aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda/nsc-ircc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/irda/nsc-ircc.c')
-rw-r--r--drivers/net/irda/nsc-ircc.c163
1 files changed, 78 insertions, 85 deletions
diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c
index c0a179098ea5..e7317b104bfb 100644
--- a/drivers/net/irda/nsc-ircc.c
+++ b/drivers/net/irda/nsc-ircc.c
@@ -226,8 +226,8 @@ static int __init nsc_ircc_init(void)
226 226
227 /* Probe for all the NSC chipsets we know about */ 227 /* Probe for all the NSC chipsets we know about */
228 for (chip = chips; chip->name ; chip++) { 228 for (chip = chips; chip->name ; chip++) {
229 IRDA_DEBUG(2, "%s(), Probing for %s ...\n", __func__, 229 pr_debug("%s(), Probing for %s ...\n", __func__,
230 chip->name); 230 chip->name);
231 231
232 /* Try all config registers for this chip */ 232 /* Try all config registers for this chip */
233 for (cfg = 0; cfg < ARRAY_SIZE(chip->cfg); cfg++) { 233 for (cfg = 0; cfg < ARRAY_SIZE(chip->cfg); cfg++) {
@@ -238,7 +238,8 @@ static int __init nsc_ircc_init(void)
238 /* Read index register */ 238 /* Read index register */
239 reg = inb(cfg_base); 239 reg = inb(cfg_base);
240 if (reg == 0xff) { 240 if (reg == 0xff) {
241 IRDA_DEBUG(2, "%s() no chip at 0x%03x\n", __func__, cfg_base); 241 pr_debug("%s() no chip at 0x%03x\n",
242 __func__, cfg_base);
242 continue; 243 continue;
243 } 244 }
244 245
@@ -246,8 +247,9 @@ static int __init nsc_ircc_init(void)
246 outb(chip->cid_index, cfg_base); 247 outb(chip->cid_index, cfg_base);
247 id = inb(cfg_base+1); 248 id = inb(cfg_base+1);
248 if ((id & chip->cid_mask) == chip->cid_value) { 249 if ((id & chip->cid_mask) == chip->cid_value) {
249 IRDA_DEBUG(2, "%s() Found %s chip, revision=%d\n", 250 pr_debug("%s() Found %s chip, revision=%d\n",
250 __func__, chip->name, id & ~chip->cid_mask); 251 __func__, chip->name,
252 id & ~chip->cid_mask);
251 253
252 /* 254 /*
253 * If we found a correct PnP setting, 255 * If we found a correct PnP setting,
@@ -277,7 +279,8 @@ static int __init nsc_ircc_init(void)
277 * the chip. 279 * the chip.
278 */ 280 */
279 if (ret) { 281 if (ret) {
280 IRDA_DEBUG(2, "%s, PnP init failed\n", driver_name); 282 pr_debug("%s, PnP init failed\n",
283 driver_name);
281 memset(&info, 0, sizeof(chipio_t)); 284 memset(&info, 0, sizeof(chipio_t));
282 info.cfg_base = cfg_base; 285 info.cfg_base = cfg_base;
283 info.fir_base = io[i]; 286 info.fir_base = io[i];
@@ -299,7 +302,8 @@ static int __init nsc_ircc_init(void)
299 } 302 }
300 i++; 303 i++;
301 } else { 304 } else {
302 IRDA_DEBUG(2, "%s(), Wrong chip id=0x%02x\n", __func__, id); 305 pr_debug("%s(), Wrong chip id=0x%02x\n",
306 __func__, id);
303 } 307 }
304 } 308 }
305 } 309 }
@@ -363,9 +367,6 @@ static int __init nsc_ircc_open(chipio_t *info)
363 void *ret; 367 void *ret;
364 int err, chip_index; 368 int err, chip_index;
365 369
366 IRDA_DEBUG(2, "%s()\n", __func__);
367
368
369 for (chip_index = 0; chip_index < ARRAY_SIZE(dev_self); chip_index++) { 370 for (chip_index = 0; chip_index < ARRAY_SIZE(dev_self); chip_index++) {
370 if (!dev_self[chip_index]) 371 if (!dev_self[chip_index])
371 break; 372 break;
@@ -520,8 +521,6 @@ static int __exit nsc_ircc_close(struct nsc_ircc_cb *self)
520{ 521{
521 int iobase; 522 int iobase;
522 523
523 IRDA_DEBUG(4, "%s()\n", __func__);
524
525 IRDA_ASSERT(self != NULL, return -1;); 524 IRDA_ASSERT(self != NULL, return -1;);
526 525
527 iobase = self->io.fir_base; 526 iobase = self->io.fir_base;
@@ -532,8 +531,8 @@ static int __exit nsc_ircc_close(struct nsc_ircc_cb *self)
532 unregister_netdev(self->netdev); 531 unregister_netdev(self->netdev);
533 532
534 /* Release the PORT that this driver is using */ 533 /* Release the PORT that this driver is using */
535 IRDA_DEBUG(4, "%s(), Releasing Region %03x\n", 534 pr_debug("%s(), Releasing Region %03x\n",
536 __func__, self->io.fir_base); 535 __func__, self->io.fir_base);
537 release_region(self->io.fir_base, self->io.fir_ext); 536 release_region(self->io.fir_base, self->io.fir_ext);
538 537
539 if (self->tx_buff.head) 538 if (self->tx_buff.head)
@@ -630,8 +629,8 @@ static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info)
630 break; 629 break;
631 } 630 }
632 info->sir_base = info->fir_base; 631 info->sir_base = info->fir_base;
633 IRDA_DEBUG(2, "%s(), probing fir_base=0x%03x\n", __func__, 632 pr_debug("%s(), probing fir_base=0x%03x\n", __func__,
634 info->fir_base); 633 info->fir_base);
635 634
636 /* Read control signals routing register (CSRT) */ 635 /* Read control signals routing register (CSRT) */
637 outb(CFG_108_CSRT, cfg_base); 636 outb(CFG_108_CSRT, cfg_base);
@@ -663,7 +662,7 @@ static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info)
663 info->irq = 15; 662 info->irq = 15;
664 break; 663 break;
665 } 664 }
666 IRDA_DEBUG(2, "%s(), probing irq=%d\n", __func__, info->irq); 665 pr_debug("%s(), probing irq=%d\n", __func__, info->irq);
667 666
668 /* Currently we only read Rx DMA but it will also be used for Tx */ 667 /* Currently we only read Rx DMA but it will also be used for Tx */
669 switch ((reg >> 3) & 0x03) { 668 switch ((reg >> 3) & 0x03) {
@@ -680,7 +679,7 @@ static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info)
680 info->dma = 3; 679 info->dma = 3;
681 break; 680 break;
682 } 681 }
683 IRDA_DEBUG(2, "%s(), probing dma=%d\n", __func__, info->dma); 682 pr_debug("%s(), probing dma=%d\n", __func__, info->dma);
684 683
685 /* Read mode control register (MCTL) */ 684 /* Read mode control register (MCTL) */
686 outb(CFG_108_MCTL, cfg_base); 685 outb(CFG_108_MCTL, cfg_base);
@@ -731,7 +730,7 @@ static int nsc_ircc_probe_338(nsc_chip_t *chip, chipio_t *info)
731 730
732 pnp = (reg >> 3) & 0x01; 731 pnp = (reg >> 3) & 0x01;
733 if (pnp) { 732 if (pnp) {
734 IRDA_DEBUG(2, "(), Chip is in PnP mode\n"); 733 pr_debug("(), Chip is in PnP mode\n");
735 outb(0x46, cfg_base); 734 outb(0x46, cfg_base);
736 reg = (inb(cfg_base+1) & 0xfe) << 2; 735 reg = (inb(cfg_base+1) & 0xfe) << 2;
737 736
@@ -835,9 +834,8 @@ static int nsc_ircc_init_39x(nsc_chip_t *chip, chipio_t *info)
835 int enabled; 834 int enabled;
836 835
837 /* User is sure about his config... accept it. */ 836 /* User is sure about his config... accept it. */
838 IRDA_DEBUG(2, "%s(): nsc_ircc_init_39x (user settings): " 837 pr_debug("%s(): nsc_ircc_init_39x (user settings): io=0x%04x, irq=%d, dma=%d\n",
839 "io=0x%04x, irq=%d, dma=%d\n", 838 __func__, info->fir_base, info->irq, info->dma);
840 __func__, info->fir_base, info->irq, info->dma);
841 839
842 /* Access bank for SP2 */ 840 /* Access bank for SP2 */
843 outb(CFG_39X_LDN, cfg_base); 841 outb(CFG_39X_LDN, cfg_base);
@@ -877,8 +875,8 @@ static int nsc_ircc_probe_39x(nsc_chip_t *chip, chipio_t *info)
877 int reg1, reg2, irq, irqt, dma1, dma2; 875 int reg1, reg2, irq, irqt, dma1, dma2;
878 int enabled, susp; 876 int enabled, susp;
879 877
880 IRDA_DEBUG(2, "%s(), nsc_ircc_probe_39x, base=%d\n", 878 pr_debug("%s(), nsc_ircc_probe_39x, base=%d\n",
881 __func__, cfg_base); 879 __func__, cfg_base);
882 880
883 /* This function should be executed with irq off to avoid 881 /* This function should be executed with irq off to avoid
884 * another driver messing with the Super I/O bank - Jean II */ 882 * another driver messing with the Super I/O bank - Jean II */
@@ -912,7 +910,8 @@ static int nsc_ircc_probe_39x(nsc_chip_t *chip, chipio_t *info)
912 outb(CFG_39X_SPC, cfg_base); 910 outb(CFG_39X_SPC, cfg_base);
913 susp = 1 - ((inb(cfg_base+1) & 0x02) >> 1); 911 susp = 1 - ((inb(cfg_base+1) & 0x02) >> 1);
914 912
915 IRDA_DEBUG(2, "%s(): io=0x%02x%02x, irq=%d (type %d), rxdma=%d, txdma=%d, enabled=%d (suspended=%d)\n", __func__, reg1,reg2,irq,irqt,dma1,dma2,enabled,susp); 913 pr_debug("%s(): io=0x%02x%02x, irq=%d (type %d), rxdma=%d, txdma=%d, enabled=%d (suspended=%d)\n",
914 __func__, reg1, reg2, irq, irqt, dma1, dma2, enabled, susp);
916 915
917 /* Configure SP2 */ 916 /* Configure SP2 */
918 917
@@ -963,8 +962,8 @@ static int nsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *i
963 !(pnp_dma_flags(dev, 0) & IORESOURCE_DISABLED)) 962 !(pnp_dma_flags(dev, 0) & IORESOURCE_DISABLED))
964 pnp_info.dma = pnp_dma(dev, 0); 963 pnp_info.dma = pnp_dma(dev, 0);
965 964
966 IRDA_DEBUG(0, "%s() : From PnP, found firbase 0x%03X ; irq %d ; dma %d.\n", 965 pr_debug("%s() : From PnP, found firbase 0x%03X ; irq %d ; dma %d.\n",
967 __func__, pnp_info.fir_base, pnp_info.irq, pnp_info.dma); 966 __func__, pnp_info.fir_base, pnp_info.irq, pnp_info.dma);
968 967
969 if((pnp_info.fir_base == 0) || 968 if((pnp_info.fir_base == 0) ||
970 (pnp_info.irq == -1) || (pnp_info.dma == -1)) { 969 (pnp_info.irq == -1) || (pnp_info.dma == -1)) {
@@ -992,8 +991,8 @@ static int nsc_ircc_setup(chipio_t *info)
992 switch_bank(iobase, BANK3); 991 switch_bank(iobase, BANK3);
993 version = inb(iobase+MID); 992 version = inb(iobase+MID);
994 993
995 IRDA_DEBUG(2, "%s() Driver %s Found chip version %02x\n", 994 pr_debug("%s() Driver %s Found chip version %02x\n",
996 __func__, driver_name, version); 995 __func__, driver_name, version);
997 996
998 /* Should be 0x2? */ 997 /* Should be 0x2? */
999 if (0x20 != (version & 0xf0)) { 998 if (0x20 != (version & 0xf0)) {
@@ -1096,39 +1095,39 @@ static void nsc_ircc_init_dongle_interface (int iobase, int dongle_id)
1096 switch (dongle_id) { 1095 switch (dongle_id) {
1097 case 0x00: /* same as */ 1096 case 0x00: /* same as */
1098 case 0x01: /* Differential serial interface */ 1097 case 0x01: /* Differential serial interface */
1099 IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", 1098 pr_debug("%s(), %s not defined by irda yet\n",
1100 __func__, dongle_types[dongle_id]); 1099 __func__, dongle_types[dongle_id]);
1101 break; 1100 break;
1102 case 0x02: /* same as */ 1101 case 0x02: /* same as */
1103 case 0x03: /* Reserved */ 1102 case 0x03: /* Reserved */
1104 IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", 1103 pr_debug("%s(), %s not defined by irda yet\n",
1105 __func__, dongle_types[dongle_id]); 1104 __func__, dongle_types[dongle_id]);
1106 break; 1105 break;
1107 case 0x04: /* Sharp RY5HD01 */ 1106 case 0x04: /* Sharp RY5HD01 */
1108 break; 1107 break;
1109 case 0x05: /* Reserved, but this is what the Thinkpad reports */ 1108 case 0x05: /* Reserved, but this is what the Thinkpad reports */
1110 IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", 1109 pr_debug("%s(), %s not defined by irda yet\n",
1111 __func__, dongle_types[dongle_id]); 1110 __func__, dongle_types[dongle_id]);
1112 break; 1111 break;
1113 case 0x06: /* Single-ended serial interface */ 1112 case 0x06: /* Single-ended serial interface */
1114 IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", 1113 pr_debug("%s(), %s not defined by irda yet\n",
1115 __func__, dongle_types[dongle_id]); 1114 __func__, dongle_types[dongle_id]);
1116 break; 1115 break;
1117 case 0x07: /* Consumer-IR only */ 1116 case 0x07: /* Consumer-IR only */
1118 IRDA_DEBUG(0, "%s(), %s is not for IrDA mode\n", 1117 pr_debug("%s(), %s is not for IrDA mode\n",
1119 __func__, dongle_types[dongle_id]); 1118 __func__, dongle_types[dongle_id]);
1120 break; 1119 break;
1121 case 0x08: /* HP HSDL-2300, HP HSDL-3600/HSDL-3610 */ 1120 case 0x08: /* HP HSDL-2300, HP HSDL-3600/HSDL-3610 */
1122 IRDA_DEBUG(0, "%s(), %s\n", 1121 pr_debug("%s(), %s\n",
1123 __func__, dongle_types[dongle_id]); 1122 __func__, dongle_types[dongle_id]);
1124 break; 1123 break;
1125 case 0x09: /* IBM31T1100 or Temic TFDS6000/TFDS6500 */ 1124 case 0x09: /* IBM31T1100 or Temic TFDS6000/TFDS6500 */
1126 outb(0x28, iobase+7); /* Set irsl[0-2] as output */ 1125 outb(0x28, iobase+7); /* Set irsl[0-2] as output */
1127 break; 1126 break;
1128 case 0x0A: /* same as */ 1127 case 0x0A: /* same as */
1129 case 0x0B: /* Reserved */ 1128 case 0x0B: /* Reserved */
1130 IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", 1129 pr_debug("%s(), %s not defined by irda yet\n",
1131 __func__, dongle_types[dongle_id]); 1130 __func__, dongle_types[dongle_id]);
1132 break; 1131 break;
1133 case 0x0C: /* same as */ 1132 case 0x0C: /* same as */
1134 case 0x0D: /* HP HSDL-1100/HSDL-2100 */ 1133 case 0x0D: /* HP HSDL-1100/HSDL-2100 */
@@ -1142,15 +1141,15 @@ static void nsc_ircc_init_dongle_interface (int iobase, int dongle_id)
1142 outb(0x28, iobase+7); /* Set irsl[0-2] as output */ 1141 outb(0x28, iobase+7); /* Set irsl[0-2] as output */
1143 break; 1142 break;
1144 case 0x0F: /* No dongle connected */ 1143 case 0x0F: /* No dongle connected */
1145 IRDA_DEBUG(0, "%s(), %s\n", 1144 pr_debug("%s(), %s\n",
1146 __func__, dongle_types[dongle_id]); 1145 __func__, dongle_types[dongle_id]);
1147 1146
1148 switch_bank(iobase, BANK0); 1147 switch_bank(iobase, BANK0);
1149 outb(0x62, iobase+MCR); 1148 outb(0x62, iobase+MCR);
1150 break; 1149 break;
1151 default: 1150 default:
1152 IRDA_DEBUG(0, "%s(), invalid dongle_id %#x", 1151 pr_debug("%s(), invalid dongle_id %#x",
1153 __func__, dongle_id); 1152 __func__, dongle_id);
1154 } 1153 }
1155 1154
1156 /* IRCFG1: IRSL1 and 2 are set to IrDA mode */ 1155 /* IRCFG1: IRSL1 and 2 are set to IrDA mode */
@@ -1181,31 +1180,31 @@ static void nsc_ircc_change_dongle_speed(int iobase, int speed, int dongle_id)
1181 switch (dongle_id) { 1180 switch (dongle_id) {
1182 case 0x00: /* same as */ 1181 case 0x00: /* same as */
1183 case 0x01: /* Differential serial interface */ 1182 case 0x01: /* Differential serial interface */
1184 IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", 1183 pr_debug("%s(), %s not defined by irda yet\n",
1185 __func__, dongle_types[dongle_id]); 1184 __func__, dongle_types[dongle_id]);
1186 break; 1185 break;
1187 case 0x02: /* same as */ 1186 case 0x02: /* same as */
1188 case 0x03: /* Reserved */ 1187 case 0x03: /* Reserved */
1189 IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", 1188 pr_debug("%s(), %s not defined by irda yet\n",
1190 __func__, dongle_types[dongle_id]); 1189 __func__, dongle_types[dongle_id]);
1191 break; 1190 break;
1192 case 0x04: /* Sharp RY5HD01 */ 1191 case 0x04: /* Sharp RY5HD01 */
1193 break; 1192 break;
1194 case 0x05: /* Reserved */ 1193 case 0x05: /* Reserved */
1195 IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", 1194 pr_debug("%s(), %s not defined by irda yet\n",
1196 __func__, dongle_types[dongle_id]); 1195 __func__, dongle_types[dongle_id]);
1197 break; 1196 break;
1198 case 0x06: /* Single-ended serial interface */ 1197 case 0x06: /* Single-ended serial interface */
1199 IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", 1198 pr_debug("%s(), %s not defined by irda yet\n",
1200 __func__, dongle_types[dongle_id]); 1199 __func__, dongle_types[dongle_id]);
1201 break; 1200 break;
1202 case 0x07: /* Consumer-IR only */ 1201 case 0x07: /* Consumer-IR only */
1203 IRDA_DEBUG(0, "%s(), %s is not for IrDA mode\n", 1202 pr_debug("%s(), %s is not for IrDA mode\n",
1204 __func__, dongle_types[dongle_id]); 1203 __func__, dongle_types[dongle_id]);
1205 break; 1204 break;
1206 case 0x08: /* HP HSDL-2300, HP HSDL-3600/HSDL-3610 */ 1205 case 0x08: /* HP HSDL-2300, HP HSDL-3600/HSDL-3610 */
1207 IRDA_DEBUG(0, "%s(), %s\n", 1206 pr_debug("%s(), %s\n",
1208 __func__, dongle_types[dongle_id]); 1207 __func__, dongle_types[dongle_id]);
1209 outb(0x00, iobase+4); 1208 outb(0x00, iobase+4);
1210 if (speed > 115200) 1209 if (speed > 115200)
1211 outb(0x01, iobase+4); 1210 outb(0x01, iobase+4);
@@ -1223,8 +1222,8 @@ static void nsc_ircc_change_dongle_speed(int iobase, int speed, int dongle_id)
1223 break; 1222 break;
1224 case 0x0A: /* same as */ 1223 case 0x0A: /* same as */
1225 case 0x0B: /* Reserved */ 1224 case 0x0B: /* Reserved */
1226 IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", 1225 pr_debug("%s(), %s not defined by irda yet\n",
1227 __func__, dongle_types[dongle_id]); 1226 __func__, dongle_types[dongle_id]);
1228 break; 1227 break;
1229 case 0x0C: /* same as */ 1228 case 0x0C: /* same as */
1230 case 0x0D: /* HP HSDL-1100/HSDL-2100 */ 1229 case 0x0D: /* HP HSDL-1100/HSDL-2100 */
@@ -1232,14 +1231,14 @@ static void nsc_ircc_change_dongle_speed(int iobase, int speed, int dongle_id)
1232 case 0x0E: /* Supports SIR Mode only */ 1231 case 0x0E: /* Supports SIR Mode only */
1233 break; 1232 break;
1234 case 0x0F: /* No dongle connected */ 1233 case 0x0F: /* No dongle connected */
1235 IRDA_DEBUG(0, "%s(), %s is not for IrDA mode\n", 1234 pr_debug("%s(), %s is not for IrDA mode\n",
1236 __func__, dongle_types[dongle_id]); 1235 __func__, dongle_types[dongle_id]);
1237 1236
1238 switch_bank(iobase, BANK0); 1237 switch_bank(iobase, BANK0);
1239 outb(0x62, iobase+MCR); 1238 outb(0x62, iobase+MCR);
1240 break; 1239 break;
1241 default: 1240 default:
1242 IRDA_DEBUG(0, "%s(), invalid data_rate\n", __func__); 1241 pr_debug("%s(), invalid data_rate\n", __func__);
1243 } 1242 }
1244 /* Restore bank register */ 1243 /* Restore bank register */
1245 outb(bank, iobase+BSR); 1244 outb(bank, iobase+BSR);
@@ -1260,7 +1259,7 @@ static __u8 nsc_ircc_change_speed(struct nsc_ircc_cb *self, __u32 speed)
1260 __u8 bank; 1259 __u8 bank;
1261 __u8 ier; /* Interrupt enable register */ 1260 __u8 ier; /* Interrupt enable register */
1262 1261
1263 IRDA_DEBUG(2, "%s(), speed=%d\n", __func__, speed); 1262 pr_debug("%s(), speed=%d\n", __func__, speed);
1264 1263
1265 IRDA_ASSERT(self != NULL, return 0;); 1264 IRDA_ASSERT(self != NULL, return 0;);
1266 1265
@@ -1293,20 +1292,20 @@ static __u8 nsc_ircc_change_speed(struct nsc_ircc_cb *self, __u32 speed)
1293 outb(inb(iobase+4) | 0x04, iobase+4); 1292 outb(inb(iobase+4) | 0x04, iobase+4);
1294 1293
1295 mcr = MCR_MIR; 1294 mcr = MCR_MIR;
1296 IRDA_DEBUG(0, "%s(), handling baud of 576000\n", __func__); 1295 pr_debug("%s(), handling baud of 576000\n", __func__);
1297 break; 1296 break;
1298 case 1152000: 1297 case 1152000:
1299 mcr = MCR_MIR; 1298 mcr = MCR_MIR;
1300 IRDA_DEBUG(0, "%s(), handling baud of 1152000\n", __func__); 1299 pr_debug("%s(), handling baud of 1152000\n", __func__);
1301 break; 1300 break;
1302 case 4000000: 1301 case 4000000:
1303 mcr = MCR_FIR; 1302 mcr = MCR_FIR;
1304 IRDA_DEBUG(0, "%s(), handling baud of 4000000\n", __func__); 1303 pr_debug("%s(), handling baud of 4000000\n", __func__);
1305 break; 1304 break;
1306 default: 1305 default:
1307 mcr = MCR_FIR; 1306 mcr = MCR_FIR;
1308 IRDA_DEBUG(0, "%s(), unknown baud rate of %d\n", 1307 pr_debug("%s(), unknown baud rate of %d\n",
1309 __func__, speed); 1308 __func__, speed);
1310 break; 1309 break;
1311 } 1310 }
1312 1311
@@ -1613,15 +1612,13 @@ static int nsc_ircc_pio_write(int iobase, __u8 *buf, int len, int fifo_size)
1613 int actual = 0; 1612 int actual = 0;
1614 __u8 bank; 1613 __u8 bank;
1615 1614
1616 IRDA_DEBUG(4, "%s()\n", __func__);
1617
1618 /* Save current bank */ 1615 /* Save current bank */
1619 bank = inb(iobase+BSR); 1616 bank = inb(iobase+BSR);
1620 1617
1621 switch_bank(iobase, BANK0); 1618 switch_bank(iobase, BANK0);
1622 if (!(inb_p(iobase+LSR) & LSR_TXEMP)) { 1619 if (!(inb_p(iobase+LSR) & LSR_TXEMP)) {
1623 IRDA_DEBUG(4, "%s(), warning, FIFO not empty yet!\n", 1620 pr_debug("%s(), warning, FIFO not empty yet!\n",
1624 __func__); 1621 __func__);
1625 1622
1626 /* FIFO may still be filled to the Tx interrupt threshold */ 1623 /* FIFO may still be filled to the Tx interrupt threshold */
1627 fifo_size -= 17; 1624 fifo_size -= 17;
@@ -1633,8 +1630,8 @@ static int nsc_ircc_pio_write(int iobase, __u8 *buf, int len, int fifo_size)
1633 outb(buf[actual++], iobase+TXD); 1630 outb(buf[actual++], iobase+TXD);
1634 } 1631 }
1635 1632
1636 IRDA_DEBUG(4, "%s(), fifo_size %d ; %d sent of %d\n", 1633 pr_debug("%s(), fifo_size %d ; %d sent of %d\n",
1637 __func__, fifo_size, actual, len); 1634 __func__, fifo_size, actual, len);
1638 1635
1639 /* Restore bank */ 1636 /* Restore bank */
1640 outb(bank, iobase+BSR); 1637 outb(bank, iobase+BSR);
@@ -1655,8 +1652,6 @@ static int nsc_ircc_dma_xmit_complete(struct nsc_ircc_cb *self)
1655 __u8 bank; 1652 __u8 bank;
1656 int ret = TRUE; 1653 int ret = TRUE;
1657 1654
1658 IRDA_DEBUG(2, "%s()\n", __func__);
1659
1660 iobase = self->io.fir_base; 1655 iobase = self->io.fir_base;
1661 1656
1662 /* Save current bank */ 1657 /* Save current bank */
@@ -1786,7 +1781,7 @@ static int nsc_ircc_dma_receive_complete(struct nsc_ircc_cb *self, int iobase)
1786 len = inb(iobase+RFLFL) | ((inb(iobase+RFLFH) & 0x1f) << 8); 1781 len = inb(iobase+RFLFL) | ((inb(iobase+RFLFH) & 0x1f) << 8);
1787 1782
1788 if (st_fifo->tail >= MAX_RX_WINDOW) { 1783 if (st_fifo->tail >= MAX_RX_WINDOW) {
1789 IRDA_DEBUG(0, "%s(), window is full!\n", __func__); 1784 pr_debug("%s(), window is full!\n", __func__);
1790 continue; 1785 continue;
1791 } 1786 }
1792 1787
@@ -1980,7 +1975,7 @@ static void nsc_ircc_sir_interrupt(struct nsc_ircc_cb *self, int eir)
1980 * Need to be after self->io.direction to avoid race with 1975 * Need to be after self->io.direction to avoid race with
1981 * nsc_ircc_hard_xmit_sir() - Jean II */ 1976 * nsc_ircc_hard_xmit_sir() - Jean II */
1982 if (self->new_speed) { 1977 if (self->new_speed) {
1983 IRDA_DEBUG(2, "%s(), Changing speed!\n", __func__); 1978 pr_debug("%s(), Changing speed!\n", __func__);
1984 self->ier = nsc_ircc_change_speed(self, 1979 self->ier = nsc_ircc_change_speed(self,
1985 self->new_speed); 1980 self->new_speed);
1986 self->new_speed = 0; 1981 self->new_speed = 0;
@@ -2174,7 +2169,6 @@ static int nsc_ircc_net_open(struct net_device *dev)
2174 char hwname[32]; 2169 char hwname[32];
2175 __u8 bank; 2170 __u8 bank;
2176 2171
2177 IRDA_DEBUG(4, "%s()\n", __func__);
2178 2172
2179 IRDA_ASSERT(dev != NULL, return -1;); 2173 IRDA_ASSERT(dev != NULL, return -1;);
2180 self = netdev_priv(dev); 2174 self = netdev_priv(dev);
@@ -2236,7 +2230,6 @@ static int nsc_ircc_net_close(struct net_device *dev)
2236 int iobase; 2230 int iobase;
2237 __u8 bank; 2231 __u8 bank;
2238 2232
2239 IRDA_DEBUG(4, "%s()\n", __func__);
2240 2233
2241 IRDA_ASSERT(dev != NULL, return -1;); 2234 IRDA_ASSERT(dev != NULL, return -1;);
2242 2235
@@ -2290,7 +2283,7 @@ static int nsc_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2290 2283
2291 IRDA_ASSERT(self != NULL, return -1;); 2284 IRDA_ASSERT(self != NULL, return -1;);
2292 2285
2293 IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __func__, dev->name, cmd); 2286 pr_debug("%s(), %s, (cmd=0x%X)\n", __func__, dev->name, cmd);
2294 2287
2295 switch (cmd) { 2288 switch (cmd) {
2296 case SIOCSBANDWIDTH: /* Set bandwidth */ 2289 case SIOCSBANDWIDTH: /* Set bandwidth */
@@ -2329,7 +2322,7 @@ static int nsc_ircc_suspend(struct platform_device *dev, pm_message_t state)
2329 if (self->io.suspended) 2322 if (self->io.suspended)
2330 return 0; 2323 return 0;
2331 2324
2332 IRDA_DEBUG(1, "%s, Suspending\n", driver_name); 2325 pr_debug("%s, Suspending\n", driver_name);
2333 2326
2334 rtnl_lock(); 2327 rtnl_lock();
2335 if (netif_running(self->netdev)) { 2328 if (netif_running(self->netdev)) {
@@ -2363,7 +2356,7 @@ static int nsc_ircc_resume(struct platform_device *dev)
2363 if (!self->io.suspended) 2356 if (!self->io.suspended)
2364 return 0; 2357 return 0;
2365 2358
2366 IRDA_DEBUG(1, "%s, Waking up\n", driver_name); 2359 pr_debug("%s, Waking up\n", driver_name);
2367 2360
2368 rtnl_lock(); 2361 rtnl_lock();
2369 nsc_ircc_setup(&self->io); 2362 nsc_ircc_setup(&self->io);