aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-11-11 17:44:57 -0500
committerDavid S. Miller <davem@davemloft.net>2014-11-12 13:56:41 -0500
commit955a9d202f470019f42979f0d1caec98843e39ce (patch)
treefff6124b339bc33e3b5c67668bfcc13098be865c /drivers/net
parent8d326d818a2a8fc80c7df85dd88cb214804d1499 (diff)
irda: Convert IRDA_DEBUG to pr_debug
Use the normal kernel debugging mechanism which also enables dynamic_debug at the same time. Other miscellanea: o Remove sysctl for irda_debug o Remove function tracing like uses (use ftrace instead) o Coalesce formats o Realign arguments o Remove unnecessary OOM messages Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/irda/act200l-sir.c8
-rw-r--r--drivers/net/irda/actisys-sir.c3
-rw-r--r--drivers/net/irda/ali-ircc.c206
-rw-r--r--drivers/net/irda/donauboe.c96
-rw-r--r--drivers/net/irda/girbil-sir.c8
-rw-r--r--drivers/net/irda/irda-usb.c95
-rw-r--r--drivers/net/irda/irtty-sir.c8
-rw-r--r--drivers/net/irda/litelink-sir.c8
-rw-r--r--drivers/net/irda/ma600-sir.c14
-rw-r--r--drivers/net/irda/mcp2120-sir.c8
-rw-r--r--drivers/net/irda/mcs7780.c8
-rw-r--r--drivers/net/irda/nsc-ircc.c163
-rw-r--r--drivers/net/irda/old_belkin-sir.c8
-rw-r--r--drivers/net/irda/sir_dev.c44
-rw-r--r--drivers/net/irda/sir_dongle.c4
-rw-r--r--drivers/net/irda/smsc-ircc2.c125
-rw-r--r--drivers/net/irda/tekram-sir.c12
-rw-r--r--drivers/net/irda/toim3232-sir.c12
-rw-r--r--drivers/net/irda/via-ircc.c154
-rw-r--r--drivers/net/irda/vlsi_ir.c27
-rw-r--r--drivers/net/irda/w83977af_ir.c68
21 files changed, 446 insertions, 633 deletions
diff --git a/drivers/net/irda/act200l-sir.c b/drivers/net/irda/act200l-sir.c
index a9116456bc9a..e8917511e1aa 100644
--- a/drivers/net/irda/act200l-sir.c
+++ b/drivers/net/irda/act200l-sir.c
@@ -107,8 +107,6 @@ static int act200l_open(struct sir_dev *dev)
107{ 107{
108 struct qos_info *qos = &dev->qos; 108 struct qos_info *qos = &dev->qos;
109 109
110 IRDA_DEBUG(2, "%s()\n", __func__ );
111
112 /* Power on the dongle */ 110 /* Power on the dongle */
113 sirdev_set_dtr_rts(dev, TRUE, TRUE); 111 sirdev_set_dtr_rts(dev, TRUE, TRUE);
114 112
@@ -124,8 +122,6 @@ static int act200l_open(struct sir_dev *dev)
124 122
125static int act200l_close(struct sir_dev *dev) 123static int act200l_close(struct sir_dev *dev)
126{ 124{
127 IRDA_DEBUG(2, "%s()\n", __func__ );
128
129 /* Power off the dongle */ 125 /* Power off the dongle */
130 sirdev_set_dtr_rts(dev, FALSE, FALSE); 126 sirdev_set_dtr_rts(dev, FALSE, FALSE);
131 127
@@ -143,8 +139,6 @@ static int act200l_change_speed(struct sir_dev *dev, unsigned speed)
143 u8 control[3]; 139 u8 control[3];
144 int ret = 0; 140 int ret = 0;
145 141
146 IRDA_DEBUG(2, "%s()\n", __func__ );
147
148 /* Clear DTR and set RTS to enter command mode */ 142 /* Clear DTR and set RTS to enter command mode */
149 sirdev_set_dtr_rts(dev, FALSE, TRUE); 143 sirdev_set_dtr_rts(dev, FALSE, TRUE);
150 144
@@ -212,8 +206,6 @@ static int act200l_reset(struct sir_dev *dev)
212 }; 206 };
213 int ret = 0; 207 int ret = 0;
214 208
215 IRDA_DEBUG(2, "%s()\n", __func__ );
216
217 switch (state) { 209 switch (state) {
218 case SIRDEV_STATE_DONGLE_RESET: 210 case SIRDEV_STATE_DONGLE_RESET:
219 /* Reset the dongle : set RTS low for 25 ms */ 211 /* Reset the dongle : set RTS low for 25 ms */
diff --git a/drivers/net/irda/actisys-sir.c b/drivers/net/irda/actisys-sir.c
index 50b2141a6103..e224b8b99517 100644
--- a/drivers/net/irda/actisys-sir.c
+++ b/drivers/net/irda/actisys-sir.c
@@ -165,8 +165,7 @@ static int actisys_change_speed(struct sir_dev *dev, unsigned speed)
165 int ret = 0; 165 int ret = 0;
166 int i = 0; 166 int i = 0;
167 167
168 IRDA_DEBUG(4, "%s(), speed=%d (was %d)\n", __func__, 168 pr_debug("%s(), speed=%d (was %d)\n", __func__, speed, dev->speed);
169 speed, dev->speed);
170 169
171 /* dongle was already resetted from irda_request state machine, 170 /* dongle was already resetted from irda_request state machine,
172 * we are in known state (dongle default) 171 * we are in known state (dongle default)
diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c
index 7f23e5ff099e..588680a72fa1 100644
--- a/drivers/net/irda/ali-ircc.c
+++ b/drivers/net/irda/ali-ircc.c
@@ -154,8 +154,6 @@ static int __init ali_ircc_init(void)
154 int reg, revision; 154 int reg, revision;
155 int i = 0; 155 int i = 0;
156 156
157 IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__);
158
159 ret = platform_driver_register(&ali_ircc_driver); 157 ret = platform_driver_register(&ali_ircc_driver);
160 if (ret) { 158 if (ret) {
161 net_err_ratelimited("%s, Can't register driver!\n", 159 net_err_ratelimited("%s, Can't register driver!\n",
@@ -168,7 +166,7 @@ static int __init ali_ircc_init(void)
168 /* Probe for all the ALi chipsets we know about */ 166 /* Probe for all the ALi chipsets we know about */
169 for (chip= chips; chip->name; chip++, i++) 167 for (chip= chips; chip->name; chip++, i++)
170 { 168 {
171 IRDA_DEBUG(2, "%s(), Probing for %s ...\n", __func__, chip->name); 169 pr_debug("%s(), Probing for %s ...\n", __func__, chip->name);
172 170
173 /* Try all config registers for this chip */ 171 /* Try all config registers for this chip */
174 for (cfg=0; cfg<2; cfg++) 172 for (cfg=0; cfg<2; cfg++)
@@ -198,12 +196,13 @@ static int __init ali_ircc_init(void)
198 196
199 if (reg == chip->cid_value) 197 if (reg == chip->cid_value)
200 { 198 {
201 IRDA_DEBUG(2, "%s(), Chip found at 0x%03x\n", __func__, cfg_base); 199 pr_debug("%s(), Chip found at 0x%03x\n",
200 __func__, cfg_base);
202 201
203 outb(0x1F, cfg_base); 202 outb(0x1F, cfg_base);
204 revision = inb(cfg_base+1); 203 revision = inb(cfg_base+1);
205 IRDA_DEBUG(2, "%s(), Found %s chip, revision=%d\n", __func__, 204 pr_debug("%s(), Found %s chip, revision=%d\n",
206 chip->name, revision); 205 __func__, chip->name, revision);
207 206
208 /* 207 /*
209 * If the user supplies the base address, then 208 * If the user supplies the base address, then
@@ -225,15 +224,14 @@ static int __init ali_ircc_init(void)
225 } 224 }
226 else 225 else
227 { 226 {
228 IRDA_DEBUG(2, "%s(), No %s chip at 0x%03x\n", __func__, chip->name, cfg_base); 227 pr_debug("%s(), No %s chip at 0x%03x\n",
228 __func__, chip->name, cfg_base);
229 } 229 }
230 /* Exit configuration */ 230 /* Exit configuration */
231 outb(0xbb, cfg_base); 231 outb(0xbb, cfg_base);
232 } 232 }
233 } 233 }
234 234
235 IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __func__);
236
237 if (ret) 235 if (ret)
238 platform_driver_unregister(&ali_ircc_driver); 236 platform_driver_unregister(&ali_ircc_driver);
239 237
@@ -250,8 +248,6 @@ static void __exit ali_ircc_cleanup(void)
250{ 248{
251 int i; 249 int i;
252 250
253 IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__);
254
255 for (i=0; i < ARRAY_SIZE(dev_self); i++) { 251 for (i=0; i < ARRAY_SIZE(dev_self); i++) {
256 if (dev_self[i]) 252 if (dev_self[i])
257 ali_ircc_close(dev_self[i]); 253 ali_ircc_close(dev_self[i]);
@@ -259,7 +255,6 @@ static void __exit ali_ircc_cleanup(void)
259 255
260 platform_driver_unregister(&ali_ircc_driver); 256 platform_driver_unregister(&ali_ircc_driver);
261 257
262 IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __func__);
263} 258}
264 259
265static const struct net_device_ops ali_ircc_sir_ops = { 260static const struct net_device_ops ali_ircc_sir_ops = {
@@ -289,8 +284,6 @@ static int ali_ircc_open(int i, chipio_t *info)
289 int dongle_id; 284 int dongle_id;
290 int err; 285 int err;
291 286
292 IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__);
293
294 if (i >= ARRAY_SIZE(dev_self)) { 287 if (i >= ARRAY_SIZE(dev_self)) {
295 net_err_ratelimited("%s(), maximum number of supported chips reached!\n", 288 net_err_ratelimited("%s(), maximum number of supported chips reached!\n",
296 __func__); 289 __func__);
@@ -394,7 +387,6 @@ static int ali_ircc_open(int i, chipio_t *info)
394 387
395 self->io.dongle_id = dongle_id; 388 self->io.dongle_id = dongle_id;
396 389
397 IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __func__);
398 390
399 return 0; 391 return 0;
400 392
@@ -423,8 +415,6 @@ static int __exit ali_ircc_close(struct ali_ircc_cb *self)
423{ 415{
424 int iobase; 416 int iobase;
425 417
426 IRDA_DEBUG(4, "%s(), ---------------- Start ----------------\n", __func__);
427
428 IRDA_ASSERT(self != NULL, return -1;); 418 IRDA_ASSERT(self != NULL, return -1;);
429 419
430 iobase = self->io.fir_base; 420 iobase = self->io.fir_base;
@@ -433,7 +423,7 @@ static int __exit ali_ircc_close(struct ali_ircc_cb *self)
433 unregister_netdev(self->netdev); 423 unregister_netdev(self->netdev);
434 424
435 /* Release the PORT that this driver is using */ 425 /* Release the PORT that this driver is using */
436 IRDA_DEBUG(4, "%s(), Releasing Region %03x\n", __func__, self->io.fir_base); 426 pr_debug("%s(), Releasing Region %03x\n", __func__, self->io.fir_base);
437 release_region(self->io.fir_base, self->io.fir_ext); 427 release_region(self->io.fir_base, self->io.fir_ext);
438 428
439 if (self->tx_buff.head) 429 if (self->tx_buff.head)
@@ -447,7 +437,6 @@ static int __exit ali_ircc_close(struct ali_ircc_cb *self)
447 dev_self[self->index] = NULL; 437 dev_self[self->index] = NULL;
448 free_netdev(self->netdev); 438 free_netdev(self->netdev);
449 439
450 IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __func__);
451 440
452 return 0; 441 return 0;
453} 442}
@@ -490,7 +479,6 @@ static int ali_ircc_probe_53(ali_chip_t *chip, chipio_t *info)
490 int cfg_base = info->cfg_base; 479 int cfg_base = info->cfg_base;
491 int hi, low, reg; 480 int hi, low, reg;
492 481
493 IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__);
494 482
495 /* Enter Configuration */ 483 /* Enter Configuration */
496 outb(chip->entr1, cfg_base); 484 outb(chip->entr1, cfg_base);
@@ -509,13 +497,13 @@ static int ali_ircc_probe_53(ali_chip_t *chip, chipio_t *info)
509 497
510 info->sir_base = info->fir_base; 498 info->sir_base = info->fir_base;
511 499
512 IRDA_DEBUG(2, "%s(), probing fir_base=0x%03x\n", __func__, info->fir_base); 500 pr_debug("%s(), probing fir_base=0x%03x\n", __func__, info->fir_base);
513 501
514 /* Read IRQ control register */ 502 /* Read IRQ control register */
515 outb(0x70, cfg_base); 503 outb(0x70, cfg_base);
516 reg = inb(cfg_base+1); 504 reg = inb(cfg_base+1);
517 info->irq = reg & 0x0f; 505 info->irq = reg & 0x0f;
518 IRDA_DEBUG(2, "%s(), probing irq=%d\n", __func__, info->irq); 506 pr_debug("%s(), probing irq=%d\n", __func__, info->irq);
519 507
520 /* Read DMA channel */ 508 /* Read DMA channel */
521 outb(0x74, cfg_base); 509 outb(0x74, cfg_base);
@@ -526,24 +514,23 @@ static int ali_ircc_probe_53(ali_chip_t *chip, chipio_t *info)
526 net_warn_ratelimited("%s(), No DMA channel assigned !\n", 514 net_warn_ratelimited("%s(), No DMA channel assigned !\n",
527 __func__); 515 __func__);
528 else 516 else
529 IRDA_DEBUG(2, "%s(), probing dma=%d\n", __func__, info->dma); 517 pr_debug("%s(), probing dma=%d\n", __func__, info->dma);
530 518
531 /* Read Enabled Status */ 519 /* Read Enabled Status */
532 outb(0x30, cfg_base); 520 outb(0x30, cfg_base);
533 reg = inb(cfg_base+1); 521 reg = inb(cfg_base+1);
534 info->enabled = (reg & 0x80) && (reg & 0x01); 522 info->enabled = (reg & 0x80) && (reg & 0x01);
535 IRDA_DEBUG(2, "%s(), probing enabled=%d\n", __func__, info->enabled); 523 pr_debug("%s(), probing enabled=%d\n", __func__, info->enabled);
536 524
537 /* Read Power Status */ 525 /* Read Power Status */
538 outb(0x22, cfg_base); 526 outb(0x22, cfg_base);
539 reg = inb(cfg_base+1); 527 reg = inb(cfg_base+1);
540 info->suspended = (reg & 0x20); 528 info->suspended = (reg & 0x20);
541 IRDA_DEBUG(2, "%s(), probing suspended=%d\n", __func__, info->suspended); 529 pr_debug("%s(), probing suspended=%d\n", __func__, info->suspended);
542 530
543 /* Exit configuration */ 531 /* Exit configuration */
544 outb(0xbb, cfg_base); 532 outb(0xbb, cfg_base);
545 533
546 IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __func__);
547 534
548 return 0; 535 return 0;
549} 536}
@@ -561,7 +548,6 @@ static int ali_ircc_setup(chipio_t *info)
561 int version; 548 int version;
562 int iobase = info->fir_base; 549 int iobase = info->fir_base;
563 550
564 IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__);
565 551
566 /* Locking comments : 552 /* Locking comments :
567 * Most operations here need to be protected. We are called before 553 * Most operations here need to be protected. We are called before
@@ -622,7 +608,6 @@ static int ali_ircc_setup(chipio_t *info)
622 // outb(UART_IER_RDI, iobase+UART_IER); //benjamin 2000/11/23 01:25PM 608 // outb(UART_IER_RDI, iobase+UART_IER); //benjamin 2000/11/23 01:25PM
623 // Turn on the interrupts in ali_ircc_net_open 609 // Turn on the interrupts in ali_ircc_net_open
624 610
625 IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__);
626 611
627 return 0; 612 return 0;
628} 613}
@@ -639,7 +624,6 @@ static int ali_ircc_read_dongle_id (int i, chipio_t *info)
639 int dongle_id, reg; 624 int dongle_id, reg;
640 int cfg_base = info->cfg_base; 625 int cfg_base = info->cfg_base;
641 626
642 IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__);
643 627
644 /* Enter Configuration */ 628 /* Enter Configuration */
645 outb(chips[i].entr1, cfg_base); 629 outb(chips[i].entr1, cfg_base);
@@ -653,13 +637,12 @@ static int ali_ircc_read_dongle_id (int i, chipio_t *info)
653 outb(0xf0, cfg_base); 637 outb(0xf0, cfg_base);
654 reg = inb(cfg_base+1); 638 reg = inb(cfg_base+1);
655 dongle_id = ((reg>>6)&0x02) | ((reg>>5)&0x01); 639 dongle_id = ((reg>>6)&0x02) | ((reg>>5)&0x01);
656 IRDA_DEBUG(2, "%s(), probing dongle_id=%d, dongle_types=%s\n", __func__, 640 pr_debug("%s(), probing dongle_id=%d, dongle_types=%s\n",
657 dongle_id, dongle_types[dongle_id]); 641 __func__, dongle_id, dongle_types[dongle_id]);
658 642
659 /* Exit configuration */ 643 /* Exit configuration */
660 outb(0xbb, cfg_base); 644 outb(0xbb, cfg_base);
661 645
662 IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__);
663 646
664 return dongle_id; 647 return dongle_id;
665} 648}
@@ -676,7 +659,6 @@ static irqreturn_t ali_ircc_interrupt(int irq, void *dev_id)
676 struct ali_ircc_cb *self; 659 struct ali_ircc_cb *self;
677 int ret; 660 int ret;
678 661
679 IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__);
680 662
681 self = netdev_priv(dev); 663 self = netdev_priv(dev);
682 664
@@ -690,7 +672,6 @@ static irqreturn_t ali_ircc_interrupt(int irq, void *dev_id)
690 672
691 spin_unlock(&self->lock); 673 spin_unlock(&self->lock);
692 674
693 IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__);
694 return ret; 675 return ret;
695} 676}
696/* 677/*
@@ -704,7 +685,6 @@ static irqreturn_t ali_ircc_fir_interrupt(struct ali_ircc_cb *self)
704 __u8 eir, OldMessageCount; 685 __u8 eir, OldMessageCount;
705 int iobase, tmp; 686 int iobase, tmp;
706 687
707 IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __func__);
708 688
709 iobase = self->io.fir_base; 689 iobase = self->io.fir_base;
710 690
@@ -717,10 +697,10 @@ static irqreturn_t ali_ircc_fir_interrupt(struct ali_ircc_cb *self)
717 //self->ier = inb(iobase+FIR_IER); 2000/12/1 04:32PM 697 //self->ier = inb(iobase+FIR_IER); 2000/12/1 04:32PM
718 eir = self->InterruptID & self->ier; /* Mask out the interesting ones */ 698 eir = self->InterruptID & self->ier; /* Mask out the interesting ones */
719 699
720 IRDA_DEBUG(1, "%s(), self->InterruptID = %x\n", __func__,self->InterruptID); 700 pr_debug("%s(), self->InterruptID = %x\n", __func__, self->InterruptID);
721 IRDA_DEBUG(1, "%s(), self->LineStatus = %x\n", __func__,self->LineStatus); 701 pr_debug("%s(), self->LineStatus = %x\n", __func__, self->LineStatus);
722 IRDA_DEBUG(1, "%s(), self->ier = %x\n", __func__,self->ier); 702 pr_debug("%s(), self->ier = %x\n", __func__, self->ier);
723 IRDA_DEBUG(1, "%s(), eir = %x\n", __func__,eir); 703 pr_debug("%s(), eir = %x\n", __func__, eir);
724 704
725 /* Disable interrupts */ 705 /* Disable interrupts */
726 SetCOMInterrupts(self, FALSE); 706 SetCOMInterrupts(self, FALSE);
@@ -731,7 +711,8 @@ static irqreturn_t ali_ircc_fir_interrupt(struct ali_ircc_cb *self)
731 { 711 {
732 if (self->io.direction == IO_XMIT) /* TX */ 712 if (self->io.direction == IO_XMIT) /* TX */
733 { 713 {
734 IRDA_DEBUG(1, "%s(), ******* IIR_EOM (Tx) *******\n", __func__); 714 pr_debug("%s(), ******* IIR_EOM (Tx) *******\n",
715 __func__);
735 716
736 if(ali_ircc_dma_xmit_complete(self)) 717 if(ali_ircc_dma_xmit_complete(self))
737 { 718 {
@@ -750,23 +731,27 @@ static irqreturn_t ali_ircc_fir_interrupt(struct ali_ircc_cb *self)
750 } 731 }
751 else /* RX */ 732 else /* RX */
752 { 733 {
753 IRDA_DEBUG(1, "%s(), ******* IIR_EOM (Rx) *******\n", __func__); 734 pr_debug("%s(), ******* IIR_EOM (Rx) *******\n",
735 __func__);
754 736
755 if(OldMessageCount > ((self->LineStatus+1) & 0x07)) 737 if(OldMessageCount > ((self->LineStatus+1) & 0x07))
756 { 738 {
757 self->rcvFramesOverflow = TRUE; 739 self->rcvFramesOverflow = TRUE;
758 IRDA_DEBUG(1, "%s(), ******* self->rcvFramesOverflow = TRUE ********\n", __func__); 740 pr_debug("%s(), ******* self->rcvFramesOverflow = TRUE ********\n",
741 __func__);
759 } 742 }
760 743
761 if (ali_ircc_dma_receive_complete(self)) 744 if (ali_ircc_dma_receive_complete(self))
762 { 745 {
763 IRDA_DEBUG(1, "%s(), ******* receive complete ********\n", __func__); 746 pr_debug("%s(), ******* receive complete ********\n",
747 __func__);
764 748
765 self->ier = IER_EOM; 749 self->ier = IER_EOM;
766 } 750 }
767 else 751 else
768 { 752 {
769 IRDA_DEBUG(1, "%s(), ******* Not receive complete ********\n", __func__); 753 pr_debug("%s(), ******* Not receive complete ********\n",
754 __func__);
770 755
771 self->ier = IER_EOM | IER_TIMER; 756 self->ier = IER_EOM | IER_TIMER;
772 } 757 }
@@ -779,7 +764,8 @@ static irqreturn_t ali_ircc_fir_interrupt(struct ali_ircc_cb *self)
779 if(OldMessageCount > ((self->LineStatus+1) & 0x07)) 764 if(OldMessageCount > ((self->LineStatus+1) & 0x07))
780 { 765 {
781 self->rcvFramesOverflow = TRUE; 766 self->rcvFramesOverflow = TRUE;
782 IRDA_DEBUG(1, "%s(), ******* self->rcvFramesOverflow = TRUE *******\n", __func__); 767 pr_debug("%s(), ******* self->rcvFramesOverflow = TRUE *******\n",
768 __func__);
783 } 769 }
784 /* Disable Timer */ 770 /* Disable Timer */
785 switch_bank(iobase, BANK1); 771 switch_bank(iobase, BANK1);
@@ -811,7 +797,6 @@ static irqreturn_t ali_ircc_fir_interrupt(struct ali_ircc_cb *self)
811 /* Restore Interrupt */ 797 /* Restore Interrupt */
812 SetCOMInterrupts(self, TRUE); 798 SetCOMInterrupts(self, TRUE);
813 799
814 IRDA_DEBUG(1, "%s(), ----------------- End ---------------\n", __func__);
815 return IRQ_RETVAL(eir); 800 return IRQ_RETVAL(eir);
816} 801}
817 802
@@ -826,7 +811,6 @@ static irqreturn_t ali_ircc_sir_interrupt(struct ali_ircc_cb *self)
826 int iobase; 811 int iobase;
827 int iir, lsr; 812 int iir, lsr;
828 813
829 IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__);
830 814
831 iobase = self->io.sir_base; 815 iobase = self->io.sir_base;
832 816
@@ -835,13 +819,13 @@ static irqreturn_t ali_ircc_sir_interrupt(struct ali_ircc_cb *self)
835 /* Clear interrupt */ 819 /* Clear interrupt */
836 lsr = inb(iobase+UART_LSR); 820 lsr = inb(iobase+UART_LSR);
837 821
838 IRDA_DEBUG(4, "%s(), iir=%02x, lsr=%02x, iobase=%#x\n", __func__, 822 pr_debug("%s(), iir=%02x, lsr=%02x, iobase=%#x\n",
839 iir, lsr, iobase); 823 __func__, iir, lsr, iobase);
840 824
841 switch (iir) 825 switch (iir)
842 { 826 {
843 case UART_IIR_RLSI: 827 case UART_IIR_RLSI:
844 IRDA_DEBUG(2, "%s(), RLSI\n", __func__); 828 pr_debug("%s(), RLSI\n", __func__);
845 break; 829 break;
846 case UART_IIR_RDI: 830 case UART_IIR_RDI:
847 /* Receive interrupt */ 831 /* Receive interrupt */
@@ -855,15 +839,14 @@ static irqreturn_t ali_ircc_sir_interrupt(struct ali_ircc_cb *self)
855 } 839 }
856 break; 840 break;
857 default: 841 default:
858 IRDA_DEBUG(0, "%s(), unhandled IIR=%#x\n", __func__, iir); 842 pr_debug("%s(), unhandled IIR=%#x\n",
843 __func__, iir);
859 break; 844 break;
860 } 845 }
861 846
862 } 847 }
863 848
864 849
865 IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__);
866
867 return IRQ_RETVAL(iir); 850 return IRQ_RETVAL(iir);
868} 851}
869 852
@@ -879,7 +862,6 @@ static void ali_ircc_sir_receive(struct ali_ircc_cb *self)
879 int boguscount = 0; 862 int boguscount = 0;
880 int iobase; 863 int iobase;
881 864
882 IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__);
883 IRDA_ASSERT(self != NULL, return;); 865 IRDA_ASSERT(self != NULL, return;);
884 866
885 iobase = self->io.sir_base; 867 iobase = self->io.sir_base;
@@ -894,12 +876,11 @@ static void ali_ircc_sir_receive(struct ali_ircc_cb *self)
894 876
895 /* Make sure we don't stay here too long */ 877 /* Make sure we don't stay here too long */
896 if (boguscount++ > 32) { 878 if (boguscount++ > 32) {
897 IRDA_DEBUG(2,"%s(), breaking!\n", __func__); 879 pr_debug("%s(), breaking!\n", __func__);
898 break; 880 break;
899 } 881 }
900 } while (inb(iobase+UART_LSR) & UART_LSR_DR); 882 } while (inb(iobase+UART_LSR) & UART_LSR_DR);
901 883
902 IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ );
903} 884}
904 885
905/* 886/*
@@ -916,7 +897,6 @@ static void ali_ircc_sir_write_wakeup(struct ali_ircc_cb *self)
916 897
917 IRDA_ASSERT(self != NULL, return;); 898 IRDA_ASSERT(self != NULL, return;);
918 899
919 IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__ );
920 900
921 iobase = self->io.sir_base; 901 iobase = self->io.sir_base;
922 902
@@ -935,16 +915,18 @@ static void ali_ircc_sir_write_wakeup(struct ali_ircc_cb *self)
935 { 915 {
936 /* We must wait until all data are gone */ 916 /* We must wait until all data are gone */
937 while(!(inb(iobase+UART_LSR) & UART_LSR_TEMT)) 917 while(!(inb(iobase+UART_LSR) & UART_LSR_TEMT))
938 IRDA_DEBUG(1, "%s(), UART_LSR_THRE\n", __func__ ); 918 pr_debug("%s(), UART_LSR_THRE\n", __func__);
939 919
940 IRDA_DEBUG(1, "%s(), Changing speed! self->new_speed = %d\n", __func__ , self->new_speed); 920 pr_debug("%s(), Changing speed! self->new_speed = %d\n",
921 __func__, self->new_speed);
941 ali_ircc_change_speed(self, self->new_speed); 922 ali_ircc_change_speed(self, self->new_speed);
942 self->new_speed = 0; 923 self->new_speed = 0;
943 924
944 // benjamin 2000/11/10 06:32PM 925 // benjamin 2000/11/10 06:32PM
945 if (self->io.speed > 115200) 926 if (self->io.speed > 115200)
946 { 927 {
947 IRDA_DEBUG(2, "%s(), ali_ircc_change_speed from UART_LSR_TEMT\n", __func__ ); 928 pr_debug("%s(), ali_ircc_change_speed from UART_LSR_TEMT\n",
929 __func__);
948 930
949 self->ier = IER_EOM; 931 self->ier = IER_EOM;
950 // SetCOMInterrupts(self, TRUE); 932 // SetCOMInterrupts(self, TRUE);
@@ -962,7 +944,6 @@ static void ali_ircc_sir_write_wakeup(struct ali_ircc_cb *self)
962 outb(UART_IER_RDI, iobase+UART_IER); 944 outb(UART_IER_RDI, iobase+UART_IER);
963 } 945 }
964 946
965 IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ );
966} 947}
967 948
968static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud) 949static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud)
@@ -970,9 +951,8 @@ static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud)
970 struct net_device *dev = self->netdev; 951 struct net_device *dev = self->netdev;
971 int iobase; 952 int iobase;
972 953
973 IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __func__ );
974 954
975 IRDA_DEBUG(2, "%s(), setting speed = %d\n", __func__ , baud); 955 pr_debug("%s(), setting speed = %d\n", __func__, baud);
976 956
977 /* This function *must* be called with irq off and spin-lock. 957 /* This function *must* be called with irq off and spin-lock.
978 * - Jean II */ 958 * - Jean II */
@@ -1011,7 +991,6 @@ static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud)
1011 991
1012 netif_wake_queue(self->netdev); 992 netif_wake_queue(self->netdev);
1013 993
1014 IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ );
1015} 994}
1016 995
1017static void ali_ircc_fir_change_speed(struct ali_ircc_cb *priv, __u32 baud) 996static void ali_ircc_fir_change_speed(struct ali_ircc_cb *priv, __u32 baud)
@@ -1021,14 +1000,14 @@ static void ali_ircc_fir_change_speed(struct ali_ircc_cb *priv, __u32 baud)
1021 struct ali_ircc_cb *self = priv; 1000 struct ali_ircc_cb *self = priv;
1022 struct net_device *dev; 1001 struct net_device *dev;
1023 1002
1024 IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __func__ );
1025 1003
1026 IRDA_ASSERT(self != NULL, return;); 1004 IRDA_ASSERT(self != NULL, return;);
1027 1005
1028 dev = self->netdev; 1006 dev = self->netdev;
1029 iobase = self->io.fir_base; 1007 iobase = self->io.fir_base;
1030 1008
1031 IRDA_DEBUG(1, "%s(), self->io.speed = %d, change to speed = %d\n", __func__ ,self->io.speed,baud); 1009 pr_debug("%s(), self->io.speed = %d, change to speed = %d\n",
1010 __func__, self->io.speed, baud);
1032 1011
1033 /* Come from SIR speed */ 1012 /* Come from SIR speed */
1034 if(self->io.speed <=115200) 1013 if(self->io.speed <=115200)
@@ -1042,7 +1021,6 @@ static void ali_ircc_fir_change_speed(struct ali_ircc_cb *priv, __u32 baud)
1042 // Set Dongle Speed mode 1021 // Set Dongle Speed mode
1043 ali_ircc_change_dongle_speed(self, baud); 1022 ali_ircc_change_dongle_speed(self, baud);
1044 1023
1045 IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ );
1046} 1024}
1047 1025
1048/* 1026/*
@@ -1060,9 +1038,8 @@ static void ali_ircc_sir_change_speed(struct ali_ircc_cb *priv, __u32 speed)
1060 int lcr; /* Line control reg */ 1038 int lcr; /* Line control reg */
1061 int divisor; 1039 int divisor;
1062 1040
1063 IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __func__ );
1064 1041
1065 IRDA_DEBUG(1, "%s(), Setting speed to: %d\n", __func__ , speed); 1042 pr_debug("%s(), Setting speed to: %d\n", __func__, speed);
1066 1043
1067 IRDA_ASSERT(self != NULL, return;); 1044 IRDA_ASSERT(self != NULL, return;);
1068 1045
@@ -1116,7 +1093,6 @@ static void ali_ircc_sir_change_speed(struct ali_ircc_cb *priv, __u32 speed)
1116 1093
1117 spin_unlock_irqrestore(&self->lock, flags); 1094 spin_unlock_irqrestore(&self->lock, flags);
1118 1095
1119 IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ );
1120} 1096}
1121 1097
1122static void ali_ircc_change_dongle_speed(struct ali_ircc_cb *priv, int speed) 1098static void ali_ircc_change_dongle_speed(struct ali_ircc_cb *priv, int speed)
@@ -1126,14 +1102,14 @@ static void ali_ircc_change_dongle_speed(struct ali_ircc_cb *priv, int speed)
1126 int iobase,dongle_id; 1102 int iobase,dongle_id;
1127 int tmp = 0; 1103 int tmp = 0;
1128 1104
1129 IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __func__ );
1130 1105
1131 iobase = self->io.fir_base; /* or iobase = self->io.sir_base; */ 1106 iobase = self->io.fir_base; /* or iobase = self->io.sir_base; */
1132 dongle_id = self->io.dongle_id; 1107 dongle_id = self->io.dongle_id;
1133 1108
1134 /* We are already locked, no need to do it again */ 1109 /* We are already locked, no need to do it again */
1135 1110
1136 IRDA_DEBUG(1, "%s(), Set Speed for %s , Speed = %d\n", __func__ , dongle_types[dongle_id], speed); 1111 pr_debug("%s(), Set Speed for %s , Speed = %d\n",
1112 __func__, dongle_types[dongle_id], speed);
1137 1113
1138 switch_bank(iobase, BANK2); 1114 switch_bank(iobase, BANK2);
1139 tmp = inb(iobase+FIR_IRDA_CR); 1115 tmp = inb(iobase+FIR_IRDA_CR);
@@ -1297,7 +1273,6 @@ static void ali_ircc_change_dongle_speed(struct ali_ircc_cb *priv, int speed)
1297 1273
1298 switch_bank(iobase, BANK0); 1274 switch_bank(iobase, BANK0);
1299 1275
1300 IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ );
1301} 1276}
1302 1277
1303/* 1278/*
@@ -1310,11 +1285,10 @@ static int ali_ircc_sir_write(int iobase, int fifo_size, __u8 *buf, int len)
1310{ 1285{
1311 int actual = 0; 1286 int actual = 0;
1312 1287
1313 IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__ );
1314 1288
1315 /* Tx FIFO should be empty! */ 1289 /* Tx FIFO should be empty! */
1316 if (!(inb(iobase+UART_LSR) & UART_LSR_THRE)) { 1290 if (!(inb(iobase+UART_LSR) & UART_LSR_THRE)) {
1317 IRDA_DEBUG(0, "%s(), failed, fifo not empty!\n", __func__ ); 1291 pr_debug("%s(), failed, fifo not empty!\n", __func__);
1318 return 0; 1292 return 0;
1319 } 1293 }
1320 1294
@@ -1326,7 +1300,6 @@ static int ali_ircc_sir_write(int iobase, int fifo_size, __u8 *buf, int len)
1326 actual++; 1300 actual++;
1327 } 1301 }
1328 1302
1329 IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ );
1330 return actual; 1303 return actual;
1331} 1304}
1332 1305
@@ -1342,7 +1315,6 @@ static int ali_ircc_net_open(struct net_device *dev)
1342 int iobase; 1315 int iobase;
1343 char hwname[32]; 1316 char hwname[32];
1344 1317
1345 IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__ );
1346 1318
1347 IRDA_ASSERT(dev != NULL, return -1;); 1319 IRDA_ASSERT(dev != NULL, return -1;);
1348 1320
@@ -1386,7 +1358,6 @@ static int ali_ircc_net_open(struct net_device *dev)
1386 */ 1358 */
1387 self->irlap = irlap_open(dev, &self->qos, hwname); 1359 self->irlap = irlap_open(dev, &self->qos, hwname);
1388 1360
1389 IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ );
1390 1361
1391 return 0; 1362 return 0;
1392} 1363}
@@ -1403,7 +1374,6 @@ static int ali_ircc_net_close(struct net_device *dev)
1403 struct ali_ircc_cb *self; 1374 struct ali_ircc_cb *self;
1404 //int iobase; 1375 //int iobase;
1405 1376
1406 IRDA_DEBUG(4, "%s(), ---------------- Start ----------------\n", __func__ );
1407 1377
1408 IRDA_ASSERT(dev != NULL, return -1;); 1378 IRDA_ASSERT(dev != NULL, return -1;);
1409 1379
@@ -1426,7 +1396,6 @@ static int ali_ircc_net_close(struct net_device *dev)
1426 free_irq(self->io.irq, dev); 1396 free_irq(self->io.irq, dev);
1427 free_dma(self->io.dma); 1397 free_dma(self->io.dma);
1428 1398
1429 IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ );
1430 1399
1431 return 0; 1400 return 0;
1432} 1401}
@@ -1446,7 +1415,6 @@ static netdev_tx_t ali_ircc_fir_hard_xmit(struct sk_buff *skb,
1446 __u32 speed; 1415 __u32 speed;
1447 int mtt, diff; 1416 int mtt, diff;
1448 1417
1449 IRDA_DEBUG(1, "%s(), ---------------- Start -----------------\n", __func__ );
1450 1418
1451 self = netdev_priv(dev); 1419 self = netdev_priv(dev);
1452 iobase = self->io.fir_base; 1420 iobase = self->io.fir_base;
@@ -1500,7 +1468,8 @@ static netdev_tx_t ali_ircc_fir_hard_xmit(struct sk_buff *skb,
1500 diff = self->now.tv_usec - self->stamp.tv_usec; 1468 diff = self->now.tv_usec - self->stamp.tv_usec;
1501 /* self->stamp is set from ali_ircc_dma_receive_complete() */ 1469 /* self->stamp is set from ali_ircc_dma_receive_complete() */
1502 1470
1503 IRDA_DEBUG(1, "%s(), ******* diff = %d *******\n", __func__ , diff); 1471 pr_debug("%s(), ******* diff = %d *******\n",
1472 __func__, diff);
1504 1473
1505 if (diff < 0) 1474 if (diff < 0)
1506 diff += 1000000; 1475 diff += 1000000;
@@ -1522,7 +1491,8 @@ static netdev_tx_t ali_ircc_fir_hard_xmit(struct sk_buff *skb,
1522 /* Adjust for timer resolution */ 1491 /* Adjust for timer resolution */
1523 mtt = (mtt+250) / 500; /* 4 discard, 5 get advanced, Let's round off */ 1492 mtt = (mtt+250) / 500; /* 4 discard, 5 get advanced, Let's round off */
1524 1493
1525 IRDA_DEBUG(1, "%s(), ************** mtt = %d ***********\n", __func__ , mtt); 1494 pr_debug("%s(), ************** mtt = %d ***********\n",
1495 __func__, mtt);
1526 1496
1527 /* Setup timer */ 1497 /* Setup timer */
1528 if (mtt == 1) /* 500 us */ 1498 if (mtt == 1) /* 500 us */
@@ -1579,7 +1549,6 @@ static netdev_tx_t ali_ircc_fir_hard_xmit(struct sk_buff *skb,
1579 spin_unlock_irqrestore(&self->lock, flags); 1549 spin_unlock_irqrestore(&self->lock, flags);
1580 dev_kfree_skb(skb); 1550 dev_kfree_skb(skb);
1581 1551
1582 IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ );
1583 return NETDEV_TX_OK; 1552 return NETDEV_TX_OK;
1584} 1553}
1585 1554
@@ -1590,7 +1559,6 @@ static void ali_ircc_dma_xmit(struct ali_ircc_cb *self)
1590 unsigned char FIFO_OPTI, Hi, Lo; 1559 unsigned char FIFO_OPTI, Hi, Lo;
1591 1560
1592 1561
1593 IRDA_DEBUG(1, "%s(), ---------------- Start -----------------\n", __func__ );
1594 1562
1595 iobase = self->io.fir_base; 1563 iobase = self->io.fir_base;
1596 1564
@@ -1641,7 +1609,8 @@ static void ali_ircc_dma_xmit(struct ali_ircc_cb *self)
1641 tmp = inb(iobase+FIR_LCR_B); 1609 tmp = inb(iobase+FIR_LCR_B);
1642 tmp &= ~0x20; // Disable SIP 1610 tmp &= ~0x20; // Disable SIP
1643 outb(((unsigned char)(tmp & 0x3f) | LCR_B_TX_MODE) & ~LCR_B_BW, iobase+FIR_LCR_B); 1611 outb(((unsigned char)(tmp & 0x3f) | LCR_B_TX_MODE) & ~LCR_B_BW, iobase+FIR_LCR_B);
1644 IRDA_DEBUG(1, "%s(), *** Change to TX mode: FIR_LCR_B = 0x%x ***\n", __func__ , inb(iobase+FIR_LCR_B)); 1612 pr_debug("%s(), *** Change to TX mode: FIR_LCR_B = 0x%x ***\n",
1613 __func__, inb(iobase + FIR_LCR_B));
1645 1614
1646 outb(0, iobase+FIR_LSR); 1615 outb(0, iobase+FIR_LSR);
1647 1616
@@ -1651,7 +1620,6 @@ static void ali_ircc_dma_xmit(struct ali_ircc_cb *self)
1651 1620
1652 switch_bank(iobase, BANK0); 1621 switch_bank(iobase, BANK0);
1653 1622
1654 IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ );
1655} 1623}
1656 1624
1657static int ali_ircc_dma_xmit_complete(struct ali_ircc_cb *self) 1625static int ali_ircc_dma_xmit_complete(struct ali_ircc_cb *self)
@@ -1659,7 +1627,6 @@ static int ali_ircc_dma_xmit_complete(struct ali_ircc_cb *self)
1659 int iobase; 1627 int iobase;
1660 int ret = TRUE; 1628 int ret = TRUE;
1661 1629
1662 IRDA_DEBUG(1, "%s(), ---------------- Start -----------------\n", __func__ );
1663 1630
1664 iobase = self->io.fir_base; 1631 iobase = self->io.fir_base;
1665 1632
@@ -1716,7 +1683,6 @@ static int ali_ircc_dma_xmit_complete(struct ali_ircc_cb *self)
1716 1683
1717 switch_bank(iobase, BANK0); 1684 switch_bank(iobase, BANK0);
1718 1685
1719 IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ );
1720 return ret; 1686 return ret;
1721} 1687}
1722 1688
@@ -1731,7 +1697,6 @@ static int ali_ircc_dma_receive(struct ali_ircc_cb *self)
1731{ 1697{
1732 int iobase, tmp; 1698 int iobase, tmp;
1733 1699
1734 IRDA_DEBUG(1, "%s(), ---------------- Start -----------------\n", __func__ );
1735 1700
1736 iobase = self->io.fir_base; 1701 iobase = self->io.fir_base;
1737 1702
@@ -1769,7 +1734,8 @@ static int ali_ircc_dma_receive(struct ali_ircc_cb *self)
1769 //switch_bank(iobase, BANK0); 1734 //switch_bank(iobase, BANK0);
1770 tmp = inb(iobase+FIR_LCR_B); 1735 tmp = inb(iobase+FIR_LCR_B);
1771 outb((unsigned char)(tmp &0x3f) | LCR_B_RX_MODE | LCR_B_BW , iobase + FIR_LCR_B); // 2000/12/1 05:16PM 1736 outb((unsigned char)(tmp &0x3f) | LCR_B_RX_MODE | LCR_B_BW , iobase + FIR_LCR_B); // 2000/12/1 05:16PM
1772 IRDA_DEBUG(1, "%s(), *** Change To RX mode: FIR_LCR_B = 0x%x ***\n", __func__ , inb(iobase+FIR_LCR_B)); 1737 pr_debug("%s(), *** Change To RX mode: FIR_LCR_B = 0x%x ***\n",
1738 __func__, inb(iobase + FIR_LCR_B));
1773 1739
1774 /* Set Rx Threshold */ 1740 /* Set Rx Threshold */
1775 switch_bank(iobase, BANK1); 1741 switch_bank(iobase, BANK1);
@@ -1781,7 +1747,6 @@ static int ali_ircc_dma_receive(struct ali_ircc_cb *self)
1781 outb(CR_DMA_EN | CR_DMA_BURST, iobase+FIR_CR); 1747 outb(CR_DMA_EN | CR_DMA_BURST, iobase+FIR_CR);
1782 1748
1783 switch_bank(iobase, BANK0); 1749 switch_bank(iobase, BANK0);
1784 IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ );
1785 return 0; 1750 return 0;
1786} 1751}
1787 1752
@@ -1792,8 +1757,6 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self)
1792 __u8 status, MessageCount; 1757 __u8 status, MessageCount;
1793 int len, i, iobase, val; 1758 int len, i, iobase, val;
1794 1759
1795 IRDA_DEBUG(1, "%s(), ---------------- Start -----------------\n", __func__ );
1796
1797 st_fifo = &self->st_fifo; 1760 st_fifo = &self->st_fifo;
1798 iobase = self->io.fir_base; 1761 iobase = self->io.fir_base;
1799 1762
@@ -1801,7 +1764,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self)
1801 MessageCount = inb(iobase+ FIR_LSR)&0x07; 1764 MessageCount = inb(iobase+ FIR_LSR)&0x07;
1802 1765
1803 if (MessageCount > 0) 1766 if (MessageCount > 0)
1804 IRDA_DEBUG(0, "%s(), Message count = %d,\n", __func__ , MessageCount); 1767 pr_debug("%s(), Message count = %d\n", __func__, MessageCount);
1805 1768
1806 for (i=0; i<=MessageCount; i++) 1769 for (i=0; i<=MessageCount; i++)
1807 { 1770 {
@@ -1814,11 +1777,11 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self)
1814 len = len << 8; 1777 len = len << 8;
1815 len |= inb(iobase+FIR_RX_DSR_LO); 1778 len |= inb(iobase+FIR_RX_DSR_LO);
1816 1779
1817 IRDA_DEBUG(1, "%s(), RX Length = 0x%.2x,\n", __func__ , len); 1780 pr_debug("%s(), RX Length = 0x%.2x,\n", __func__ , len);
1818 IRDA_DEBUG(1, "%s(), RX Status = 0x%.2x,\n", __func__ , status); 1781 pr_debug("%s(), RX Status = 0x%.2x,\n", __func__ , status);
1819 1782
1820 if (st_fifo->tail >= MAX_RX_WINDOW) { 1783 if (st_fifo->tail >= MAX_RX_WINDOW) {
1821 IRDA_DEBUG(0, "%s(), window is full!\n", __func__ ); 1784 pr_debug("%s(), window is full!\n", __func__);
1822 continue; 1785 continue;
1823 } 1786 }
1824 1787
@@ -1841,7 +1804,8 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self)
1841 /* Check for errors */ 1804 /* Check for errors */
1842 if ((status & 0xd8) || self->rcvFramesOverflow || (len==0)) 1805 if ((status & 0xd8) || self->rcvFramesOverflow || (len==0))
1843 { 1806 {
1844 IRDA_DEBUG(0,"%s(), ************* RX Errors ************\n", __func__ ); 1807 pr_debug("%s(), ************* RX Errors ************\n",
1808 __func__);
1845 1809
1846 /* Skip frame */ 1810 /* Skip frame */
1847 self->netdev->stats.rx_errors++; 1811 self->netdev->stats.rx_errors++;
@@ -1851,29 +1815,34 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self)
1851 if (status & LSR_FIFO_UR) 1815 if (status & LSR_FIFO_UR)
1852 { 1816 {
1853 self->netdev->stats.rx_frame_errors++; 1817 self->netdev->stats.rx_frame_errors++;
1854 IRDA_DEBUG(0,"%s(), ************* FIFO Errors ************\n", __func__ ); 1818 pr_debug("%s(), ************* FIFO Errors ************\n",
1819 __func__);
1855 } 1820 }
1856 if (status & LSR_FRAME_ERROR) 1821 if (status & LSR_FRAME_ERROR)
1857 { 1822 {
1858 self->netdev->stats.rx_frame_errors++; 1823 self->netdev->stats.rx_frame_errors++;
1859 IRDA_DEBUG(0,"%s(), ************* FRAME Errors ************\n", __func__ ); 1824 pr_debug("%s(), ************* FRAME Errors ************\n",
1825 __func__);
1860 } 1826 }
1861 1827
1862 if (status & LSR_CRC_ERROR) 1828 if (status & LSR_CRC_ERROR)
1863 { 1829 {
1864 self->netdev->stats.rx_crc_errors++; 1830 self->netdev->stats.rx_crc_errors++;
1865 IRDA_DEBUG(0,"%s(), ************* CRC Errors ************\n", __func__ ); 1831 pr_debug("%s(), ************* CRC Errors ************\n",
1832 __func__);
1866 } 1833 }
1867 1834
1868 if(self->rcvFramesOverflow) 1835 if(self->rcvFramesOverflow)
1869 { 1836 {
1870 self->netdev->stats.rx_frame_errors++; 1837 self->netdev->stats.rx_frame_errors++;
1871 IRDA_DEBUG(0,"%s(), ************* Overran DMA buffer ************\n", __func__ ); 1838 pr_debug("%s(), ************* Overran DMA buffer ************\n",
1839 __func__);
1872 } 1840 }
1873 if(len == 0) 1841 if(len == 0)
1874 { 1842 {
1875 self->netdev->stats.rx_frame_errors++; 1843 self->netdev->stats.rx_frame_errors++;
1876 IRDA_DEBUG(0,"%s(), ********** Receive Frame Size = 0 *********\n", __func__ ); 1844 pr_debug("%s(), ********** Receive Frame Size = 0 *********\n",
1845 __func__);
1877 } 1846 }
1878 } 1847 }
1879 else 1848 else
@@ -1885,7 +1854,8 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self)
1885 val = inb(iobase+FIR_BSR); 1854 val = inb(iobase+FIR_BSR);
1886 if ((val& BSR_FIFO_NOT_EMPTY)== 0x80) 1855 if ((val& BSR_FIFO_NOT_EMPTY)== 0x80)
1887 { 1856 {
1888 IRDA_DEBUG(0, "%s(), ************* BSR_FIFO_NOT_EMPTY ************\n", __func__ ); 1857 pr_debug("%s(), ************* BSR_FIFO_NOT_EMPTY ************\n",
1858 __func__);
1889 1859
1890 /* Put this entry back in fifo */ 1860 /* Put this entry back in fifo */
1891 st_fifo->head--; 1861 st_fifo->head--;
@@ -1946,7 +1916,6 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self)
1946 1916
1947 switch_bank(iobase, BANK0); 1917 switch_bank(iobase, BANK0);
1948 1918
1949 IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ );
1950 return TRUE; 1919 return TRUE;
1951} 1920}
1952 1921
@@ -1966,7 +1935,6 @@ static netdev_tx_t ali_ircc_sir_hard_xmit(struct sk_buff *skb,
1966 int iobase; 1935 int iobase;
1967 __u32 speed; 1936 __u32 speed;
1968 1937
1969 IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__ );
1970 1938
1971 IRDA_ASSERT(dev != NULL, return NETDEV_TX_OK;); 1939 IRDA_ASSERT(dev != NULL, return NETDEV_TX_OK;);
1972 1940
@@ -2015,7 +1983,6 @@ static netdev_tx_t ali_ircc_sir_hard_xmit(struct sk_buff *skb,
2015 1983
2016 dev_kfree_skb(skb); 1984 dev_kfree_skb(skb);
2017 1985
2018 IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ );
2019 1986
2020 return NETDEV_TX_OK; 1987 return NETDEV_TX_OK;
2021} 1988}
@@ -2034,7 +2001,6 @@ static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2034 unsigned long flags; 2001 unsigned long flags;
2035 int ret = 0; 2002 int ret = 0;
2036 2003
2037 IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__ );
2038 2004
2039 IRDA_ASSERT(dev != NULL, return -1;); 2005 IRDA_ASSERT(dev != NULL, return -1;);
2040 2006
@@ -2042,11 +2008,11 @@ static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2042 2008
2043 IRDA_ASSERT(self != NULL, return -1;); 2009 IRDA_ASSERT(self != NULL, return -1;);
2044 2010
2045 IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __func__ , dev->name, cmd); 2011 pr_debug("%s(), %s, (cmd=0x%X)\n", __func__ , dev->name, cmd);
2046 2012
2047 switch (cmd) { 2013 switch (cmd) {
2048 case SIOCSBANDWIDTH: /* Set bandwidth */ 2014 case SIOCSBANDWIDTH: /* Set bandwidth */
2049 IRDA_DEBUG(1, "%s(), SIOCSBANDWIDTH\n", __func__ ); 2015 pr_debug("%s(), SIOCSBANDWIDTH\n", __func__);
2050 /* 2016 /*
2051 * This function will also be used by IrLAP to change the 2017 * This function will also be used by IrLAP to change the
2052 * speed, so we still must allow for speed change within 2018 * speed, so we still must allow for speed change within
@@ -2060,13 +2026,13 @@ static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2060 spin_unlock_irqrestore(&self->lock, flags); 2026 spin_unlock_irqrestore(&self->lock, flags);
2061 break; 2027 break;
2062 case SIOCSMEDIABUSY: /* Set media busy */ 2028 case SIOCSMEDIABUSY: /* Set media busy */
2063 IRDA_DEBUG(1, "%s(), SIOCSMEDIABUSY\n", __func__ ); 2029 pr_debug("%s(), SIOCSMEDIABUSY\n", __func__);
2064 if (!capable(CAP_NET_ADMIN)) 2030 if (!capable(CAP_NET_ADMIN))
2065 return -EPERM; 2031 return -EPERM;
2066 irda_device_set_media_busy(self->netdev, TRUE); 2032 irda_device_set_media_busy(self->netdev, TRUE);
2067 break; 2033 break;
2068 case SIOCGRECEIVING: /* Check if we are receiving right now */ 2034 case SIOCGRECEIVING: /* Check if we are receiving right now */
2069 IRDA_DEBUG(2, "%s(), SIOCGRECEIVING\n", __func__ ); 2035 pr_debug("%s(), SIOCGRECEIVING\n", __func__);
2070 /* This is protected */ 2036 /* This is protected */
2071 irq->ifr_receiving = ali_ircc_is_receiving(self); 2037 irq->ifr_receiving = ali_ircc_is_receiving(self);
2072 break; 2038 break;
@@ -2074,7 +2040,6 @@ static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2074 ret = -EOPNOTSUPP; 2040 ret = -EOPNOTSUPP;
2075 } 2041 }
2076 2042
2077 IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ );
2078 2043
2079 return ret; 2044 return ret;
2080} 2045}
@@ -2091,7 +2056,6 @@ static int ali_ircc_is_receiving(struct ali_ircc_cb *self)
2091 int status = FALSE; 2056 int status = FALSE;
2092 int iobase; 2057 int iobase;
2093 2058
2094 IRDA_DEBUG(2, "%s(), ---------------- Start -----------------\n", __func__ );
2095 2059
2096 IRDA_ASSERT(self != NULL, return FALSE;); 2060 IRDA_ASSERT(self != NULL, return FALSE;);
2097 2061
@@ -2105,7 +2069,8 @@ static int ali_ircc_is_receiving(struct ali_ircc_cb *self)
2105 if((inb(iobase+FIR_FIFO_FR) & 0x3f) != 0) 2069 if((inb(iobase+FIR_FIFO_FR) & 0x3f) != 0)
2106 { 2070 {
2107 /* We are receiving something */ 2071 /* We are receiving something */
2108 IRDA_DEBUG(1, "%s(), We are receiving something\n", __func__ ); 2072 pr_debug("%s(), We are receiving something\n",
2073 __func__);
2109 status = TRUE; 2074 status = TRUE;
2110 } 2075 }
2111 switch_bank(iobase, BANK0); 2076 switch_bank(iobase, BANK0);
@@ -2117,7 +2082,6 @@ static int ali_ircc_is_receiving(struct ali_ircc_cb *self)
2117 2082
2118 spin_unlock_irqrestore(&self->lock, flags); 2083 spin_unlock_irqrestore(&self->lock, flags);
2119 2084
2120 IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ );
2121 2085
2122 return status; 2086 return status;
2123} 2087}
@@ -2163,7 +2127,8 @@ static void SetCOMInterrupts(struct ali_ircc_cb *self , unsigned char enable)
2163 2127
2164 int iobase = self->io.fir_base; /* or sir_base */ 2128 int iobase = self->io.fir_base; /* or sir_base */
2165 2129
2166 IRDA_DEBUG(2, "%s(), -------- Start -------- ( Enable = %d )\n", __func__ , enable); 2130 pr_debug("%s(), -------- Start -------- ( Enable = %d )\n",
2131 __func__, enable);
2167 2132
2168 /* Enable the interrupt which we wish to */ 2133 /* Enable the interrupt which we wish to */
2169 if (enable){ 2134 if (enable){
@@ -2204,14 +2169,12 @@ static void SetCOMInterrupts(struct ali_ircc_cb *self , unsigned char enable)
2204 else 2169 else
2205 outb(newMask, iobase+UART_IER); 2170 outb(newMask, iobase+UART_IER);
2206 2171
2207 IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ );
2208} 2172}
2209 2173
2210static void SIR2FIR(int iobase) 2174static void SIR2FIR(int iobase)
2211{ 2175{
2212 //unsigned char tmp; 2176 //unsigned char tmp;
2213 2177
2214 IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __func__ );
2215 2178
2216 /* Already protected (change_speed() or setup()), no need to lock. 2179 /* Already protected (change_speed() or setup()), no need to lock.
2217 * Jean II */ 2180 * Jean II */
@@ -2227,14 +2190,12 @@ static void SIR2FIR(int iobase)
2227 //tmp |= 0x20; 2190 //tmp |= 0x20;
2228 //outb(tmp, iobase+FIR_LCR_B); 2191 //outb(tmp, iobase+FIR_LCR_B);
2229 2192
2230 IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ );
2231} 2193}
2232 2194
2233static void FIR2SIR(int iobase) 2195static void FIR2SIR(int iobase)
2234{ 2196{
2235 unsigned char val; 2197 unsigned char val;
2236 2198
2237 IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __func__ );
2238 2199
2239 /* Already protected (change_speed() or setup()), no need to lock. 2200 /* Already protected (change_speed() or setup()), no need to lock.
2240 * Jean II */ 2201 * Jean II */
@@ -2250,7 +2211,6 @@ static void FIR2SIR(int iobase)
2250 val = inb(iobase+UART_LSR); 2211 val = inb(iobase+UART_LSR);
2251 val = inb(iobase+UART_MSR); 2212 val = inb(iobase+UART_MSR);
2252 2213
2253 IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ );
2254} 2214}
2255 2215
2256MODULE_AUTHOR("Benjamin Kong <benjamin_kong@ali.com.tw>"); 2216MODULE_AUTHOR("Benjamin Kong <benjamin_kong@ali.com.tw>");
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c
index a87a82ca111f..b337e6d23a88 100644
--- a/drivers/net/irda/donauboe.c
+++ b/drivers/net/irda/donauboe.c
@@ -232,7 +232,7 @@ char head=tete;
232for (i=0;i<len;i+=16) { 232for (i=0;i<len;i+=16) {
233 for (j=0;j<16 && i+j<len;j++) { sprintf(&dump[3*j],"%02x.",data[i+j]); } 233 for (j=0;j<16 && i+j<len;j++) { sprintf(&dump[3*j],"%02x.",data[i+j]); }
234 dump [3*j]=0; 234 dump [3*j]=0;
235 IRDA_DEBUG (2, "%c%s\n",head , dump); 235 pr_debug("%c%s\n", head, dump);
236 head='+'; 236 head='+';
237 } 237 }
238} 238}
@@ -245,8 +245,6 @@ toshoboe_dumpregs (struct toshoboe_cb *self)
245{ 245{
246 __u32 ringbase; 246 __u32 ringbase;
247 247
248 IRDA_DEBUG (4, "%s()\n", __func__);
249
250 ringbase = INB (OBOE_RING_BASE0) << 10; 248 ringbase = INB (OBOE_RING_BASE0) << 10;
251 ringbase |= INB (OBOE_RING_BASE1) << 18; 249 ringbase |= INB (OBOE_RING_BASE1) << 18;
252 ringbase |= INB (OBOE_RING_BASE2) << 26; 250 ringbase |= INB (OBOE_RING_BASE2) << 26;
@@ -293,8 +291,6 @@ static void
293toshoboe_disablebm (struct toshoboe_cb *self) 291toshoboe_disablebm (struct toshoboe_cb *self)
294{ 292{
295 __u8 command; 293 __u8 command;
296 IRDA_DEBUG (4, "%s()\n", __func__);
297
298 pci_read_config_byte (self->pdev, PCI_COMMAND, &command); 294 pci_read_config_byte (self->pdev, PCI_COMMAND, &command);
299 command &= ~PCI_COMMAND_MASTER; 295 command &= ~PCI_COMMAND_MASTER;
300 pci_write_config_byte (self->pdev, PCI_COMMAND, command); 296 pci_write_config_byte (self->pdev, PCI_COMMAND, command);
@@ -305,8 +301,6 @@ toshoboe_disablebm (struct toshoboe_cb *self)
305static void 301static void
306toshoboe_stopchip (struct toshoboe_cb *self) 302toshoboe_stopchip (struct toshoboe_cb *self)
307{ 303{
308 IRDA_DEBUG (4, "%s()\n", __func__);
309
310 /*Disable interrupts */ 304 /*Disable interrupts */
311 OUTB (0x0, OBOE_IER); 305 OUTB (0x0, OBOE_IER);
312 /*Disable DMA, Disable Rx, Disable Tx */ 306 /*Disable DMA, Disable Rx, Disable Tx */
@@ -350,7 +344,7 @@ toshoboe_setbaud (struct toshoboe_cb *self)
350 __u16 pconfig = 0; 344 __u16 pconfig = 0;
351 __u8 config0l = 0; 345 __u8 config0l = 0;
352 346
353 IRDA_DEBUG (2, "%s(%d/%d)\n", __func__, self->speed, self->io.speed); 347 pr_debug("%s(%d/%d)\n", __func__, self->speed, self->io.speed);
354 348
355 switch (self->speed) 349 switch (self->speed)
356 { 350 {
@@ -482,7 +476,6 @@ toshoboe_setbaud (struct toshoboe_cb *self)
482static void 476static void
483toshoboe_enablebm (struct toshoboe_cb *self) 477toshoboe_enablebm (struct toshoboe_cb *self)
484{ 478{
485 IRDA_DEBUG (4, "%s()\n", __func__);
486 pci_set_master (self->pdev); 479 pci_set_master (self->pdev);
487} 480}
488 481
@@ -492,8 +485,6 @@ toshoboe_initring (struct toshoboe_cb *self)
492{ 485{
493 int i; 486 int i;
494 487
495 IRDA_DEBUG (4, "%s()\n", __func__);
496
497 for (i = 0; i < TX_SLOTS; ++i) 488 for (i = 0; i < TX_SLOTS; ++i)
498 { 489 {
499 self->ring->tx[i].len = 0; 490 self->ring->tx[i].len = 0;
@@ -550,8 +541,6 @@ toshoboe_startchip (struct toshoboe_cb *self)
550{ 541{
551 __u32 physaddr; 542 __u32 physaddr;
552 543
553 IRDA_DEBUG (4, "%s()\n", __func__);
554
555 toshoboe_initring (self); 544 toshoboe_initring (self);
556 toshoboe_enablebm (self); 545 toshoboe_enablebm (self);
557 OUTBP (OBOE_CONFIG1_RESET, OBOE_CONFIG1); 546 OUTBP (OBOE_CONFIG1_RESET, OBOE_CONFIG1);
@@ -636,9 +625,8 @@ toshoboe_makemttpacket (struct toshoboe_cb *self, void *buf, int mtt)
636 xbofs=xbofs/80000; /*Eight bits per byte, and mtt is in us*/ 625 xbofs=xbofs/80000; /*Eight bits per byte, and mtt is in us*/
637 xbofs++; 626 xbofs++;
638 627
639 IRDA_DEBUG (2, DRIVER_NAME 628 pr_debug(DRIVER_NAME ": generated mtt of %d bytes for %d us at %d baud\n",
640 ": generated mtt of %d bytes for %d us at %d baud\n" 629 xbofs, mtt, self->speed);
641 , xbofs,mtt,self->speed);
642 630
643 if (xbofs > TX_LEN) 631 if (xbofs > TX_LEN)
644 { 632 {
@@ -824,8 +812,6 @@ toshoboe_probe (struct toshoboe_cb *self)
824#endif 812#endif
825 unsigned long flags; 813 unsigned long flags;
826 814
827 IRDA_DEBUG (4, "%s()\n", __func__);
828
829 if (request_irq (self->io.irq, toshoboe_probeinterrupt, 815 if (request_irq (self->io.irq, toshoboe_probeinterrupt,
830 self->io.irqflags, "toshoboe", (void *) self)) 816 self->io.irqflags, "toshoboe", (void *) self))
831 { 817 {
@@ -983,10 +969,10 @@ toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev)
983 969
984 IRDA_ASSERT (self != NULL, return NETDEV_TX_OK; ); 970 IRDA_ASSERT (self != NULL, return NETDEV_TX_OK; );
985 971
986 IRDA_DEBUG (1, "%s.tx:%x(%x)%x\n", __func__ 972 pr_debug("%s.tx:%x(%x)%x\n",
987 ,skb->len,self->txpending,INB (OBOE_ENABLEH)); 973 __func__, skb->len, self->txpending, INB(OBOE_ENABLEH));
988 if (!cb->magic) { 974 if (!cb->magic) {
989 IRDA_DEBUG (2, "%s.Not IrLAP:%x\n", __func__, cb->magic); 975 pr_debug("%s.Not IrLAP:%x\n", __func__, cb->magic);
990#ifdef DUMP_PACKETS 976#ifdef DUMP_PACKETS
991 _dumpbufs(skb->data,skb->len,'>'); 977 _dumpbufs(skb->data,skb->len,'>');
992#endif 978#endif
@@ -1012,8 +998,8 @@ toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev)
1012 if (self->txpending || skb->len) 998 if (self->txpending || skb->len)
1013 { 999 {
1014 self->new_speed = speed; 1000 self->new_speed = speed;
1015 IRDA_DEBUG (1, "%s: Queued TxDone scheduled speed change %d\n" , 1001 pr_debug("%s: Queued TxDone scheduled speed change %d\n" ,
1016 __func__, speed); 1002 __func__, speed);
1017 /* if no data, that's all! */ 1003 /* if no data, that's all! */
1018 if (!skb->len) 1004 if (!skb->len)
1019 { 1005 {
@@ -1055,8 +1041,7 @@ toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev)
1055 /* which we will add a wrong checksum to */ 1041 /* which we will add a wrong checksum to */
1056 1042
1057 mtt = toshoboe_makemttpacket (self, self->tx_bufs[self->txs], mtt); 1043 mtt = toshoboe_makemttpacket (self, self->tx_bufs[self->txs], mtt);
1058 IRDA_DEBUG (1, "%s.mtt:%x(%x)%d\n", __func__ 1044 pr_debug("%s.mtt:%x(%x)%d\n", __func__, skb->len, mtt, self->txpending);
1059 ,skb->len,mtt,self->txpending);
1060 if (mtt) 1045 if (mtt)
1061 { 1046 {
1062 self->ring->tx[self->txs].len = mtt & 0xfff; 1047 self->ring->tx[self->txs].len = mtt & 0xfff;
@@ -1099,8 +1084,9 @@ dumpbufs(skb->data,skb->len,'>');
1099 1084
1100 if (self->ring->tx[self->txs].control & OBOE_CTL_TX_HW_OWNS) 1085 if (self->ring->tx[self->txs].control & OBOE_CTL_TX_HW_OWNS)
1101 { 1086 {
1102 IRDA_DEBUG (0, "%s.ful:%x(%x)%x\n", __func__ 1087 pr_debug("%s.ful:%x(%x)%x\n",
1103 ,skb->len, self->ring->tx[self->txs].control, self->txpending); 1088 __func__, skb->len, self->ring->tx[self->txs].control,
1089 self->txpending);
1104 toshoboe_start_DMA(self, OBOE_CONFIG0H_ENTX); 1090 toshoboe_start_DMA(self, OBOE_CONFIG0H_ENTX);
1105 spin_unlock_irqrestore(&self->spinlock, flags); 1091 spin_unlock_irqrestore(&self->spinlock, flags);
1106 return NETDEV_TX_BUSY; 1092 return NETDEV_TX_BUSY;
@@ -1177,8 +1163,7 @@ toshoboe_interrupt (int irq, void *dev_id)
1177 if (self->ring->tx[i].control & OBOE_CTL_TX_HW_OWNS) 1163 if (self->ring->tx[i].control & OBOE_CTL_TX_HW_OWNS)
1178 self->txpending++; 1164 self->txpending++;
1179 } 1165 }
1180 IRDA_DEBUG (1, "%s.txd(%x)%x/%x\n", __func__ 1166 pr_debug("%s.txd(%x)%x/%x\n", __func__, irqstat, txp, self->txpending);
1181 ,irqstat,txp,self->txpending);
1182 1167
1183 txp = INB (OBOE_TXSLOT) & OBOE_SLOT_MASK; 1168 txp = INB (OBOE_TXSLOT) & OBOE_SLOT_MASK;
1184 1169
@@ -1206,8 +1191,8 @@ toshoboe_interrupt (int irq, void *dev_id)
1206 if ((!self->txpending) && (self->new_speed)) 1191 if ((!self->txpending) && (self->new_speed))
1207 { 1192 {
1208 self->speed = self->new_speed; 1193 self->speed = self->new_speed;
1209 IRDA_DEBUG (1, "%s: Executed TxDone scheduled speed change %d\n", 1194 pr_debug("%s: Executed TxDone scheduled speed change %d\n",
1210 __func__, self->speed); 1195 __func__, self->speed);
1211 toshoboe_setbaud (self); 1196 toshoboe_setbaud (self);
1212 } 1197 }
1213 1198
@@ -1222,8 +1207,8 @@ toshoboe_interrupt (int irq, void *dev_id)
1222 { 1207 {
1223 int len = self->ring->rx[self->rxs].len; 1208 int len = self->ring->rx[self->rxs].len;
1224 skb = NULL; 1209 skb = NULL;
1225 IRDA_DEBUG (3, "%s.rcv:%x(%x)\n", __func__ 1210 pr_debug("%s.rcv:%x(%x)\n", __func__
1226 ,len,self->ring->rx[self->rxs].control); 1211 , len, self->ring->rx[self->rxs].control);
1227 1212
1228#ifdef DUMP_PACKETS 1213#ifdef DUMP_PACKETS
1229dumpbufs(self->rx_bufs[self->rxs],len,'<'); 1214dumpbufs(self->rx_bufs[self->rxs],len,'<');
@@ -1244,7 +1229,7 @@ dumpbufs(self->rx_bufs[self->rxs],len,'<');
1244 len -= 2; 1229 len -= 2;
1245 else 1230 else
1246 len = 0; 1231 len = 0;
1247 IRDA_DEBUG (1, "%s.SIR:%x(%x)\n", __func__, len,enable); 1232 pr_debug("%s.SIR:%x(%x)\n", __func__, len, enable);
1248 } 1233 }
1249 1234
1250#ifdef USE_MIR 1235#ifdef USE_MIR
@@ -1254,7 +1239,7 @@ dumpbufs(self->rx_bufs[self->rxs],len,'<');
1254 len -= 2; 1239 len -= 2;
1255 else 1240 else
1256 len = 0; 1241 len = 0;
1257 IRDA_DEBUG (2, "%s.MIR:%x(%x)\n", __func__, len,enable); 1242 pr_debug("%s.MIR:%x(%x)\n", __func__, len, enable);
1258 } 1243 }
1259#endif 1244#endif
1260 else if (enable & OBOE_ENABLEH_FIRON) 1245 else if (enable & OBOE_ENABLEH_FIRON)
@@ -1263,10 +1248,10 @@ dumpbufs(self->rx_bufs[self->rxs],len,'<');
1263 len -= 4; /*FIXME: check this */ 1248 len -= 4; /*FIXME: check this */
1264 else 1249 else
1265 len = 0; 1250 len = 0;
1266 IRDA_DEBUG (1, "%s.FIR:%x(%x)\n", __func__, len,enable); 1251 pr_debug("%s.FIR:%x(%x)\n", __func__, len, enable);
1267 } 1252 }
1268 else 1253 else
1269 IRDA_DEBUG (0, "%s.?IR:%x(%x)\n", __func__, len,enable); 1254 pr_debug("%s.?IR:%x(%x)\n", __func__, len, enable);
1270 1255
1271 if (len) 1256 if (len)
1272 { 1257 {
@@ -1299,8 +1284,8 @@ dumpbufs(self->rx_bufs[self->rxs],len,'<');
1299 /* (SIR) data is splitted in several slots. */ 1284 /* (SIR) data is splitted in several slots. */
1300 /* we have to join all the received buffers received */ 1285 /* we have to join all the received buffers received */
1301 /*in a large buffer before checking CRC. */ 1286 /*in a large buffer before checking CRC. */
1302 IRDA_DEBUG (0, "%s.err:%x(%x)\n", __func__ 1287 pr_debug("%s.err:%x(%x)\n", __func__
1303 ,len,self->ring->rx[self->rxs].control); 1288 , len, self->ring->rx[self->rxs].control);
1304 } 1289 }
1305 1290
1306 self->ring->rx[self->rxs].len = 0x0; 1291 self->ring->rx[self->rxs].len = 0x0;
@@ -1327,8 +1312,8 @@ dumpbufs(self->rx_bufs[self->rxs],len,'<');
1327 if (irqstat & OBOE_INT_SIP) 1312 if (irqstat & OBOE_INT_SIP)
1328 { 1313 {
1329 self->int_sip++; 1314 self->int_sip++;
1330 IRDA_DEBUG (1, "%s.sip:%x(%x)%x\n", __func__ 1315 pr_debug("%s.sip:%x(%x)%x\n",
1331 ,self->int_sip,irqstat,self->txpending); 1316 __func__, self->int_sip, irqstat, self->txpending);
1332 } 1317 }
1333 return IRQ_HANDLED; 1318 return IRQ_HANDLED;
1334} 1319}
@@ -1341,8 +1326,6 @@ toshoboe_net_open (struct net_device *dev)
1341 unsigned long flags; 1326 unsigned long flags;
1342 int rc; 1327 int rc;
1343 1328
1344 IRDA_DEBUG (4, "%s()\n", __func__);
1345
1346 self = netdev_priv(dev); 1329 self = netdev_priv(dev);
1347 1330
1348 if (self->async) 1331 if (self->async)
@@ -1379,8 +1362,6 @@ toshoboe_net_close (struct net_device *dev)
1379{ 1362{
1380 struct toshoboe_cb *self; 1363 struct toshoboe_cb *self;
1381 1364
1382 IRDA_DEBUG (4, "%s()\n", __func__);
1383
1384 IRDA_ASSERT (dev != NULL, return -1; ); 1365 IRDA_ASSERT (dev != NULL, return -1; );
1385 self = netdev_priv(dev); 1366 self = netdev_priv(dev);
1386 1367
@@ -1424,7 +1405,7 @@ toshoboe_net_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
1424 1405
1425 IRDA_ASSERT (self != NULL, return -1; ); 1406 IRDA_ASSERT (self != NULL, return -1; );
1426 1407
1427 IRDA_DEBUG (5, "%s(), %s, (cmd=0x%X)\n", __func__, dev->name, cmd); 1408 pr_debug("%s(), %s, (cmd=0x%X)\n", __func__, dev->name, cmd);
1428 1409
1429 /* Disable interrupts & save flags */ 1410 /* Disable interrupts & save flags */
1430 spin_lock_irqsave(&self->spinlock, flags); 1411 spin_lock_irqsave(&self->spinlock, flags);
@@ -1436,8 +1417,8 @@ toshoboe_net_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
1436 * speed, so we still must allow for speed change within 1417 * speed, so we still must allow for speed change within
1437 * interrupt context. 1418 * interrupt context.
1438 */ 1419 */
1439 IRDA_DEBUG (1, "%s(BANDWIDTH), %s, (%X/%ld\n", __func__ 1420 pr_debug("%s(BANDWIDTH), %s, (%X/%ld\n",
1440 ,dev->name, INB (OBOE_STATUS), irq->ifr_baudrate ); 1421 __func__, dev->name, INB(OBOE_STATUS), irq->ifr_baudrate);
1441 if (!in_interrupt () && !capable (CAP_NET_ADMIN)) { 1422 if (!in_interrupt () && !capable (CAP_NET_ADMIN)) {
1442 ret = -EPERM; 1423 ret = -EPERM;
1443 goto out; 1424 goto out;
@@ -1449,8 +1430,9 @@ toshoboe_net_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
1449 self->new_speed = irq->ifr_baudrate; 1430 self->new_speed = irq->ifr_baudrate;
1450 break; 1431 break;
1451 case SIOCSMEDIABUSY: /* Set media busy */ 1432 case SIOCSMEDIABUSY: /* Set media busy */
1452 IRDA_DEBUG (1, "%s(MEDIABUSY), %s, (%X/%x)\n", __func__ 1433 pr_debug("%s(MEDIABUSY), %s, (%X/%x)\n",
1453 ,dev->name, INB (OBOE_STATUS), capable (CAP_NET_ADMIN) ); 1434 __func__, dev->name,
1435 INB(OBOE_STATUS), capable(CAP_NET_ADMIN));
1454 if (!capable (CAP_NET_ADMIN)) { 1436 if (!capable (CAP_NET_ADMIN)) {
1455 ret = -EPERM; 1437 ret = -EPERM;
1456 goto out; 1438 goto out;
@@ -1459,11 +1441,11 @@ toshoboe_net_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
1459 break; 1441 break;
1460 case SIOCGRECEIVING: /* Check if we are receiving right now */ 1442 case SIOCGRECEIVING: /* Check if we are receiving right now */
1461 irq->ifr_receiving = (INB (OBOE_STATUS) & OBOE_STATUS_RXBUSY) ? 1 : 0; 1443 irq->ifr_receiving = (INB (OBOE_STATUS) & OBOE_STATUS_RXBUSY) ? 1 : 0;
1462 IRDA_DEBUG (3, "%s(RECEIVING), %s, (%X/%x)\n", __func__ 1444 pr_debug("%s(RECEIVING), %s, (%X/%x)\n",
1463 ,dev->name, INB (OBOE_STATUS), irq->ifr_receiving ); 1445 __func__, dev->name, INB(OBOE_STATUS), irq->ifr_receiving);
1464 break; 1446 break;
1465 default: 1447 default:
1466 IRDA_DEBUG (1, "%s(?), %s, (cmd=0x%X)\n", __func__, dev->name, cmd); 1448 pr_debug("%s(?), %s, (cmd=0x%X)\n", __func__, dev->name, cmd);
1467 ret = -EOPNOTSUPP; 1449 ret = -EOPNOTSUPP;
1468 } 1450 }
1469out: 1451out:
@@ -1490,8 +1472,6 @@ toshoboe_close (struct pci_dev *pci_dev)
1490 int i; 1472 int i;
1491 struct toshoboe_cb *self = pci_get_drvdata(pci_dev); 1473 struct toshoboe_cb *self = pci_get_drvdata(pci_dev);
1492 1474
1493 IRDA_DEBUG (4, "%s()\n", __func__);
1494
1495 IRDA_ASSERT (self != NULL, return; ); 1475 IRDA_ASSERT (self != NULL, return; );
1496 1476
1497 if (!self->stopped) 1477 if (!self->stopped)
@@ -1538,8 +1518,6 @@ toshoboe_open (struct pci_dev *pci_dev, const struct pci_device_id *pdid)
1538 int ok = 0; 1518 int ok = 0;
1539 int err; 1519 int err;
1540 1520
1541 IRDA_DEBUG (4, "%s()\n", __func__);
1542
1543 if ((err=pci_enable_device(pci_dev))) 1521 if ((err=pci_enable_device(pci_dev)))
1544 return err; 1522 return err;
1545 1523
@@ -1700,8 +1678,6 @@ toshoboe_gotosleep (struct pci_dev *pci_dev, pm_message_t crap)
1700 unsigned long flags; 1678 unsigned long flags;
1701 int i = 10; 1679 int i = 10;
1702 1680
1703 IRDA_DEBUG (4, "%s()\n", __func__);
1704
1705 if (!self || self->stopped) 1681 if (!self || self->stopped)
1706 return 0; 1682 return 0;
1707 1683
@@ -1728,8 +1704,6 @@ toshoboe_wakeup (struct pci_dev *pci_dev)
1728 struct toshoboe_cb *self = pci_get_drvdata(pci_dev); 1704 struct toshoboe_cb *self = pci_get_drvdata(pci_dev);
1729 unsigned long flags; 1705 unsigned long flags;
1730 1706
1731 IRDA_DEBUG (4, "%s()\n", __func__);
1732
1733 if (!self || !self->stopped) 1707 if (!self || !self->stopped)
1734 return 0; 1708 return 0;
1735 1709
diff --git a/drivers/net/irda/girbil-sir.c b/drivers/net/irda/girbil-sir.c
index f0512ad7dae7..7e0a5b8c6d53 100644
--- a/drivers/net/irda/girbil-sir.c
+++ b/drivers/net/irda/girbil-sir.c
@@ -86,8 +86,6 @@ static int girbil_open(struct sir_dev *dev)
86{ 86{
87 struct qos_info *qos = &dev->qos; 87 struct qos_info *qos = &dev->qos;
88 88
89 IRDA_DEBUG(2, "%s()\n", __func__);
90
91 /* Power on dongle */ 89 /* Power on dongle */
92 sirdev_set_dtr_rts(dev, TRUE, TRUE); 90 sirdev_set_dtr_rts(dev, TRUE, TRUE);
93 91
@@ -102,8 +100,6 @@ static int girbil_open(struct sir_dev *dev)
102 100
103static int girbil_close(struct sir_dev *dev) 101static int girbil_close(struct sir_dev *dev)
104{ 102{
105 IRDA_DEBUG(2, "%s()\n", __func__);
106
107 /* Power off dongle */ 103 /* Power off dongle */
108 sirdev_set_dtr_rts(dev, FALSE, FALSE); 104 sirdev_set_dtr_rts(dev, FALSE, FALSE);
109 105
@@ -126,8 +122,6 @@ static int girbil_change_speed(struct sir_dev *dev, unsigned speed)
126 u8 control[2]; 122 u8 control[2];
127 static int ret = 0; 123 static int ret = 0;
128 124
129 IRDA_DEBUG(2, "%s()\n", __func__);
130
131 /* dongle alread reset - port and dongle at default speed */ 125 /* dongle alread reset - port and dongle at default speed */
132 126
133 switch(state) { 127 switch(state) {
@@ -210,8 +204,6 @@ static int girbil_reset(struct sir_dev *dev)
210 u8 control = GIRBIL_TXEN | GIRBIL_RXEN; 204 u8 control = GIRBIL_TXEN | GIRBIL_RXEN;
211 int ret = 0; 205 int ret = 0;
212 206
213 IRDA_DEBUG(2, "%s()\n", __func__);
214
215 switch (state) { 207 switch (state) {
216 case SIRDEV_STATE_DONGLE_RESET: 208 case SIRDEV_STATE_DONGLE_RESET:
217 /* Reset dongle */ 209 /* Reset dongle */
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c
index e9aedbe3fc92..48b2f9a321b7 100644
--- a/drivers/net/irda/irda-usb.c
+++ b/drivers/net/irda/irda-usb.c
@@ -176,12 +176,13 @@ static void irda_usb_build_header(struct irda_usb_cb *self,
176 (!force) && (self->speed != -1)) { 176 (!force) && (self->speed != -1)) {
177 /* No speed and xbofs change here 177 /* No speed and xbofs change here
178 * (we'll do it later in the write callback) */ 178 * (we'll do it later in the write callback) */
179 IRDA_DEBUG(2, "%s(), not changing speed yet\n", __func__); 179 pr_debug("%s(), not changing speed yet\n", __func__);
180 *header = 0; 180 *header = 0;
181 return; 181 return;
182 } 182 }
183 183
184 IRDA_DEBUG(2, "%s(), changing speed to %d\n", __func__, self->new_speed); 184 pr_debug("%s(), changing speed to %d\n",
185 __func__, self->new_speed);
185 self->speed = self->new_speed; 186 self->speed = self->new_speed;
186 /* We will do ` self->new_speed = -1; ' in the completion 187 /* We will do ` self->new_speed = -1; ' in the completion
187 * handler just in case the current URB fail - Jean II */ 188 * handler just in case the current URB fail - Jean II */
@@ -227,7 +228,8 @@ static void irda_usb_build_header(struct irda_usb_cb *self,
227 228
228 /* Set the negotiated additional XBOFS */ 229 /* Set the negotiated additional XBOFS */
229 if (self->new_xbofs != -1) { 230 if (self->new_xbofs != -1) {
230 IRDA_DEBUG(2, "%s(), changing xbofs to %d\n", __func__, self->new_xbofs); 231 pr_debug("%s(), changing xbofs to %d\n",
232 __func__, self->new_xbofs);
231 self->xbofs = self->new_xbofs; 233 self->xbofs = self->new_xbofs;
232 /* We will do ` self->new_xbofs = -1; ' in the completion 234 /* We will do ` self->new_xbofs = -1; ' in the completion
233 * handler just in case the current URB fail - Jean II */ 235 * handler just in case the current URB fail - Jean II */
@@ -301,8 +303,8 @@ static void irda_usb_change_speed_xbofs(struct irda_usb_cb *self)
301 struct urb *urb; 303 struct urb *urb;
302 int ret; 304 int ret;
303 305
304 IRDA_DEBUG(2, "%s(), speed=%d, xbofs=%d\n", __func__, 306 pr_debug("%s(), speed=%d, xbofs=%d\n", __func__,
305 self->new_speed, self->new_xbofs); 307 self->new_speed, self->new_xbofs);
306 308
307 /* Grab the speed URB */ 309 /* Grab the speed URB */
308 urb = self->speed_urb; 310 urb = self->speed_urb;
@@ -346,8 +348,6 @@ static void speed_bulk_callback(struct urb *urb)
346{ 348{
347 struct irda_usb_cb *self = urb->context; 349 struct irda_usb_cb *self = urb->context;
348 350
349 IRDA_DEBUG(2, "%s()\n", __func__);
350
351 /* We should always have a context */ 351 /* We should always have a context */
352 IRDA_ASSERT(self != NULL, return;); 352 IRDA_ASSERT(self != NULL, return;);
353 /* We should always be called for the speed URB */ 353 /* We should always be called for the speed URB */
@@ -356,7 +356,8 @@ static void speed_bulk_callback(struct urb *urb)
356 /* Check for timeout and other USB nasties */ 356 /* Check for timeout and other USB nasties */
357 if (urb->status != 0) { 357 if (urb->status != 0) {
358 /* I get a lot of -ECONNABORTED = -103 here - Jean II */ 358 /* I get a lot of -ECONNABORTED = -103 here - Jean II */
359 IRDA_DEBUG(0, "%s(), URB complete status %d, transfer_flags 0x%04X\n", __func__, urb->status, urb->transfer_flags); 359 pr_debug("%s(), URB complete status %d, transfer_flags 0x%04X\n",
360 __func__, urb->status, urb->transfer_flags);
360 361
361 /* Don't do anything here, that might confuse the USB layer. 362 /* Don't do anything here, that might confuse the USB layer.
362 * Instead, we will wait for irda_usb_net_timeout(), the 363 * Instead, we will wait for irda_usb_net_timeout(), the
@@ -391,7 +392,7 @@ static netdev_tx_t irda_usb_hard_xmit(struct sk_buff *skb,
391 s16 xbofs; 392 s16 xbofs;
392 int res, mtt; 393 int res, mtt;
393 394
394 IRDA_DEBUG(4, "%s() on %s\n", __func__, netdev->name); 395 pr_debug("%s() on %s\n", __func__, netdev->name);
395 396
396 netif_stop_queue(netdev); 397 netif_stop_queue(netdev);
397 398
@@ -402,7 +403,7 @@ static netdev_tx_t irda_usb_hard_xmit(struct sk_buff *skb,
402 * We need to check self->present under the spinlock because 403 * We need to check self->present under the spinlock because
403 * of irda_usb_disconnect() is synchronous - Jean II */ 404 * of irda_usb_disconnect() is synchronous - Jean II */
404 if (!self->present) { 405 if (!self->present) {
405 IRDA_DEBUG(0, "%s(), Device is gone...\n", __func__); 406 pr_debug("%s(), Device is gone...\n", __func__);
406 goto drop; 407 goto drop;
407 } 408 }
408 409
@@ -554,8 +555,6 @@ static void write_bulk_callback(struct urb *urb)
554 struct sk_buff *skb = urb->context; 555 struct sk_buff *skb = urb->context;
555 struct irda_usb_cb *self = ((struct irda_skb_cb *) skb->cb)->context; 556 struct irda_usb_cb *self = ((struct irda_skb_cb *) skb->cb)->context;
556 557
557 IRDA_DEBUG(2, "%s()\n", __func__);
558
559 /* We should always have a context */ 558 /* We should always have a context */
560 IRDA_ASSERT(self != NULL, return;); 559 IRDA_ASSERT(self != NULL, return;);
561 /* We should always be called for the speed URB */ 560 /* We should always be called for the speed URB */
@@ -568,7 +567,8 @@ static void write_bulk_callback(struct urb *urb)
568 /* Check for timeout and other USB nasties */ 567 /* Check for timeout and other USB nasties */
569 if (urb->status != 0) { 568 if (urb->status != 0) {
570 /* I get a lot of -ECONNABORTED = -103 here - Jean II */ 569 /* I get a lot of -ECONNABORTED = -103 here - Jean II */
571 IRDA_DEBUG(0, "%s(), URB complete status %d, transfer_flags 0x%04X\n", __func__, urb->status, urb->transfer_flags); 570 pr_debug("%s(), URB complete status %d, transfer_flags 0x%04X\n",
571 __func__, urb->status, urb->transfer_flags);
572 572
573 /* Don't do anything here, that might confuse the USB layer, 573 /* Don't do anything here, that might confuse the USB layer,
574 * and we could go in recursion and blow the kernel stack... 574 * and we could go in recursion and blow the kernel stack...
@@ -587,7 +587,7 @@ static void write_bulk_callback(struct urb *urb)
587 587
588 /* If the network is closed, stop everything */ 588 /* If the network is closed, stop everything */
589 if ((!self->netopen) || (!self->present)) { 589 if ((!self->netopen) || (!self->present)) {
590 IRDA_DEBUG(0, "%s(), Network is gone...\n", __func__); 590 pr_debug("%s(), Network is gone...\n", __func__);
591 spin_unlock_irqrestore(&self->lock, flags); 591 spin_unlock_irqrestore(&self->lock, flags);
592 return; 592 return;
593 } 593 }
@@ -598,7 +598,7 @@ static void write_bulk_callback(struct urb *urb)
598 (self->new_xbofs != self->xbofs)) { 598 (self->new_xbofs != self->xbofs)) {
599 /* We haven't changed speed yet (because of 599 /* We haven't changed speed yet (because of
600 * IUC_SPEED_BUG), so do it now - Jean II */ 600 * IUC_SPEED_BUG), so do it now - Jean II */
601 IRDA_DEBUG(1, "%s(), Changing speed now...\n", __func__); 601 pr_debug("%s(), Changing speed now...\n", __func__);
602 irda_usb_change_speed_xbofs(self); 602 irda_usb_change_speed_xbofs(self);
603 } else { 603 } else {
604 /* New speed and xbof is now committed in hardware */ 604 /* New speed and xbof is now committed in hardware */
@@ -630,7 +630,7 @@ static void irda_usb_net_timeout(struct net_device *netdev)
630 struct urb *urb; 630 struct urb *urb;
631 int done = 0; /* If we have made any progress */ 631 int done = 0; /* If we have made any progress */
632 632
633 IRDA_DEBUG(0, "%s(), Network layer thinks we timed out!\n", __func__); 633 pr_debug("%s(), Network layer thinks we timed out!\n", __func__);
634 IRDA_ASSERT(self != NULL, return;); 634 IRDA_ASSERT(self != NULL, return;);
635 635
636 /* Protect us from USB callbacks, net Tx and else. */ 636 /* Protect us from USB callbacks, net Tx and else. */
@@ -647,7 +647,8 @@ static void irda_usb_net_timeout(struct net_device *netdev)
647 /* Check speed URB */ 647 /* Check speed URB */
648 urb = self->speed_urb; 648 urb = self->speed_urb;
649 if (urb->status != 0) { 649 if (urb->status != 0) {
650 IRDA_DEBUG(0, "%s: Speed change timed out, urb->status=%d, urb->transfer_flags=0x%04X\n", netdev->name, urb->status, urb->transfer_flags); 650 pr_debug("%s: Speed change timed out, urb->status=%d, urb->transfer_flags=0x%04X\n",
651 netdev->name, urb->status, urb->transfer_flags);
651 652
652 switch (urb->status) { 653 switch (urb->status) {
653 case -EINPROGRESS: 654 case -EINPROGRESS:
@@ -672,7 +673,8 @@ static void irda_usb_net_timeout(struct net_device *netdev)
672 if (urb->status != 0) { 673 if (urb->status != 0) {
673 struct sk_buff *skb = urb->context; 674 struct sk_buff *skb = urb->context;
674 675
675 IRDA_DEBUG(0, "%s: Tx timed out, urb->status=%d, urb->transfer_flags=0x%04X\n", netdev->name, urb->status, urb->transfer_flags); 676 pr_debug("%s: Tx timed out, urb->status=%d, urb->transfer_flags=0x%04X\n",
677 netdev->name, urb->status, urb->transfer_flags);
676 678
677 /* Increase error count */ 679 /* Increase error count */
678 netdev->stats.tx_errors++; 680 netdev->stats.tx_errors++;
@@ -761,8 +763,6 @@ static void irda_usb_submit(struct irda_usb_cb *self, struct sk_buff *skb, struc
761 struct irda_skb_cb *cb; 763 struct irda_skb_cb *cb;
762 int ret; 764 int ret;
763 765
764 IRDA_DEBUG(2, "%s()\n", __func__);
765
766 /* This should never happen */ 766 /* This should never happen */
767 IRDA_ASSERT(skb != NULL, return;); 767 IRDA_ASSERT(skb != NULL, return;);
768 IRDA_ASSERT(urb != NULL, return;); 768 IRDA_ASSERT(urb != NULL, return;);
@@ -805,7 +805,7 @@ static void irda_usb_receive(struct urb *urb)
805 struct urb *next_urb; 805 struct urb *next_urb;
806 unsigned int len, docopy; 806 unsigned int len, docopy;
807 807
808 IRDA_DEBUG(2, "%s(), len=%d\n", __func__, urb->actual_length); 808 pr_debug("%s(), len=%d\n", __func__, urb->actual_length);
809 809
810 /* Find ourselves */ 810 /* Find ourselves */
811 cb = (struct irda_skb_cb *) skb->cb; 811 cb = (struct irda_skb_cb *) skb->cb;
@@ -815,7 +815,7 @@ static void irda_usb_receive(struct urb *urb)
815 815
816 /* If the network is closed or the device gone, stop everything */ 816 /* If the network is closed or the device gone, stop everything */
817 if ((!self->netopen) || (!self->present)) { 817 if ((!self->netopen) || (!self->present)) {
818 IRDA_DEBUG(0, "%s(), Network is gone!\n", __func__); 818 pr_debug("%s(), Network is gone!\n", __func__);
819 /* Don't re-submit the URB : will stall the Rx path */ 819 /* Don't re-submit the URB : will stall the Rx path */
820 return; 820 return;
821 } 821 }
@@ -838,7 +838,8 @@ static void irda_usb_receive(struct urb *urb)
838 /* Usually precursor to a hot-unplug on OHCI. */ 838 /* Usually precursor to a hot-unplug on OHCI. */
839 default: 839 default:
840 self->netdev->stats.rx_errors++; 840 self->netdev->stats.rx_errors++;
841 IRDA_DEBUG(0, "%s(), RX status %d, transfer_flags 0x%04X\n", __func__, urb->status, urb->transfer_flags); 841 pr_debug("%s(), RX status %d, transfer_flags 0x%04X\n",
842 __func__, urb->status, urb->transfer_flags);
842 break; 843 break;
843 } 844 }
844 /* If we received an error, we don't want to resubmit the 845 /* If we received an error, we don't want to resubmit the
@@ -964,8 +965,6 @@ static void irda_usb_rx_defer_expired(unsigned long data)
964 struct irda_skb_cb *cb; 965 struct irda_skb_cb *cb;
965 struct urb *next_urb; 966 struct urb *next_urb;
966 967
967 IRDA_DEBUG(2, "%s()\n", __func__);
968
969 /* Find ourselves */ 968 /* Find ourselves */
970 cb = (struct irda_skb_cb *) skb->cb; 969 cb = (struct irda_skb_cb *) skb->cb;
971 IRDA_ASSERT(cb != NULL, return;); 970 IRDA_ASSERT(cb != NULL, return;);
@@ -1049,8 +1048,8 @@ static int stir421x_fw_upload(struct irda_usb_cb *self,
1049 self->bulk_out_ep), 1048 self->bulk_out_ep),
1050 patch_block, block_size, 1049 patch_block, block_size,
1051 &actual_len, msecs_to_jiffies(500)); 1050 &actual_len, msecs_to_jiffies(500));
1052 IRDA_DEBUG(3,"%s(): Bulk send %u bytes, ret=%d\n", 1051 pr_debug("%s(): Bulk send %u bytes, ret=%d\n",
1053 __func__, actual_len, ret); 1052 __func__, actual_len, ret);
1054 1053
1055 if (ret < 0) 1054 if (ret < 0)
1056 break; 1055 break;
@@ -1112,8 +1111,8 @@ static int stir421x_patch_device(struct irda_usb_cb *self)
1112 + ((build / 10) << 4) 1111 + ((build / 10) << 4)
1113 + (build % 10); 1112 + (build % 10);
1114 1113
1115 IRDA_DEBUG(3, "%s(): Firmware Product version %ld\n", 1114 pr_debug("%s(): Firmware Product version %ld\n",
1116 __func__, fw_version); 1115 __func__, fw_version);
1117 } 1116 }
1118 } 1117 }
1119 1118
@@ -1169,8 +1168,6 @@ static int irda_usb_net_open(struct net_device *netdev)
1169 char hwname[16]; 1168 char hwname[16];
1170 int i; 1169 int i;
1171 1170
1172 IRDA_DEBUG(1, "%s()\n", __func__);
1173
1174 IRDA_ASSERT(netdev != NULL, return -1;); 1171 IRDA_ASSERT(netdev != NULL, return -1;);
1175 self = netdev_priv(netdev); 1172 self = netdev_priv(netdev);
1176 IRDA_ASSERT(self != NULL, return -1;); 1173 IRDA_ASSERT(self != NULL, return -1;);
@@ -1249,8 +1246,6 @@ static int irda_usb_net_close(struct net_device *netdev)
1249 struct irda_usb_cb *self; 1246 struct irda_usb_cb *self;
1250 int i; 1247 int i;
1251 1248
1252 IRDA_DEBUG(1, "%s()\n", __func__);
1253
1254 IRDA_ASSERT(netdev != NULL, return -1;); 1249 IRDA_ASSERT(netdev != NULL, return -1;);
1255 self = netdev_priv(netdev); 1250 self = netdev_priv(netdev);
1256 IRDA_ASSERT(self != NULL, return -1;); 1251 IRDA_ASSERT(self != NULL, return -1;);
@@ -1304,7 +1299,7 @@ static int irda_usb_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
1304 self = netdev_priv(dev); 1299 self = netdev_priv(dev);
1305 IRDA_ASSERT(self != NULL, return -1;); 1300 IRDA_ASSERT(self != NULL, return -1;);
1306 1301
1307 IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __func__, dev->name, cmd); 1302 pr_debug("%s(), %s, (cmd=0x%X)\n", __func__, dev->name, cmd);
1308 1303
1309 switch (cmd) { 1304 switch (cmd) {
1310 case SIOCSBANDWIDTH: /* Set bandwidth */ 1305 case SIOCSBANDWIDTH: /* Set bandwidth */
@@ -1354,7 +1349,6 @@ static inline void irda_usb_init_qos(struct irda_usb_cb *self)
1354{ 1349{
1355 struct irda_class_desc *desc; 1350 struct irda_class_desc *desc;
1356 1351
1357 IRDA_DEBUG(3, "%s()\n", __func__);
1358 1352
1359 desc = self->irda_desc; 1353 desc = self->irda_desc;
1360 1354
@@ -1370,8 +1364,10 @@ static inline void irda_usb_init_qos(struct irda_usb_cb *self)
1370 self->qos.window_size.bits = desc->bmWindowSize; 1364 self->qos.window_size.bits = desc->bmWindowSize;
1371 self->qos.data_size.bits = desc->bmDataSize; 1365 self->qos.data_size.bits = desc->bmDataSize;
1372 1366
1373 IRDA_DEBUG(0, "%s(), dongle says speed=0x%X, size=0x%X, window=0x%X, bofs=0x%X, turn=0x%X\n", 1367 pr_debug("%s(), dongle says speed=0x%X, size=0x%X, window=0x%X, bofs=0x%X, turn=0x%X\n",
1374 __func__, self->qos.baud_rate.bits, self->qos.data_size.bits, self->qos.window_size.bits, self->qos.additional_bofs.bits, self->qos.min_turn_time.bits); 1368 __func__, self->qos.baud_rate.bits, self->qos.data_size.bits,
1369 self->qos.window_size.bits, self->qos.additional_bofs.bits,
1370 self->qos.min_turn_time.bits);
1375 1371
1376 /* Don't always trust what the dongle tell us */ 1372 /* Don't always trust what the dongle tell us */
1377 if(self->capability & IUC_SIR_ONLY) 1373 if(self->capability & IUC_SIR_ONLY)
@@ -1414,8 +1410,6 @@ static inline int irda_usb_open(struct irda_usb_cb *self)
1414{ 1410{
1415 struct net_device *netdev = self->netdev; 1411 struct net_device *netdev = self->netdev;
1416 1412
1417 IRDA_DEBUG(1, "%s()\n", __func__);
1418
1419 netdev->netdev_ops = &irda_usb_netdev_ops; 1413 netdev->netdev_ops = &irda_usb_netdev_ops;
1420 1414
1421 irda_usb_init_qos(self); 1415 irda_usb_init_qos(self);
@@ -1430,8 +1424,6 @@ static inline int irda_usb_open(struct irda_usb_cb *self)
1430 */ 1424 */
1431static inline void irda_usb_close(struct irda_usb_cb *self) 1425static inline void irda_usb_close(struct irda_usb_cb *self)
1432{ 1426{
1433 IRDA_DEBUG(1, "%s()\n", __func__);
1434
1435 /* Remove netdevice */ 1427 /* Remove netdevice */
1436 unregister_netdev(self->netdev); 1428 unregister_netdev(self->netdev);
1437 1429
@@ -1509,8 +1501,9 @@ static inline int irda_usb_parse_endpoints(struct irda_usb_cb *self, struct usb_
1509 } 1501 }
1510 } 1502 }
1511 1503
1512 IRDA_DEBUG(0, "%s(), And our endpoints are : in=%02X, out=%02X (%d), int=%02X\n", 1504 pr_debug("%s(), And our endpoints are : in=%02X, out=%02X (%d), int=%02X\n",
1513 __func__, self->bulk_in_ep, self->bulk_out_ep, self->bulk_out_mtu, self->bulk_int_ep); 1505 __func__, self->bulk_in_ep, self->bulk_out_ep,
1506 self->bulk_out_mtu, self->bulk_int_ep);
1514 1507
1515 return (self->bulk_in_ep != 0) && (self->bulk_out_ep != 0); 1508 return (self->bulk_in_ep != 0) && (self->bulk_out_ep != 0);
1516} 1509}
@@ -1572,7 +1565,7 @@ static inline struct irda_class_desc *irda_usb_find_class_desc(struct usb_interf
1572 0, intf->altsetting->desc.bInterfaceNumber, desc, 1565 0, intf->altsetting->desc.bInterfaceNumber, desc,
1573 sizeof(*desc), 500); 1566 sizeof(*desc), 500);
1574 1567
1575 IRDA_DEBUG(1, "%s(), ret=%d\n", __func__, ret); 1568 pr_debug("%s(), ret=%d\n", __func__, ret);
1576 if (ret < sizeof(*desc)) { 1569 if (ret < sizeof(*desc)) {
1577 net_warn_ratelimited("usb-irda: class_descriptor read %s (%d)\n", 1570 net_warn_ratelimited("usb-irda: class_descriptor read %s (%d)\n",
1578 ret < 0 ? "failed" : "too short", ret); 1571 ret < 0 ? "failed" : "too short", ret);
@@ -1679,7 +1672,8 @@ static int irda_usb_probe(struct usb_interface *intf,
1679 * specify an alternate, but very few driver do like this. 1672 * specify an alternate, but very few driver do like this.
1680 * Jean II */ 1673 * Jean II */
1681 ret = usb_set_interface(dev, intf->altsetting->desc.bInterfaceNumber, 0); 1674 ret = usb_set_interface(dev, intf->altsetting->desc.bInterfaceNumber, 0);
1682 IRDA_DEBUG(1, "usb-irda: set interface %d result %d\n", intf->altsetting->desc.bInterfaceNumber, ret); 1675 pr_debug("usb-irda: set interface %d result %d\n",
1676 intf->altsetting->desc.bInterfaceNumber, ret);
1683 switch (ret) { 1677 switch (ret) {
1684 case 0: 1678 case 0:
1685 break; 1679 break;
@@ -1687,10 +1681,11 @@ static int irda_usb_probe(struct usb_interface *intf,
1687 /* Martin Diehl says if we get a -EPIPE we should 1681 /* Martin Diehl says if we get a -EPIPE we should
1688 * be fine and we don't need to do a usb_clear_halt(). 1682 * be fine and we don't need to do a usb_clear_halt().
1689 * - Jean II */ 1683 * - Jean II */
1690 IRDA_DEBUG(0, "%s(), Received -EPIPE, ignoring...\n", __func__); 1684 pr_debug("%s(), Received -EPIPE, ignoring...\n",
1685 __func__);
1691 break; 1686 break;
1692 default: 1687 default:
1693 IRDA_DEBUG(0, "%s(), Unknown error %d\n", __func__, ret); 1688 pr_debug("%s(), Unknown error %d\n", __func__, ret);
1694 ret = -EIO; 1689 ret = -EIO;
1695 goto err_out_3; 1690 goto err_out_3;
1696 } 1691 }
@@ -1716,7 +1711,7 @@ static int irda_usb_probe(struct usb_interface *intf,
1716 ret = usb_control_msg (self->usbdev, usb_sndctrlpipe (self->usbdev, 0), 1711 ret = usb_control_msg (self->usbdev, usb_sndctrlpipe (self->usbdev, 0),
1717 0x02, 0x40, 0, 0, NULL, 0, 500); 1712 0x02, 0x40, 0, 0, NULL, 0, 500);
1718 if (ret < 0) { 1713 if (ret < 0) {
1719 IRDA_DEBUG (0, "usb_control_msg failed %d\n", ret); 1714 pr_debug("usb_control_msg failed %d\n", ret);
1720 goto err_out_3; 1715 goto err_out_3;
1721 } else { 1716 } else {
1722 mdelay(10); 1717 mdelay(10);
@@ -1808,8 +1803,6 @@ static void irda_usb_disconnect(struct usb_interface *intf)
1808 struct irda_usb_cb *self = usb_get_intfdata(intf); 1803 struct irda_usb_cb *self = usb_get_intfdata(intf);
1809 int i; 1804 int i;
1810 1805
1811 IRDA_DEBUG(1, "%s()\n", __func__);
1812
1813 usb_set_intfdata(intf, NULL); 1806 usb_set_intfdata(intf, NULL);
1814 if (!self) 1807 if (!self)
1815 return; 1808 return;
@@ -1858,7 +1851,7 @@ static void irda_usb_disconnect(struct usb_interface *intf)
1858 1851
1859 /* Free self and network device */ 1852 /* Free self and network device */
1860 free_netdev(self->netdev); 1853 free_netdev(self->netdev);
1861 IRDA_DEBUG(0, "%s(), USB IrDA Disconnected\n", __func__); 1854 pr_debug("%s(), USB IrDA Disconnected\n", __func__);
1862} 1855}
1863 1856
1864#ifdef CONFIG_PM 1857#ifdef CONFIG_PM
diff --git a/drivers/net/irda/irtty-sir.c b/drivers/net/irda/irtty-sir.c
index abbb654c0666..696852eb23c3 100644
--- a/drivers/net/irda/irtty-sir.c
+++ b/drivers/net/irda/irtty-sir.c
@@ -240,7 +240,7 @@ static void irtty_receive_buf(struct tty_struct *tty, const unsigned char *cp,
240 * Characters received with a parity error, etc? 240 * Characters received with a parity error, etc?
241 */ 241 */
242 if (fp && *fp++) { 242 if (fp && *fp++) {
243 IRDA_DEBUG(0, "Framing or parity error!\n"); 243 pr_debug("Framing or parity error!\n");
244 sirdev_receive(dev, NULL, 0); /* notify sir_dev (updating stats) */ 244 sirdev_receive(dev, NULL, 0); /* notify sir_dev (updating stats) */
245 return; 245 return;
246 } 246 }
@@ -387,7 +387,7 @@ static int irtty_ioctl(struct tty_struct *tty, struct file *file, unsigned int c
387 IRDA_ASSERT(priv != NULL, return -ENODEV;); 387 IRDA_ASSERT(priv != NULL, return -ENODEV;);
388 IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return -EBADR;); 388 IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return -EBADR;);
389 389
390 IRDA_DEBUG(3, "%s(cmd=0x%X)\n", __func__, cmd); 390 pr_debug("%s(cmd=0x%X)\n", __func__, cmd);
391 391
392 dev = priv->dev; 392 dev = priv->dev;
393 IRDA_ASSERT(dev != NULL, return -1;); 393 IRDA_ASSERT(dev != NULL, return -1;);
@@ -477,7 +477,7 @@ static int irtty_open(struct tty_struct *tty)
477 477
478 mutex_unlock(&irtty_mutex); 478 mutex_unlock(&irtty_mutex);
479 479
480 IRDA_DEBUG(0, "%s - %s: irda line discipline opened\n", __func__, tty->name); 480 pr_debug("%s - %s: irda line discipline opened\n", __func__, tty->name);
481 481
482 return 0; 482 return 0;
483 483
@@ -528,7 +528,7 @@ static void irtty_close(struct tty_struct *tty)
528 528
529 kfree(priv); 529 kfree(priv);
530 530
531 IRDA_DEBUG(0, "%s - %s: irda line discipline closed\n", __func__, tty->name); 531 pr_debug("%s - %s: irda line discipline closed\n", __func__, tty->name);
532} 532}
533 533
534/* ------------------------------------------------------- */ 534/* ------------------------------------------------------- */
diff --git a/drivers/net/irda/litelink-sir.c b/drivers/net/irda/litelink-sir.c
index 6827777cbeea..8eefcb44bac3 100644
--- a/drivers/net/irda/litelink-sir.c
+++ b/drivers/net/irda/litelink-sir.c
@@ -76,8 +76,6 @@ static int litelink_open(struct sir_dev *dev)
76{ 76{
77 struct qos_info *qos = &dev->qos; 77 struct qos_info *qos = &dev->qos;
78 78
79 IRDA_DEBUG(2, "%s()\n", __func__);
80
81 /* Power up dongle */ 79 /* Power up dongle */
82 sirdev_set_dtr_rts(dev, TRUE, TRUE); 80 sirdev_set_dtr_rts(dev, TRUE, TRUE);
83 81
@@ -93,8 +91,6 @@ static int litelink_open(struct sir_dev *dev)
93 91
94static int litelink_close(struct sir_dev *dev) 92static int litelink_close(struct sir_dev *dev)
95{ 93{
96 IRDA_DEBUG(2, "%s()\n", __func__);
97
98 /* Power off dongle */ 94 /* Power off dongle */
99 sirdev_set_dtr_rts(dev, FALSE, FALSE); 95 sirdev_set_dtr_rts(dev, FALSE, FALSE);
100 96
@@ -111,8 +107,6 @@ static int litelink_change_speed(struct sir_dev *dev, unsigned speed)
111{ 107{
112 int i; 108 int i;
113 109
114 IRDA_DEBUG(2, "%s()\n", __func__);
115
116 /* dongle already reset by irda-thread - current speed (dongle and 110 /* dongle already reset by irda-thread - current speed (dongle and
117 * port) is the default speed (115200 for litelink!) 111 * port) is the default speed (115200 for litelink!)
118 */ 112 */
@@ -154,8 +148,6 @@ static int litelink_change_speed(struct sir_dev *dev, unsigned speed)
154 */ 148 */
155static int litelink_reset(struct sir_dev *dev) 149static int litelink_reset(struct sir_dev *dev)
156{ 150{
157 IRDA_DEBUG(2, "%s()\n", __func__);
158
159 /* probably the power-up can be dropped here, but with only 151 /* probably the power-up can be dropped here, but with only
160 * 15 usec delay it's not worth the risk unless somebody with 152 * 15 usec delay it's not worth the risk unless somebody with
161 * the hardware confirms it doesn't break anything... 153 * the hardware confirms it doesn't break anything...
diff --git a/drivers/net/irda/ma600-sir.c b/drivers/net/irda/ma600-sir.c
index 944d044510e3..a764817b47f1 100644
--- a/drivers/net/irda/ma600-sir.c
+++ b/drivers/net/irda/ma600-sir.c
@@ -65,13 +65,11 @@ static struct dongle_driver ma600 = {
65 65
66static int __init ma600_sir_init(void) 66static int __init ma600_sir_init(void)
67{ 67{
68 IRDA_DEBUG(2, "%s()\n", __func__);
69 return irda_register_dongle(&ma600); 68 return irda_register_dongle(&ma600);
70} 69}
71 70
72static void __exit ma600_sir_cleanup(void) 71static void __exit ma600_sir_cleanup(void)
73{ 72{
74 IRDA_DEBUG(2, "%s()\n", __func__);
75 irda_unregister_dongle(&ma600); 73 irda_unregister_dongle(&ma600);
76} 74}
77 75
@@ -86,8 +84,6 @@ static int ma600_open(struct sir_dev *dev)
86{ 84{
87 struct qos_info *qos = &dev->qos; 85 struct qos_info *qos = &dev->qos;
88 86
89 IRDA_DEBUG(2, "%s()\n", __func__);
90
91 sirdev_set_dtr_rts(dev, TRUE, TRUE); 87 sirdev_set_dtr_rts(dev, TRUE, TRUE);
92 88
93 /* Explicitly set the speeds we can accept */ 89 /* Explicitly set the speeds we can accept */
@@ -104,8 +100,6 @@ static int ma600_open(struct sir_dev *dev)
104 100
105static int ma600_close(struct sir_dev *dev) 101static int ma600_close(struct sir_dev *dev)
106{ 102{
107 IRDA_DEBUG(2, "%s()\n", __func__);
108
109 /* Power off dongle */ 103 /* Power off dongle */
110 sirdev_set_dtr_rts(dev, FALSE, FALSE); 104 sirdev_set_dtr_rts(dev, FALSE, FALSE);
111 105
@@ -174,8 +168,8 @@ static int ma600_change_speed(struct sir_dev *dev, unsigned speed)
174{ 168{
175 u8 byte; 169 u8 byte;
176 170
177 IRDA_DEBUG(2, "%s(), speed=%d (was %d)\n", __func__, 171 pr_debug("%s(), speed=%d (was %d)\n", __func__,
178 speed, dev->speed); 172 speed, dev->speed);
179 173
180 /* dongle already reset, dongle and port at default speed (9600) */ 174 /* dongle already reset, dongle and port at default speed (9600) */
181 175
@@ -204,7 +198,7 @@ static int ma600_change_speed(struct sir_dev *dev, unsigned speed)
204 return -1; 198 return -1;
205 } 199 }
206 else 200 else
207 IRDA_DEBUG(2, "%s() control byte write read OK\n", __func__); 201 pr_debug("%s() control byte write read OK\n", __func__);
208#endif 202#endif
209 203
210 /* Set DTR, Set RTS */ 204 /* Set DTR, Set RTS */
@@ -236,8 +230,6 @@ static int ma600_change_speed(struct sir_dev *dev, unsigned speed)
236 230
237static int ma600_reset(struct sir_dev *dev) 231static int ma600_reset(struct sir_dev *dev)
238{ 232{
239 IRDA_DEBUG(2, "%s()\n", __func__);
240
241 /* Reset the dongle : set DTR low for 10 ms */ 233 /* Reset the dongle : set DTR low for 10 ms */
242 sirdev_set_dtr_rts(dev, FALSE, TRUE); 234 sirdev_set_dtr_rts(dev, FALSE, TRUE);
243 msleep(10); 235 msleep(10);
diff --git a/drivers/net/irda/mcp2120-sir.c b/drivers/net/irda/mcp2120-sir.c
index 97674695211c..2e33f91bfe8f 100644
--- a/drivers/net/irda/mcp2120-sir.c
+++ b/drivers/net/irda/mcp2120-sir.c
@@ -63,8 +63,6 @@ static int mcp2120_open(struct sir_dev *dev)
63{ 63{
64 struct qos_info *qos = &dev->qos; 64 struct qos_info *qos = &dev->qos;
65 65
66 IRDA_DEBUG(2, "%s()\n", __func__);
67
68 /* seems no explicit power-on required here and reset switching it on anyway */ 66 /* seems no explicit power-on required here and reset switching it on anyway */
69 67
70 qos->baud_rate.bits &= IR_9600|IR_19200|IR_38400|IR_57600|IR_115200; 68 qos->baud_rate.bits &= IR_9600|IR_19200|IR_38400|IR_57600|IR_115200;
@@ -76,8 +74,6 @@ static int mcp2120_open(struct sir_dev *dev)
76 74
77static int mcp2120_close(struct sir_dev *dev) 75static int mcp2120_close(struct sir_dev *dev)
78{ 76{
79 IRDA_DEBUG(2, "%s()\n", __func__);
80
81 /* Power off dongle */ 77 /* Power off dongle */
82 /* reset and inhibit mcp2120 */ 78 /* reset and inhibit mcp2120 */
83 sirdev_set_dtr_rts(dev, TRUE, TRUE); 79 sirdev_set_dtr_rts(dev, TRUE, TRUE);
@@ -102,8 +98,6 @@ static int mcp2120_change_speed(struct sir_dev *dev, unsigned speed)
102 u8 control[2]; 98 u8 control[2];
103 static int ret = 0; 99 static int ret = 0;
104 100
105 IRDA_DEBUG(2, "%s()\n", __func__);
106
107 switch (state) { 101 switch (state) {
108 case SIRDEV_STATE_DONGLE_SPEED: 102 case SIRDEV_STATE_DONGLE_SPEED:
109 /* Set DTR to enter command mode */ 103 /* Set DTR to enter command mode */
@@ -188,8 +182,6 @@ static int mcp2120_reset(struct sir_dev *dev)
188 unsigned delay = 0; 182 unsigned delay = 0;
189 int ret = 0; 183 int ret = 0;
190 184
191 IRDA_DEBUG(2, "%s()\n", __func__);
192
193 switch (state) { 185 switch (state) {
194 case SIRDEV_STATE_DONGLE_RESET: 186 case SIRDEV_STATE_DONGLE_RESET:
195 //printk("mcp2120_reset: dongle_reset\n"); 187 //printk("mcp2120_reset: dongle_reset\n");
diff --git a/drivers/net/irda/mcs7780.c b/drivers/net/irda/mcs7780.c
index 6cbd29dcf2d6..e4d678fbeb2f 100644
--- a/drivers/net/irda/mcs7780.c
+++ b/drivers/net/irda/mcs7780.c
@@ -894,7 +894,7 @@ static int mcs_probe(struct usb_interface *intf,
894 if (!ndev) 894 if (!ndev)
895 goto error1; 895 goto error1;
896 896
897 IRDA_DEBUG(1, "MCS7780 USB-IrDA bridge found at %d.\n", udev->devnum); 897 pr_debug("MCS7780 USB-IrDA bridge found at %d.\n", udev->devnum);
898 898
899 SET_NETDEV_DEV(ndev, &intf->dev); 899 SET_NETDEV_DEV(ndev, &intf->dev);
900 900
@@ -942,8 +942,8 @@ static int mcs_probe(struct usb_interface *intf,
942 if (ret != 0) 942 if (ret != 0)
943 goto error2; 943 goto error2;
944 944
945 IRDA_DEBUG(1, "IrDA: Registered MosChip MCS7780 device as %s\n", 945 pr_debug("IrDA: Registered MosChip MCS7780 device as %s\n",
946 ndev->name); 946 ndev->name);
947 947
948 mcs->transceiver_type = transceiver_type; 948 mcs->transceiver_type = transceiver_type;
949 mcs->sir_tweak = sir_tweak; 949 mcs->sir_tweak = sir_tweak;
@@ -973,7 +973,7 @@ static void mcs_disconnect(struct usb_interface *intf)
973 free_netdev(mcs->netdev); 973 free_netdev(mcs->netdev);
974 974
975 usb_set_intfdata(intf, NULL); 975 usb_set_intfdata(intf, NULL);
976 IRDA_DEBUG(0, "MCS7780 now disconnected.\n"); 976 pr_debug("MCS7780 now disconnected.\n");
977} 977}
978 978
979module_usb_driver(mcs_driver); 979module_usb_driver(mcs_driver);
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);
diff --git a/drivers/net/irda/old_belkin-sir.c b/drivers/net/irda/old_belkin-sir.c
index f237136f3827..a7c2e990ae69 100644
--- a/drivers/net/irda/old_belkin-sir.c
+++ b/drivers/net/irda/old_belkin-sir.c
@@ -90,8 +90,6 @@ static int old_belkin_open(struct sir_dev *dev)
90{ 90{
91 struct qos_info *qos = &dev->qos; 91 struct qos_info *qos = &dev->qos;
92 92
93 IRDA_DEBUG(2, "%s()\n", __func__);
94
95 /* Power on dongle */ 93 /* Power on dongle */
96 sirdev_set_dtr_rts(dev, TRUE, TRUE); 94 sirdev_set_dtr_rts(dev, TRUE, TRUE);
97 95
@@ -108,8 +106,6 @@ static int old_belkin_open(struct sir_dev *dev)
108 106
109static int old_belkin_close(struct sir_dev *dev) 107static int old_belkin_close(struct sir_dev *dev)
110{ 108{
111 IRDA_DEBUG(2, "%s()\n", __func__);
112
113 /* Power off dongle */ 109 /* Power off dongle */
114 sirdev_set_dtr_rts(dev, FALSE, FALSE); 110 sirdev_set_dtr_rts(dev, FALSE, FALSE);
115 111
@@ -123,8 +119,6 @@ static int old_belkin_close(struct sir_dev *dev)
123 */ 119 */
124static int old_belkin_change_speed(struct sir_dev *dev, unsigned speed) 120static int old_belkin_change_speed(struct sir_dev *dev, unsigned speed)
125{ 121{
126 IRDA_DEBUG(2, "%s()\n", __func__);
127
128 dev->speed = 9600; 122 dev->speed = 9600;
129 return (speed==dev->speed) ? 0 : -EINVAL; 123 return (speed==dev->speed) ? 0 : -EINVAL;
130} 124}
@@ -137,8 +131,6 @@ static int old_belkin_change_speed(struct sir_dev *dev, unsigned speed)
137 */ 131 */
138static int old_belkin_reset(struct sir_dev *dev) 132static int old_belkin_reset(struct sir_dev *dev)
139{ 133{
140 IRDA_DEBUG(2, "%s()\n", __func__);
141
142 /* This dongles speed "defaults" to 9600 bps ;-) */ 134 /* This dongles speed "defaults" to 9600 bps ;-) */
143 dev->speed = 9600; 135 dev->speed = 9600;
144 136
diff --git a/drivers/net/irda/sir_dev.c b/drivers/net/irda/sir_dev.c
index 5bfcd25923b4..6af26a7d787c 100644
--- a/drivers/net/irda/sir_dev.c
+++ b/drivers/net/irda/sir_dev.c
@@ -109,11 +109,11 @@ static void sirdev_config_fsm(struct work_struct *work)
109 int ret = -1; 109 int ret = -1;
110 unsigned delay; 110 unsigned delay;
111 111
112 IRDA_DEBUG(2, "%s(), <%ld>\n", __func__, jiffies); 112 pr_debug("%s(), <%ld>\n", __func__, jiffies);
113 113
114 do { 114 do {
115 IRDA_DEBUG(3, "%s - state=0x%04x / substate=0x%04x\n", 115 pr_debug("%s - state=0x%04x / substate=0x%04x\n",
116 __func__, fsm->state, fsm->substate); 116 __func__, fsm->state, fsm->substate);
117 117
118 next_state = fsm->state; 118 next_state = fsm->state;
119 delay = 0; 119 delay = 0;
@@ -287,12 +287,12 @@ int sirdev_schedule_request(struct sir_dev *dev, int initial_state, unsigned par
287{ 287{
288 struct sir_fsm *fsm = &dev->fsm; 288 struct sir_fsm *fsm = &dev->fsm;
289 289
290 IRDA_DEBUG(2, "%s - state=0x%04x / param=%u\n", __func__, 290 pr_debug("%s - state=0x%04x / param=%u\n", __func__,
291 initial_state, param); 291 initial_state, param);
292 292
293 if (down_trylock(&fsm->sem)) { 293 if (down_trylock(&fsm->sem)) {
294 if (in_interrupt() || in_atomic() || irqs_disabled()) { 294 if (in_interrupt() || in_atomic() || irqs_disabled()) {
295 IRDA_DEBUG(1, "%s(), state machine busy!\n", __func__); 295 pr_debug("%s(), state machine busy!\n", __func__);
296 return -EWOULDBLOCK; 296 return -EWOULDBLOCK;
297 } else 297 } else
298 down(&fsm->sem); 298 down(&fsm->sem);
@@ -345,7 +345,7 @@ int sirdev_set_dongle(struct sir_dev *dev, IRDA_DONGLE type)
345{ 345{
346 int err; 346 int err;
347 347
348 IRDA_DEBUG(3, "%s : requesting dongle %d.\n", __func__, type); 348 pr_debug("%s : requesting dongle %d.\n", __func__, type);
349 349
350 err = sirdev_schedule_dongle_open(dev, type); 350 err = sirdev_schedule_dongle_open(dev, type);
351 if (unlikely(err)) 351 if (unlikely(err))
@@ -380,7 +380,7 @@ int sirdev_raw_write(struct sir_dev *dev, const char *buf, int len)
380 380
381 ret = dev->drv->do_write(dev, dev->tx_buff.data, dev->tx_buff.len); 381 ret = dev->drv->do_write(dev, dev->tx_buff.data, dev->tx_buff.len);
382 if (ret > 0) { 382 if (ret > 0) {
383 IRDA_DEBUG(3, "%s(), raw-tx started\n", __func__); 383 pr_debug("%s(), raw-tx started\n", __func__);
384 384
385 dev->tx_buff.data += ret; 385 dev->tx_buff.data += ret;
386 dev->tx_buff.len -= ret; 386 dev->tx_buff.len -= ret;
@@ -440,8 +440,8 @@ void sirdev_write_complete(struct sir_dev *dev)
440 440
441 spin_lock_irqsave(&dev->tx_lock, flags); 441 spin_lock_irqsave(&dev->tx_lock, flags);
442 442
443 IRDA_DEBUG(3, "%s() - dev->tx_buff.len = %d\n", 443 pr_debug("%s() - dev->tx_buff.len = %d\n",
444 __func__, dev->tx_buff.len); 444 __func__, dev->tx_buff.len);
445 445
446 if (likely(dev->tx_buff.len > 0)) { 446 if (likely(dev->tx_buff.len > 0)) {
447 /* Write data left in transmit buffer */ 447 /* Write data left in transmit buffer */
@@ -475,7 +475,7 @@ void sirdev_write_complete(struct sir_dev *dev)
475 * restarted when the irda-thread has completed the request. 475 * restarted when the irda-thread has completed the request.
476 */ 476 */
477 477
478 IRDA_DEBUG(3, "%s(), raw-tx done\n", __func__); 478 pr_debug("%s(), raw-tx done\n", __func__);
479 dev->raw_tx = 0; 479 dev->raw_tx = 0;
480 goto done; /* no post-frame handling in raw mode */ 480 goto done; /* no post-frame handling in raw mode */
481 } 481 }
@@ -492,7 +492,7 @@ void sirdev_write_complete(struct sir_dev *dev)
492 * re-activated. 492 * re-activated.
493 */ 493 */
494 494
495 IRDA_DEBUG(5, "%s(), finished with frame!\n", __func__); 495 pr_debug("%s(), finished with frame!\n", __func__);
496 496
497 if ((skb=dev->tx_skb) != NULL) { 497 if ((skb=dev->tx_skb) != NULL) {
498 dev->tx_skb = NULL; 498 dev->tx_skb = NULL;
@@ -502,7 +502,7 @@ void sirdev_write_complete(struct sir_dev *dev)
502 } 502 }
503 503
504 if (unlikely(dev->new_speed > 0)) { 504 if (unlikely(dev->new_speed > 0)) {
505 IRDA_DEBUG(5, "%s(), Changing speed!\n", __func__); 505 pr_debug("%s(), Changing speed!\n", __func__);
506 err = sirdev_schedule_speed(dev, dev->new_speed); 506 err = sirdev_schedule_speed(dev, dev->new_speed);
507 if (unlikely(err)) { 507 if (unlikely(err)) {
508 /* should never happen 508 /* should never happen
@@ -552,7 +552,7 @@ int sirdev_receive(struct sir_dev *dev, const unsigned char *cp, size_t count)
552 */ 552 */
553 irda_device_set_media_busy(dev->netdev, TRUE); 553 irda_device_set_media_busy(dev->netdev, TRUE);
554 dev->netdev->stats.rx_dropped++; 554 dev->netdev->stats.rx_dropped++;
555 IRDA_DEBUG(0, "%s; rx-drop: %zd\n", __func__, count); 555 pr_debug("%s; rx-drop: %zd\n", __func__, count);
556 return 0; 556 return 0;
557 } 557 }
558 558
@@ -598,7 +598,7 @@ static netdev_tx_t sirdev_hard_xmit(struct sk_buff *skb,
598 598
599 netif_stop_queue(ndev); 599 netif_stop_queue(ndev);
600 600
601 IRDA_DEBUG(3, "%s(), skb->len = %d\n", __func__, skb->len); 601 pr_debug("%s(), skb->len = %d\n", __func__, skb->len);
602 602
603 speed = irda_get_next_speed(skb); 603 speed = irda_get_next_speed(skb);
604 if ((speed != dev->speed) && (speed != -1)) { 604 if ((speed != dev->speed) && (speed != -1)) {
@@ -635,7 +635,7 @@ static netdev_tx_t sirdev_hard_xmit(struct sk_buff *skb,
635 635
636 /* Check problems */ 636 /* Check problems */
637 if(spin_is_locked(&dev->tx_lock)) { 637 if(spin_is_locked(&dev->tx_lock)) {
638 IRDA_DEBUG(3, "%s(), write not completed\n", __func__); 638 pr_debug("%s(), write not completed\n", __func__);
639 } 639 }
640 640
641 /* serialize with write completion */ 641 /* serialize with write completion */
@@ -684,7 +684,7 @@ static int sirdev_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd)
684 684
685 IRDA_ASSERT(dev != NULL, return -1;); 685 IRDA_ASSERT(dev != NULL, return -1;);
686 686
687 IRDA_DEBUG(3, "%s(), %s, (cmd=0x%X)\n", __func__, ndev->name, cmd); 687 pr_debug("%s(), %s, (cmd=0x%X)\n", __func__, ndev->name, cmd);
688 688
689 switch (cmd) { 689 switch (cmd) {
690 case SIOCSBANDWIDTH: /* Set bandwidth */ 690 case SIOCSBANDWIDTH: /* Set bandwidth */
@@ -801,8 +801,6 @@ static int sirdev_open(struct net_device *ndev)
801 if (!try_module_get(drv->owner)) 801 if (!try_module_get(drv->owner))
802 return -ESTALE; 802 return -ESTALE;
803 803
804 IRDA_DEBUG(2, "%s()\n", __func__);
805
806 if (sirdev_alloc_buffers(dev)) 804 if (sirdev_alloc_buffers(dev))
807 goto errout_dec; 805 goto errout_dec;
808 806
@@ -819,7 +817,7 @@ static int sirdev_open(struct net_device *ndev)
819 817
820 netif_wake_queue(ndev); 818 netif_wake_queue(ndev);
821 819
822 IRDA_DEBUG(2, "%s - done, speed = %d\n", __func__, dev->speed); 820 pr_debug("%s - done, speed = %d\n", __func__, dev->speed);
823 821
824 return 0; 822 return 0;
825 823
@@ -839,7 +837,7 @@ static int sirdev_close(struct net_device *ndev)
839 struct sir_dev *dev = netdev_priv(ndev); 837 struct sir_dev *dev = netdev_priv(ndev);
840 const struct sir_driver *drv; 838 const struct sir_driver *drv;
841 839
842// IRDA_DEBUG(0, "%s\n", __func__); 840/* pr_debug("%s\n", __func__); */
843 841
844 netif_stop_queue(ndev); 842 netif_stop_queue(ndev);
845 843
@@ -881,7 +879,7 @@ struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *n
881 struct net_device *ndev; 879 struct net_device *ndev;
882 struct sir_dev *dev; 880 struct sir_dev *dev;
883 881
884 IRDA_DEBUG(0, "%s - %s\n", __func__, name); 882 pr_debug("%s - %s\n", __func__, name);
885 883
886 /* instead of adding tests to protect against drv->do_write==NULL 884 /* instead of adding tests to protect against drv->do_write==NULL
887 * at several places we refuse to create a sir_dev instance for 885 * at several places we refuse to create a sir_dev instance for
@@ -939,7 +937,7 @@ int sirdev_put_instance(struct sir_dev *dev)
939{ 937{
940 int err = 0; 938 int err = 0;
941 939
942 IRDA_DEBUG(0, "%s\n", __func__); 940 pr_debug("%s\n", __func__);
943 941
944 atomic_set(&dev->enable_rx, 0); 942 atomic_set(&dev->enable_rx, 0);
945 943
diff --git a/drivers/net/irda/sir_dongle.c b/drivers/net/irda/sir_dongle.c
index cfbabb63f5cc..7436f73ff1bb 100644
--- a/drivers/net/irda/sir_dongle.c
+++ b/drivers/net/irda/sir_dongle.c
@@ -34,8 +34,8 @@ int irda_register_dongle(struct dongle_driver *new)
34 struct list_head *entry; 34 struct list_head *entry;
35 struct dongle_driver *drv; 35 struct dongle_driver *drv;
36 36
37 IRDA_DEBUG(0, "%s : registering dongle \"%s\" (%d).\n", 37 pr_debug("%s : registering dongle \"%s\" (%d).\n",
38 __func__, new->driver_name, new->type); 38 __func__, new->driver_name, new->type);
39 39
40 mutex_lock(&dongle_list_lock); 40 mutex_lock(&dongle_list_lock);
41 list_for_each(entry, &dongle_list) { 41 list_for_each(entry, &dongle_list) {
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c
index a7f0f5214ad7..b455ffe8850c 100644
--- a/drivers/net/irda/smsc-ircc2.c
+++ b/drivers/net/irda/smsc-ircc2.c
@@ -461,7 +461,7 @@ static int __init smsc_ircc_init(void)
461{ 461{
462 int ret; 462 int ret;
463 463
464 IRDA_DEBUG(1, "%s\n", __func__); 464 pr_debug("%s\n", __func__);
465 465
466 ret = platform_driver_register(&smsc_ircc_driver); 466 ret = platform_driver_register(&smsc_ircc_driver);
467 if (ret) { 467 if (ret) {
@@ -523,7 +523,7 @@ static int smsc_ircc_open(unsigned int fir_base, unsigned int sir_base, u8 dma,
523 struct net_device *dev; 523 struct net_device *dev;
524 int err; 524 int err;
525 525
526 IRDA_DEBUG(1, "%s\n", __func__); 526 pr_debug("%s\n", __func__);
527 527
528 err = smsc_ircc_present(fir_base, sir_base); 528 err = smsc_ircc_present(fir_base, sir_base);
529 if (err) 529 if (err)
@@ -803,7 +803,7 @@ static int smsc_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd
803 803
804 IRDA_ASSERT(self != NULL, return -1;); 804 IRDA_ASSERT(self != NULL, return -1;);
805 805
806 IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __func__, dev->name, cmd); 806 pr_debug("%s(), %s, (cmd=0x%X)\n", __func__, dev->name, cmd);
807 807
808 switch (cmd) { 808 switch (cmd) {
809 case SIOCSBANDWIDTH: /* Set bandwidth */ 809 case SIOCSBANDWIDTH: /* Set bandwidth */
@@ -882,7 +882,7 @@ static netdev_tx_t smsc_ircc_hard_xmit_sir(struct sk_buff *skb,
882 unsigned long flags; 882 unsigned long flags;
883 s32 speed; 883 s32 speed;
884 884
885 IRDA_DEBUG(1, "%s\n", __func__); 885 pr_debug("%s\n", __func__);
886 886
887 IRDA_ASSERT(dev != NULL, return NETDEV_TX_OK;); 887 IRDA_ASSERT(dev != NULL, return NETDEV_TX_OK;);
888 888
@@ -957,21 +957,21 @@ static void smsc_ircc_set_fir_speed(struct smsc_ircc_cb *self, u32 speed)
957 ir_mode = IRCC_CFGA_IRDA_HDLC; 957 ir_mode = IRCC_CFGA_IRDA_HDLC;
958 ctrl = IRCC_CRC; 958 ctrl = IRCC_CRC;
959 fast = 0; 959 fast = 0;
960 IRDA_DEBUG(0, "%s(), handling baud of 576000\n", __func__); 960 pr_debug("%s(), handling baud of 576000\n", __func__);
961 break; 961 break;
962 case 1152000: 962 case 1152000:
963 ir_mode = IRCC_CFGA_IRDA_HDLC; 963 ir_mode = IRCC_CFGA_IRDA_HDLC;
964 ctrl = IRCC_1152 | IRCC_CRC; 964 ctrl = IRCC_1152 | IRCC_CRC;
965 fast = IRCC_LCR_A_FAST | IRCC_LCR_A_GP_DATA; 965 fast = IRCC_LCR_A_FAST | IRCC_LCR_A_GP_DATA;
966 IRDA_DEBUG(0, "%s(), handling baud of 1152000\n", 966 pr_debug("%s(), handling baud of 1152000\n",
967 __func__); 967 __func__);
968 break; 968 break;
969 case 4000000: 969 case 4000000:
970 ir_mode = IRCC_CFGA_IRDA_4PPM; 970 ir_mode = IRCC_CFGA_IRDA_4PPM;
971 ctrl = IRCC_CRC; 971 ctrl = IRCC_CRC;
972 fast = IRCC_LCR_A_FAST; 972 fast = IRCC_LCR_A_FAST;
973 IRDA_DEBUG(0, "%s(), handling baud of 4000000\n", 973 pr_debug("%s(), handling baud of 4000000\n",
974 __func__); 974 __func__);
975 break; 975 break;
976 } 976 }
977 #if 0 977 #if 0
@@ -999,7 +999,7 @@ static void smsc_ircc_fir_start(struct smsc_ircc_cb *self)
999 struct net_device *dev; 999 struct net_device *dev;
1000 int fir_base; 1000 int fir_base;
1001 1001
1002 IRDA_DEBUG(1, "%s\n", __func__); 1002 pr_debug("%s\n", __func__);
1003 1003
1004 IRDA_ASSERT(self != NULL, return;); 1004 IRDA_ASSERT(self != NULL, return;);
1005 dev = self->netdev; 1005 dev = self->netdev;
@@ -1044,7 +1044,7 @@ static void smsc_ircc_fir_stop(struct smsc_ircc_cb *self)
1044{ 1044{
1045 int fir_base; 1045 int fir_base;
1046 1046
1047 IRDA_DEBUG(1, "%s\n", __func__); 1047 pr_debug("%s\n", __func__);
1048 1048
1049 IRDA_ASSERT(self != NULL, return;); 1049 IRDA_ASSERT(self != NULL, return;);
1050 1050
@@ -1068,7 +1068,7 @@ static void smsc_ircc_change_speed(struct smsc_ircc_cb *self, u32 speed)
1068 struct net_device *dev; 1068 struct net_device *dev;
1069 int last_speed_was_sir; 1069 int last_speed_was_sir;
1070 1070
1071 IRDA_DEBUG(0, "%s() changing speed to: %d\n", __func__, speed); 1071 pr_debug("%s() changing speed to: %d\n", __func__, speed);
1072 1072
1073 IRDA_ASSERT(self != NULL, return;); 1073 IRDA_ASSERT(self != NULL, return;);
1074 dev = self->netdev; 1074 dev = self->netdev;
@@ -1136,7 +1136,7 @@ static void smsc_ircc_set_sir_speed(struct smsc_ircc_cb *self, __u32 speed)
1136 int lcr; /* Line control reg */ 1136 int lcr; /* Line control reg */
1137 int divisor; 1137 int divisor;
1138 1138
1139 IRDA_DEBUG(0, "%s(), Setting speed to: %d\n", __func__, speed); 1139 pr_debug("%s(), Setting speed to: %d\n", __func__, speed);
1140 1140
1141 IRDA_ASSERT(self != NULL, return;); 1141 IRDA_ASSERT(self != NULL, return;);
1142 iobase = self->io.sir_base; 1142 iobase = self->io.sir_base;
@@ -1171,7 +1171,7 @@ static void smsc_ircc_set_sir_speed(struct smsc_ircc_cb *self, __u32 speed)
1171 /* Turn on interrups */ 1171 /* Turn on interrups */
1172 outb(UART_IER_RLSI | UART_IER_RDI | UART_IER_THRI, iobase + UART_IER); 1172 outb(UART_IER_RLSI | UART_IER_RDI | UART_IER_THRI, iobase + UART_IER);
1173 1173
1174 IRDA_DEBUG(2, "%s() speed changed to: %d\n", __func__, speed); 1174 pr_debug("%s() speed changed to: %d\n", __func__, speed);
1175} 1175}
1176 1176
1177 1177
@@ -1255,7 +1255,7 @@ static void smsc_ircc_dma_xmit(struct smsc_ircc_cb *self, int bofs)
1255 int iobase = self->io.fir_base; 1255 int iobase = self->io.fir_base;
1256 u8 ctrl; 1256 u8 ctrl;
1257 1257
1258 IRDA_DEBUG(3, "%s\n", __func__); 1258 pr_debug("%s\n", __func__);
1259#if 1 1259#if 1
1260 /* Disable Rx */ 1260 /* Disable Rx */
1261 register_bank(iobase, 0); 1261 register_bank(iobase, 0);
@@ -1309,7 +1309,7 @@ static void smsc_ircc_dma_xmit_complete(struct smsc_ircc_cb *self)
1309{ 1309{
1310 int iobase = self->io.fir_base; 1310 int iobase = self->io.fir_base;
1311 1311
1312 IRDA_DEBUG(3, "%s\n", __func__); 1312 pr_debug("%s\n", __func__);
1313#if 0 1313#if 0
1314 /* Disable Tx */ 1314 /* Disable Tx */
1315 register_bank(iobase, 0); 1315 register_bank(iobase, 0);
@@ -1413,7 +1413,7 @@ static void smsc_ircc_dma_receive_complete(struct smsc_ircc_cb *self)
1413 1413
1414 register_bank(iobase, 0); 1414 register_bank(iobase, 0);
1415 1415
1416 IRDA_DEBUG(3, "%s\n", __func__); 1416 pr_debug("%s\n", __func__);
1417#if 0 1417#if 0
1418 /* Disable Rx */ 1418 /* Disable Rx */
1419 register_bank(iobase, 0); 1419 register_bank(iobase, 0);
@@ -1424,8 +1424,8 @@ static void smsc_ircc_dma_receive_complete(struct smsc_ircc_cb *self)
1424 lsr= inb(iobase + IRCC_LSR); 1424 lsr= inb(iobase + IRCC_LSR);
1425 msgcnt = inb(iobase + IRCC_LCR_B) & 0x08; 1425 msgcnt = inb(iobase + IRCC_LCR_B) & 0x08;
1426 1426
1427 IRDA_DEBUG(2, "%s: dma count = %d\n", __func__, 1427 pr_debug("%s: dma count = %d\n", __func__,
1428 get_dma_residue(self->io.dma)); 1428 get_dma_residue(self->io.dma));
1429 1429
1430 len = self->rx_buff.truesize - get_dma_residue(self->io.dma); 1430 len = self->rx_buff.truesize - get_dma_residue(self->io.dma);
1431 1431
@@ -1450,7 +1450,7 @@ static void smsc_ircc_dma_receive_complete(struct smsc_ircc_cb *self)
1450 net_warn_ratelimited("%s(), bogus len=%d\n", __func__, len); 1450 net_warn_ratelimited("%s(), bogus len=%d\n", __func__, len);
1451 return; 1451 return;
1452 } 1452 }
1453 IRDA_DEBUG(2, "%s: msgcnt = %d, len=%d\n", __func__, msgcnt, len); 1453 pr_debug("%s: msgcnt = %d, len=%d\n", __func__, msgcnt, len);
1454 1454
1455 skb = dev_alloc_skb(len + 1); 1455 skb = dev_alloc_skb(len + 1);
1456 if (!skb) 1456 if (!skb)
@@ -1494,7 +1494,7 @@ static void smsc_ircc_sir_receive(struct smsc_ircc_cb *self)
1494 1494
1495 /* Make sure we don't stay here to long */ 1495 /* Make sure we don't stay here to long */
1496 if (boguscount++ > 32) { 1496 if (boguscount++ > 32) {
1497 IRDA_DEBUG(2, "%s(), breaking!\n", __func__); 1497 pr_debug("%s(), breaking!\n", __func__);
1498 break; 1498 break;
1499 } 1499 }
1500 } while (inb(iobase + UART_LSR) & UART_LSR_DR); 1500 } while (inb(iobase + UART_LSR) & UART_LSR_DR);
@@ -1536,7 +1536,7 @@ static irqreturn_t smsc_ircc_interrupt(int dummy, void *dev_id)
1536 lcra = inb(iobase + IRCC_LCR_A); 1536 lcra = inb(iobase + IRCC_LCR_A);
1537 lsr = inb(iobase + IRCC_LSR); 1537 lsr = inb(iobase + IRCC_LSR);
1538 1538
1539 IRDA_DEBUG(2, "%s(), iir = 0x%02x\n", __func__, iir); 1539 pr_debug("%s(), iir = 0x%02x\n", __func__, iir);
1540 1540
1541 if (iir & IRCC_IIR_EOM) { 1541 if (iir & IRCC_IIR_EOM) {
1542 if (self->io.direction == IO_RECV) 1542 if (self->io.direction == IO_RECV)
@@ -1586,12 +1586,12 @@ static irqreturn_t smsc_ircc_interrupt_sir(struct net_device *dev)
1586 /* Clear interrupt */ 1586 /* Clear interrupt */
1587 lsr = inb(iobase + UART_LSR); 1587 lsr = inb(iobase + UART_LSR);
1588 1588
1589 IRDA_DEBUG(4, "%s(), iir=%02x, lsr=%02x, iobase=%#x\n", 1589 pr_debug("%s(), iir=%02x, lsr=%02x, iobase=%#x\n",
1590 __func__, iir, lsr, iobase); 1590 __func__, iir, lsr, iobase);
1591 1591
1592 switch (iir) { 1592 switch (iir) {
1593 case UART_IIR_RLSI: 1593 case UART_IIR_RLSI:
1594 IRDA_DEBUG(2, "%s(), RLSI\n", __func__); 1594 pr_debug("%s(), RLSI\n", __func__);
1595 break; 1595 break;
1596 case UART_IIR_RDI: 1596 case UART_IIR_RDI:
1597 /* Receive interrupt */ 1597 /* Receive interrupt */
@@ -1603,8 +1603,8 @@ static irqreturn_t smsc_ircc_interrupt_sir(struct net_device *dev)
1603 smsc_ircc_sir_write_wakeup(self); 1603 smsc_ircc_sir_write_wakeup(self);
1604 break; 1604 break;
1605 default: 1605 default:
1606 IRDA_DEBUG(0, "%s(), unhandled IIR=%#x\n", 1606 pr_debug("%s(), unhandled IIR=%#x\n",
1607 __func__, iir); 1607 __func__, iir);
1608 break; 1608 break;
1609 } 1609 }
1610 1610
@@ -1631,12 +1631,12 @@ static int ircc_is_receiving(struct smsc_ircc_cb *self)
1631 int status = FALSE; 1631 int status = FALSE;
1632 /* int iobase; */ 1632 /* int iobase; */
1633 1633
1634 IRDA_DEBUG(1, "%s\n", __func__); 1634 pr_debug("%s\n", __func__);
1635 1635
1636 IRDA_ASSERT(self != NULL, return FALSE;); 1636 IRDA_ASSERT(self != NULL, return FALSE;);
1637 1637
1638 IRDA_DEBUG(0, "%s: dma count = %d\n", __func__, 1638 pr_debug("%s: dma count = %d\n", __func__,
1639 get_dma_residue(self->io.dma)); 1639 get_dma_residue(self->io.dma));
1640 1640
1641 status = (self->rx_buff.state != OUTSIDE_FRAME); 1641 status = (self->rx_buff.state != OUTSIDE_FRAME);
1642 1642
@@ -1651,8 +1651,8 @@ static int smsc_ircc_request_irq(struct smsc_ircc_cb *self)
1651 error = request_irq(self->io.irq, smsc_ircc_interrupt, 0, 1651 error = request_irq(self->io.irq, smsc_ircc_interrupt, 0,
1652 self->netdev->name, self->netdev); 1652 self->netdev->name, self->netdev);
1653 if (error) 1653 if (error)
1654 IRDA_DEBUG(0, "%s(), unable to allocate irq=%d, err=%d\n", 1654 pr_debug("%s(), unable to allocate irq=%d, err=%d\n",
1655 __func__, self->io.irq, error); 1655 __func__, self->io.irq, error);
1656 1656
1657 return error; 1657 return error;
1658} 1658}
@@ -1696,21 +1696,21 @@ static int smsc_ircc_net_open(struct net_device *dev)
1696 struct smsc_ircc_cb *self; 1696 struct smsc_ircc_cb *self;
1697 char hwname[16]; 1697 char hwname[16];
1698 1698
1699 IRDA_DEBUG(1, "%s\n", __func__); 1699 pr_debug("%s\n", __func__);
1700 1700
1701 IRDA_ASSERT(dev != NULL, return -1;); 1701 IRDA_ASSERT(dev != NULL, return -1;);
1702 self = netdev_priv(dev); 1702 self = netdev_priv(dev);
1703 IRDA_ASSERT(self != NULL, return 0;); 1703 IRDA_ASSERT(self != NULL, return 0;);
1704 1704
1705 if (self->io.suspended) { 1705 if (self->io.suspended) {
1706 IRDA_DEBUG(0, "%s(), device is suspended\n", __func__); 1706 pr_debug("%s(), device is suspended\n", __func__);
1707 return -EAGAIN; 1707 return -EAGAIN;
1708 } 1708 }
1709 1709
1710 if (request_irq(self->io.irq, smsc_ircc_interrupt, 0, dev->name, 1710 if (request_irq(self->io.irq, smsc_ircc_interrupt, 0, dev->name,
1711 (void *) dev)) { 1711 (void *) dev)) {
1712 IRDA_DEBUG(0, "%s(), unable to allocate irq=%d\n", 1712 pr_debug("%s(), unable to allocate irq=%d\n",
1713 __func__, self->io.irq); 1713 __func__, self->io.irq);
1714 return -EAGAIN; 1714 return -EAGAIN;
1715 } 1715 }
1716 1716
@@ -1753,7 +1753,7 @@ static int smsc_ircc_net_close(struct net_device *dev)
1753{ 1753{
1754 struct smsc_ircc_cb *self; 1754 struct smsc_ircc_cb *self;
1755 1755
1756 IRDA_DEBUG(1, "%s\n", __func__); 1756 pr_debug("%s\n", __func__);
1757 1757
1758 IRDA_ASSERT(dev != NULL, return -1;); 1758 IRDA_ASSERT(dev != NULL, return -1;);
1759 self = netdev_priv(dev); 1759 self = netdev_priv(dev);
@@ -1784,7 +1784,7 @@ static int smsc_ircc_suspend(struct platform_device *dev, pm_message_t state)
1784 struct smsc_ircc_cb *self = platform_get_drvdata(dev); 1784 struct smsc_ircc_cb *self = platform_get_drvdata(dev);
1785 1785
1786 if (!self->io.suspended) { 1786 if (!self->io.suspended) {
1787 IRDA_DEBUG(1, "%s, Suspending\n", driver_name); 1787 pr_debug("%s, Suspending\n", driver_name);
1788 1788
1789 rtnl_lock(); 1789 rtnl_lock();
1790 if (netif_running(self->netdev)) { 1790 if (netif_running(self->netdev)) {
@@ -1805,7 +1805,7 @@ static int smsc_ircc_resume(struct platform_device *dev)
1805 struct smsc_ircc_cb *self = platform_get_drvdata(dev); 1805 struct smsc_ircc_cb *self = platform_get_drvdata(dev);
1806 1806
1807 if (self->io.suspended) { 1807 if (self->io.suspended) {
1808 IRDA_DEBUG(1, "%s, Waking up\n", driver_name); 1808 pr_debug("%s, Waking up\n", driver_name);
1809 1809
1810 rtnl_lock(); 1810 rtnl_lock();
1811 smsc_ircc_init_chip(self); 1811 smsc_ircc_init_chip(self);
@@ -1836,7 +1836,7 @@ static int smsc_ircc_resume(struct platform_device *dev)
1836 */ 1836 */
1837static int __exit smsc_ircc_close(struct smsc_ircc_cb *self) 1837static int __exit smsc_ircc_close(struct smsc_ircc_cb *self)
1838{ 1838{
1839 IRDA_DEBUG(1, "%s\n", __func__); 1839 pr_debug("%s\n", __func__);
1840 1840
1841 IRDA_ASSERT(self != NULL, return -1;); 1841 IRDA_ASSERT(self != NULL, return -1;);
1842 1842
@@ -1848,13 +1848,13 @@ static int __exit smsc_ircc_close(struct smsc_ircc_cb *self)
1848 smsc_ircc_stop_interrupts(self); 1848 smsc_ircc_stop_interrupts(self);
1849 1849
1850 /* Release the PORTS that this driver is using */ 1850 /* Release the PORTS that this driver is using */
1851 IRDA_DEBUG(0, "%s(), releasing 0x%03x\n", __func__, 1851 pr_debug("%s(), releasing 0x%03x\n", __func__,
1852 self->io.fir_base); 1852 self->io.fir_base);
1853 1853
1854 release_region(self->io.fir_base, self->io.fir_ext); 1854 release_region(self->io.fir_base, self->io.fir_ext);
1855 1855
1856 IRDA_DEBUG(0, "%s(), releasing 0x%03x\n", __func__, 1856 pr_debug("%s(), releasing 0x%03x\n", __func__,
1857 self->io.sir_base); 1857 self->io.sir_base);
1858 1858
1859 release_region(self->io.sir_base, self->io.sir_ext); 1859 release_region(self->io.sir_base, self->io.sir_ext);
1860 1860
@@ -1875,7 +1875,7 @@ static void __exit smsc_ircc_cleanup(void)
1875{ 1875{
1876 int i; 1876 int i;
1877 1877
1878 IRDA_DEBUG(1, "%s\n", __func__); 1878 pr_debug("%s\n", __func__);
1879 1879
1880 for (i = 0; i < 2; i++) { 1880 for (i = 0; i < 2; i++) {
1881 if (dev_self[i]) 1881 if (dev_self[i])
@@ -1899,7 +1899,7 @@ static void smsc_ircc_sir_start(struct smsc_ircc_cb *self)
1899 struct net_device *dev; 1899 struct net_device *dev;
1900 int fir_base, sir_base; 1900 int fir_base, sir_base;
1901 1901
1902 IRDA_DEBUG(3, "%s\n", __func__); 1902 pr_debug("%s\n", __func__);
1903 1903
1904 IRDA_ASSERT(self != NULL, return;); 1904 IRDA_ASSERT(self != NULL, return;);
1905 dev = self->netdev; 1905 dev = self->netdev;
@@ -1925,7 +1925,7 @@ static void smsc_ircc_sir_start(struct smsc_ircc_cb *self)
1925 /* Turn on interrups */ 1925 /* Turn on interrups */
1926 outb(UART_IER_RLSI | UART_IER_RDI |UART_IER_THRI, sir_base + UART_IER); 1926 outb(UART_IER_RLSI | UART_IER_RDI |UART_IER_THRI, sir_base + UART_IER);
1927 1927
1928 IRDA_DEBUG(3, "%s() - exit\n", __func__); 1928 pr_debug("%s() - exit\n", __func__);
1929 1929
1930 outb(0x00, fir_base + IRCC_MASTER); 1930 outb(0x00, fir_base + IRCC_MASTER);
1931} 1931}
@@ -1935,7 +1935,7 @@ void smsc_ircc_sir_stop(struct smsc_ircc_cb *self)
1935{ 1935{
1936 int iobase; 1936 int iobase;
1937 1937
1938 IRDA_DEBUG(3, "%s\n", __func__); 1938 pr_debug("%s\n", __func__);
1939 iobase = self->io.sir_base; 1939 iobase = self->io.sir_base;
1940 1940
1941 /* Reset UART */ 1941 /* Reset UART */
@@ -1961,7 +1961,7 @@ static void smsc_ircc_sir_write_wakeup(struct smsc_ircc_cb *self)
1961 1961
1962 IRDA_ASSERT(self != NULL, return;); 1962 IRDA_ASSERT(self != NULL, return;);
1963 1963
1964 IRDA_DEBUG(4, "%s\n", __func__); 1964 pr_debug("%s\n", __func__);
1965 1965
1966 iobase = self->io.sir_base; 1966 iobase = self->io.sir_base;
1967 1967
@@ -1982,8 +1982,8 @@ static void smsc_ircc_sir_write_wakeup(struct smsc_ircc_cb *self)
1982 * if we need to change the speed of the hardware 1982 * if we need to change the speed of the hardware
1983 */ 1983 */
1984 if (self->new_speed) { 1984 if (self->new_speed) {
1985 IRDA_DEBUG(5, "%s(), Changing speed to %d.\n", 1985 pr_debug("%s(), Changing speed to %d.\n",
1986 __func__, self->new_speed); 1986 __func__, self->new_speed);
1987 smsc_ircc_sir_wait_hw_transmitter_finish(self); 1987 smsc_ircc_sir_wait_hw_transmitter_finish(self);
1988 smsc_ircc_change_speed(self, self->new_speed); 1988 smsc_ircc_change_speed(self, self->new_speed);
1989 self->new_speed = 0; 1989 self->new_speed = 0;
@@ -2123,7 +2123,7 @@ static void smsc_ircc_sir_wait_hw_transmitter_finish(struct smsc_ircc_cb *self)
2123 udelay(1); 2123 udelay(1);
2124 2124
2125 if (count < 0) 2125 if (count < 0)
2126 IRDA_DEBUG(0, "%s(): stuck transmitter\n", __func__); 2126 pr_debug("%s(): stuck transmitter\n", __func__);
2127} 2127}
2128 2128
2129 2129
@@ -2184,7 +2184,7 @@ static int __init smsc_superio_flat(const struct smsc_chip *chips, unsigned shor
2184 u8 mode, dma, irq; 2184 u8 mode, dma, irq;
2185 int ret = -ENODEV; 2185 int ret = -ENODEV;
2186 2186
2187 IRDA_DEBUG(1, "%s\n", __func__); 2187 pr_debug("%s\n", __func__);
2188 2188
2189 if (smsc_ircc_probe(cfgbase, SMSCSIOFLAT_DEVICEID_REG, chips, type) == NULL) 2189 if (smsc_ircc_probe(cfgbase, SMSCSIOFLAT_DEVICEID_REG, chips, type) == NULL)
2190 return ret; 2190 return ret;
@@ -2235,7 +2235,7 @@ static int __init smsc_superio_paged(const struct smsc_chip *chips, unsigned sho
2235 unsigned short fir_io, sir_io; 2235 unsigned short fir_io, sir_io;
2236 int ret = -ENODEV; 2236 int ret = -ENODEV;
2237 2237
2238 IRDA_DEBUG(1, "%s\n", __func__); 2238 pr_debug("%s\n", __func__);
2239 2239
2240 if (smsc_ircc_probe(cfg_base, 0x20, chips, type) == NULL) 2240 if (smsc_ircc_probe(cfg_base, 0x20, chips, type) == NULL)
2241 return ret; 2241 return ret;
@@ -2269,7 +2269,7 @@ static int __init smsc_superio_paged(const struct smsc_chip *chips, unsigned sho
2269 2269
2270static int __init smsc_access(unsigned short cfg_base, unsigned char reg) 2270static int __init smsc_access(unsigned short cfg_base, unsigned char reg)
2271{ 2271{
2272 IRDA_DEBUG(1, "%s\n", __func__); 2272 pr_debug("%s\n", __func__);
2273 2273
2274 outb(reg, cfg_base); 2274 outb(reg, cfg_base);
2275 return inb(cfg_base) != reg ? -1 : 0; 2275 return inb(cfg_base) != reg ? -1 : 0;
@@ -2279,7 +2279,7 @@ static const struct smsc_chip * __init smsc_ircc_probe(unsigned short cfg_base,
2279{ 2279{
2280 u8 devid, xdevid, rev; 2280 u8 devid, xdevid, rev;
2281 2281
2282 IRDA_DEBUG(1, "%s\n", __func__); 2282 pr_debug("%s\n", __func__);
2283 2283
2284 /* Leave configuration */ 2284 /* Leave configuration */
2285 2285
@@ -2534,9 +2534,8 @@ static int __init preconfigure_smsc_chip(struct
2534 outb(LPC47N227_CFGACCESSKEY, iobase); // enter configuration state 2534 outb(LPC47N227_CFGACCESSKEY, iobase); // enter configuration state
2535 outb(SMSCSIOFLAT_DEVICEID_REG, iobase); // set for device ID 2535 outb(SMSCSIOFLAT_DEVICEID_REG, iobase); // set for device ID
2536 tmpbyte = inb(iobase +1); // Read device ID 2536 tmpbyte = inb(iobase +1); // Read device ID
2537 IRDA_DEBUG(0, 2537 pr_debug("Detected Chip id: 0x%02x, setting up registers...\n",
2538 "Detected Chip id: 0x%02x, setting up registers...\n", 2538 tmpbyte);
2539 tmpbyte);
2540 2539
2541 /* Disable UART1 and set up SIR I/O port */ 2540 /* Disable UART1 and set up SIR I/O port */
2542 outb(0x24, iobase); // select CR24 - UART1 base addr 2541 outb(0x24, iobase); // select CR24 - UART1 base addr
@@ -2682,7 +2681,7 @@ static int __init preconfigure_through_82801(struct pci_dev *dev,
2682 default: 2681 default:
2683 tmpbyte |= 0x01; /* COM2 default */ 2682 tmpbyte |= 0x01; /* COM2 default */
2684 } 2683 }
2685 IRDA_DEBUG(1, "COM_DEC (write): 0x%02x\n", tmpbyte); 2684 pr_debug("COM_DEC (write): 0x%02x\n", tmpbyte);
2686 pci_write_config_byte(dev, COM_DEC, tmpbyte); 2685 pci_write_config_byte(dev, COM_DEC, tmpbyte);
2687 2686
2688 /* Enable Low Pin Count interface */ 2687 /* Enable Low Pin Count interface */
@@ -2710,7 +2709,7 @@ static int __init preconfigure_through_82801(struct pci_dev *dev,
2710 } 2709 }
2711 tmpword &= 0xfffd; /* disable LPC COMB */ 2710 tmpword &= 0xfffd; /* disable LPC COMB */
2712 tmpword |= 0x0001; /* set bit 0 : enable LPC COMA addr range (GEN2) */ 2711 tmpword |= 0x0001; /* set bit 0 : enable LPC COMA addr range (GEN2) */
2713 IRDA_DEBUG(1, "LPC_EN (write): 0x%04x\n", tmpword); 2712 pr_debug("LPC_EN (write): 0x%04x\n", tmpword);
2714 pci_write_config_word(dev, LPC_EN, tmpword); 2713 pci_write_config_word(dev, LPC_EN, tmpword);
2715 2714
2716 /* 2715 /*
@@ -2755,7 +2754,7 @@ static int __init preconfigure_through_82801(struct pci_dev *dev,
2755 default: 2754 default:
2756 break; /* do not change settings */ 2755 break; /* do not change settings */
2757 } 2756 }
2758 IRDA_DEBUG(1, "PCI_DMA_C (write): 0x%04x\n", tmpword); 2757 pr_debug("PCI_DMA_C (write): 0x%04x\n", tmpword);
2759 pci_write_config_word(dev, PCI_DMA_C, tmpword); 2758 pci_write_config_word(dev, PCI_DMA_C, tmpword);
2760 2759
2761 /* 2760 /*
@@ -2766,7 +2765,7 @@ static int __init preconfigure_through_82801(struct pci_dev *dev,
2766 */ 2765 */
2767 tmpword = conf->fir_io & 0xfff8; 2766 tmpword = conf->fir_io & 0xfff8;
2768 tmpword |= 0x0001; 2767 tmpword |= 0x0001;
2769 IRDA_DEBUG(1, "GEN2_DEC (write): 0x%04x\n", tmpword); 2768 pr_debug("GEN2_DEC (write): 0x%04x\n", tmpword);
2770 pci_write_config_word(dev, GEN2_DEC, tmpword); 2769 pci_write_config_word(dev, GEN2_DEC, tmpword);
2771 2770
2772 /* Pre-configure chip */ 2771 /* Pre-configure chip */
diff --git a/drivers/net/irda/tekram-sir.c b/drivers/net/irda/tekram-sir.c
index 04db4eac9dc3..9dcf0c103b9d 100644
--- a/drivers/net/irda/tekram-sir.c
+++ b/drivers/net/irda/tekram-sir.c
@@ -63,8 +63,8 @@ static int __init tekram_sir_init(void)
63{ 63{
64 if (tekram_delay < 1 || tekram_delay > 500) 64 if (tekram_delay < 1 || tekram_delay > 500)
65 tekram_delay = 200; 65 tekram_delay = 200;
66 IRDA_DEBUG(1, "%s - using %d ms delay\n", 66 pr_debug("%s - using %d ms delay\n",
67 tekram.driver_name, tekram_delay); 67 tekram.driver_name, tekram_delay);
68 return irda_register_dongle(&tekram); 68 return irda_register_dongle(&tekram);
69} 69}
70 70
@@ -77,8 +77,6 @@ static int tekram_open(struct sir_dev *dev)
77{ 77{
78 struct qos_info *qos = &dev->qos; 78 struct qos_info *qos = &dev->qos;
79 79
80 IRDA_DEBUG(2, "%s()\n", __func__);
81
82 sirdev_set_dtr_rts(dev, TRUE, TRUE); 80 sirdev_set_dtr_rts(dev, TRUE, TRUE);
83 81
84 qos->baud_rate.bits &= IR_9600|IR_19200|IR_38400|IR_57600|IR_115200; 82 qos->baud_rate.bits &= IR_9600|IR_19200|IR_38400|IR_57600|IR_115200;
@@ -92,8 +90,6 @@ static int tekram_open(struct sir_dev *dev)
92 90
93static int tekram_close(struct sir_dev *dev) 91static int tekram_close(struct sir_dev *dev)
94{ 92{
95 IRDA_DEBUG(2, "%s()\n", __func__);
96
97 /* Power off dongle */ 93 /* Power off dongle */
98 sirdev_set_dtr_rts(dev, FALSE, FALSE); 94 sirdev_set_dtr_rts(dev, FALSE, FALSE);
99 95
@@ -130,8 +126,6 @@ static int tekram_change_speed(struct sir_dev *dev, unsigned speed)
130 u8 byte; 126 u8 byte;
131 static int ret = 0; 127 static int ret = 0;
132 128
133 IRDA_DEBUG(2, "%s()\n", __func__);
134
135 switch(state) { 129 switch(state) {
136 case SIRDEV_STATE_DONGLE_SPEED: 130 case SIRDEV_STATE_DONGLE_SPEED:
137 131
@@ -205,8 +199,6 @@ static int tekram_change_speed(struct sir_dev *dev, unsigned speed)
205 199
206static int tekram_reset(struct sir_dev *dev) 200static int tekram_reset(struct sir_dev *dev)
207{ 201{
208 IRDA_DEBUG(2, "%s()\n", __func__);
209
210 /* Clear DTR, Set RTS */ 202 /* Clear DTR, Set RTS */
211 sirdev_set_dtr_rts(dev, FALSE, TRUE); 203 sirdev_set_dtr_rts(dev, FALSE, TRUE);
212 204
diff --git a/drivers/net/irda/toim3232-sir.c b/drivers/net/irda/toim3232-sir.c
index 19ad4606b799..6d2f55959c49 100644
--- a/drivers/net/irda/toim3232-sir.c
+++ b/drivers/net/irda/toim3232-sir.c
@@ -168,8 +168,8 @@ static int __init toim3232_sir_init(void)
168{ 168{
169 if (toim3232delay < 1 || toim3232delay > 500) 169 if (toim3232delay < 1 || toim3232delay > 500)
170 toim3232delay = 200; 170 toim3232delay = 200;
171 IRDA_DEBUG(1, "%s - using %d ms delay\n", 171 pr_debug("%s - using %d ms delay\n",
172 toim3232.driver_name, toim3232delay); 172 toim3232.driver_name, toim3232delay);
173 return irda_register_dongle(&toim3232); 173 return irda_register_dongle(&toim3232);
174} 174}
175 175
@@ -182,8 +182,6 @@ static int toim3232_open(struct sir_dev *dev)
182{ 182{
183 struct qos_info *qos = &dev->qos; 183 struct qos_info *qos = &dev->qos;
184 184
185 IRDA_DEBUG(2, "%s()\n", __func__);
186
187 /* Pull the lines high to start with. 185 /* Pull the lines high to start with.
188 * 186 *
189 * For the IR320ST-2, we need to charge the main supply capacitor to 187 * For the IR320ST-2, we need to charge the main supply capacitor to
@@ -210,8 +208,6 @@ static int toim3232_open(struct sir_dev *dev)
210 208
211static int toim3232_close(struct sir_dev *dev) 209static int toim3232_close(struct sir_dev *dev)
212{ 210{
213 IRDA_DEBUG(2, "%s()\n", __func__);
214
215 /* Power off dongle */ 211 /* Power off dongle */
216 sirdev_set_dtr_rts(dev, FALSE, FALSE); 212 sirdev_set_dtr_rts(dev, FALSE, FALSE);
217 213
@@ -242,8 +238,6 @@ static int toim3232_change_speed(struct sir_dev *dev, unsigned speed)
242 u8 byte; 238 u8 byte;
243 static int ret = 0; 239 static int ret = 0;
244 240
245 IRDA_DEBUG(2, "%s()\n", __func__);
246
247 switch(state) { 241 switch(state) {
248 case SIRDEV_STATE_DONGLE_SPEED: 242 case SIRDEV_STATE_DONGLE_SPEED:
249 243
@@ -345,8 +339,6 @@ static int toim3232_change_speed(struct sir_dev *dev, unsigned speed)
345 339
346static int toim3232_reset(struct sir_dev *dev) 340static int toim3232_reset(struct sir_dev *dev)
347{ 341{
348 IRDA_DEBUG(2, "%s()\n", __func__);
349
350 /* Switch off both DTR and RTS to switch off dongle */ 342 /* Switch off both DTR and RTS to switch off dongle */
351 sirdev_set_dtr_rts(dev, FALSE, FALSE); 343 sirdev_set_dtr_rts(dev, FALSE, FALSE);
352 344
diff --git a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c
index b07b4ccddcad..6960d4cd3cae 100644
--- a/drivers/net/irda/via-ircc.c
+++ b/drivers/net/irda/via-ircc.c
@@ -144,12 +144,10 @@ static int __init via_ircc_init(void)
144{ 144{
145 int rc; 145 int rc;
146 146
147 IRDA_DEBUG(3, "%s()\n", __func__);
148
149 rc = pci_register_driver(&via_driver); 147 rc = pci_register_driver(&via_driver);
150 if (rc < 0) { 148 if (rc < 0) {
151 IRDA_DEBUG(0, "%s(): error rc = %d, returning -ENODEV...\n", 149 pr_debug("%s(): error rc = %d, returning -ENODEV...\n",
152 __func__, rc); 150 __func__, rc);
153 return -ENODEV; 151 return -ENODEV;
154 } 152 }
155 return 0; 153 return 0;
@@ -162,11 +160,11 @@ static int via_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
162 u16 Chipset,FirDRQ1,FirDRQ0,FirIRQ,FirIOBase; 160 u16 Chipset,FirDRQ1,FirDRQ0,FirIRQ,FirIOBase;
163 chipio_t info; 161 chipio_t info;
164 162
165 IRDA_DEBUG(2, "%s(): Device ID=(0X%X)\n", __func__, id->device); 163 pr_debug("%s(): Device ID=(0X%X)\n", __func__, id->device);
166 164
167 rc = pci_enable_device (pcidev); 165 rc = pci_enable_device (pcidev);
168 if (rc) { 166 if (rc) {
169 IRDA_DEBUG(0, "%s(): error rc = %d\n", __func__, rc); 167 pr_debug("%s(): error rc = %d\n", __func__, rc);
170 return -ENODEV; 168 return -ENODEV;
171 } 169 }
172 170
@@ -177,7 +175,7 @@ static int via_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
177 Chipset=0x3076; 175 Chipset=0x3076;
178 176
179 if (Chipset==0x3076) { 177 if (Chipset==0x3076) {
180 IRDA_DEBUG(2, "%s(): Chipset = 3076\n", __func__); 178 pr_debug("%s(): Chipset = 3076\n", __func__);
181 179
182 WriteLPCReg(7,0x0c ); 180 WriteLPCReg(7,0x0c );
183 temp=ReadLPCReg(0x30);//check if BIOS Enable Fir 181 temp=ReadLPCReg(0x30);//check if BIOS Enable Fir
@@ -213,7 +211,7 @@ static int via_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
213 } else 211 } else
214 rc = -ENODEV; //IR not turn on 212 rc = -ENODEV; //IR not turn on
215 } else { //Not VT1211 213 } else { //Not VT1211
216 IRDA_DEBUG(2, "%s(): Chipset = 3096\n", __func__); 214 pr_debug("%s(): Chipset = 3096\n", __func__);
217 215
218 pci_read_config_byte(pcidev,0x67,&bTmp);//check if BIOS Enable Fir 216 pci_read_config_byte(pcidev,0x67,&bTmp);//check if BIOS Enable Fir
219 if((bTmp&0x01)==1) { // BIOS enable FIR 217 if((bTmp&0x01)==1) { // BIOS enable FIR
@@ -252,14 +250,12 @@ static int via_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
252 rc = -ENODEV; //IR not turn on !!!!! 250 rc = -ENODEV; //IR not turn on !!!!!
253 }//Not VT1211 251 }//Not VT1211
254 252
255 IRDA_DEBUG(2, "%s(): End - rc = %d\n", __func__, rc); 253 pr_debug("%s(): End - rc = %d\n", __func__, rc);
256 return rc; 254 return rc;
257} 255}
258 256
259static void __exit via_ircc_cleanup(void) 257static void __exit via_ircc_cleanup(void)
260{ 258{
261 IRDA_DEBUG(3, "%s()\n", __func__);
262
263 /* Cleanup all instances of the driver */ 259 /* Cleanup all instances of the driver */
264 pci_unregister_driver (&via_driver); 260 pci_unregister_driver (&via_driver);
265} 261}
@@ -289,8 +285,6 @@ static int via_ircc_open(struct pci_dev *pdev, chipio_t *info, unsigned int id)
289 struct via_ircc_cb *self; 285 struct via_ircc_cb *self;
290 int err; 286 int err;
291 287
292 IRDA_DEBUG(3, "%s()\n", __func__);
293
294 /* Allocate new instance of the driver */ 288 /* Allocate new instance of the driver */
295 dev = alloc_irdadev(sizeof(struct via_ircc_cb)); 289 dev = alloc_irdadev(sizeof(struct via_ircc_cb));
296 if (dev == NULL) 290 if (dev == NULL)
@@ -316,8 +310,8 @@ static int via_ircc_open(struct pci_dev *pdev, chipio_t *info, unsigned int id)
316 310
317 /* Reserve the ioports that we need */ 311 /* Reserve the ioports that we need */
318 if (!request_region(self->io.fir_base, self->io.fir_ext, driver_name)) { 312 if (!request_region(self->io.fir_base, self->io.fir_ext, driver_name)) {
319 IRDA_DEBUG(0, "%s(), can't get iobase of 0x%03x\n", 313 pr_debug("%s(), can't get iobase of 0x%03x\n",
320 __func__, self->io.fir_base); 314 __func__, self->io.fir_base);
321 err = -ENODEV; 315 err = -ENODEV;
322 goto err_out1; 316 goto err_out1;
323 } 317 }
@@ -423,8 +417,6 @@ static void via_remove_one(struct pci_dev *pdev)
423 struct via_ircc_cb *self = pci_get_drvdata(pdev); 417 struct via_ircc_cb *self = pci_get_drvdata(pdev);
424 int iobase; 418 int iobase;
425 419
426 IRDA_DEBUG(3, "%s()\n", __func__);
427
428 iobase = self->io.fir_base; 420 iobase = self->io.fir_base;
429 421
430 ResetChip(iobase, 5); //hardware reset. 422 ResetChip(iobase, 5); //hardware reset.
@@ -432,8 +424,8 @@ static void via_remove_one(struct pci_dev *pdev)
432 unregister_netdev(self->netdev); 424 unregister_netdev(self->netdev);
433 425
434 /* Release the PORT that this driver is using */ 426 /* Release the PORT that this driver is using */
435 IRDA_DEBUG(2, "%s(), Releasing Region %03x\n", 427 pr_debug("%s(), Releasing Region %03x\n",
436 __func__, self->io.fir_base); 428 __func__, self->io.fir_base);
437 release_region(self->io.fir_base, self->io.fir_ext); 429 release_region(self->io.fir_base, self->io.fir_ext);
438 if (self->tx_buff.head) 430 if (self->tx_buff.head)
439 dma_free_coherent(&pdev->dev, self->tx_buff.truesize, 431 dma_free_coherent(&pdev->dev, self->tx_buff.truesize,
@@ -458,8 +450,6 @@ static void via_hw_init(struct via_ircc_cb *self)
458{ 450{
459 int iobase = self->io.fir_base; 451 int iobase = self->io.fir_base;
460 452
461 IRDA_DEBUG(3, "%s()\n", __func__);
462
463 SetMaxRxPacketSize(iobase, 0x0fff); //set to max:4095 453 SetMaxRxPacketSize(iobase, 0x0fff); //set to max:4095
464 // FIFO Init 454 // FIFO Init
465 EnRXFIFOReadyInt(iobase, OFF); 455 EnRXFIFOReadyInt(iobase, OFF);
@@ -528,8 +518,8 @@ static void via_ircc_change_dongle_speed(int iobase, int speed,
528 /* speed is unused, as we use IsSIROn()/IsMIROn() */ 518 /* speed is unused, as we use IsSIROn()/IsMIROn() */
529 speed = speed; 519 speed = speed;
530 520
531 IRDA_DEBUG(1, "%s(): change_dongle_speed to %d for 0x%x, %d\n", 521 pr_debug("%s(): change_dongle_speed to %d for 0x%x, %d\n",
532 __func__, speed, iobase, dongle_id); 522 __func__, speed, iobase, dongle_id);
533 523
534 switch (dongle_id) { 524 switch (dongle_id) {
535 525
@@ -618,7 +608,8 @@ static void via_ircc_change_dongle_speed(int iobase, int speed,
618 608
619 case 0x11: /* Temic TFDS4500 */ 609 case 0x11: /* Temic TFDS4500 */
620 610
621 IRDA_DEBUG(2, "%s: Temic TFDS4500: One RX pin, TX normal, RX inverted.\n", __func__); 611 pr_debug("%s: Temic TFDS4500: One RX pin, TX normal, RX inverted\n",
612 __func__);
622 613
623 UseOneRX(iobase, ON); //use ONE RX....RX1 614 UseOneRX(iobase, ON); //use ONE RX....RX1
624 InvertTX(iobase, OFF); 615 InvertTX(iobase, OFF);
@@ -636,7 +627,8 @@ static void via_ircc_change_dongle_speed(int iobase, int speed,
636 SlowIRRXLowActive(iobase, OFF); 627 SlowIRRXLowActive(iobase, OFF);
637 628
638 } else{ 629 } else{
639 IRDA_DEBUG(0, "%s: Warning: TFDS4500 not running in SIR mode !\n", __func__); 630 pr_debug("%s: Warning: TFDS4500 not running in SIR mode !\n",
631 __func__);
640 } 632 }
641 break; 633 break;
642 634
@@ -673,7 +665,7 @@ static void via_ircc_change_speed(struct via_ircc_cb *self, __u32 speed)
673 iobase = self->io.fir_base; 665 iobase = self->io.fir_base;
674 /* Update accounting for new speed */ 666 /* Update accounting for new speed */
675 self->io.speed = speed; 667 self->io.speed = speed;
676 IRDA_DEBUG(1, "%s: change_speed to %d bps.\n", __func__, speed); 668 pr_debug("%s: change_speed to %d bps.\n", __func__, speed);
677 669
678 WriteReg(iobase, I_ST_CT_0, 0x0); 670 WriteReg(iobase, I_ST_CT_0, 0x0);
679 671
@@ -903,10 +895,10 @@ static int via_ircc_dma_xmit(struct via_ircc_cb *self, u16 iobase)
903 ((u8 *)self->tx_fifo.queue[self->tx_fifo.ptr].start - 895 ((u8 *)self->tx_fifo.queue[self->tx_fifo.ptr].start -
904 self->tx_buff.head) + self->tx_buff_dma, 896 self->tx_buff.head) + self->tx_buff_dma,
905 self->tx_fifo.queue[self->tx_fifo.ptr].len, DMA_TX_MODE); 897 self->tx_fifo.queue[self->tx_fifo.ptr].len, DMA_TX_MODE);
906 IRDA_DEBUG(1, "%s: tx_fifo.ptr=%x,len=%x,tx_fifo.len=%x..\n", 898 pr_debug("%s: tx_fifo.ptr=%x,len=%x,tx_fifo.len=%x..\n",
907 __func__, self->tx_fifo.ptr, 899 __func__, self->tx_fifo.ptr,
908 self->tx_fifo.queue[self->tx_fifo.ptr].len, 900 self->tx_fifo.queue[self->tx_fifo.ptr].len,
909 self->tx_fifo.len); 901 self->tx_fifo.len);
910 902
911 SetSendByte(iobase, self->tx_fifo.queue[self->tx_fifo.ptr].len); 903 SetSendByte(iobase, self->tx_fifo.queue[self->tx_fifo.ptr].len);
912 RXStart(iobase, OFF); 904 RXStart(iobase, OFF);
@@ -927,8 +919,6 @@ static int via_ircc_dma_xmit_complete(struct via_ircc_cb *self)
927 int iobase; 919 int iobase;
928 u8 Tx_status; 920 u8 Tx_status;
929 921
930 IRDA_DEBUG(3, "%s()\n", __func__);
931
932 iobase = self->io.fir_base; 922 iobase = self->io.fir_base;
933 /* Disable DMA */ 923 /* Disable DMA */
934// DisableDmaChannel(self->io.dma); 924// DisableDmaChannel(self->io.dma);
@@ -958,10 +948,9 @@ static int via_ircc_dma_xmit_complete(struct via_ircc_cb *self)
958 self->tx_fifo.ptr++; 948 self->tx_fifo.ptr++;
959 } 949 }
960 } 950 }
961 IRDA_DEBUG(1, 951 pr_debug("%s: tx_fifo.len=%x ,tx_fifo.ptr=%x,tx_fifo.free=%x...\n",
962 "%s: tx_fifo.len=%x ,tx_fifo.ptr=%x,tx_fifo.free=%x...\n", 952 __func__,
963 __func__, 953 self->tx_fifo.len, self->tx_fifo.ptr, self->tx_fifo.free);
964 self->tx_fifo.len, self->tx_fifo.ptr, self->tx_fifo.free);
965/* F01_S 954/* F01_S
966 // Any frames to be sent back-to-back? 955 // Any frames to be sent back-to-back?
967 if (self->tx_fifo.len) { 956 if (self->tx_fifo.len) {
@@ -996,8 +985,6 @@ static int via_ircc_dma_receive(struct via_ircc_cb *self)
996 985
997 iobase = self->io.fir_base; 986 iobase = self->io.fir_base;
998 987
999 IRDA_DEBUG(3, "%s()\n", __func__);
1000
1001 self->tx_fifo.len = self->tx_fifo.ptr = self->tx_fifo.free = 0; 988 self->tx_fifo.len = self->tx_fifo.ptr = self->tx_fifo.free = 0;
1002 self->tx_fifo.tail = self->tx_buff.head; 989 self->tx_fifo.tail = self->tx_buff.head;
1003 self->RxDataReady = 0; 990 self->RxDataReady = 0;
@@ -1079,15 +1066,15 @@ static int via_ircc_dma_receive_complete(struct via_ircc_cb *self,
1079 if (len == 0) 1066 if (len == 0)
1080 return TRUE; //interrupt only, data maybe move by RxT 1067 return TRUE; //interrupt only, data maybe move by RxT
1081 if (((len - 4) < 2) || ((len - 4) > 2048)) { 1068 if (((len - 4) < 2) || ((len - 4) > 2048)) {
1082 IRDA_DEBUG(1, "%s(): Trouble:len=%x,CurCount=%x,LastCount=%x..\n", 1069 pr_debug("%s(): Trouble:len=%x,CurCount=%x,LastCount=%x\n",
1083 __func__, len, RxCurCount(iobase, self), 1070 __func__, len, RxCurCount(iobase, self),
1084 self->RxLastCount); 1071 self->RxLastCount);
1085 hwreset(self); 1072 hwreset(self);
1086 return FALSE; 1073 return FALSE;
1087 } 1074 }
1088 IRDA_DEBUG(2, "%s(): fifo.len=%x,len=%x,CurCount=%x..\n", 1075 pr_debug("%s(): fifo.len=%x,len=%x,CurCount=%x..\n",
1089 __func__, 1076 __func__,
1090 st_fifo->len, len - 4, RxCurCount(iobase, self)); 1077 st_fifo->len, len - 4, RxCurCount(iobase, self));
1091 1078
1092 st_fifo->entries[st_fifo->tail].status = status; 1079 st_fifo->entries[st_fifo->tail].status = status;
1093 st_fifo->entries[st_fifo->tail].len = len; 1080 st_fifo->entries[st_fifo->tail].len = len;
@@ -1134,8 +1121,8 @@ F01_E */
1134 skb_put(skb, len - 4); 1121 skb_put(skb, len - 4);
1135 1122
1136 skb_copy_to_linear_data(skb, self->rx_buff.data, len - 4); 1123 skb_copy_to_linear_data(skb, self->rx_buff.data, len - 4);
1137 IRDA_DEBUG(2, "%s(): len=%x.rx_buff=%p\n", __func__, 1124 pr_debug("%s(): len=%x.rx_buff=%p\n", __func__,
1138 len - 4, self->rx_buff.data); 1125 len - 4, self->rx_buff.data);
1139 1126
1140 // Move to next frame 1127 // Move to next frame
1141 self->rx_buff.data += len; 1128 self->rx_buff.data += len;
@@ -1164,7 +1151,7 @@ static int upload_rxdata(struct via_ircc_cb *self, int iobase)
1164 1151
1165 len = GetRecvByte(iobase, self); 1152 len = GetRecvByte(iobase, self);
1166 1153
1167 IRDA_DEBUG(2, "%s(): len=%x\n", __func__, len); 1154 pr_debug("%s(): len=%x\n", __func__, len);
1168 1155
1169 if ((len - 4) < 2) { 1156 if ((len - 4) < 2) {
1170 self->netdev->stats.rx_dropped++; 1157 self->netdev->stats.rx_dropped++;
@@ -1249,8 +1236,8 @@ static int RxTimerHandler(struct via_ircc_cb *self, int iobase)
1249 skb_put(skb, len - 4); 1236 skb_put(skb, len - 4);
1250 skb_copy_to_linear_data(skb, self->rx_buff.data, len - 4); 1237 skb_copy_to_linear_data(skb, self->rx_buff.data, len - 4);
1251 1238
1252 IRDA_DEBUG(2, "%s(): len=%x.head=%x\n", __func__, 1239 pr_debug("%s(): len=%x.head=%x\n", __func__,
1253 len - 4, st_fifo->head); 1240 len - 4, st_fifo->head);
1254 1241
1255 // Move to next frame 1242 // Move to next frame
1256 self->rx_buff.data += len; 1243 self->rx_buff.data += len;
@@ -1263,10 +1250,8 @@ static int RxTimerHandler(struct via_ircc_cb *self, int iobase)
1263 } //while 1250 } //while
1264 self->RetryCount = 0; 1251 self->RetryCount = 0;
1265 1252
1266 IRDA_DEBUG(2, 1253 pr_debug("%s(): End of upload HostStatus=%x,RxStatus=%x\n",
1267 "%s(): End of upload HostStatus=%x,RxStatus=%x\n", 1254 __func__, GetHostStatus(iobase), GetRXStatus(iobase));
1268 __func__,
1269 GetHostStatus(iobase), GetRXStatus(iobase));
1270 1255
1271 /* 1256 /*
1272 * if frame is receive complete at this routine ,then upload 1257 * if frame is receive complete at this routine ,then upload
@@ -1304,12 +1289,12 @@ static irqreturn_t via_ircc_interrupt(int dummy, void *dev_id)
1304 spin_lock(&self->lock); 1289 spin_lock(&self->lock);
1305 iHostIntType = GetHostStatus(iobase); 1290 iHostIntType = GetHostStatus(iobase);
1306 1291
1307 IRDA_DEBUG(4, "%s(): iHostIntType %02x: %s %s %s %02x\n", 1292 pr_debug("%s(): iHostIntType %02x: %s %s %s %02x\n",
1308 __func__, iHostIntType, 1293 __func__, iHostIntType,
1309 (iHostIntType & 0x40) ? "Timer" : "", 1294 (iHostIntType & 0x40) ? "Timer" : "",
1310 (iHostIntType & 0x20) ? "Tx" : "", 1295 (iHostIntType & 0x20) ? "Tx" : "",
1311 (iHostIntType & 0x10) ? "Rx" : "", 1296 (iHostIntType & 0x10) ? "Rx" : "",
1312 (iHostIntType & 0x0e) >> 1); 1297 (iHostIntType & 0x0e) >> 1);
1313 1298
1314 if ((iHostIntType & 0x40) != 0) { //Timer Event 1299 if ((iHostIntType & 0x40) != 0) { //Timer Event
1315 self->EventFlag.TimeOut++; 1300 self->EventFlag.TimeOut++;
@@ -1334,12 +1319,12 @@ static irqreturn_t via_ircc_interrupt(int dummy, void *dev_id)
1334 if ((iHostIntType & 0x20) != 0) { //Tx Event 1319 if ((iHostIntType & 0x20) != 0) { //Tx Event
1335 iTxIntType = GetTXStatus(iobase); 1320 iTxIntType = GetTXStatus(iobase);
1336 1321
1337 IRDA_DEBUG(4, "%s(): iTxIntType %02x: %s %s %s %s\n", 1322 pr_debug("%s(): iTxIntType %02x: %s %s %s %s\n",
1338 __func__, iTxIntType, 1323 __func__, iTxIntType,
1339 (iTxIntType & 0x08) ? "FIFO underr." : "", 1324 (iTxIntType & 0x08) ? "FIFO underr." : "",
1340 (iTxIntType & 0x04) ? "EOM" : "", 1325 (iTxIntType & 0x04) ? "EOM" : "",
1341 (iTxIntType & 0x02) ? "FIFO ready" : "", 1326 (iTxIntType & 0x02) ? "FIFO ready" : "",
1342 (iTxIntType & 0x01) ? "Early EOM" : ""); 1327 (iTxIntType & 0x01) ? "Early EOM" : "");
1343 1328
1344 if (iTxIntType & 0x4) { 1329 if (iTxIntType & 0x4) {
1345 self->EventFlag.EOMessage++; // read and will auto clean 1330 self->EventFlag.EOMessage++; // read and will auto clean
@@ -1358,17 +1343,17 @@ static irqreturn_t via_ircc_interrupt(int dummy, void *dev_id)
1358 /* Check if DMA has finished */ 1343 /* Check if DMA has finished */
1359 iRxIntType = GetRXStatus(iobase); 1344 iRxIntType = GetRXStatus(iobase);
1360 1345
1361 IRDA_DEBUG(4, "%s(): iRxIntType %02x: %s %s %s %s %s %s %s\n", 1346 pr_debug("%s(): iRxIntType %02x: %s %s %s %s %s %s %s\n",
1362 __func__, iRxIntType, 1347 __func__, iRxIntType,
1363 (iRxIntType & 0x80) ? "PHY err." : "", 1348 (iRxIntType & 0x80) ? "PHY err." : "",
1364 (iRxIntType & 0x40) ? "CRC err" : "", 1349 (iRxIntType & 0x40) ? "CRC err" : "",
1365 (iRxIntType & 0x20) ? "FIFO overr." : "", 1350 (iRxIntType & 0x20) ? "FIFO overr." : "",
1366 (iRxIntType & 0x10) ? "EOF" : "", 1351 (iRxIntType & 0x10) ? "EOF" : "",
1367 (iRxIntType & 0x08) ? "RxData" : "", 1352 (iRxIntType & 0x08) ? "RxData" : "",
1368 (iRxIntType & 0x02) ? "RxMaxLen" : "", 1353 (iRxIntType & 0x02) ? "RxMaxLen" : "",
1369 (iRxIntType & 0x01) ? "SIR bad" : ""); 1354 (iRxIntType & 0x01) ? "SIR bad" : "");
1370 if (!iRxIntType) 1355 if (!iRxIntType)
1371 IRDA_DEBUG(3, "%s(): RxIRQ =0\n", __func__); 1356 pr_debug("%s(): RxIRQ =0\n", __func__);
1372 1357
1373 if (iRxIntType & 0x10) { 1358 if (iRxIntType & 0x10) {
1374 if (via_ircc_dma_receive_complete(self, iobase)) { 1359 if (via_ircc_dma_receive_complete(self, iobase)) {
@@ -1377,10 +1362,9 @@ static irqreturn_t via_ircc_interrupt(int dummy, void *dev_id)
1377 } 1362 }
1378 } // No ERR 1363 } // No ERR
1379 else { //ERR 1364 else { //ERR
1380 IRDA_DEBUG(4, "%s(): RxIRQ ERR:iRxIntType=%x,HostIntType=%x,CurCount=%x,RxLastCount=%x_____\n", 1365 pr_debug("%s(): RxIRQ ERR:iRxIntType=%x,HostIntType=%x,CurCount=%x,RxLastCount=%x_____\n",
1381 __func__, iRxIntType, iHostIntType, 1366 __func__, iRxIntType, iHostIntType,
1382 RxCurCount(iobase, self), 1367 RxCurCount(iobase, self), self->RxLastCount);
1383 self->RxLastCount);
1384 1368
1385 if (iRxIntType & 0x20) { //FIFO OverRun ERR 1369 if (iRxIntType & 0x20) { //FIFO OverRun ERR
1386 ResetChip(iobase, 0); 1370 ResetChip(iobase, 0);
@@ -1403,8 +1387,6 @@ static void hwreset(struct via_ircc_cb *self)
1403 int iobase; 1387 int iobase;
1404 iobase = self->io.fir_base; 1388 iobase = self->io.fir_base;
1405 1389
1406 IRDA_DEBUG(3, "%s()\n", __func__);
1407
1408 ResetChip(iobase, 5); 1390 ResetChip(iobase, 5);
1409 EnableDMA(iobase, OFF); 1391 EnableDMA(iobase, OFF);
1410 EnableTX(iobase, OFF); 1392 EnableTX(iobase, OFF);
@@ -1448,7 +1430,7 @@ static int via_ircc_is_receiving(struct via_ircc_cb *self)
1448 if (CkRxRecv(iobase, self)) 1430 if (CkRxRecv(iobase, self))
1449 status = TRUE; 1431 status = TRUE;
1450 1432
1451 IRDA_DEBUG(2, "%s(): status=%x....\n", __func__, status); 1433 pr_debug("%s(): status=%x....\n", __func__, status);
1452 1434
1453 return status; 1435 return status;
1454} 1436}
@@ -1466,8 +1448,6 @@ static int via_ircc_net_open(struct net_device *dev)
1466 int iobase; 1448 int iobase;
1467 char hwname[32]; 1449 char hwname[32];
1468 1450
1469 IRDA_DEBUG(3, "%s()\n", __func__);
1470
1471 IRDA_ASSERT(dev != NULL, return -1;); 1451 IRDA_ASSERT(dev != NULL, return -1;);
1472 self = netdev_priv(dev); 1452 self = netdev_priv(dev);
1473 dev->stats.rx_packets = 0; 1453 dev->stats.rx_packets = 0;
@@ -1533,8 +1513,6 @@ static int via_ircc_net_close(struct net_device *dev)
1533 struct via_ircc_cb *self; 1513 struct via_ircc_cb *self;
1534 int iobase; 1514 int iobase;
1535 1515
1536 IRDA_DEBUG(3, "%s()\n", __func__);
1537
1538 IRDA_ASSERT(dev != NULL, return -1;); 1516 IRDA_ASSERT(dev != NULL, return -1;);
1539 self = netdev_priv(dev); 1517 self = netdev_priv(dev);
1540 IRDA_ASSERT(self != NULL, return 0;); 1518 IRDA_ASSERT(self != NULL, return 0;);
@@ -1577,8 +1555,8 @@ static int via_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq,
1577 IRDA_ASSERT(dev != NULL, return -1;); 1555 IRDA_ASSERT(dev != NULL, return -1;);
1578 self = netdev_priv(dev); 1556 self = netdev_priv(dev);
1579 IRDA_ASSERT(self != NULL, return -1;); 1557 IRDA_ASSERT(self != NULL, return -1;);
1580 IRDA_DEBUG(1, "%s(), %s, (cmd=0x%X)\n", __func__, dev->name, 1558 pr_debug("%s(), %s, (cmd=0x%X)\n", __func__, dev->name,
1581 cmd); 1559 cmd);
1582 /* Disable interrupts & save flags */ 1560 /* Disable interrupts & save flags */
1583 spin_lock_irqsave(&self->lock, flags); 1561 spin_lock_irqsave(&self->lock, flags);
1584 switch (cmd) { 1562 switch (cmd) {
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c
index fd4dedea8e08..ac39d9f33d5f 100644
--- a/drivers/net/irda/vlsi_ir.c
+++ b/drivers/net/irda/vlsi_ir.c
@@ -556,7 +556,7 @@ static int vlsi_process_rx(struct vlsi_ring *r, struct ring_descr *rd)
556 crclen = (idev->mode==IFF_FIR) ? sizeof(u32) : sizeof(u16); 556 crclen = (idev->mode==IFF_FIR) ? sizeof(u32) : sizeof(u16);
557 len -= crclen; /* remove trailing CRC */ 557 len -= crclen; /* remove trailing CRC */
558 if (len <= 0) { 558 if (len <= 0) {
559 IRDA_DEBUG(0, "%s: strange frame (len=%d)\n", __func__, len); 559 pr_debug("%s: strange frame (len=%d)\n", __func__, len);
560 ret |= VLSI_RX_DROP; 560 ret |= VLSI_RX_DROP;
561 goto done; 561 goto done;
562 } 562 }
@@ -571,7 +571,7 @@ static int vlsi_process_rx(struct vlsi_ring *r, struct ring_descr *rd)
571 */ 571 */
572 le16_to_cpus(rd->buf+len); 572 le16_to_cpus(rd->buf+len);
573 if (irda_calc_crc16(INIT_FCS,rd->buf,len+crclen) != GOOD_FCS) { 573 if (irda_calc_crc16(INIT_FCS,rd->buf,len+crclen) != GOOD_FCS) {
574 IRDA_DEBUG(0, "%s: crc error\n", __func__); 574 pr_debug("%s: crc error\n", __func__);
575 ret |= VLSI_RX_CRC; 575 ret |= VLSI_RX_CRC;
576 goto done; 576 goto done;
577 } 577 }
@@ -689,7 +689,7 @@ static void vlsi_unarm_rx(vlsi_irda_dev_t *idev)
689 if (rd_is_active(rd)) { 689 if (rd_is_active(rd)) {
690 rd_set_status(rd, 0); 690 rd_set_status(rd, 0);
691 if (rd_get_count(rd)) { 691 if (rd_get_count(rd)) {
692 IRDA_DEBUG(0, "%s - dropping rx packet\n", __func__); 692 pr_debug("%s - dropping rx packet\n", __func__);
693 ret = -VLSI_RX_DROP; 693 ret = -VLSI_RX_DROP;
694 } 694 }
695 rd_set_count(rd, 0); 695 rd_set_count(rd, 0);
@@ -764,7 +764,7 @@ static int vlsi_set_baud(vlsi_irda_dev_t *idev, unsigned iobase)
764 int fifocnt; 764 int fifocnt;
765 765
766 baudrate = idev->new_baud; 766 baudrate = idev->new_baud;
767 IRDA_DEBUG(2, "%s: %d -> %d\n", __func__, idev->baud, idev->new_baud); 767 pr_debug("%s: %d -> %d\n", __func__, idev->baud, idev->new_baud);
768 if (baudrate == 4000000) { 768 if (baudrate == 4000000) {
769 mode = IFF_FIR; 769 mode = IFF_FIR;
770 config = IRCFG_FIR; 770 config = IRCFG_FIR;
@@ -798,7 +798,7 @@ static int vlsi_set_baud(vlsi_irda_dev_t *idev, unsigned iobase)
798 798
799 fifocnt = inw(iobase+VLSI_PIO_RCVBCNT) & RCVBCNT_MASK; 799 fifocnt = inw(iobase+VLSI_PIO_RCVBCNT) & RCVBCNT_MASK;
800 if (fifocnt != 0) { 800 if (fifocnt != 0) {
801 IRDA_DEBUG(0, "%s: rx fifo not empty(%d)\n", __func__, fifocnt); 801 pr_debug("%s: rx fifo not empty(%d)\n", __func__, fifocnt);
802 } 802 }
803 803
804 outw(0, iobase+VLSI_PIO_IRENABLE); 804 outw(0, iobase+VLSI_PIO_IRENABLE);
@@ -1022,7 +1022,8 @@ static netdev_tx_t vlsi_hard_start_xmit(struct sk_buff *skb,
1022 1022
1023 fifocnt = inw(ndev->base_addr+VLSI_PIO_RCVBCNT) & RCVBCNT_MASK; 1023 fifocnt = inw(ndev->base_addr+VLSI_PIO_RCVBCNT) & RCVBCNT_MASK;
1024 if (fifocnt != 0) { 1024 if (fifocnt != 0) {
1025 IRDA_DEBUG(0, "%s: rx fifo not empty(%d)\n", __func__, fifocnt); 1025 pr_debug("%s: rx fifo not empty(%d)\n",
1026 __func__, fifocnt);
1026 } 1027 }
1027 1028
1028 config = inw(iobase+VLSI_PIO_IRCFG); 1029 config = inw(iobase+VLSI_PIO_IRCFG);
@@ -1034,7 +1035,7 @@ static netdev_tx_t vlsi_hard_start_xmit(struct sk_buff *skb,
1034 1035
1035 if (ring_put(r) == NULL) { 1036 if (ring_put(r) == NULL) {
1036 netif_stop_queue(ndev); 1037 netif_stop_queue(ndev);
1037 IRDA_DEBUG(3, "%s: tx ring full - queue stopped\n", __func__); 1038 pr_debug("%s: tx ring full - queue stopped\n", __func__);
1038 } 1039 }
1039 spin_unlock_irqrestore(&idev->lock, flags); 1040 spin_unlock_irqrestore(&idev->lock, flags);
1040 1041
@@ -1099,8 +1100,8 @@ static void vlsi_tx_interrupt(struct net_device *ndev)
1099 1100
1100 fifocnt = inw(iobase+VLSI_PIO_RCVBCNT) & RCVBCNT_MASK; 1101 fifocnt = inw(iobase+VLSI_PIO_RCVBCNT) & RCVBCNT_MASK;
1101 if (fifocnt != 0) { 1102 if (fifocnt != 0) {
1102 IRDA_DEBUG(0, "%s: rx fifo not empty(%d)\n", 1103 pr_debug("%s: rx fifo not empty(%d)\n",
1103 __func__, fifocnt); 1104 __func__, fifocnt);
1104 } 1105 }
1105 outw(config | IRCFG_ENTX, iobase+VLSI_PIO_IRCFG); 1106 outw(config | IRCFG_ENTX, iobase+VLSI_PIO_IRCFG);
1106 } 1107 }
@@ -1109,7 +1110,7 @@ static void vlsi_tx_interrupt(struct net_device *ndev)
1109 1110
1110 if (netif_queue_stopped(ndev) && !idev->new_baud) { 1111 if (netif_queue_stopped(ndev) && !idev->new_baud) {
1111 netif_wake_queue(ndev); 1112 netif_wake_queue(ndev);
1112 IRDA_DEBUG(3, "%s: queue awoken\n", __func__); 1113 pr_debug("%s: queue awoken\n", __func__);
1113 } 1114 }
1114} 1115}
1115 1116
@@ -1133,7 +1134,7 @@ static void vlsi_unarm_tx(vlsi_irda_dev_t *idev)
1133 dev_kfree_skb_any(rd->skb); 1134 dev_kfree_skb_any(rd->skb);
1134 rd->skb = NULL; 1135 rd->skb = NULL;
1135 } 1136 }
1136 IRDA_DEBUG(0, "%s - dropping tx packet\n", __func__); 1137 pr_debug("%s - dropping tx packet\n", __func__);
1137 ret = -VLSI_TX_DROP; 1138 ret = -VLSI_TX_DROP;
1138 } 1139 }
1139 else 1140 else
@@ -1191,8 +1192,8 @@ static int vlsi_start_clock(struct pci_dev *pdev)
1191 else /* was: clksrc=0(auto) */ 1192 else /* was: clksrc=0(auto) */
1192 clksrc = 3; /* fallback to 40MHz XCLK (OB800) */ 1193 clksrc = 3; /* fallback to 40MHz XCLK (OB800) */
1193 1194
1194 IRDA_DEBUG(0, "%s: PLL not locked, fallback to clksrc=%d\n", 1195 pr_debug("%s: PLL not locked, fallback to clksrc=%d\n",
1195 __func__, clksrc); 1196 __func__, clksrc);
1196 } 1197 }
1197 else 1198 else
1198 clksrc = 1; /* got successful PLL lock */ 1199 clksrc = 1; /* got successful PLL lock */
diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c
index 86ca123887d6..4e3d2e7c697c 100644
--- a/drivers/net/irda/w83977af_ir.c
+++ b/drivers/net/irda/w83977af_ir.c
@@ -110,8 +110,6 @@ static int __init w83977af_init(void)
110{ 110{
111 int i; 111 int i;
112 112
113 IRDA_DEBUG(0, "%s()\n", __func__ );
114
115 for (i=0; i < ARRAY_SIZE(dev_self) && io[i] < 2000; i++) { 113 for (i=0; i < ARRAY_SIZE(dev_self) && io[i] < 2000; i++) {
116 if (w83977af_open(i, io[i], irq[i], dma[i]) == 0) 114 if (w83977af_open(i, io[i], irq[i], dma[i]) == 0)
117 return 0; 115 return 0;
@@ -129,8 +127,6 @@ static void __exit w83977af_cleanup(void)
129{ 127{
130 int i; 128 int i;
131 129
132 IRDA_DEBUG(4, "%s()\n", __func__ );
133
134 for (i=0; i < ARRAY_SIZE(dev_self); i++) { 130 for (i=0; i < ARRAY_SIZE(dev_self); i++) {
135 if (dev_self[i]) 131 if (dev_self[i])
136 w83977af_close(dev_self[i]); 132 w83977af_close(dev_self[i]);
@@ -157,12 +153,10 @@ static int w83977af_open(int i, unsigned int iobase, unsigned int irq,
157 struct w83977af_ir *self; 153 struct w83977af_ir *self;
158 int err; 154 int err;
159 155
160 IRDA_DEBUG(0, "%s()\n", __func__ );
161
162 /* Lock the port that we need */ 156 /* Lock the port that we need */
163 if (!request_region(iobase, CHIP_IO_EXTENT, driver_name)) { 157 if (!request_region(iobase, CHIP_IO_EXTENT, driver_name)) {
164 IRDA_DEBUG(0, "%s(), can't get iobase of 0x%03x\n", 158 pr_debug("%s(), can't get iobase of 0x%03x\n",
165 __func__ , iobase); 159 __func__ , iobase);
166 return -ENODEV; 160 return -ENODEV;
167 } 161 }
168 162
@@ -269,8 +263,6 @@ static int w83977af_close(struct w83977af_ir *self)
269{ 263{
270 int iobase; 264 int iobase;
271 265
272 IRDA_DEBUG(0, "%s()\n", __func__ );
273
274 iobase = self->io.fir_base; 266 iobase = self->io.fir_base;
275 267
276#ifdef CONFIG_USE_W977_PNP 268#ifdef CONFIG_USE_W977_PNP
@@ -289,8 +281,8 @@ static int w83977af_close(struct w83977af_ir *self)
289 unregister_netdev(self->netdev); 281 unregister_netdev(self->netdev);
290 282
291 /* Release the PORT that this driver is using */ 283 /* Release the PORT that this driver is using */
292 IRDA_DEBUG(0 , "%s(), Releasing Region %03x\n", 284 pr_debug("%s(), Releasing Region %03x\n",
293 __func__ , self->io.fir_base); 285 __func__ , self->io.fir_base);
294 release_region(self->io.fir_base, self->io.fir_ext); 286 release_region(self->io.fir_base, self->io.fir_ext);
295 287
296 if (self->tx_buff.head) 288 if (self->tx_buff.head)
@@ -312,7 +304,6 @@ static int w83977af_probe(int iobase, int irq, int dma)
312 int i; 304 int i;
313 305
314 for (i=0; i < 2; i++) { 306 for (i=0; i < 2; i++) {
315 IRDA_DEBUG( 0, "%s()\n", __func__ );
316#ifdef CONFIG_USE_W977_PNP 307#ifdef CONFIG_USE_W977_PNP
317 /* Enter PnP configuration mode */ 308 /* Enter PnP configuration mode */
318 w977_efm_enter(efbase[i]); 309 w977_efm_enter(efbase[i]);
@@ -399,7 +390,7 @@ static int w83977af_probe(int iobase, int irq, int dma)
399 return 0; 390 return 0;
400 } else { 391 } else {
401 /* Try next extented function register address */ 392 /* Try next extented function register address */
402 IRDA_DEBUG( 0, "%s(), Wrong chip version", __func__ ); 393 pr_debug("%s(), Wrong chip version", __func__);
403 } 394 }
404 } 395 }
405 return -1; 396 return -1;
@@ -435,19 +426,19 @@ static void w83977af_change_speed(struct w83977af_ir *self, __u32 speed)
435 case 115200: outb(0x01, iobase+ABLL); break; 426 case 115200: outb(0x01, iobase+ABLL); break;
436 case 576000: 427 case 576000:
437 ir_mode = HCR_MIR_576; 428 ir_mode = HCR_MIR_576;
438 IRDA_DEBUG(0, "%s(), handling baud of 576000\n", __func__ ); 429 pr_debug("%s(), handling baud of 576000\n", __func__);
439 break; 430 break;
440 case 1152000: 431 case 1152000:
441 ir_mode = HCR_MIR_1152; 432 ir_mode = HCR_MIR_1152;
442 IRDA_DEBUG(0, "%s(), handling baud of 1152000\n", __func__ ); 433 pr_debug("%s(), handling baud of 1152000\n", __func__);
443 break; 434 break;
444 case 4000000: 435 case 4000000:
445 ir_mode = HCR_FIR; 436 ir_mode = HCR_FIR;
446 IRDA_DEBUG(0, "%s(), handling baud of 4000000\n", __func__ ); 437 pr_debug("%s(), handling baud of 4000000\n", __func__);
447 break; 438 break;
448 default: 439 default:
449 ir_mode = HCR_FIR; 440 ir_mode = HCR_FIR;
450 IRDA_DEBUG(0, "%s(), unknown baud rate of %d\n", __func__ , speed); 441 pr_debug("%s(), unknown baud rate of %d\n", __func__ , speed);
451 break; 442 break;
452 } 443 }
453 444
@@ -498,8 +489,8 @@ static netdev_tx_t w83977af_hard_xmit(struct sk_buff *skb,
498 489
499 iobase = self->io.fir_base; 490 iobase = self->io.fir_base;
500 491
501 IRDA_DEBUG(4, "%s(%ld), skb->len=%d\n", __func__ , jiffies, 492 pr_debug("%s(%ld), skb->len=%d\n", __func__ , jiffies,
502 (int) skb->len); 493 (int)skb->len);
503 494
504 /* Lock transmit buffer */ 495 /* Lock transmit buffer */
505 netif_stop_queue(dev); 496 netif_stop_queue(dev);
@@ -526,7 +517,7 @@ static netdev_tx_t w83977af_hard_xmit(struct sk_buff *skb,
526 self->tx_buff.len = skb->len; 517 self->tx_buff.len = skb->len;
527 518
528 mtt = irda_get_mtt(skb); 519 mtt = irda_get_mtt(skb);
529 IRDA_DEBUG(4, "%s(%ld), mtt=%d\n", __func__ , jiffies, mtt); 520 pr_debug("%s(%ld), mtt=%d\n", __func__ , jiffies, mtt);
530 if (mtt) 521 if (mtt)
531 udelay(mtt); 522 udelay(mtt);
532 523
@@ -560,7 +551,7 @@ static netdev_tx_t w83977af_hard_xmit(struct sk_buff *skb,
560static void w83977af_dma_write(struct w83977af_ir *self, int iobase) 551static void w83977af_dma_write(struct w83977af_ir *self, int iobase)
561{ 552{
562 __u8 set; 553 __u8 set;
563 IRDA_DEBUG(4, "%s(), len=%d\n", __func__ , self->tx_buff.len); 554 pr_debug("%s(), len=%d\n", __func__ , self->tx_buff.len);
564 555
565 /* Save current set */ 556 /* Save current set */
566 set = inb(iobase+SSR); 557 set = inb(iobase+SSR);
@@ -595,19 +586,16 @@ static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size)
595 int actual = 0; 586 int actual = 0;
596 __u8 set; 587 __u8 set;
597 588
598 IRDA_DEBUG(4, "%s()\n", __func__ );
599
600 /* Save current bank */ 589 /* Save current bank */
601 set = inb(iobase+SSR); 590 set = inb(iobase+SSR);
602 591
603 switch_bank(iobase, SET0); 592 switch_bank(iobase, SET0);
604 if (!(inb_p(iobase+USR) & USR_TSRE)) { 593 if (!(inb_p(iobase+USR) & USR_TSRE)) {
605 IRDA_DEBUG(4, 594 pr_debug("%s(), warning, FIFO not empty yet!\n", __func__);
606 "%s(), warning, FIFO not empty yet!\n", __func__ );
607 595
608 fifo_size -= 17; 596 fifo_size -= 17;
609 IRDA_DEBUG(4, "%s(), %d bytes left in tx fifo\n", 597 pr_debug("%s(), %d bytes left in tx fifo\n",
610 __func__ , fifo_size); 598 __func__ , fifo_size);
611 } 599 }
612 600
613 /* Fill FIFO with current frame */ 601 /* Fill FIFO with current frame */
@@ -616,8 +604,8 @@ static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size)
616 outb(buf[actual++], iobase+TBR); 604 outb(buf[actual++], iobase+TBR);
617 } 605 }
618 606
619 IRDA_DEBUG(4, "%s(), fifo_size %d ; %d sent of %d\n", 607 pr_debug("%s(), fifo_size %d ; %d sent of %d\n",
620 __func__ , fifo_size, actual, len); 608 __func__ , fifo_size, actual, len);
621 609
622 /* Restore bank */ 610 /* Restore bank */
623 outb(set, iobase+SSR); 611 outb(set, iobase+SSR);
@@ -637,7 +625,7 @@ static void w83977af_dma_xmit_complete(struct w83977af_ir *self)
637 int iobase; 625 int iobase;
638 __u8 set; 626 __u8 set;
639 627
640 IRDA_DEBUG(4, "%s(%ld)\n", __func__ , jiffies); 628 pr_debug("%s(%ld)\n", __func__ , jiffies);
641 629
642 IRDA_ASSERT(self != NULL, return;); 630 IRDA_ASSERT(self != NULL, return;);
643 631
@@ -652,7 +640,7 @@ static void w83977af_dma_xmit_complete(struct w83977af_ir *self)
652 640
653 /* Check for underrun! */ 641 /* Check for underrun! */
654 if (inb(iobase+AUDR) & AUDR_UNDR) { 642 if (inb(iobase+AUDR) & AUDR_UNDR) {
655 IRDA_DEBUG(0, "%s(), Transmit underrun!\n", __func__ ); 643 pr_debug("%s(), Transmit underrun!\n", __func__);
656 644
657 self->netdev->stats.tx_errors++; 645 self->netdev->stats.tx_errors++;
658 self->netdev->stats.tx_fifo_errors++; 646 self->netdev->stats.tx_fifo_errors++;
@@ -693,7 +681,7 @@ static int w83977af_dma_receive(struct w83977af_ir *self)
693#endif 681#endif
694 IRDA_ASSERT(self != NULL, return -1;); 682 IRDA_ASSERT(self != NULL, return -1;);
695 683
696 IRDA_DEBUG(4, "%s\n", __func__ ); 684 pr_debug("%s\n", __func__);
697 685
698 iobase= self->io.fir_base; 686 iobase= self->io.fir_base;
699 687
@@ -764,7 +752,7 @@ static int w83977af_dma_receive_complete(struct w83977af_ir *self)
764 __u8 set; 752 __u8 set;
765 __u8 status; 753 __u8 status;
766 754
767 IRDA_DEBUG(4, "%s\n", __func__ ); 755 pr_debug("%s\n", __func__);
768 756
769 st_fifo = &self->st_fifo; 757 st_fifo = &self->st_fifo;
770 758
@@ -881,8 +869,6 @@ static void w83977af_pio_receive(struct w83977af_ir *self)
881 __u8 byte = 0x00; 869 __u8 byte = 0x00;
882 int iobase; 870 int iobase;
883 871
884 IRDA_DEBUG(4, "%s()\n", __func__ );
885
886 IRDA_ASSERT(self != NULL, return;); 872 IRDA_ASSERT(self != NULL, return;);
887 873
888 iobase = self->io.fir_base; 874 iobase = self->io.fir_base;
@@ -908,7 +894,7 @@ static __u8 w83977af_sir_interrupt(struct w83977af_ir *self, int isr)
908 __u8 set; 894 __u8 set;
909 int iobase; 895 int iobase;
910 896
911 IRDA_DEBUG(4, "%s(), isr=%#x\n", __func__ , isr); 897 pr_debug("%s(), isr=%#x\n", __func__ , isr);
912 898
913 iobase = self->io.fir_base; 899 iobase = self->io.fir_base;
914 /* Transmit FIFO low on data */ 900 /* Transmit FIFO low on data */
@@ -944,8 +930,7 @@ static __u8 w83977af_sir_interrupt(struct w83977af_ir *self, int isr)
944 if (isr & ISR_TXEMP_I) { 930 if (isr & ISR_TXEMP_I) {
945 /* Check if we need to change the speed? */ 931 /* Check if we need to change the speed? */
946 if (self->new_speed) { 932 if (self->new_speed) {
947 IRDA_DEBUG(2, 933 pr_debug("%s(), Changing speed!\n", __func__);
948 "%s(), Changing speed!\n", __func__ );
949 w83977af_change_speed(self, self->new_speed); 934 w83977af_change_speed(self, self->new_speed);
950 self->new_speed = 0; 935 self->new_speed = 0;
951 } 936 }
@@ -1127,7 +1112,6 @@ static int w83977af_net_open(struct net_device *dev)
1127 char hwname[32]; 1112 char hwname[32];
1128 __u8 set; 1113 __u8 set;
1129 1114
1130 IRDA_DEBUG(0, "%s()\n", __func__ );
1131 1115
1132 IRDA_ASSERT(dev != NULL, return -1;); 1116 IRDA_ASSERT(dev != NULL, return -1;);
1133 self = netdev_priv(dev); 1117 self = netdev_priv(dev);
@@ -1190,8 +1174,6 @@ static int w83977af_net_close(struct net_device *dev)
1190 int iobase; 1174 int iobase;
1191 __u8 set; 1175 __u8 set;
1192 1176
1193 IRDA_DEBUG(0, "%s()\n", __func__ );
1194
1195 IRDA_ASSERT(dev != NULL, return -1;); 1177 IRDA_ASSERT(dev != NULL, return -1;);
1196 1178
1197 self = netdev_priv(dev); 1179 self = netdev_priv(dev);
@@ -1245,7 +1227,7 @@ static int w83977af_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
1245 1227
1246 IRDA_ASSERT(self != NULL, return -1;); 1228 IRDA_ASSERT(self != NULL, return -1;);
1247 1229
1248 IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __func__ , dev->name, cmd); 1230 pr_debug("%s(), %s, (cmd=0x%X)\n", __func__ , dev->name, cmd);
1249 1231
1250 spin_lock_irqsave(&self->lock, flags); 1232 spin_lock_irqsave(&self->lock, flags);
1251 1233