aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/cxt1e1
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/cxt1e1')
-rw-r--r--drivers/staging/cxt1e1/comet.c8
-rw-r--r--drivers/staging/cxt1e1/functions.c8
-rw-r--r--drivers/staging/cxt1e1/hwprobe.c4
-rw-r--r--drivers/staging/cxt1e1/linux.c18
-rw-r--r--drivers/staging/cxt1e1/musycc.c58
-rw-r--r--drivers/staging/cxt1e1/pmcc4_drv.c38
-rw-r--r--drivers/staging/cxt1e1/sbecom_inline_linux.h4
7 files changed, 69 insertions, 69 deletions
diff --git a/drivers/staging/cxt1e1/comet.c b/drivers/staging/cxt1e1/comet.c
index dcbe6b62845..52224cdc967 100644
--- a/drivers/staging/cxt1e1/comet.c
+++ b/drivers/staging/cxt1e1/comet.c
@@ -29,7 +29,7 @@
29#endif 29#endif
30 30
31 31
32extern int log_level; 32extern int cxt1e1_log_level;
33 33
34#define COMET_NUM_SAMPLES 24 /* Number of entries in the waveform table */ 34#define COMET_NUM_SAMPLES 24 /* Number of entries in the waveform table */
35#define COMET_NUM_UNITS 5 /* Number of points per entry in table */ 35#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,
292 * i.e.FPMODE=0 (@0x20) */ 292 * i.e.FPMODE=0 (@0x20) */
293 if ((moreParams & CFG_CLK_PORT_MASK) == CFG_CLK_PORT_INTERNAL) 293 if ((moreParams & CFG_CLK_PORT_MASK) == CFG_CLK_PORT_INTERNAL)
294 { 294 {
295 if (log_level >= LOG_SBEBUG12) 295 if (cxt1e1_log_level >= LOG_SBEBUG12)
296 pr_info(">> %s: clockmaster internal clock\n", __func__); 296 pr_info(">> %s: clockmaster internal clock\n", __func__);
297 pci_write_32 ((u_int32_t *) &comet->tx_time, 0x0d); /* internal oscillator */ 297 pci_write_32 ((u_int32_t *) &comet->tx_time, 0x0d); /* internal oscillator */
298 } else /* external clock source */ 298 } else /* external clock source */
299 { 299 {
300 if (log_level >= LOG_SBEBUG12) 300 if (cxt1e1_log_level >= LOG_SBEBUG12)
301 pr_info(">> %s: clockmaster external clock\n", __func__); 301 pr_info(">> %s: clockmaster external clock\n", __func__);
302 pci_write_32 ((u_int32_t *) &comet->tx_time, 0x09); /* loop timing 302 pci_write_32 ((u_int32_t *) &comet->tx_time, 0x09); /* loop timing
303 * (external) */ 303 * (external) */
@@ -312,7 +312,7 @@ init_comet (void *ci, comet_t * comet, u_int32_t port_mode, int clockmaster,
312 pci_write_32 ((u_int32_t *) &comet->brif_cfg, 0x21); /* Slave Mode (CMODE=1) */ 312 pci_write_32 ((u_int32_t *) &comet->brif_cfg, 0x21); /* Slave Mode (CMODE=1) */
313 pci_write_32 ((u_int32_t *) &comet->brif_fpcfg, 0x20); /* Slave Mode i.e. 313 pci_write_32 ((u_int32_t *) &comet->brif_fpcfg, 0x20); /* Slave Mode i.e.
314 * FPMODE=1 (@0x20) */ 314 * FPMODE=1 (@0x20) */
315 if (log_level >= LOG_SBEBUG12) 315 if (cxt1e1_log_level >= LOG_SBEBUG12)
316 pr_info(">> %s: clockslave internal clock\n", __func__); 316 pr_info(">> %s: clockslave internal clock\n", __func__);
317 pci_write_32 ((u_int32_t *) &comet->tx_time, 0x0d); /* oscillator timing */ 317 pci_write_32 ((u_int32_t *) &comet->tx_time, 0x0d); /* oscillator timing */
318 } 318 }
diff --git a/drivers/staging/cxt1e1/functions.c b/drivers/staging/cxt1e1/functions.c
index ab399c2f748..d9a9aa3571d 100644
--- a/drivers/staging/cxt1e1/functions.c
+++ b/drivers/staging/cxt1e1/functions.c
@@ -54,7 +54,7 @@ static int dummy = 0;
54 54
55#endif 55#endif
56 56
57extern int log_level; 57extern int cxt1e1_log_level;
58extern int drvr_state; 58extern int drvr_state;
59 59
60 60
@@ -67,7 +67,7 @@ pci_read_32 (u_int32_t *p)
67 67
68 FLUSH_PCI_READ (); 68 FLUSH_PCI_READ ();
69 v = le32_to_cpu (*p); 69 v = le32_to_cpu (*p);
70 if (log_level >= LOG_DEBUG) 70 if (cxt1e1_log_level >= LOG_DEBUG)
71 pr_info("pci_read : %x = %x\n", (u_int32_t) p, v); 71 pr_info("pci_read : %x = %x\n", (u_int32_t) p, v);
72 return v; 72 return v;
73#else 73#else
@@ -80,7 +80,7 @@ void
80pci_write_32 (u_int32_t *p, u_int32_t v) 80pci_write_32 (u_int32_t *p, u_int32_t v)
81{ 81{
82#ifdef FLOW_DEBUG 82#ifdef FLOW_DEBUG
83 if (log_level >= LOG_DEBUG) 83 if (cxt1e1_log_level >= LOG_DEBUG)
84 pr_info("pci_write: %x = %x\n", (u_int32_t) p, v); 84 pr_info("pci_write: %x = %x\n", (u_int32_t) p, v);
85#endif 85#endif
86 *p = cpu_to_le32 (v); 86 *p = cpu_to_le32 (v);
@@ -118,7 +118,7 @@ watchdog_func (unsigned long arg)
118 118
119 if (drvr_state != SBE_DRVR_AVAILABLE) 119 if (drvr_state != SBE_DRVR_AVAILABLE)
120 { 120 {
121 if (log_level >= LOG_MONITOR) 121 if (cxt1e1_log_level >= LOG_MONITOR)
122 pr_warning("%s: drvr not available (%x)\n", __func__, drvr_state); 122 pr_warning("%s: drvr not available (%x)\n", __func__, drvr_state);
123 return; 123 return;
124 } 124 }
diff --git a/drivers/staging/cxt1e1/hwprobe.c b/drivers/staging/cxt1e1/hwprobe.c
index 89200e7af26..c517cc22f39 100644
--- a/drivers/staging/cxt1e1/hwprobe.c
+++ b/drivers/staging/cxt1e1/hwprobe.c
@@ -37,7 +37,7 @@
37#define STATIC static 37#define STATIC static
38#endif 38#endif
39 39
40extern int log_level; 40extern int cxt1e1_log_level;
41extern int error_flag; 41extern int error_flag;
42extern int drvr_state; 42extern int drvr_state;
43 43
@@ -143,7 +143,7 @@ hdw_sn_get (hdw_info_t * hi, int brdno)
143 if ((hi->promfmt = pmc_verify_cksum (&hi->mfg_info.data)) == PROM_FORMAT_Unk) 143 if ((hi->promfmt = pmc_verify_cksum (&hi->mfg_info.data)) == PROM_FORMAT_Unk)
144 { 144 {
145 /* bad crc, data is suspect */ 145 /* bad crc, data is suspect */
146 if (log_level >= LOG_WARN) 146 if (cxt1e1_log_level >= LOG_WARN)
147 pr_info("%s: EEPROM cksum error\n", hi->devname); 147 pr_info("%s: EEPROM cksum error\n", hi->devname);
148 hi->mfg_info_sts = EEPROM_CRCERR; 148 hi->mfg_info_sts = EEPROM_CRCERR;
149 } else 149 } else
diff --git a/drivers/staging/cxt1e1/linux.c b/drivers/staging/cxt1e1/linux.c
index c7930287e3d..0f78f896275 100644
--- a/drivers/staging/cxt1e1/linux.c
+++ b/drivers/staging/cxt1e1/linux.c
@@ -108,9 +108,9 @@ extern int unregister_hdlc_device_v7 (hdlc_device *);
108#endif 108#endif
109 109
110int error_flag; /* module load error reporting */ 110int error_flag; /* module load error reporting */
111int log_level = LOG_ERROR; 111int cxt1e1_log_level = LOG_ERROR;
112int log_level_default = LOG_ERROR; 112int log_level_default = LOG_ERROR;
113module_param(log_level, int, 0444); 113module_param(cxt1e1_log_level, int, 0444);
114 114
115int cxt1e1_max_mru = MUSYCC_MRU; 115int cxt1e1_max_mru = MUSYCC_MRU;
116int max_mru_default = MUSYCC_MRU; 116int max_mru_default = MUSYCC_MRU;
@@ -497,7 +497,7 @@ create_chan (struct net_device * ndev, ci_t * ci,
497 rtnl_lock (); /* needed due to Ioctl calling sequence */ 497 rtnl_lock (); /* needed due to Ioctl calling sequence */
498 if (ret) 498 if (ret)
499 { 499 {
500 if (log_level >= LOG_WARN) 500 if (cxt1e1_log_level >= LOG_WARN)
501 pr_info("%s: create_chan[%d] registration error = %d.\n", 501 pr_info("%s: create_chan[%d] registration error = %d.\n",
502 ci->devname, cp->channum, ret); 502 ci->devname, cp->channum, ret);
503 free_netdev (dev); /* cleanup */ 503 free_netdev (dev); /* cleanup */
@@ -722,11 +722,11 @@ do_get_chan_stats (struct net_device * ndev, void *data)
722STATIC status_t 722STATIC status_t
723do_set_loglevel (struct net_device * ndev, void *data) 723do_set_loglevel (struct net_device * ndev, void *data)
724{ 724{
725 unsigned int log_level; 725 unsigned int cxt1e1_log_level;
726 726
727 if (copy_from_user (&log_level, data, sizeof (int))) 727 if (copy_from_user (&cxt1e1_log_level, data, sizeof (int)))
728 return -EFAULT; 728 return -EFAULT;
729 sbecom_set_loglevel (log_level); 729 sbecom_set_loglevel (cxt1e1_log_level);
730 return 0; 730 return 0;
731} 731}
732 732
@@ -1115,9 +1115,9 @@ c4_mod_init (void)
1115 return -rtn; /* installation failure - see system log */ 1115 return -rtn; /* installation failure - see system log */
1116 1116
1117 /* housekeeping notifications */ 1117 /* housekeeping notifications */
1118 if (log_level != log_level_default) 1118 if (cxt1e1_log_level != log_level_default)
1119 pr_info("NOTE: driver parameter <log_level> changed from default %d to %d.\n", 1119 pr_info("NOTE: driver parameter <cxt1e1_log_level> changed from default %d to %d.\n",
1120 log_level_default, log_level); 1120 log_level_default, cxt1e1_log_level);
1121 if (cxt1e1_max_mru != max_mru_default) 1121 if (cxt1e1_max_mru != max_mru_default)
1122 pr_info("NOTE: driver parameter <cxt1e1_max_mru> changed from default %d to %d.\n", 1122 pr_info("NOTE: driver parameter <cxt1e1_max_mru> changed from default %d to %d.\n",
1123 max_mru_default, cxt1e1_max_mru); 1123 max_mru_default, cxt1e1_max_mru);
diff --git a/drivers/staging/cxt1e1/musycc.c b/drivers/staging/cxt1e1/musycc.c
index fc15610f697..f274c77fb3f 100644
--- a/drivers/staging/cxt1e1/musycc.c
+++ b/drivers/staging/cxt1e1/musycc.c
@@ -97,7 +97,7 @@ char SBEid_pmcc4_musyccc[] =
97/* global driver variables */ 97/* global driver variables */
98extern ci_t *c4_list; 98extern ci_t *c4_list;
99extern int drvr_state; 99extern int drvr_state;
100extern int log_level; 100extern int cxt1e1_log_level;
101 101
102extern int cxt1e1_max_mru; 102extern int cxt1e1_max_mru;
103extern int cxt1e1_max_mtu; 103extern int cxt1e1_max_mtu;
@@ -627,7 +627,7 @@ rewrite:
627 627
628 if ((r != req) && (req != SR_CHIP_RESET) && (++rcnt <= MUSYCC_SR_RETRY_CNT)) 628 if ((r != req) && (req != SR_CHIP_RESET) && (++rcnt <= MUSYCC_SR_RETRY_CNT))
629 { 629 {
630 if (log_level >= LOG_MONITOR) 630 if (cxt1e1_log_level >= LOG_MONITOR)
631 pr_info("%s: %d - reissue srv req/last %x/%x (hdw reads %x), Chan %d.\n", 631 pr_info("%s: %d - reissue srv req/last %x/%x (hdw reads %x), Chan %d.\n",
632 pi->up->devname, rcnt, req, pi->sr_last, r, 632 pi->up->devname, rcnt, req, pi->sr_last, r,
633 (pi->portnum * MUSYCC_NCHANS) + (req & 0x1f)); 633 (pi->portnum * MUSYCC_NCHANS) + (req & 0x1f));
@@ -951,7 +951,7 @@ musycc_bh_tx_eom (mpi_t * pi, int gchan)
951 ch = pi->chan[gchan]; 951 ch = pi->chan[gchan];
952 if (ch == 0 || ch->state != UP) 952 if (ch == 0 || ch->state != UP)
953 { 953 {
954 if (log_level >= LOG_ERROR) 954 if (cxt1e1_log_level >= LOG_ERROR)
955 pr_info("%s: intr: xmit EOM on uninitialized channel %d\n", 955 pr_info("%s: intr: xmit EOM on uninitialized channel %d\n",
956 pi->up->devname, gchan); 956 pi->up->devname, gchan);
957 } 957 }
@@ -1002,7 +1002,7 @@ musycc_bh_tx_eom (mpi_t * pi, int gchan)
1002 } 1002 }
1003 if (status & MUSYCC_TX_OWNED) 1003 if (status & MUSYCC_TX_OWNED)
1004 { 1004 {
1005 if (log_level >= LOG_MONITOR) 1005 if (cxt1e1_log_level >= LOG_MONITOR)
1006 { 1006 {
1007 pr_info("%s: Port %d Chan %2d - unexpected TX msg ownership intr (md %p sts %x)\n", 1007 pr_info("%s: Port %d Chan %2d - unexpected TX msg ownership intr (md %p sts %x)\n",
1008 pi->up->devname, pi->portnum, ch->channum, 1008 pi->up->devname, pi->portnum, ch->channum,
@@ -1016,7 +1016,7 @@ musycc_bh_tx_eom (mpi_t * pi, int gchan)
1016 break; /* Not our mdesc, done */ 1016 break; /* Not our mdesc, done */
1017 } else 1017 } else
1018 { 1018 {
1019 if (log_level >= LOG_MONITOR) 1019 if (cxt1e1_log_level >= LOG_MONITOR)
1020 pr_info("%s: Port %d Chan %2d - recovered TX msg ownership [%d] (md %p sts %x)\n", 1020 pr_info("%s: Port %d Chan %2d - recovered TX msg ownership [%d] (md %p sts %x)\n",
1021 pi->up->devname, pi->portnum, ch->channum, readCount, md, status); 1021 pi->up->devname, pi->portnum, ch->channum, readCount, md, status);
1022 } 1022 }
@@ -1054,7 +1054,7 @@ musycc_bh_tx_eom (mpi_t * pi, int gchan)
1054 } 1054 }
1055 md->status = 0; 1055 md->status = 0;
1056#ifdef RLD_TXFULL_DEBUG 1056#ifdef RLD_TXFULL_DEBUG
1057 if (log_level >= LOG_MONITOR2) 1057 if (cxt1e1_log_level >= LOG_MONITOR2)
1058 pr_info("~~ tx_eom: tx_full %x txd_free %d -> %d\n", 1058 pr_info("~~ tx_eom: tx_full %x txd_free %d -> %d\n",
1059 ch->tx_full, ch->txd_free, ch->txd_free + 1); 1059 ch->tx_full, ch->txd_free, ch->txd_free + 1);
1060#endif 1060#endif
@@ -1063,7 +1063,7 @@ musycc_bh_tx_eom (mpi_t * pi, int gchan)
1063 1063
1064 if ((ch->p.chan_mode != CFG_CH_PROTO_TRANS) && (status & EOBIRQ_ENABLE)) 1064 if ((ch->p.chan_mode != CFG_CH_PROTO_TRANS) && (status & EOBIRQ_ENABLE))
1065 { 1065 {
1066 if (log_level >= LOG_MONITOR) 1066 if (cxt1e1_log_level >= LOG_MONITOR)
1067 pr_info("%s: Mode (%x) incorrect EOB status (%x)\n", 1067 pr_info("%s: Mode (%x) incorrect EOB status (%x)\n",
1068 pi->up->devname, ch->p.chan_mode, status); 1068 pi->up->devname, ch->p.chan_mode, status);
1069 if ((status & EOMIRQ_ENABLE) == 0) 1069 if ((status & EOMIRQ_ENABLE) == 0)
@@ -1094,7 +1094,7 @@ musycc_bh_tx_eom (mpi_t * pi, int gchan)
1094 { 1094 {
1095 1095
1096#ifdef RLD_TXFULL_DEBUG 1096#ifdef RLD_TXFULL_DEBUG
1097 if (log_level >= LOG_MONITOR2) 1097 if (cxt1e1_log_level >= LOG_MONITOR2)
1098 pr_info("tx_eom[%d]: enable xmit tx_full no more, txd_free %d txd_num/2 %d\n", 1098 pr_info("tx_eom[%d]: enable xmit tx_full no more, txd_free %d txd_num/2 %d\n",
1099 ch->channum, 1099 ch->channum,
1100 ch->txd_free, ch->txd_num / 2); 1100 ch->txd_free, ch->txd_num / 2);
@@ -1108,7 +1108,7 @@ musycc_bh_tx_eom (mpi_t * pi, int gchan)
1108#ifdef RLD_TXFULL_DEBUG 1108#ifdef RLD_TXFULL_DEBUG
1109 else if (ch->tx_full) 1109 else if (ch->tx_full)
1110 { 1110 {
1111 if (log_level >= LOG_MONITOR2) 1111 if (cxt1e1_log_level >= LOG_MONITOR2)
1112 pr_info("tx_eom[%d]: bypass TX enable though room available? (txd_free %d txd_num/2 %d)\n", 1112 pr_info("tx_eom[%d]: bypass TX enable though room available? (txd_free %d txd_num/2 %d)\n",
1113 ch->channum, 1113 ch->channum,
1114 ch->txd_free, ch->txd_num / 2); 1114 ch->txd_free, ch->txd_num / 2);
@@ -1138,7 +1138,7 @@ musycc_bh_rx_eom (mpi_t * pi, int gchan)
1138 ch = pi->chan[gchan]; 1138 ch = pi->chan[gchan];
1139 if (ch == 0 || ch->state != UP) 1139 if (ch == 0 || ch->state != UP)
1140 { 1140 {
1141 if (log_level > LOG_ERROR) 1141 if (cxt1e1_log_level > LOG_ERROR)
1142 pr_info("%s: intr: receive EOM on uninitialized channel %d\n", 1142 pr_info("%s: intr: receive EOM on uninitialized channel %d\n",
1143 pi->up->devname, gchan); 1143 pi->up->devname, gchan);
1144 return; 1144 return;
@@ -1269,7 +1269,7 @@ musycc_intr_th_handler (void *devp)
1269 1269
1270 if (nextInt != INTRPTS_NEXTINT (ci->intlog.this_status_new)) 1270 if (nextInt != INTRPTS_NEXTINT (ci->intlog.this_status_new))
1271 { 1271 {
1272 if (log_level >= LOG_MONITOR) 1272 if (cxt1e1_log_level >= LOG_MONITOR)
1273 { 1273 {
1274 pr_info("%s: note - updated ISD from %08x to %08x\n", 1274 pr_info("%s: note - updated ISD from %08x to %08x\n",
1275 ci->devname, status, 1275 ci->devname, status,
@@ -1337,11 +1337,11 @@ musycc_intr_th_handler (void *devp)
1337 ci->intlog.last_status_new = ci->intlog.this_status_new; 1337 ci->intlog.last_status_new = ci->intlog.this_status_new;
1338 ci->intlog.this_status_new = currInt; 1338 ci->intlog.this_status_new = currInt;
1339 1339
1340 if ((log_level >= LOG_WARN) && (status & INTRPTS_INTFULL_M)) 1340 if ((cxt1e1_log_level >= LOG_WARN) && (status & INTRPTS_INTFULL_M))
1341 { 1341 {
1342 pr_info("%s: Interrupt queue full condition occurred\n", ci->devname); 1342 pr_info("%s: Interrupt queue full condition occurred\n", ci->devname);
1343 } 1343 }
1344 if (log_level >= LOG_DEBUG) 1344 if (cxt1e1_log_level >= LOG_DEBUG)
1345 pr_info("%s: interrupts pending, isd @ 0x%p: %x curr %d cnt %d NEXT %d\n", 1345 pr_info("%s: interrupts pending, isd @ 0x%p: %x curr %d cnt %d NEXT %d\n",
1346 ci->devname, &ci->reg->isd, 1346 ci->devname, &ci->reg->isd,
1347 status, nextInt, intCnt, (intCnt + nextInt) & (INT_QUEUE_SIZE - 1)); 1347 status, nextInt, intCnt, (intCnt + nextInt) & (INT_QUEUE_SIZE - 1));
@@ -1448,7 +1448,7 @@ musycc_intr_bh_tasklet (ci_t * ci)
1448 if ((currInt == badInt) || (currInt == badInt2)) /* catch failure of Bug 1448 if ((currInt == badInt) || (currInt == badInt2)) /* catch failure of Bug
1449 * Fix checking */ 1449 * Fix checking */
1450 { 1450 {
1451 if (log_level >= LOG_WARN) 1451 if (cxt1e1_log_level >= LOG_WARN)
1452 pr_info("%s: Illegal Interrupt Detected @ 0x%p, mod %d.)\n", 1452 pr_info("%s: Illegal Interrupt Detected @ 0x%p, mod %d.)\n",
1453 ci->devname, &ci->iqd_p[headx], headx); 1453 ci->devname, &ci->iqd_p[headx], headx);
1454 1454
@@ -1483,7 +1483,7 @@ musycc_intr_bh_tasklet (ci_t * ci)
1483 ci->iqd_p[headx] = __constant_cpu_to_le32 (INT_EMPTY_ENTRY); 1483 ci->iqd_p[headx] = __constant_cpu_to_le32 (INT_EMPTY_ENTRY);
1484 FLUSH_MEM_WRITE (); 1484 FLUSH_MEM_WRITE ();
1485 1485
1486 if (log_level >= LOG_DEBUG) 1486 if (cxt1e1_log_level >= LOG_DEBUG)
1487 { 1487 {
1488 if (err != 0) 1488 if (err != 0)
1489 pr_info(" %08x -> err: %2d,", currInt, err); 1489 pr_info(" %08x -> err: %2d,", currInt, err);
@@ -1497,7 +1497,7 @@ musycc_intr_bh_tasklet (ci_t * ci)
1497 switch (event) 1497 switch (event)
1498 { 1498 {
1499 case EVE_SACK: /* Service Request Acknowledge */ 1499 case EVE_SACK: /* Service Request Acknowledge */
1500 if (log_level >= LOG_DEBUG) 1500 if (cxt1e1_log_level >= LOG_DEBUG)
1501 { 1501 {
1502 volatile u_int32_t r; 1502 volatile u_int32_t r;
1503 1503
@@ -1534,7 +1534,7 @@ musycc_intr_bh_tasklet (ci_t * ci)
1534 } 1534 }
1535 break; 1535 break;
1536 default: 1536 default:
1537 if (log_level >= LOG_WARN) 1537 if (cxt1e1_log_level >= LOG_WARN)
1538 pr_info("%s: unexpected interrupt event: %d, iqd[%d]: %08x, port: %d\n", ci->devname, 1538 pr_info("%s: unexpected interrupt event: %d, iqd[%d]: %08x, port: %d\n", ci->devname,
1539 event, headx, currInt, group); 1539 event, headx, currInt, group);
1540 break; 1540 break;
@@ -1573,9 +1573,9 @@ musycc_intr_bh_tasklet (ci_t * ci)
1573 1573
1574 { 1574 {
1575#ifdef RLD_TRANS_DEBUG 1575#ifdef RLD_TRANS_DEBUG
1576 if (1 || log_level >= LOG_MONITOR) 1576 if (1 || cxt1e1_log_level >= LOG_MONITOR)
1577#else 1577#else
1578 if (log_level >= LOG_MONITOR) 1578 if (cxt1e1_log_level >= LOG_MONITOR)
1579#endif 1579#endif
1580 { 1580 {
1581 pr_info("%s: TX buffer underflow [ONR] on channel %d, mode %x QStopped %x free %d\n", 1581 pr_info("%s: TX buffer underflow [ONR] on channel %d, mode %x QStopped %x free %d\n",
@@ -1605,7 +1605,7 @@ musycc_intr_bh_tasklet (ci_t * ci)
1605 ch->s.rx_over_errors++; 1605 ch->s.rx_over_errors++;
1606 ch->ch_start_rx = CH_START_RX_ONR; 1606 ch->ch_start_rx = CH_START_RX_ONR;
1607 1607
1608 if (log_level >= LOG_WARN) 1608 if (cxt1e1_log_level >= LOG_WARN)
1609 { 1609 {
1610 pr_info("%s: RX buffer overflow [ONR] on channel %d, mode %x\n", 1610 pr_info("%s: RX buffer overflow [ONR] on channel %d, mode %x\n",
1611 ci->devname, ch->channum, ch->p.chan_mode); 1611 ci->devname, ch->channum, ch->p.chan_mode);
@@ -1623,7 +1623,7 @@ musycc_intr_bh_tasklet (ci_t * ci)
1623 * Per MUSYCC manual, Section 6.4.8.3 [Transmit Errors], 1623 * Per MUSYCC manual, Section 6.4.8.3 [Transmit Errors],
1624 * this BUFF error requires Transmit channel reactivation. 1624 * this BUFF error requires Transmit channel reactivation.
1625 */ 1625 */
1626 if (log_level >= LOG_MONITOR) 1626 if (cxt1e1_log_level >= LOG_MONITOR)
1627 pr_info("%s: TX buffer underrun [BUFF] on channel %d, mode %x\n", 1627 pr_info("%s: TX buffer underrun [BUFF] on channel %d, mode %x\n",
1628 ci->devname, ch->channum, ch->p.chan_mode); 1628 ci->devname, ch->channum, ch->p.chan_mode);
1629 } else /* RX buffer overrun */ 1629 } else /* RX buffer overrun */
@@ -1636,7 +1636,7 @@ musycc_intr_bh_tasklet (ci_t * ci)
1636 * space for this channel. Receive channel reactivation is 1636 * space for this channel. Receive channel reactivation is
1637 * not required, but data has been lost. 1637 * not required, but data has been lost.
1638 */ 1638 */
1639 if (log_level >= LOG_WARN) 1639 if (cxt1e1_log_level >= LOG_WARN)
1640 pr_info("%s: RX buffer overrun [BUFF] on channel %d, mode %x\n", 1640 pr_info("%s: RX buffer overrun [BUFF] on channel %d, mode %x\n",
1641 ci->devname, ch->channum, ch->p.chan_mode); 1641 ci->devname, ch->channum, ch->p.chan_mode);
1642 /* 1642 /*
@@ -1658,7 +1658,7 @@ musycc_intr_bh_tasklet (ci_t * ci)
1658 } /* switch on err */ 1658 } /* switch on err */
1659 1659
1660 /* Check for interrupt lost condition */ 1660 /* Check for interrupt lost condition */
1661 if ((currInt & INTRPT_ILOST_M) && (log_level >= LOG_ERROR)) 1661 if ((currInt & INTRPT_ILOST_M) && (cxt1e1_log_level >= LOG_ERROR))
1662 { 1662 {
1663 pr_info("%s: Interrupt queue overflow - ILOST asserted\n", 1663 pr_info("%s: Interrupt queue overflow - ILOST asserted\n",
1664 ci->devname); 1664 ci->devname);
@@ -1667,7 +1667,7 @@ musycc_intr_bh_tasklet (ci_t * ci)
1667 FLUSH_MEM_WRITE (); 1667 FLUSH_MEM_WRITE ();
1668 FLUSH_MEM_READ (); 1668 FLUSH_MEM_READ ();
1669 } /* while */ 1669 } /* while */
1670 if ((log_level >= LOG_MONITOR2) && (ci->iqp_headx != ci->iqp_tailx)) 1670 if ((cxt1e1_log_level >= LOG_MONITOR2) && (ci->iqp_headx != ci->iqp_tailx))
1671 { 1671 {
1672 int bh; 1672 int bh;
1673 1673
@@ -1821,9 +1821,9 @@ musycc_start_xmit (ci_t * ci, int channum, void *mem_token)
1821 return EROFS; /* how else to flag unwritable state ? */ 1821 return EROFS; /* how else to flag unwritable state ? */
1822 1822
1823#ifdef RLD_TRANS_DEBUGx 1823#ifdef RLD_TRANS_DEBUGx
1824 if (1 || log_level >= LOG_MONITOR2) 1824 if (1 || cxt1e1_log_level >= LOG_MONITOR2)
1825#else 1825#else
1826 if (log_level >= LOG_MONITOR2) 1826 if (cxt1e1_log_level >= LOG_MONITOR2)
1827#endif 1827#endif
1828 { 1828 {
1829 pr_info("++ start_xmt[%d]: state %x start %x full %d free %d required %d stopped %x\n", 1829 pr_info("++ start_xmt[%d]: state %x start %x full %d free %d required %d stopped %x\n",
@@ -1846,7 +1846,7 @@ musycc_start_xmit (ci_t * ci, int channum, void *mem_token)
1846 1846
1847 if (txd_need_cnt == 0) 1847 if (txd_need_cnt == 0)
1848 { 1848 {
1849 if (log_level >= LOG_MONITOR2) 1849 if (cxt1e1_log_level >= LOG_MONITOR2)
1850 pr_info("%s channel %d: no TX data in User buffer\n", ci->devname, channum); 1850 pr_info("%s channel %d: no TX data in User buffer\n", ci->devname, channum);
1851 OS_mem_token_free (mem_token); 1851 OS_mem_token_free (mem_token);
1852 return 0; /* no data to send */ 1852 return 0; /* no data to send */
@@ -1857,7 +1857,7 @@ musycc_start_xmit (ci_t * ci, int channum, void *mem_token)
1857 if (txd_need_cnt > ch->txd_num) /* never enough descriptors for this 1857 if (txd_need_cnt > ch->txd_num) /* never enough descriptors for this
1858 * large a buffer */ 1858 * large a buffer */
1859 { 1859 {
1860 if (log_level >= LOG_DEBUG) 1860 if (cxt1e1_log_level >= LOG_DEBUG)
1861 { 1861 {
1862 pr_info("start_xmit: discarding buffer, insufficient descriptor cnt %d, need %d.\n", 1862 pr_info("start_xmit: discarding buffer, insufficient descriptor cnt %d, need %d.\n",
1863 ch->txd_num, txd_need_cnt + 1); 1863 ch->txd_num, txd_need_cnt + 1);
@@ -1874,7 +1874,7 @@ musycc_start_xmit (ci_t * ci, int channum, void *mem_token)
1874 /************************************************************/ 1874 /************************************************************/
1875 if (txd_need_cnt > ch->txd_free) 1875 if (txd_need_cnt > ch->txd_free)
1876 { 1876 {
1877 if (log_level >= LOG_MONITOR2) 1877 if (cxt1e1_log_level >= LOG_MONITOR2)
1878 { 1878 {
1879 pr_info("start_xmit[%d]: EBUSY - need more descriptors, have %d of %d need %d\n", 1879 pr_info("start_xmit[%d]: EBUSY - need more descriptors, have %d of %d need %d\n",
1880 channum, ch->txd_free, ch->txd_num, txd_need_cnt); 1880 channum, ch->txd_free, ch->txd_num, txd_need_cnt);
diff --git a/drivers/staging/cxt1e1/pmcc4_drv.c b/drivers/staging/cxt1e1/pmcc4_drv.c
index 5c8a3eb0cfc..341e7a92f09 100644
--- a/drivers/staging/cxt1e1/pmcc4_drv.c
+++ b/drivers/staging/cxt1e1/pmcc4_drv.c
@@ -135,7 +135,7 @@ void musycc_serv_req (mpi_t *, u_int32_t);
135void musycc_update_timeslots (mpi_t *); 135void musycc_update_timeslots (mpi_t *);
136 136
137extern void musycc_update_tx_thp (mch_t *); 137extern void musycc_update_tx_thp (mch_t *);
138extern int log_level; 138extern int cxt1e1_log_level;
139extern int cxt1e1_max_mru; 139extern int cxt1e1_max_mru;
140extern int cxt1e1_max_mtu; 140extern int cxt1e1_max_mtu;
141extern int max_rxdesc_used, max_rxdesc_default; 141extern int max_rxdesc_used, max_rxdesc_default;
@@ -168,12 +168,12 @@ sbecom_set_loglevel (int d)
168 * for card 0 only */ 168 * for card 0 only */
169 } else 169 } else
170 { 170 {
171 if (log_level != d) 171 if (cxt1e1_log_level != d)
172 { 172 {
173 pr_info("log level changed from %d to %d\n", log_level, d); 173 pr_info("log level changed from %d to %d\n", cxt1e1_log_level, d);
174 log_level = d; /* set new */ 174 cxt1e1_log_level = d; /* set new */
175 } else 175 } else
176 pr_info("log level is %d\n", log_level); 176 pr_info("log level is %d\n", cxt1e1_log_level);
177 } 177 }
178} 178}
179 179
@@ -513,7 +513,7 @@ checkPorts (ci_t * ci)
513 if ((value == 0x1c) || (value == 0x19) || (value == 0x12)) 513 if ((value == 0x1c) || (value == 0x19) || (value == 0x12))
514 c4_loop_port (ci, portnum, COMET_MDIAG_LBOFF); /* take port out of any 514 c4_loop_port (ci, portnum, COMET_MDIAG_LBOFF); /* take port out of any
515 * loopbk mode */ 515 * loopbk mode */
516 if (log_level >= LOG_DEBUG) 516 if (cxt1e1_log_level >= LOG_DEBUG)
517 if (value != 0x3f) 517 if (value != 0x3f)
518 pr_warning("%s: BOC value = %x on Port %d\n", 518 pr_warning("%s: BOC value = %x on Port %d\n",
519 ci->devname, value, portnum); 519 ci->devname, value, portnum);
@@ -533,7 +533,7 @@ c4_watchdog (ci_t * ci)
533{ 533{
534 if (drvr_state != SBE_DRVR_AVAILABLE) 534 if (drvr_state != SBE_DRVR_AVAILABLE)
535 { 535 {
536 if (log_level >= LOG_MONITOR) 536 if (cxt1e1_log_level >= LOG_MONITOR)
537 pr_info("drvr not available (%x)\n", drvr_state); 537 pr_info("drvr not available (%x)\n", drvr_state);
538 return; 538 return;
539 } 539 }
@@ -794,19 +794,19 @@ c4_loop_port (ci_t * ci, int portnum, u_int8_t cmd)
794 } 794 }
795 795
796 pci_write_32 ((u_int32_t *) &comet->mdiag, cmd); 796 pci_write_32 ((u_int32_t *) &comet->mdiag, cmd);
797 if (log_level >= LOG_WARN) 797 if (cxt1e1_log_level >= LOG_WARN)
798 pr_info("%s: loopback mode changed to %2x from %2x on Port %d\n", 798 pr_info("%s: loopback mode changed to %2x from %2x on Port %d\n",
799 ci->devname, cmd, loopValue, portnum); 799 ci->devname, cmd, loopValue, portnum);
800 loopValue = pci_read_32 ((u_int32_t *) &comet->mdiag) & COMET_MDIAG_LBMASK; 800 loopValue = pci_read_32 ((u_int32_t *) &comet->mdiag) & COMET_MDIAG_LBMASK;
801 if (loopValue != cmd) 801 if (loopValue != cmd)
802 { 802 {
803 if (log_level >= LOG_ERROR) 803 if (cxt1e1_log_level >= LOG_ERROR)
804 pr_info("%s: write to loop register failed, unknown state for Port %d\n", 804 pr_info("%s: write to loop register failed, unknown state for Port %d\n",
805 ci->devname, portnum); 805 ci->devname, portnum);
806 } 806 }
807 } else 807 } else
808 { 808 {
809 if (log_level >= LOG_WARN) 809 if (cxt1e1_log_level >= LOG_WARN)
810 pr_info("%s: loopback already in that mode (%2x)\n", 810 pr_info("%s: loopback already in that mode (%2x)\n",
811 ci->devname, loopValue); 811 ci->devname, loopValue);
812 } 812 }
@@ -997,7 +997,7 @@ c4_set_port (ci_t * ci, int portnum)
997 pi = &ci->port[portnum]; 997 pi = &ci->port[portnum];
998 pp = &ci->port[portnum].p; 998 pp = &ci->port[portnum].p;
999 e1mode = IS_FRAME_ANY_E1 (pp->port_mode); 999 e1mode = IS_FRAME_ANY_E1 (pp->port_mode);
1000 if (log_level >= LOG_MONITOR2) 1000 if (cxt1e1_log_level >= LOG_MONITOR2)
1001 { 1001 {
1002 pr_info("%s: c4_set_port[%d]: entered, e1mode = %x, openchans %d.\n", 1002 pr_info("%s: c4_set_port[%d]: entered, e1mode = %x, openchans %d.\n",
1003 ci->devname, 1003 ci->devname,
@@ -1278,12 +1278,12 @@ c4_fifo_alloc (mpi_t * pi, int chan, int *len)
1278 } 1278 }
1279 if (max != *len) 1279 if (max != *len)
1280 { 1280 {
1281 if (log_level >= LOG_WARN) 1281 if (cxt1e1_log_level >= LOG_WARN)
1282 pr_info("%s: wanted to allocate %d fifo space, but got only %d\n", 1282 pr_info("%s: wanted to allocate %d fifo space, but got only %d\n",
1283 pi->up->devname, *len, max); 1283 pi->up->devname, *len, max);
1284 *len = max; 1284 *len = max;
1285 } 1285 }
1286 if (log_level >= LOG_DEBUG) 1286 if (cxt1e1_log_level >= LOG_DEBUG)
1287 pr_info("%s: allocated %d fifo at %d for channel %d/%d\n", 1287 pr_info("%s: allocated %d fifo at %d for channel %d/%d\n",
1288 pi->up->devname, max, start, chan, pi->p.portnum); 1288 pi->up->devname, max, start, chan, pi->p.portnum);
1289 for (i = maxstart; i < (maxstart + max); i++) 1289 for (i = maxstart; i < (maxstart + max); i++)
@@ -1296,7 +1296,7 @@ c4_fifo_free (mpi_t * pi, int chan)
1296{ 1296{
1297 int i; 1297 int i;
1298 1298
1299 if (log_level >= LOG_DEBUG) 1299 if (cxt1e1_log_level >= LOG_DEBUG)
1300 pr_info("%s: deallocated fifo for channel %d/%d\n", 1300 pr_info("%s: deallocated fifo for channel %d/%d\n",
1301 pi->up->devname, chan, pi->p.portnum); 1301 pi->up->devname, chan, pi->p.portnum);
1302 for (i = 0; i < 32; i++) 1302 for (i = 0; i < 32; i++)
@@ -1321,7 +1321,7 @@ c4_chan_up (ci_t * ci, int channum)
1321 return ENOENT; 1321 return ENOENT;
1322 if (ch->state == UP) 1322 if (ch->state == UP)
1323 { 1323 {
1324 if (log_level >= LOG_MONITOR) 1324 if (cxt1e1_log_level >= LOG_MONITOR)
1325 pr_info("%s: channel already UP, graceful early exit\n", 1325 pr_info("%s: channel already UP, graceful early exit\n",
1326 ci->devname); 1326 ci->devname);
1327 return 0; 1327 return 0;
@@ -1334,7 +1334,7 @@ c4_chan_up (ci_t * ci, int channum)
1334 { 1334 {
1335 if (ch->p.bitmask[i] & pi->tsm[i]) 1335 if (ch->p.bitmask[i] & pi->tsm[i])
1336 { 1336 {
1337 if (1 || log_level >= LOG_WARN) 1337 if (1 || cxt1e1_log_level >= LOG_WARN)
1338 { 1338 {
1339 pr_info("%s: c4_chan_up[%d] EINVAL (attempt to cfg in-use or unavailable TimeSlot[%d])\n", 1339 pr_info("%s: c4_chan_up[%d] EINVAL (attempt to cfg in-use or unavailable TimeSlot[%d])\n",
1340 ci->devname, channum, i); 1340 ci->devname, channum, i);
@@ -1351,7 +1351,7 @@ c4_chan_up (ci_t * ci, int channum)
1351 nbuf = nts / 8 ? nts / 8 : 1; 1351 nbuf = nts / 8 ? nts / 8 : 1;
1352 if (!nbuf) 1352 if (!nbuf)
1353 { 1353 {
1354 /* if( log_level >= LOG_WARN) */ 1354 /* if( cxt1e1_log_level >= LOG_WARN) */
1355 pr_info("%s: c4_chan_up[%d] ENOBUFS (no TimeSlots assigned)\n", 1355 pr_info("%s: c4_chan_up[%d] ENOBUFS (no TimeSlots assigned)\n",
1356 ci->devname, channum); 1356 ci->devname, channum);
1357 return ENOBUFS; /* this should not happen */ 1357 return ENOBUFS; /* this should not happen */
@@ -1420,7 +1420,7 @@ c4_chan_up (ci_t * ci, int channum)
1420 1420
1421#if 0 1421#if 0
1422 /* DEBUG INFO */ 1422 /* DEBUG INFO */
1423 if (log_level >= LOG_MONITOR) 1423 if (cxt1e1_log_level >= LOG_MONITOR)
1424 pr_info("%s: mode %x rxnum %d (rxused %d def %d) txnum %d (txused %d def %d)\n", 1424 pr_info("%s: mode %x rxnum %d (rxused %d def %d) txnum %d (txused %d def %d)\n",
1425 ci->devname, ch->p.chan_mode, 1425 ci->devname, ch->p.chan_mode,
1426 rxnum, max_rxdesc_used, max_rxdesc_default, 1426 rxnum, max_rxdesc_used, max_rxdesc_default,
@@ -1451,7 +1451,7 @@ c4_chan_up (ci_t * ci, int channum)
1451 1451
1452 if (!(m = OS_mem_token_alloc (cxt1e1_max_mru))) 1452 if (!(m = OS_mem_token_alloc (cxt1e1_max_mru)))
1453 { 1453 {
1454 if (log_level >= LOG_MONITOR) 1454 if (cxt1e1_log_level >= LOG_MONITOR)
1455 pr_info("%s: c4_chan_up[%d] - token alloc failure, size = %d.\n", 1455 pr_info("%s: c4_chan_up[%d] - token alloc failure, size = %d.\n",
1456 ci->devname, channum, cxt1e1_max_mru); 1456 ci->devname, channum, cxt1e1_max_mru);
1457 goto errfree; 1457 goto errfree;
diff --git a/drivers/staging/cxt1e1/sbecom_inline_linux.h b/drivers/staging/cxt1e1/sbecom_inline_linux.h
index 5a72cb5cff4..501a331ded5 100644
--- a/drivers/staging/cxt1e1/sbecom_inline_linux.h
+++ b/drivers/staging/cxt1e1/sbecom_inline_linux.h
@@ -86,7 +86,7 @@ pci_read_32 (u_int32_t *p)
86 86
87 FLUSH_PCI_READ (); 87 FLUSH_PCI_READ ();
88 v = le32_to_cpu (*p); 88 v = le32_to_cpu (*p);
89 if (log_level >= LOG_DEBUG) 89 if (cxt1e1_log_level >= LOG_DEBUG)
90 pr_info("pci_read : %x = %x\n", (u_int32_t) p, v); 90 pr_info("pci_read : %x = %x\n", (u_int32_t) p, v);
91 return v; 91 return v;
92#else 92#else
@@ -99,7 +99,7 @@ static inline void
99pci_write_32 (u_int32_t *p, u_int32_t v) 99pci_write_32 (u_int32_t *p, u_int32_t v)
100{ 100{
101#ifdef FLOW_DEBUG 101#ifdef FLOW_DEBUG
102 if (log_level >= LOG_DEBUG) 102 if (cxt1e1_log_level >= LOG_DEBUG)
103 pr_info("pci_write: %x = %x\n", (u_int32_t) p, v); 103 pr_info("pci_write: %x = %x\n", (u_int32_t) p, v);
104#endif 104#endif
105 *p = cpu_to_le32 (v); 105 *p = cpu_to_le32 (v);