Commit b8b73994 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: cxt1e1: rename global log_level variable

The driver should not have such a generic global variable name.
Reported-by: default avatarZimny Lech <napohybelskurwysynom2010@gmail.com>
Cc: Bob Beers <bob.beers@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent bc657f6e
......@@ -29,7 +29,7 @@
#endif
extern int log_level;
extern int cxt1e1_log_level;
#define COMET_NUM_SAMPLES 24 /* Number of entries in the waveform table */
#define COMET_NUM_UNITS 5 /* Number of points per entry in table */
......@@ -292,12 +292,12 @@ init_comet (void *ci, comet_t * comet, u_int32_t port_mode, int clockmaster,
* i.e.FPMODE=0 (@0x20) */
if ((moreParams & CFG_CLK_PORT_MASK) == CFG_CLK_PORT_INTERNAL)
{
if (log_level >= LOG_SBEBUG12)
if (cxt1e1_log_level >= LOG_SBEBUG12)
pr_info(">> %s: clockmaster internal clock\n", __func__);
pci_write_32 ((u_int32_t *) &comet->tx_time, 0x0d); /* internal oscillator */
} else /* external clock source */
{
if (log_level >= LOG_SBEBUG12)
if (cxt1e1_log_level >= LOG_SBEBUG12)
pr_info(">> %s: clockmaster external clock\n", __func__);
pci_write_32 ((u_int32_t *) &comet->tx_time, 0x09); /* loop timing
* (external) */
......@@ -312,7 +312,7 @@ init_comet (void *ci, comet_t * comet, u_int32_t port_mode, int clockmaster,
pci_write_32 ((u_int32_t *) &comet->brif_cfg, 0x21); /* Slave Mode (CMODE=1) */
pci_write_32 ((u_int32_t *) &comet->brif_fpcfg, 0x20); /* Slave Mode i.e.
* FPMODE=1 (@0x20) */
if (log_level >= LOG_SBEBUG12)
if (cxt1e1_log_level >= LOG_SBEBUG12)
pr_info(">> %s: clockslave internal clock\n", __func__);
pci_write_32 ((u_int32_t *) &comet->tx_time, 0x0d); /* oscillator timing */
}
......
......@@ -54,7 +54,7 @@ static int dummy = 0;
#endif
extern int log_level;
extern int cxt1e1_log_level;
extern int drvr_state;
......@@ -67,7 +67,7 @@ pci_read_32 (u_int32_t *p)
FLUSH_PCI_READ ();
v = le32_to_cpu (*p);
if (log_level >= LOG_DEBUG)
if (cxt1e1_log_level >= LOG_DEBUG)
pr_info("pci_read : %x = %x\n", (u_int32_t) p, v);
return v;
#else
......@@ -80,7 +80,7 @@ void
pci_write_32 (u_int32_t *p, u_int32_t v)
{
#ifdef FLOW_DEBUG
if (log_level >= LOG_DEBUG)
if (cxt1e1_log_level >= LOG_DEBUG)
pr_info("pci_write: %x = %x\n", (u_int32_t) p, v);
#endif
*p = cpu_to_le32 (v);
......@@ -118,7 +118,7 @@ watchdog_func (unsigned long arg)
if (drvr_state != SBE_DRVR_AVAILABLE)
{
if (log_level >= LOG_MONITOR)
if (cxt1e1_log_level >= LOG_MONITOR)
pr_warning("%s: drvr not available (%x)\n", __func__, drvr_state);
return;
}
......
......@@ -37,7 +37,7 @@
#define STATIC static
#endif
extern int log_level;
extern int cxt1e1_log_level;
extern int error_flag;
extern int drvr_state;
......@@ -143,7 +143,7 @@ hdw_sn_get (hdw_info_t * hi, int brdno)
if ((hi->promfmt = pmc_verify_cksum (&hi->mfg_info.data)) == PROM_FORMAT_Unk)
{
/* bad crc, data is suspect */
if (log_level >= LOG_WARN)
if (cxt1e1_log_level >= LOG_WARN)
pr_info("%s: EEPROM cksum error\n", hi->devname);
hi->mfg_info_sts = EEPROM_CRCERR;
} else
......
......@@ -108,9 +108,9 @@ extern int unregister_hdlc_device_v7 (hdlc_device *);
#endif
int error_flag; /* module load error reporting */
int log_level = LOG_ERROR;
int cxt1e1_log_level = LOG_ERROR;
int log_level_default = LOG_ERROR;
module_param(log_level, int, 0444);
module_param(cxt1e1_log_level, int, 0444);
int cxt1e1_max_mru = MUSYCC_MRU;
int max_mru_default = MUSYCC_MRU;
......@@ -497,7 +497,7 @@ create_chan (struct net_device * ndev, ci_t * ci,
rtnl_lock (); /* needed due to Ioctl calling sequence */
if (ret)
{
if (log_level >= LOG_WARN)
if (cxt1e1_log_level >= LOG_WARN)
pr_info("%s: create_chan[%d] registration error = %d.\n",
ci->devname, cp->channum, ret);
free_netdev (dev); /* cleanup */
......@@ -722,11 +722,11 @@ do_get_chan_stats (struct net_device * ndev, void *data)
STATIC status_t
do_set_loglevel (struct net_device * ndev, void *data)
{
unsigned int log_level;
unsigned int cxt1e1_log_level;
if (copy_from_user (&log_level, data, sizeof (int)))
if (copy_from_user (&cxt1e1_log_level, data, sizeof (int)))
return -EFAULT;
sbecom_set_loglevel (log_level);
sbecom_set_loglevel (cxt1e1_log_level);
return 0;
}
......@@ -1115,9 +1115,9 @@ c4_mod_init (void)
return -rtn; /* installation failure - see system log */
/* housekeeping notifications */
if (log_level != log_level_default)
pr_info("NOTE: driver parameter <log_level> changed from default %d to %d.\n",
log_level_default, log_level);
if (cxt1e1_log_level != log_level_default)
pr_info("NOTE: driver parameter <cxt1e1_log_level> changed from default %d to %d.\n",
log_level_default, cxt1e1_log_level);
if (cxt1e1_max_mru != max_mru_default)
pr_info("NOTE: driver parameter <cxt1e1_max_mru> changed from default %d to %d.\n",
max_mru_default, cxt1e1_max_mru);
......
This diff is collapsed.
......@@ -135,7 +135,7 @@ void musycc_serv_req (mpi_t *, u_int32_t);
void musycc_update_timeslots (mpi_t *);
extern void musycc_update_tx_thp (mch_t *);
extern int log_level;
extern int cxt1e1_log_level;
extern int cxt1e1_max_mru;
extern int cxt1e1_max_mtu;
extern int max_rxdesc_used, max_rxdesc_default;
......@@ -168,12 +168,12 @@ sbecom_set_loglevel (int d)
* for card 0 only */
} else
{
if (log_level != d)
if (cxt1e1_log_level != d)
{
pr_info("log level changed from %d to %d\n", log_level, d);
log_level = d; /* set new */
pr_info("log level changed from %d to %d\n", cxt1e1_log_level, d);
cxt1e1_log_level = d; /* set new */
} else
pr_info("log level is %d\n", log_level);
pr_info("log level is %d\n", cxt1e1_log_level);
}
}
......@@ -513,7 +513,7 @@ checkPorts (ci_t * ci)
if ((value == 0x1c) || (value == 0x19) || (value == 0x12))
c4_loop_port (ci, portnum, COMET_MDIAG_LBOFF); /* take port out of any
* loopbk mode */
if (log_level >= LOG_DEBUG)
if (cxt1e1_log_level >= LOG_DEBUG)
if (value != 0x3f)
pr_warning("%s: BOC value = %x on Port %d\n",
ci->devname, value, portnum);
......@@ -533,7 +533,7 @@ c4_watchdog (ci_t * ci)
{
if (drvr_state != SBE_DRVR_AVAILABLE)
{
if (log_level >= LOG_MONITOR)
if (cxt1e1_log_level >= LOG_MONITOR)
pr_info("drvr not available (%x)\n", drvr_state);
return;
}
......@@ -794,19 +794,19 @@ c4_loop_port (ci_t * ci, int portnum, u_int8_t cmd)
}
pci_write_32 ((u_int32_t *) &comet->mdiag, cmd);
if (log_level >= LOG_WARN)
if (cxt1e1_log_level >= LOG_WARN)
pr_info("%s: loopback mode changed to %2x from %2x on Port %d\n",
ci->devname, cmd, loopValue, portnum);
loopValue = pci_read_32 ((u_int32_t *) &comet->mdiag) & COMET_MDIAG_LBMASK;
if (loopValue != cmd)
{
if (log_level >= LOG_ERROR)
if (cxt1e1_log_level >= LOG_ERROR)
pr_info("%s: write to loop register failed, unknown state for Port %d\n",
ci->devname, portnum);
}
} else
{
if (log_level >= LOG_WARN)
if (cxt1e1_log_level >= LOG_WARN)
pr_info("%s: loopback already in that mode (%2x)\n",
ci->devname, loopValue);
}
......@@ -997,7 +997,7 @@ c4_set_port (ci_t * ci, int portnum)
pi = &ci->port[portnum];
pp = &ci->port[portnum].p;
e1mode = IS_FRAME_ANY_E1 (pp->port_mode);
if (log_level >= LOG_MONITOR2)
if (cxt1e1_log_level >= LOG_MONITOR2)
{
pr_info("%s: c4_set_port[%d]: entered, e1mode = %x, openchans %d.\n",
ci->devname,
......@@ -1278,12 +1278,12 @@ c4_fifo_alloc (mpi_t * pi, int chan, int *len)
}
if (max != *len)
{
if (log_level >= LOG_WARN)
if (cxt1e1_log_level >= LOG_WARN)
pr_info("%s: wanted to allocate %d fifo space, but got only %d\n",
pi->up->devname, *len, max);
*len = max;
}
if (log_level >= LOG_DEBUG)
if (cxt1e1_log_level >= LOG_DEBUG)
pr_info("%s: allocated %d fifo at %d for channel %d/%d\n",
pi->up->devname, max, start, chan, pi->p.portnum);
for (i = maxstart; i < (maxstart + max); i++)
......@@ -1296,7 +1296,7 @@ c4_fifo_free (mpi_t * pi, int chan)
{
int i;
if (log_level >= LOG_DEBUG)
if (cxt1e1_log_level >= LOG_DEBUG)
pr_info("%s: deallocated fifo for channel %d/%d\n",
pi->up->devname, chan, pi->p.portnum);
for (i = 0; i < 32; i++)
......@@ -1321,7 +1321,7 @@ c4_chan_up (ci_t * ci, int channum)
return ENOENT;
if (ch->state == UP)
{
if (log_level >= LOG_MONITOR)
if (cxt1e1_log_level >= LOG_MONITOR)
pr_info("%s: channel already UP, graceful early exit\n",
ci->devname);
return 0;
......@@ -1334,7 +1334,7 @@ c4_chan_up (ci_t * ci, int channum)
{
if (ch->p.bitmask[i] & pi->tsm[i])
{
if (1 || log_level >= LOG_WARN)
if (1 || cxt1e1_log_level >= LOG_WARN)
{
pr_info("%s: c4_chan_up[%d] EINVAL (attempt to cfg in-use or unavailable TimeSlot[%d])\n",
ci->devname, channum, i);
......@@ -1351,7 +1351,7 @@ c4_chan_up (ci_t * ci, int channum)
nbuf = nts / 8 ? nts / 8 : 1;
if (!nbuf)
{
/* if( log_level >= LOG_WARN) */
/* if( cxt1e1_log_level >= LOG_WARN) */
pr_info("%s: c4_chan_up[%d] ENOBUFS (no TimeSlots assigned)\n",
ci->devname, channum);
return ENOBUFS; /* this should not happen */
......@@ -1420,7 +1420,7 @@ c4_chan_up (ci_t * ci, int channum)
#if 0
/* DEBUG INFO */
if (log_level >= LOG_MONITOR)
if (cxt1e1_log_level >= LOG_MONITOR)
pr_info("%s: mode %x rxnum %d (rxused %d def %d) txnum %d (txused %d def %d)\n",
ci->devname, ch->p.chan_mode,
rxnum, max_rxdesc_used, max_rxdesc_default,
......@@ -1451,7 +1451,7 @@ c4_chan_up (ci_t * ci, int channum)
if (!(m = OS_mem_token_alloc (cxt1e1_max_mru)))
{
if (log_level >= LOG_MONITOR)
if (cxt1e1_log_level >= LOG_MONITOR)
pr_info("%s: c4_chan_up[%d] - token alloc failure, size = %d.\n",
ci->devname, channum, cxt1e1_max_mru);
goto errfree;
......
......@@ -86,7 +86,7 @@ pci_read_32 (u_int32_t *p)
FLUSH_PCI_READ ();
v = le32_to_cpu (*p);
if (log_level >= LOG_DEBUG)
if (cxt1e1_log_level >= LOG_DEBUG)
pr_info("pci_read : %x = %x\n", (u_int32_t) p, v);
return v;
#else
......@@ -99,7 +99,7 @@ static inline void
pci_write_32 (u_int32_t *p, u_int32_t v)
{
#ifdef FLOW_DEBUG
if (log_level >= LOG_DEBUG)
if (cxt1e1_log_level >= LOG_DEBUG)
pr_info("pci_write: %x = %x\n", (u_int32_t) p, v);
#endif
*p = cpu_to_le32 (v);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment