diff options
59 files changed, 1244 insertions, 1930 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 | ||
125 | static int act200l_close(struct sir_dev *dev) | 123 | static 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 | ||
265 | static const struct net_device_ops ali_ircc_sir_ops = { | 260 | static 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 | ||
968 | static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud) | 949 | static 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 | ||
1017 | static void ali_ircc_fir_change_speed(struct ali_ircc_cb *priv, __u32 baud) | 996 | static 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 | ||
1122 | static void ali_ircc_change_dongle_speed(struct ali_ircc_cb *priv, int speed) | 1098 | static 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 | ||
1657 | static int ali_ircc_dma_xmit_complete(struct ali_ircc_cb *self) | 1625 | static 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 | ||
2210 | static void SIR2FIR(int iobase) | 2174 | static 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 | ||
2233 | static void FIR2SIR(int iobase) | 2195 | static 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 | ||
2256 | MODULE_AUTHOR("Benjamin Kong <benjamin_kong@ali.com.tw>"); | 2216 | MODULE_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; | |||
232 | for (i=0;i<len;i+=16) { | 232 | for (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 | |||
293 | toshoboe_disablebm (struct toshoboe_cb *self) | 291 | toshoboe_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) | |||
305 | static void | 301 | static void |
306 | toshoboe_stopchip (struct toshoboe_cb *self) | 302 | toshoboe_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) | |||
482 | static void | 476 | static void |
483 | toshoboe_enablebm (struct toshoboe_cb *self) | 477 | toshoboe_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 |
1229 | dumpbufs(self->rx_bufs[self->rxs],len,'<'); | 1214 | dumpbufs(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 | } |
1469 | out: | 1451 | out: |
@@ -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 | ||
103 | static int girbil_close(struct sir_dev *dev) | 101 | static 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 | */ |
1431 | static inline void irda_usb_close(struct irda_usb_cb *self) | 1425 | static 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 | ||
94 | static int litelink_close(struct sir_dev *dev) | 92 | static 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 | */ |
155 | static int litelink_reset(struct sir_dev *dev) | 149 | static 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 | ||
66 | static int __init ma600_sir_init(void) | 66 | static 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 | ||
72 | static void __exit ma600_sir_cleanup(void) | 71 | static 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 | ||
105 | static int ma600_close(struct sir_dev *dev) | 101 | static 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 | ||
237 | static int ma600_reset(struct sir_dev *dev) | 231 | static 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 | ||
77 | static int mcp2120_close(struct sir_dev *dev) | 75 | static 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 | ||
979 | module_usb_driver(mcs_driver); | 979 | module_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 | ||
109 | static int old_belkin_close(struct sir_dev *dev) | 107 | static 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 | */ |
124 | static int old_belkin_change_speed(struct sir_dev *dev, unsigned speed) | 120 | static 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 | */ |
138 | static int old_belkin_reset(struct sir_dev *dev) | 132 | static 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 | */ |
1837 | static int __exit smsc_ircc_close(struct smsc_ircc_cb *self) | 1837 | static 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 | ||
2270 | static int __init smsc_access(unsigned short cfg_base, unsigned char reg) | 2270 | static 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 | ||
93 | static int tekram_close(struct sir_dev *dev) | 91 | static 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 | ||
206 | static int tekram_reset(struct sir_dev *dev) | 200 | static 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 | ||
211 | static int toim3232_close(struct sir_dev *dev) | 209 | static 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 | ||
346 | static int toim3232_reset(struct sir_dev *dev) | 340 | static 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 | ||
259 | static void __exit via_ircc_cleanup(void) | 257 | static 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, | |||
560 | static void w83977af_dma_write(struct w83977af_ir *self, int iobase) | 551 | static 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 | ||
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h index 4ff18bdc63df..92c8fb575213 100644 --- a/include/net/irda/irda.h +++ b/include/net/irda/irda.h | |||
@@ -55,16 +55,6 @@ typedef __u32 magic_t; | |||
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | #ifdef CONFIG_IRDA_DEBUG | 57 | #ifdef CONFIG_IRDA_DEBUG |
58 | |||
59 | extern unsigned int irda_debug; | ||
60 | |||
61 | /* use 0 for production, 1 for verification, >2 for debug */ | ||
62 | #define IRDA_DEBUG_LEVEL 0 | ||
63 | |||
64 | #define IRDA_DEBUG(n, args...) \ | ||
65 | do { if (irda_debug >= (n)) \ | ||
66 | printk(KERN_DEBUG args); \ | ||
67 | } while (0) | ||
68 | #define IRDA_ASSERT(expr, func) \ | 58 | #define IRDA_ASSERT(expr, func) \ |
69 | do { if(!(expr)) { \ | 59 | do { if(!(expr)) { \ |
70 | printk( "Assertion failed! %s:%s:%d %s\n", \ | 60 | printk( "Assertion failed! %s:%s:%d %s\n", \ |
@@ -72,7 +62,6 @@ do { if(!(expr)) { \ | |||
72 | func } } while (0) | 62 | func } } while (0) |
73 | #define IRDA_ASSERT_LABEL(label) label | 63 | #define IRDA_ASSERT_LABEL(label) label |
74 | #else | 64 | #else |
75 | #define IRDA_DEBUG(n, args...) do { } while (0) | ||
76 | #define IRDA_ASSERT(expr, func) do { (void)(expr); } while (0) | 65 | #define IRDA_ASSERT(expr, func) do { (void)(expr); } while (0) |
77 | #define IRDA_ASSERT_LABEL(label) | 66 | #define IRDA_ASSERT_LABEL(label) |
78 | #endif /* CONFIG_IRDA_DEBUG */ | 67 | #endif /* CONFIG_IRDA_DEBUG */ |
diff --git a/include/net/irda/irlap.h b/include/net/irda/irlap.h index fb4b76d5d7f1..6f23e820618c 100644 --- a/include/net/irda/irlap.h +++ b/include/net/irda/irlap.h | |||
@@ -303,7 +303,7 @@ static inline void irlap_next_state(struct irlap_cb *self, IRLAP_STATE state) | |||
303 | if (!self || self->magic != LAP_MAGIC) | 303 | if (!self || self->magic != LAP_MAGIC) |
304 | return; | 304 | return; |
305 | 305 | ||
306 | IRDA_DEBUG(4, "next LAP state = %s\n", irlap_state[state]); | 306 | pr_debug("next LAP state = %s\n", irlap_state[state]); |
307 | */ | 307 | */ |
308 | self->state = state; | 308 | self->state = state; |
309 | } | 309 | } |
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index 4b04ae06b288..31f70a8c7813 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c | |||
@@ -84,14 +84,12 @@ static int irda_data_indication(void *instance, void *sap, struct sk_buff *skb) | |||
84 | struct sock *sk; | 84 | struct sock *sk; |
85 | int err; | 85 | int err; |
86 | 86 | ||
87 | IRDA_DEBUG(3, "%s()\n", __func__); | ||
88 | |||
89 | self = instance; | 87 | self = instance; |
90 | sk = instance; | 88 | sk = instance; |
91 | 89 | ||
92 | err = sock_queue_rcv_skb(sk, skb); | 90 | err = sock_queue_rcv_skb(sk, skb); |
93 | if (err) { | 91 | if (err) { |
94 | IRDA_DEBUG(1, "%s(), error: no more mem!\n", __func__); | 92 | pr_debug("%s(), error: no more mem!\n", __func__); |
95 | self->rx_flow = FLOW_STOP; | 93 | self->rx_flow = FLOW_STOP; |
96 | 94 | ||
97 | /* When we return error, TTP will need to requeue the skb */ | 95 | /* When we return error, TTP will need to requeue the skb */ |
@@ -115,7 +113,7 @@ static void irda_disconnect_indication(void *instance, void *sap, | |||
115 | 113 | ||
116 | self = instance; | 114 | self = instance; |
117 | 115 | ||
118 | IRDA_DEBUG(2, "%s(%p)\n", __func__, self); | 116 | pr_debug("%s(%p)\n", __func__, self); |
119 | 117 | ||
120 | /* Don't care about it, but let's not leak it */ | 118 | /* Don't care about it, but let's not leak it */ |
121 | if(skb) | 119 | if(skb) |
@@ -123,8 +121,8 @@ static void irda_disconnect_indication(void *instance, void *sap, | |||
123 | 121 | ||
124 | sk = instance; | 122 | sk = instance; |
125 | if (sk == NULL) { | 123 | if (sk == NULL) { |
126 | IRDA_DEBUG(0, "%s(%p) : BUG : sk is NULL\n", | 124 | pr_debug("%s(%p) : BUG : sk is NULL\n", |
127 | __func__, self); | 125 | __func__, self); |
128 | return; | 126 | return; |
129 | } | 127 | } |
130 | 128 | ||
@@ -180,7 +178,7 @@ static void irda_connect_confirm(void *instance, void *sap, | |||
180 | 178 | ||
181 | self = instance; | 179 | self = instance; |
182 | 180 | ||
183 | IRDA_DEBUG(2, "%s(%p)\n", __func__, self); | 181 | pr_debug("%s(%p)\n", __func__, self); |
184 | 182 | ||
185 | sk = instance; | 183 | sk = instance; |
186 | if (sk == NULL) { | 184 | if (sk == NULL) { |
@@ -219,8 +217,8 @@ static void irda_connect_confirm(void *instance, void *sap, | |||
219 | self->max_data_size = irttp_get_max_seg_size(self->tsap); | 217 | self->max_data_size = irttp_get_max_seg_size(self->tsap); |
220 | } | 218 | } |
221 | 219 | ||
222 | IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __func__, | 220 | pr_debug("%s(), max_data_size=%d\n", __func__, |
223 | self->max_data_size); | 221 | self->max_data_size); |
224 | 222 | ||
225 | memcpy(&self->qos_tx, qos, sizeof(struct qos_info)); | 223 | memcpy(&self->qos_tx, qos, sizeof(struct qos_info)); |
226 | 224 | ||
@@ -244,7 +242,7 @@ static void irda_connect_indication(void *instance, void *sap, | |||
244 | 242 | ||
245 | self = instance; | 243 | self = instance; |
246 | 244 | ||
247 | IRDA_DEBUG(2, "%s(%p)\n", __func__, self); | 245 | pr_debug("%s(%p)\n", __func__, self); |
248 | 246 | ||
249 | sk = instance; | 247 | sk = instance; |
250 | if (sk == NULL) { | 248 | if (sk == NULL) { |
@@ -282,8 +280,8 @@ static void irda_connect_indication(void *instance, void *sap, | |||
282 | self->max_data_size = irttp_get_max_seg_size(self->tsap); | 280 | self->max_data_size = irttp_get_max_seg_size(self->tsap); |
283 | } | 281 | } |
284 | 282 | ||
285 | IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __func__, | 283 | pr_debug("%s(), max_data_size=%d\n", __func__, |
286 | self->max_data_size); | 284 | self->max_data_size); |
287 | 285 | ||
288 | memcpy(&self->qos_tx, qos, sizeof(struct qos_info)); | 286 | memcpy(&self->qos_tx, qos, sizeof(struct qos_info)); |
289 | 287 | ||
@@ -301,12 +299,10 @@ static void irda_connect_response(struct irda_sock *self) | |||
301 | { | 299 | { |
302 | struct sk_buff *skb; | 300 | struct sk_buff *skb; |
303 | 301 | ||
304 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
305 | |||
306 | skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER, GFP_KERNEL); | 302 | skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER, GFP_KERNEL); |
307 | if (skb == NULL) { | 303 | if (skb == NULL) { |
308 | IRDA_DEBUG(0, "%s() Unable to allocate sk_buff!\n", | 304 | pr_debug("%s() Unable to allocate sk_buff!\n", |
309 | __func__); | 305 | __func__); |
310 | return; | 306 | return; |
311 | } | 307 | } |
312 | 308 | ||
@@ -327,26 +323,24 @@ static void irda_flow_indication(void *instance, void *sap, LOCAL_FLOW flow) | |||
327 | struct irda_sock *self; | 323 | struct irda_sock *self; |
328 | struct sock *sk; | 324 | struct sock *sk; |
329 | 325 | ||
330 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
331 | |||
332 | self = instance; | 326 | self = instance; |
333 | sk = instance; | 327 | sk = instance; |
334 | BUG_ON(sk == NULL); | 328 | BUG_ON(sk == NULL); |
335 | 329 | ||
336 | switch (flow) { | 330 | switch (flow) { |
337 | case FLOW_STOP: | 331 | case FLOW_STOP: |
338 | IRDA_DEBUG(1, "%s(), IrTTP wants us to slow down\n", | 332 | pr_debug("%s(), IrTTP wants us to slow down\n", |
339 | __func__); | 333 | __func__); |
340 | self->tx_flow = flow; | 334 | self->tx_flow = flow; |
341 | break; | 335 | break; |
342 | case FLOW_START: | 336 | case FLOW_START: |
343 | self->tx_flow = flow; | 337 | self->tx_flow = flow; |
344 | IRDA_DEBUG(1, "%s(), IrTTP wants us to start again\n", | 338 | pr_debug("%s(), IrTTP wants us to start again\n", |
345 | __func__); | 339 | __func__); |
346 | wake_up_interruptible(sk_sleep(sk)); | 340 | wake_up_interruptible(sk_sleep(sk)); |
347 | break; | 341 | break; |
348 | default: | 342 | default: |
349 | IRDA_DEBUG(0, "%s(), Unknown flow command!\n", __func__); | 343 | pr_debug("%s(), Unknown flow command!\n", __func__); |
350 | /* Unknown flow command, better stop */ | 344 | /* Unknown flow command, better stop */ |
351 | self->tx_flow = flow; | 345 | self->tx_flow = flow; |
352 | break; | 346 | break; |
@@ -372,7 +366,7 @@ static void irda_getvalue_confirm(int result, __u16 obj_id, | |||
372 | return; | 366 | return; |
373 | } | 367 | } |
374 | 368 | ||
375 | IRDA_DEBUG(2, "%s(%p)\n", __func__, self); | 369 | pr_debug("%s(%p)\n", __func__, self); |
376 | 370 | ||
377 | /* We probably don't need to make any more queries */ | 371 | /* We probably don't need to make any more queries */ |
378 | iriap_close(self->iriap); | 372 | iriap_close(self->iriap); |
@@ -380,8 +374,8 @@ static void irda_getvalue_confirm(int result, __u16 obj_id, | |||
380 | 374 | ||
381 | /* Check if request succeeded */ | 375 | /* Check if request succeeded */ |
382 | if (result != IAS_SUCCESS) { | 376 | if (result != IAS_SUCCESS) { |
383 | IRDA_DEBUG(1, "%s(), IAS query failed! (%d)\n", __func__, | 377 | pr_debug("%s(), IAS query failed! (%d)\n", __func__, |
384 | result); | 378 | result); |
385 | 379 | ||
386 | self->errno = result; /* We really need it later */ | 380 | self->errno = result; /* We really need it later */ |
387 | 381 | ||
@@ -413,8 +407,6 @@ static void irda_selective_discovery_indication(discinfo_t *discovery, | |||
413 | { | 407 | { |
414 | struct irda_sock *self; | 408 | struct irda_sock *self; |
415 | 409 | ||
416 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
417 | |||
418 | self = priv; | 410 | self = priv; |
419 | if (!self) { | 411 | if (!self) { |
420 | net_warn_ratelimited("%s: lost myself!\n", __func__); | 412 | net_warn_ratelimited("%s: lost myself!\n", __func__); |
@@ -440,8 +432,6 @@ static void irda_discovery_timeout(u_long priv) | |||
440 | { | 432 | { |
441 | struct irda_sock *self; | 433 | struct irda_sock *self; |
442 | 434 | ||
443 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
444 | |||
445 | self = (struct irda_sock *) priv; | 435 | self = (struct irda_sock *) priv; |
446 | BUG_ON(self == NULL); | 436 | BUG_ON(self == NULL); |
447 | 437 | ||
@@ -465,7 +455,7 @@ static int irda_open_tsap(struct irda_sock *self, __u8 tsap_sel, char *name) | |||
465 | notify_t notify; | 455 | notify_t notify; |
466 | 456 | ||
467 | if (self->tsap) { | 457 | if (self->tsap) { |
468 | IRDA_DEBUG(0, "%s: busy!\n", __func__); | 458 | pr_debug("%s: busy!\n", __func__); |
469 | return -EBUSY; | 459 | return -EBUSY; |
470 | } | 460 | } |
471 | 461 | ||
@@ -483,8 +473,8 @@ static int irda_open_tsap(struct irda_sock *self, __u8 tsap_sel, char *name) | |||
483 | self->tsap = irttp_open_tsap(tsap_sel, DEFAULT_INITIAL_CREDIT, | 473 | self->tsap = irttp_open_tsap(tsap_sel, DEFAULT_INITIAL_CREDIT, |
484 | ¬ify); | 474 | ¬ify); |
485 | if (self->tsap == NULL) { | 475 | if (self->tsap == NULL) { |
486 | IRDA_DEBUG(0, "%s(), Unable to allocate TSAP!\n", | 476 | pr_debug("%s(), Unable to allocate TSAP!\n", |
487 | __func__); | 477 | __func__); |
488 | return -ENOMEM; | 478 | return -ENOMEM; |
489 | } | 479 | } |
490 | /* Remember which TSAP selector we actually got */ | 480 | /* Remember which TSAP selector we actually got */ |
@@ -517,7 +507,7 @@ static int irda_open_lsap(struct irda_sock *self, int pid) | |||
517 | 507 | ||
518 | self->lsap = irlmp_open_lsap(LSAP_CONNLESS, ¬ify, pid); | 508 | self->lsap = irlmp_open_lsap(LSAP_CONNLESS, ¬ify, pid); |
519 | if (self->lsap == NULL) { | 509 | if (self->lsap == NULL) { |
520 | IRDA_DEBUG( 0, "%s(), Unable to allocate LSAP!\n", __func__); | 510 | pr_debug("%s(), Unable to allocate LSAP!\n", __func__); |
521 | return -ENOMEM; | 511 | return -ENOMEM; |
522 | } | 512 | } |
523 | 513 | ||
@@ -538,7 +528,7 @@ static int irda_open_lsap(struct irda_sock *self, int pid) | |||
538 | */ | 528 | */ |
539 | static int irda_find_lsap_sel(struct irda_sock *self, char *name) | 529 | static int irda_find_lsap_sel(struct irda_sock *self, char *name) |
540 | { | 530 | { |
541 | IRDA_DEBUG(2, "%s(%p, %s)\n", __func__, self, name); | 531 | pr_debug("%s(%p, %s)\n", __func__, self, name); |
542 | 532 | ||
543 | if (self->iriap) { | 533 | if (self->iriap) { |
544 | net_warn_ratelimited("%s(): busy with a previous query\n", | 534 | net_warn_ratelimited("%s(): busy with a previous query\n", |
@@ -577,8 +567,8 @@ static int irda_find_lsap_sel(struct irda_sock *self, char *name) | |||
577 | /* Get the remote TSAP selector */ | 567 | /* Get the remote TSAP selector */ |
578 | switch (self->ias_result->type) { | 568 | switch (self->ias_result->type) { |
579 | case IAS_INTEGER: | 569 | case IAS_INTEGER: |
580 | IRDA_DEBUG(4, "%s() int=%d\n", | 570 | pr_debug("%s() int=%d\n", |
581 | __func__, self->ias_result->t.integer); | 571 | __func__, self->ias_result->t.integer); |
582 | 572 | ||
583 | if (self->ias_result->t.integer != -1) | 573 | if (self->ias_result->t.integer != -1) |
584 | self->dtsap_sel = self->ias_result->t.integer; | 574 | self->dtsap_sel = self->ias_result->t.integer; |
@@ -587,7 +577,7 @@ static int irda_find_lsap_sel(struct irda_sock *self, char *name) | |||
587 | break; | 577 | break; |
588 | default: | 578 | default: |
589 | self->dtsap_sel = 0; | 579 | self->dtsap_sel = 0; |
590 | IRDA_DEBUG(0, "%s(), bad type!\n", __func__); | 580 | pr_debug("%s(), bad type!\n", __func__); |
591 | break; | 581 | break; |
592 | } | 582 | } |
593 | if (self->ias_result) | 583 | if (self->ias_result) |
@@ -625,7 +615,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) | |||
625 | __u32 daddr = DEV_ADDR_ANY; /* Address we found the service on */ | 615 | __u32 daddr = DEV_ADDR_ANY; /* Address we found the service on */ |
626 | __u8 dtsap_sel = 0x0; /* TSAP associated with it */ | 616 | __u8 dtsap_sel = 0x0; /* TSAP associated with it */ |
627 | 617 | ||
628 | IRDA_DEBUG(2, "%s(), name=%s\n", __func__, name); | 618 | pr_debug("%s(), name=%s\n", __func__, name); |
629 | 619 | ||
630 | /* Ask lmp for the current discovery log | 620 | /* Ask lmp for the current discovery log |
631 | * Note : we have to use irlmp_get_discoveries(), as opposed | 621 | * Note : we have to use irlmp_get_discoveries(), as opposed |
@@ -646,8 +636,8 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) | |||
646 | /* Try the address in the log */ | 636 | /* Try the address in the log */ |
647 | self->daddr = discoveries[i].daddr; | 637 | self->daddr = discoveries[i].daddr; |
648 | self->saddr = 0x0; | 638 | self->saddr = 0x0; |
649 | IRDA_DEBUG(1, "%s(), trying daddr = %08x\n", | 639 | pr_debug("%s(), trying daddr = %08x\n", |
650 | __func__, self->daddr); | 640 | __func__, self->daddr); |
651 | 641 | ||
652 | /* Query remote LM-IAS for this service */ | 642 | /* Query remote LM-IAS for this service */ |
653 | err = irda_find_lsap_sel(self, name); | 643 | err = irda_find_lsap_sel(self, name); |
@@ -655,8 +645,8 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) | |||
655 | case 0: | 645 | case 0: |
656 | /* We found the requested service */ | 646 | /* We found the requested service */ |
657 | if(daddr != DEV_ADDR_ANY) { | 647 | if(daddr != DEV_ADDR_ANY) { |
658 | IRDA_DEBUG(1, "%s(), discovered service ''%s'' in two different devices !!!\n", | 648 | pr_debug("%s(), discovered service ''%s'' in two different devices !!!\n", |
659 | __func__, name); | 649 | __func__, name); |
660 | self->daddr = DEV_ADDR_ANY; | 650 | self->daddr = DEV_ADDR_ANY; |
661 | kfree(discoveries); | 651 | kfree(discoveries); |
662 | return -ENOTUNIQ; | 652 | return -ENOTUNIQ; |
@@ -670,7 +660,8 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) | |||
670 | break; | 660 | break; |
671 | default: | 661 | default: |
672 | /* Something bad did happen :-( */ | 662 | /* Something bad did happen :-( */ |
673 | IRDA_DEBUG(0, "%s(), unexpected IAS query failure\n", __func__); | 663 | pr_debug("%s(), unexpected IAS query failure\n", |
664 | __func__); | ||
674 | self->daddr = DEV_ADDR_ANY; | 665 | self->daddr = DEV_ADDR_ANY; |
675 | kfree(discoveries); | 666 | kfree(discoveries); |
676 | return -EHOSTUNREACH; | 667 | return -EHOSTUNREACH; |
@@ -681,8 +672,8 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) | |||
681 | 672 | ||
682 | /* Check out what we found */ | 673 | /* Check out what we found */ |
683 | if(daddr == DEV_ADDR_ANY) { | 674 | if(daddr == DEV_ADDR_ANY) { |
684 | IRDA_DEBUG(1, "%s(), cannot discover service ''%s'' in any device !!!\n", | 675 | pr_debug("%s(), cannot discover service ''%s'' in any device !!!\n", |
685 | __func__, name); | 676 | __func__, name); |
686 | self->daddr = DEV_ADDR_ANY; | 677 | self->daddr = DEV_ADDR_ANY; |
687 | return -EADDRNOTAVAIL; | 678 | return -EADDRNOTAVAIL; |
688 | } | 679 | } |
@@ -692,8 +683,8 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) | |||
692 | self->saddr = 0x0; | 683 | self->saddr = 0x0; |
693 | self->dtsap_sel = dtsap_sel; | 684 | self->dtsap_sel = dtsap_sel; |
694 | 685 | ||
695 | IRDA_DEBUG(1, "%s(), discovered requested service ''%s'' at address %08x\n", | 686 | pr_debug("%s(), discovered requested service ''%s'' at address %08x\n", |
696 | __func__, name, self->daddr); | 687 | __func__, name, self->daddr); |
697 | 688 | ||
698 | return 0; | 689 | return 0; |
699 | } | 690 | } |
@@ -725,8 +716,8 @@ static int irda_getname(struct socket *sock, struct sockaddr *uaddr, | |||
725 | saddr.sir_addr = self->saddr; | 716 | saddr.sir_addr = self->saddr; |
726 | } | 717 | } |
727 | 718 | ||
728 | IRDA_DEBUG(1, "%s(), tsap_sel = %#x\n", __func__, saddr.sir_lsap_sel); | 719 | pr_debug("%s(), tsap_sel = %#x\n", __func__, saddr.sir_lsap_sel); |
729 | IRDA_DEBUG(1, "%s(), addr = %08x\n", __func__, saddr.sir_addr); | 720 | pr_debug("%s(), addr = %08x\n", __func__, saddr.sir_addr); |
730 | 721 | ||
731 | /* uaddr_len come to us uninitialised */ | 722 | /* uaddr_len come to us uninitialised */ |
732 | *uaddr_len = sizeof (struct sockaddr_irda); | 723 | *uaddr_len = sizeof (struct sockaddr_irda); |
@@ -746,8 +737,6 @@ static int irda_listen(struct socket *sock, int backlog) | |||
746 | struct sock *sk = sock->sk; | 737 | struct sock *sk = sock->sk; |
747 | int err = -EOPNOTSUPP; | 738 | int err = -EOPNOTSUPP; |
748 | 739 | ||
749 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
750 | |||
751 | lock_sock(sk); | 740 | lock_sock(sk); |
752 | 741 | ||
753 | if ((sk->sk_type != SOCK_STREAM) && (sk->sk_type != SOCK_SEQPACKET) && | 742 | if ((sk->sk_type != SOCK_STREAM) && (sk->sk_type != SOCK_SEQPACKET) && |
@@ -779,7 +768,7 @@ static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
779 | struct irda_sock *self = irda_sk(sk); | 768 | struct irda_sock *self = irda_sk(sk); |
780 | int err; | 769 | int err; |
781 | 770 | ||
782 | IRDA_DEBUG(2, "%s(%p)\n", __func__, self); | 771 | pr_debug("%s(%p)\n", __func__, self); |
783 | 772 | ||
784 | if (addr_len != sizeof(struct sockaddr_irda)) | 773 | if (addr_len != sizeof(struct sockaddr_irda)) |
785 | return -EINVAL; | 774 | return -EINVAL; |
@@ -792,7 +781,8 @@ static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
792 | self->pid = addr->sir_lsap_sel; | 781 | self->pid = addr->sir_lsap_sel; |
793 | err = -EOPNOTSUPP; | 782 | err = -EOPNOTSUPP; |
794 | if (self->pid & 0x80) { | 783 | if (self->pid & 0x80) { |
795 | IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __func__); | 784 | pr_debug("%s(), extension in PID not supp!\n", |
785 | __func__); | ||
796 | goto out; | 786 | goto out; |
797 | } | 787 | } |
798 | err = irda_open_lsap(self, self->pid); | 788 | err = irda_open_lsap(self, self->pid); |
@@ -845,8 +835,6 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags) | |||
845 | struct sk_buff *skb; | 835 | struct sk_buff *skb; |
846 | int err; | 836 | int err; |
847 | 837 | ||
848 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
849 | |||
850 | err = irda_create(sock_net(sk), newsock, sk->sk_protocol, 0); | 838 | err = irda_create(sock_net(sk), newsock, sk->sk_protocol, 0); |
851 | if (err) | 839 | if (err) |
852 | return err; | 840 | return err; |
@@ -911,7 +899,7 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags) | |||
911 | new->tsap = irttp_dup(self->tsap, new); | 899 | new->tsap = irttp_dup(self->tsap, new); |
912 | err = -EPERM; /* value does not seem to make sense. -arnd */ | 900 | err = -EPERM; /* value does not seem to make sense. -arnd */ |
913 | if (!new->tsap) { | 901 | if (!new->tsap) { |
914 | IRDA_DEBUG(0, "%s(), dup failed!\n", __func__); | 902 | pr_debug("%s(), dup failed!\n", __func__); |
915 | kfree_skb(skb); | 903 | kfree_skb(skb); |
916 | goto out; | 904 | goto out; |
917 | } | 905 | } |
@@ -971,7 +959,7 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr, | |||
971 | struct irda_sock *self = irda_sk(sk); | 959 | struct irda_sock *self = irda_sk(sk); |
972 | int err; | 960 | int err; |
973 | 961 | ||
974 | IRDA_DEBUG(2, "%s(%p)\n", __func__, self); | 962 | pr_debug("%s(%p)\n", __func__, self); |
975 | 963 | ||
976 | lock_sock(sk); | 964 | lock_sock(sk); |
977 | /* Don't allow connect for Ultra sockets */ | 965 | /* Don't allow connect for Ultra sockets */ |
@@ -1007,13 +995,13 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr, | |||
1007 | /* Try to find one suitable */ | 995 | /* Try to find one suitable */ |
1008 | err = irda_discover_daddr_and_lsap_sel(self, addr->sir_name); | 996 | err = irda_discover_daddr_and_lsap_sel(self, addr->sir_name); |
1009 | if (err) { | 997 | if (err) { |
1010 | IRDA_DEBUG(0, "%s(), auto-connect failed!\n", __func__); | 998 | pr_debug("%s(), auto-connect failed!\n", __func__); |
1011 | goto out; | 999 | goto out; |
1012 | } | 1000 | } |
1013 | } else { | 1001 | } else { |
1014 | /* Use the one provided by the user */ | 1002 | /* Use the one provided by the user */ |
1015 | self->daddr = addr->sir_addr; | 1003 | self->daddr = addr->sir_addr; |
1016 | IRDA_DEBUG(1, "%s(), daddr = %08x\n", __func__, self->daddr); | 1004 | pr_debug("%s(), daddr = %08x\n", __func__, self->daddr); |
1017 | 1005 | ||
1018 | /* If we don't have a valid service name, we assume the | 1006 | /* If we don't have a valid service name, we assume the |
1019 | * user want to connect on a specific LSAP. Prevent | 1007 | * user want to connect on a specific LSAP. Prevent |
@@ -1023,7 +1011,7 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr, | |||
1023 | /* Query remote LM-IAS using service name */ | 1011 | /* Query remote LM-IAS using service name */ |
1024 | err = irda_find_lsap_sel(self, addr->sir_name); | 1012 | err = irda_find_lsap_sel(self, addr->sir_name); |
1025 | if (err) { | 1013 | if (err) { |
1026 | IRDA_DEBUG(0, "%s(), connect failed!\n", __func__); | 1014 | pr_debug("%s(), connect failed!\n", __func__); |
1027 | goto out; | 1015 | goto out; |
1028 | } | 1016 | } |
1029 | } else { | 1017 | } else { |
@@ -1048,7 +1036,7 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr, | |||
1048 | self->saddr, self->daddr, NULL, | 1036 | self->saddr, self->daddr, NULL, |
1049 | self->max_sdu_size_rx, NULL); | 1037 | self->max_sdu_size_rx, NULL); |
1050 | if (err) { | 1038 | if (err) { |
1051 | IRDA_DEBUG(0, "%s(), connect failed!\n", __func__); | 1039 | pr_debug("%s(), connect failed!\n", __func__); |
1052 | goto out; | 1040 | goto out; |
1053 | } | 1041 | } |
1054 | 1042 | ||
@@ -1100,8 +1088,6 @@ static int irda_create(struct net *net, struct socket *sock, int protocol, | |||
1100 | struct sock *sk; | 1088 | struct sock *sk; |
1101 | struct irda_sock *self; | 1089 | struct irda_sock *self; |
1102 | 1090 | ||
1103 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
1104 | |||
1105 | if (net != &init_net) | 1091 | if (net != &init_net) |
1106 | return -EAFNOSUPPORT; | 1092 | return -EAFNOSUPPORT; |
1107 | 1093 | ||
@@ -1121,7 +1107,7 @@ static int irda_create(struct net *net, struct socket *sock, int protocol, | |||
1121 | return -ENOMEM; | 1107 | return -ENOMEM; |
1122 | 1108 | ||
1123 | self = irda_sk(sk); | 1109 | self = irda_sk(sk); |
1124 | IRDA_DEBUG(2, "%s() : self is %p\n", __func__, self); | 1110 | pr_debug("%s() : self is %p\n", __func__, self); |
1125 | 1111 | ||
1126 | init_waitqueue_head(&self->query_wait); | 1112 | init_waitqueue_head(&self->query_wait); |
1127 | 1113 | ||
@@ -1183,7 +1169,7 @@ static int irda_create(struct net *net, struct socket *sock, int protocol, | |||
1183 | */ | 1169 | */ |
1184 | static void irda_destroy_socket(struct irda_sock *self) | 1170 | static void irda_destroy_socket(struct irda_sock *self) |
1185 | { | 1171 | { |
1186 | IRDA_DEBUG(2, "%s(%p)\n", __func__, self); | 1172 | pr_debug("%s(%p)\n", __func__, self); |
1187 | 1173 | ||
1188 | /* Unregister with IrLMP */ | 1174 | /* Unregister with IrLMP */ |
1189 | irlmp_unregister_client(self->ckey); | 1175 | irlmp_unregister_client(self->ckey); |
@@ -1220,8 +1206,6 @@ static int irda_release(struct socket *sock) | |||
1220 | { | 1206 | { |
1221 | struct sock *sk = sock->sk; | 1207 | struct sock *sk = sock->sk; |
1222 | 1208 | ||
1223 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
1224 | |||
1225 | if (sk == NULL) | 1209 | if (sk == NULL) |
1226 | return 0; | 1210 | return 0; |
1227 | 1211 | ||
@@ -1288,7 +1272,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1288 | struct sk_buff *skb; | 1272 | struct sk_buff *skb; |
1289 | int err = -EPIPE; | 1273 | int err = -EPIPE; |
1290 | 1274 | ||
1291 | IRDA_DEBUG(4, "%s(), len=%zd\n", __func__, len); | 1275 | pr_debug("%s(), len=%zd\n", __func__, len); |
1292 | 1276 | ||
1293 | /* Note : socket.c set MSG_EOR on SEQPACKET sockets */ | 1277 | /* Note : socket.c set MSG_EOR on SEQPACKET sockets */ |
1294 | if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_EOR | MSG_CMSG_COMPAT | | 1278 | if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_EOR | MSG_CMSG_COMPAT | |
@@ -1324,8 +1308,8 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1324 | 1308 | ||
1325 | /* Check that we don't send out too big frames */ | 1309 | /* Check that we don't send out too big frames */ |
1326 | if (len > self->max_data_size) { | 1310 | if (len > self->max_data_size) { |
1327 | IRDA_DEBUG(2, "%s(), Chopping frame from %zd to %d bytes!\n", | 1311 | pr_debug("%s(), Chopping frame from %zd to %d bytes!\n", |
1328 | __func__, len, self->max_data_size); | 1312 | __func__, len, self->max_data_size); |
1329 | len = self->max_data_size; | 1313 | len = self->max_data_size; |
1330 | } | 1314 | } |
1331 | 1315 | ||
@@ -1349,7 +1333,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1349 | */ | 1333 | */ |
1350 | err = irttp_data_request(self->tsap, skb); | 1334 | err = irttp_data_request(self->tsap, skb); |
1351 | if (err) { | 1335 | if (err) { |
1352 | IRDA_DEBUG(0, "%s(), err=%d\n", __func__, err); | 1336 | pr_debug("%s(), err=%d\n", __func__, err); |
1353 | goto out_err; | 1337 | goto out_err; |
1354 | } | 1338 | } |
1355 | 1339 | ||
@@ -1380,8 +1364,6 @@ static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock, | |||
1380 | size_t copied; | 1364 | size_t copied; |
1381 | int err; | 1365 | int err; |
1382 | 1366 | ||
1383 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
1384 | |||
1385 | skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT, | 1367 | skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT, |
1386 | flags & MSG_DONTWAIT, &err); | 1368 | flags & MSG_DONTWAIT, &err); |
1387 | if (!skb) | 1369 | if (!skb) |
@@ -1391,8 +1373,8 @@ static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock, | |||
1391 | copied = skb->len; | 1373 | copied = skb->len; |
1392 | 1374 | ||
1393 | if (copied > size) { | 1375 | if (copied > size) { |
1394 | IRDA_DEBUG(2, "%s(), Received truncated frame (%zd < %zd)!\n", | 1376 | pr_debug("%s(), Received truncated frame (%zd < %zd)!\n", |
1395 | __func__, copied, size); | 1377 | __func__, copied, size); |
1396 | copied = size; | 1378 | copied = size; |
1397 | msg->msg_flags |= MSG_TRUNC; | 1379 | msg->msg_flags |= MSG_TRUNC; |
1398 | } | 1380 | } |
@@ -1408,7 +1390,7 @@ static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock, | |||
1408 | */ | 1390 | */ |
1409 | if (self->rx_flow == FLOW_STOP) { | 1391 | if (self->rx_flow == FLOW_STOP) { |
1410 | if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) { | 1392 | if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) { |
1411 | IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __func__); | 1393 | pr_debug("%s(), Starting IrTTP\n", __func__); |
1412 | self->rx_flow = FLOW_START; | 1394 | self->rx_flow = FLOW_START; |
1413 | irttp_flow_request(self->tsap, FLOW_START); | 1395 | irttp_flow_request(self->tsap, FLOW_START); |
1414 | } | 1396 | } |
@@ -1430,8 +1412,6 @@ static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock, | |||
1430 | int target, err; | 1412 | int target, err; |
1431 | long timeo; | 1413 | long timeo; |
1432 | 1414 | ||
1433 | IRDA_DEBUG(3, "%s()\n", __func__); | ||
1434 | |||
1435 | if ((err = sock_error(sk)) < 0) | 1415 | if ((err = sock_error(sk)) < 0) |
1436 | return err; | 1416 | return err; |
1437 | 1417 | ||
@@ -1503,15 +1483,15 @@ static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock, | |||
1503 | 1483 | ||
1504 | /* put the skb back if we didn't use it up.. */ | 1484 | /* put the skb back if we didn't use it up.. */ |
1505 | if (skb->len) { | 1485 | if (skb->len) { |
1506 | IRDA_DEBUG(1, "%s(), back on q!\n", | 1486 | pr_debug("%s(), back on q!\n", |
1507 | __func__); | 1487 | __func__); |
1508 | skb_queue_head(&sk->sk_receive_queue, skb); | 1488 | skb_queue_head(&sk->sk_receive_queue, skb); |
1509 | break; | 1489 | break; |
1510 | } | 1490 | } |
1511 | 1491 | ||
1512 | kfree_skb(skb); | 1492 | kfree_skb(skb); |
1513 | } else { | 1493 | } else { |
1514 | IRDA_DEBUG(0, "%s() questionable!?\n", __func__); | 1494 | pr_debug("%s() questionable!?\n", __func__); |
1515 | 1495 | ||
1516 | /* put message back and return */ | 1496 | /* put message back and return */ |
1517 | skb_queue_head(&sk->sk_receive_queue, skb); | 1497 | skb_queue_head(&sk->sk_receive_queue, skb); |
@@ -1527,7 +1507,7 @@ static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock, | |||
1527 | */ | 1507 | */ |
1528 | if (self->rx_flow == FLOW_STOP) { | 1508 | if (self->rx_flow == FLOW_STOP) { |
1529 | if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) { | 1509 | if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) { |
1530 | IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __func__); | 1510 | pr_debug("%s(), Starting IrTTP\n", __func__); |
1531 | self->rx_flow = FLOW_START; | 1511 | self->rx_flow = FLOW_START; |
1532 | irttp_flow_request(self->tsap, FLOW_START); | 1512 | irttp_flow_request(self->tsap, FLOW_START); |
1533 | } | 1513 | } |
@@ -1551,7 +1531,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock, | |||
1551 | struct sk_buff *skb; | 1531 | struct sk_buff *skb; |
1552 | int err; | 1532 | int err; |
1553 | 1533 | ||
1554 | IRDA_DEBUG(4, "%s(), len=%zd\n", __func__, len); | 1534 | pr_debug("%s(), len=%zd\n", __func__, len); |
1555 | 1535 | ||
1556 | if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT)) | 1536 | if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT)) |
1557 | return -EINVAL; | 1537 | return -EINVAL; |
@@ -1575,9 +1555,8 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock, | |||
1575 | * service, so we have no fragmentation and no coalescence | 1555 | * service, so we have no fragmentation and no coalescence |
1576 | */ | 1556 | */ |
1577 | if (len > self->max_data_size) { | 1557 | if (len > self->max_data_size) { |
1578 | IRDA_DEBUG(0, "%s(), Warning to much data! " | 1558 | pr_debug("%s(), Warning too much data! Chopping frame from %zd to %d bytes!\n", |
1579 | "Chopping frame from %zd to %d bytes!\n", | 1559 | __func__, len, self->max_data_size); |
1580 | __func__, len, self->max_data_size); | ||
1581 | len = self->max_data_size; | 1560 | len = self->max_data_size; |
1582 | } | 1561 | } |
1583 | 1562 | ||
@@ -1590,7 +1569,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock, | |||
1590 | skb_reserve(skb, self->max_header_size); | 1569 | skb_reserve(skb, self->max_header_size); |
1591 | skb_reset_transport_header(skb); | 1570 | skb_reset_transport_header(skb); |
1592 | 1571 | ||
1593 | IRDA_DEBUG(4, "%s(), appending user data\n", __func__); | 1572 | pr_debug("%s(), appending user data\n", __func__); |
1594 | skb_put(skb, len); | 1573 | skb_put(skb, len); |
1595 | err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len); | 1574 | err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len); |
1596 | if (err) { | 1575 | if (err) { |
@@ -1604,7 +1583,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock, | |||
1604 | */ | 1583 | */ |
1605 | err = irttp_udata_request(self->tsap, skb); | 1584 | err = irttp_udata_request(self->tsap, skb); |
1606 | if (err) { | 1585 | if (err) { |
1607 | IRDA_DEBUG(0, "%s(), err=%d\n", __func__, err); | 1586 | pr_debug("%s(), err=%d\n", __func__, err); |
1608 | goto out; | 1587 | goto out; |
1609 | } | 1588 | } |
1610 | 1589 | ||
@@ -1633,7 +1612,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock, | |||
1633 | struct sk_buff *skb; | 1612 | struct sk_buff *skb; |
1634 | int err; | 1613 | int err; |
1635 | 1614 | ||
1636 | IRDA_DEBUG(4, "%s(), len=%zd\n", __func__, len); | 1615 | pr_debug("%s(), len=%zd\n", __func__, len); |
1637 | 1616 | ||
1638 | err = -EINVAL; | 1617 | err = -EINVAL; |
1639 | if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT)) | 1618 | if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT)) |
@@ -1661,7 +1640,8 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock, | |||
1661 | 1640 | ||
1662 | pid = addr->sir_lsap_sel; | 1641 | pid = addr->sir_lsap_sel; |
1663 | if (pid & 0x80) { | 1642 | if (pid & 0x80) { |
1664 | IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __func__); | 1643 | pr_debug("%s(), extension in PID not supp!\n", |
1644 | __func__); | ||
1665 | err = -EOPNOTSUPP; | 1645 | err = -EOPNOTSUPP; |
1666 | goto out; | 1646 | goto out; |
1667 | } | 1647 | } |
@@ -1670,8 +1650,8 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock, | |||
1670 | * port. Jean II */ | 1650 | * port. Jean II */ |
1671 | if ((self->lsap == NULL) || | 1651 | if ((self->lsap == NULL) || |
1672 | (sk->sk_state != TCP_ESTABLISHED)) { | 1652 | (sk->sk_state != TCP_ESTABLISHED)) { |
1673 | IRDA_DEBUG(0, "%s(), socket not bound to Ultra PID.\n", | 1653 | pr_debug("%s(), socket not bound to Ultra PID.\n", |
1674 | __func__); | 1654 | __func__); |
1675 | err = -ENOTCONN; | 1655 | err = -ENOTCONN; |
1676 | goto out; | 1656 | goto out; |
1677 | } | 1657 | } |
@@ -1684,9 +1664,8 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock, | |||
1684 | * service, so we have no fragmentation and no coalescence | 1664 | * service, so we have no fragmentation and no coalescence |
1685 | */ | 1665 | */ |
1686 | if (len > self->max_data_size) { | 1666 | if (len > self->max_data_size) { |
1687 | IRDA_DEBUG(0, "%s(), Warning to much data! " | 1667 | pr_debug("%s(), Warning too much data! Chopping frame from %zd to %d bytes!\n", |
1688 | "Chopping frame from %zd to %d bytes!\n", | 1668 | __func__, len, self->max_data_size); |
1689 | __func__, len, self->max_data_size); | ||
1690 | len = self->max_data_size; | 1669 | len = self->max_data_size; |
1691 | } | 1670 | } |
1692 | 1671 | ||
@@ -1699,7 +1678,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock, | |||
1699 | skb_reserve(skb, self->max_header_size); | 1678 | skb_reserve(skb, self->max_header_size); |
1700 | skb_reset_transport_header(skb); | 1679 | skb_reset_transport_header(skb); |
1701 | 1680 | ||
1702 | IRDA_DEBUG(4, "%s(), appending user data\n", __func__); | 1681 | pr_debug("%s(), appending user data\n", __func__); |
1703 | skb_put(skb, len); | 1682 | skb_put(skb, len); |
1704 | err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len); | 1683 | err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len); |
1705 | if (err) { | 1684 | if (err) { |
@@ -1710,7 +1689,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock, | |||
1710 | err = irlmp_connless_data_request((bound ? self->lsap : NULL), | 1689 | err = irlmp_connless_data_request((bound ? self->lsap : NULL), |
1711 | skb, pid); | 1690 | skb, pid); |
1712 | if (err) | 1691 | if (err) |
1713 | IRDA_DEBUG(0, "%s(), err=%d\n", __func__, err); | 1692 | pr_debug("%s(), err=%d\n", __func__, err); |
1714 | out: | 1693 | out: |
1715 | release_sock(sk); | 1694 | release_sock(sk); |
1716 | return err ? : len; | 1695 | return err ? : len; |
@@ -1725,7 +1704,7 @@ static int irda_shutdown(struct socket *sock, int how) | |||
1725 | struct sock *sk = sock->sk; | 1704 | struct sock *sk = sock->sk; |
1726 | struct irda_sock *self = irda_sk(sk); | 1705 | struct irda_sock *self = irda_sk(sk); |
1727 | 1706 | ||
1728 | IRDA_DEBUG(1, "%s(%p)\n", __func__, self); | 1707 | pr_debug("%s(%p)\n", __func__, self); |
1729 | 1708 | ||
1730 | lock_sock(sk); | 1709 | lock_sock(sk); |
1731 | 1710 | ||
@@ -1764,8 +1743,6 @@ static unsigned int irda_poll(struct file * file, struct socket *sock, | |||
1764 | struct irda_sock *self = irda_sk(sk); | 1743 | struct irda_sock *self = irda_sk(sk); |
1765 | unsigned int mask; | 1744 | unsigned int mask; |
1766 | 1745 | ||
1767 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
1768 | |||
1769 | poll_wait(file, sk_sleep(sk), wait); | 1746 | poll_wait(file, sk_sleep(sk), wait); |
1770 | mask = 0; | 1747 | mask = 0; |
1771 | 1748 | ||
@@ -1773,13 +1750,13 @@ static unsigned int irda_poll(struct file * file, struct socket *sock, | |||
1773 | if (sk->sk_err) | 1750 | if (sk->sk_err) |
1774 | mask |= POLLERR; | 1751 | mask |= POLLERR; |
1775 | if (sk->sk_shutdown & RCV_SHUTDOWN) { | 1752 | if (sk->sk_shutdown & RCV_SHUTDOWN) { |
1776 | IRDA_DEBUG(0, "%s(), POLLHUP\n", __func__); | 1753 | pr_debug("%s(), POLLHUP\n", __func__); |
1777 | mask |= POLLHUP; | 1754 | mask |= POLLHUP; |
1778 | } | 1755 | } |
1779 | 1756 | ||
1780 | /* Readable? */ | 1757 | /* Readable? */ |
1781 | if (!skb_queue_empty(&sk->sk_receive_queue)) { | 1758 | if (!skb_queue_empty(&sk->sk_receive_queue)) { |
1782 | IRDA_DEBUG(4, "Socket is readable\n"); | 1759 | pr_debug("Socket is readable\n"); |
1783 | mask |= POLLIN | POLLRDNORM; | 1760 | mask |= POLLIN | POLLRDNORM; |
1784 | } | 1761 | } |
1785 | 1762 | ||
@@ -1787,7 +1764,7 @@ static unsigned int irda_poll(struct file * file, struct socket *sock, | |||
1787 | switch (sk->sk_type) { | 1764 | switch (sk->sk_type) { |
1788 | case SOCK_STREAM: | 1765 | case SOCK_STREAM: |
1789 | if (sk->sk_state == TCP_CLOSE) { | 1766 | if (sk->sk_state == TCP_CLOSE) { |
1790 | IRDA_DEBUG(0, "%s(), POLLHUP\n", __func__); | 1767 | pr_debug("%s(), POLLHUP\n", __func__); |
1791 | mask |= POLLHUP; | 1768 | mask |= POLLHUP; |
1792 | } | 1769 | } |
1793 | 1770 | ||
@@ -1825,7 +1802,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
1825 | struct sock *sk = sock->sk; | 1802 | struct sock *sk = sock->sk; |
1826 | int err; | 1803 | int err; |
1827 | 1804 | ||
1828 | IRDA_DEBUG(4, "%s(), cmd=%#x\n", __func__, cmd); | 1805 | pr_debug("%s(), cmd=%#x\n", __func__, cmd); |
1829 | 1806 | ||
1830 | err = -EINVAL; | 1807 | err = -EINVAL; |
1831 | switch (cmd) { | 1808 | switch (cmd) { |
@@ -1866,7 +1843,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
1866 | case SIOCSIFMETRIC: | 1843 | case SIOCSIFMETRIC: |
1867 | break; | 1844 | break; |
1868 | default: | 1845 | default: |
1869 | IRDA_DEBUG(1, "%s(), doing device ioctl!\n", __func__); | 1846 | pr_debug("%s(), doing device ioctl!\n", __func__); |
1870 | err = -ENOIOCTLCMD; | 1847 | err = -ENOIOCTLCMD; |
1871 | } | 1848 | } |
1872 | 1849 | ||
@@ -1902,7 +1879,7 @@ static int irda_setsockopt(struct socket *sock, int level, int optname, | |||
1902 | struct ias_attrib * ias_attr; /* Attribute in IAS object */ | 1879 | struct ias_attrib * ias_attr; /* Attribute in IAS object */ |
1903 | int opt, free_ias = 0, err = 0; | 1880 | int opt, free_ias = 0, err = 0; |
1904 | 1881 | ||
1905 | IRDA_DEBUG(2, "%s(%p)\n", __func__, self); | 1882 | pr_debug("%s(%p)\n", __func__, self); |
1906 | 1883 | ||
1907 | if (level != SOL_IRLMP) | 1884 | if (level != SOL_IRLMP) |
1908 | return -ENOPROTOOPT; | 1885 | return -ENOPROTOOPT; |
@@ -2102,7 +2079,8 @@ static int irda_setsockopt(struct socket *sock, int level, int optname, | |||
2102 | 2079 | ||
2103 | /* Check is the user space own the object */ | 2080 | /* Check is the user space own the object */ |
2104 | if(ias_attr->value->owner != IAS_USER_ATTR) { | 2081 | if(ias_attr->value->owner != IAS_USER_ATTR) { |
2105 | IRDA_DEBUG(1, "%s(), attempting to delete a kernel attribute\n", __func__); | 2082 | pr_debug("%s(), attempting to delete a kernel attribute\n", |
2083 | __func__); | ||
2106 | kfree(ias_opt); | 2084 | kfree(ias_opt); |
2107 | err = -EPERM; | 2085 | err = -EPERM; |
2108 | goto out; | 2086 | goto out; |
@@ -2125,8 +2103,8 @@ static int irda_setsockopt(struct socket *sock, int level, int optname, | |||
2125 | 2103 | ||
2126 | /* Only possible for a seqpacket service (TTP with SAR) */ | 2104 | /* Only possible for a seqpacket service (TTP with SAR) */ |
2127 | if (sk->sk_type != SOCK_SEQPACKET) { | 2105 | if (sk->sk_type != SOCK_SEQPACKET) { |
2128 | IRDA_DEBUG(2, "%s(), setting max_sdu_size = %d\n", | 2106 | pr_debug("%s(), setting max_sdu_size = %d\n", |
2129 | __func__, opt); | 2107 | __func__, opt); |
2130 | self->max_sdu_size_rx = opt; | 2108 | self->max_sdu_size_rx = opt; |
2131 | } else { | 2109 | } else { |
2132 | net_warn_ratelimited("%s: not allowed to set MAXSDUSIZE for this socket type!\n", | 2110 | net_warn_ratelimited("%s: not allowed to set MAXSDUSIZE for this socket type!\n", |
@@ -2258,7 +2236,7 @@ static int irda_getsockopt(struct socket *sock, int level, int optname, | |||
2258 | int err = 0; | 2236 | int err = 0; |
2259 | int offset, total; | 2237 | int offset, total; |
2260 | 2238 | ||
2261 | IRDA_DEBUG(2, "%s(%p)\n", __func__, self); | 2239 | pr_debug("%s(%p)\n", __func__, self); |
2262 | 2240 | ||
2263 | if (level != SOL_IRLMP) | 2241 | if (level != SOL_IRLMP) |
2264 | return -ENOPROTOOPT; | 2242 | return -ENOPROTOOPT; |
@@ -2546,7 +2524,8 @@ bed: | |||
2546 | 2524 | ||
2547 | /* Wait until a node is discovered */ | 2525 | /* Wait until a node is discovered */ |
2548 | if (!self->cachedaddr) { | 2526 | if (!self->cachedaddr) { |
2549 | IRDA_DEBUG(1, "%s(), nothing discovered yet, going to sleep...\n", __func__); | 2527 | pr_debug("%s(), nothing discovered yet, going to sleep...\n", |
2528 | __func__); | ||
2550 | 2529 | ||
2551 | /* Set watchdog timer to expire in <val> ms. */ | 2530 | /* Set watchdog timer to expire in <val> ms. */ |
2552 | self->errno = 0; | 2531 | self->errno = 0; |
@@ -2562,14 +2541,14 @@ bed: | |||
2562 | /* If watchdog is still activated, kill it! */ | 2541 | /* If watchdog is still activated, kill it! */ |
2563 | del_timer(&(self->watchdog)); | 2542 | del_timer(&(self->watchdog)); |
2564 | 2543 | ||
2565 | IRDA_DEBUG(1, "%s(), ...waking up !\n", __func__); | 2544 | pr_debug("%s(), ...waking up !\n", __func__); |
2566 | 2545 | ||
2567 | if (err != 0) | 2546 | if (err != 0) |
2568 | goto out; | 2547 | goto out; |
2569 | } | 2548 | } |
2570 | else | 2549 | else |
2571 | IRDA_DEBUG(1, "%s(), found immediately !\n", | 2550 | pr_debug("%s(), found immediately !\n", |
2572 | __func__); | 2551 | __func__); |
2573 | 2552 | ||
2574 | /* Tell IrLMP that we have been notified */ | 2553 | /* Tell IrLMP that we have been notified */ |
2575 | irlmp_update_client(self->ckey, self->mask.word, | 2554 | irlmp_update_client(self->ckey, self->mask.word, |
diff --git a/net/irda/discovery.c b/net/irda/discovery.c index 6786e7f193d2..364d70aed068 100644 --- a/net/irda/discovery.c +++ b/net/irda/discovery.c | |||
@@ -112,8 +112,6 @@ void irlmp_add_discovery_log(hashbin_t *cachelog, hashbin_t *log) | |||
112 | { | 112 | { |
113 | discovery_t *discovery; | 113 | discovery_t *discovery; |
114 | 114 | ||
115 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
116 | |||
117 | /* | 115 | /* |
118 | * If log is missing this means that IrLAP was unable to perform the | 116 | * If log is missing this means that IrLAP was unable to perform the |
119 | * discovery, so restart discovery again with just the half timeout | 117 | * discovery, so restart discovery again with just the half timeout |
@@ -159,8 +157,6 @@ void irlmp_expire_discoveries(hashbin_t *log, __u32 saddr, int force) | |||
159 | int i = 0; /* How many we expired */ | 157 | int i = 0; /* How many we expired */ |
160 | 158 | ||
161 | IRDA_ASSERT(log != NULL, return;); | 159 | IRDA_ASSERT(log != NULL, return;); |
162 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
163 | |||
164 | spin_lock_irqsave(&log->hb_spinlock, flags); | 160 | spin_lock_irqsave(&log->hb_spinlock, flags); |
165 | 161 | ||
166 | discovery = (discovery_t *) hashbin_get_first(log); | 162 | discovery = (discovery_t *) hashbin_get_first(log); |
@@ -232,10 +228,10 @@ void irlmp_dump_discoveries(hashbin_t *log) | |||
232 | 228 | ||
233 | discovery = (discovery_t *) hashbin_get_first(log); | 229 | discovery = (discovery_t *) hashbin_get_first(log); |
234 | while (discovery != NULL) { | 230 | while (discovery != NULL) { |
235 | IRDA_DEBUG(0, "Discovery:\n"); | 231 | pr_debug("Discovery:\n"); |
236 | IRDA_DEBUG(0, " daddr=%08x\n", discovery->data.daddr); | 232 | pr_debug(" daddr=%08x\n", discovery->data.daddr); |
237 | IRDA_DEBUG(0, " saddr=%08x\n", discovery->data.saddr); | 233 | pr_debug(" saddr=%08x\n", discovery->data.saddr); |
238 | IRDA_DEBUG(0, " nickname=%s\n", discovery->data.info); | 234 | pr_debug(" nickname=%s\n", discovery->data.info); |
239 | 235 | ||
240 | discovery = (discovery_t *) hashbin_get_next(log); | 236 | discovery = (discovery_t *) hashbin_get_next(log); |
241 | } | 237 | } |
diff --git a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c index b77fe8c86238..3af219545f6d 100644 --- a/net/irda/ircomm/ircomm_core.c +++ b/net/irda/ircomm/ircomm_core.c | |||
@@ -91,8 +91,6 @@ static int __init ircomm_init(void) | |||
91 | 91 | ||
92 | static void __exit ircomm_cleanup(void) | 92 | static void __exit ircomm_cleanup(void) |
93 | { | 93 | { |
94 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
95 | |||
96 | hashbin_delete(ircomm, (FREE_FUNC) __ircomm_close); | 94 | hashbin_delete(ircomm, (FREE_FUNC) __ircomm_close); |
97 | 95 | ||
98 | #ifdef CONFIG_PROC_FS | 96 | #ifdef CONFIG_PROC_FS |
@@ -111,8 +109,8 @@ struct ircomm_cb *ircomm_open(notify_t *notify, __u8 service_type, int line) | |||
111 | struct ircomm_cb *self = NULL; | 109 | struct ircomm_cb *self = NULL; |
112 | int ret; | 110 | int ret; |
113 | 111 | ||
114 | IRDA_DEBUG(2, "%s(), service_type=0x%02x\n", __func__ , | 112 | pr_debug("%s(), service_type=0x%02x\n", __func__ , |
115 | service_type); | 113 | service_type); |
116 | 114 | ||
117 | IRDA_ASSERT(ircomm != NULL, return NULL;); | 115 | IRDA_ASSERT(ircomm != NULL, return NULL;); |
118 | 116 | ||
@@ -155,8 +153,6 @@ EXPORT_SYMBOL(ircomm_open); | |||
155 | */ | 153 | */ |
156 | static int __ircomm_close(struct ircomm_cb *self) | 154 | static int __ircomm_close(struct ircomm_cb *self) |
157 | { | 155 | { |
158 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
159 | |||
160 | /* Disconnect link if any */ | 156 | /* Disconnect link if any */ |
161 | ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL); | 157 | ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL); |
162 | 158 | ||
@@ -191,8 +187,6 @@ int ircomm_close(struct ircomm_cb *self) | |||
191 | IRDA_ASSERT(self != NULL, return -EIO;); | 187 | IRDA_ASSERT(self != NULL, return -EIO;); |
192 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EIO;); | 188 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EIO;); |
193 | 189 | ||
194 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
195 | |||
196 | entry = hashbin_remove(ircomm, self->line, NULL); | 190 | entry = hashbin_remove(ircomm, self->line, NULL); |
197 | 191 | ||
198 | IRDA_ASSERT(entry == self, return -1;); | 192 | IRDA_ASSERT(entry == self, return -1;); |
@@ -216,8 +210,6 @@ int ircomm_connect_request(struct ircomm_cb *self, __u8 dlsap_sel, | |||
216 | struct ircomm_info info; | 210 | struct ircomm_info info; |
217 | int ret; | 211 | int ret; |
218 | 212 | ||
219 | IRDA_DEBUG(2 , "%s()\n", __func__ ); | ||
220 | |||
221 | IRDA_ASSERT(self != NULL, return -1;); | 213 | IRDA_ASSERT(self != NULL, return -1;); |
222 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); | 214 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); |
223 | 215 | ||
@@ -243,8 +235,6 @@ EXPORT_SYMBOL(ircomm_connect_request); | |||
243 | void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb, | 235 | void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb, |
244 | struct ircomm_info *info) | 236 | struct ircomm_info *info) |
245 | { | 237 | { |
246 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
247 | |||
248 | /* | 238 | /* |
249 | * If there are any data hiding in the control channel, we must | 239 | * If there are any data hiding in the control channel, we must |
250 | * deliver it first. The side effect is that the control channel | 240 | * deliver it first. The side effect is that the control channel |
@@ -255,7 +245,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb, | |||
255 | info->qos, info->max_data_size, | 245 | info->qos, info->max_data_size, |
256 | info->max_header_size, skb); | 246 | info->max_header_size, skb); |
257 | else { | 247 | else { |
258 | IRDA_DEBUG(0, "%s(), missing handler\n", __func__ ); | 248 | pr_debug("%s(), missing handler\n", __func__); |
259 | } | 249 | } |
260 | } | 250 | } |
261 | 251 | ||
@@ -272,8 +262,6 @@ int ircomm_connect_response(struct ircomm_cb *self, struct sk_buff *userdata) | |||
272 | IRDA_ASSERT(self != NULL, return -1;); | 262 | IRDA_ASSERT(self != NULL, return -1;); |
273 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); | 263 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); |
274 | 264 | ||
275 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
276 | |||
277 | ret = ircomm_do_event(self, IRCOMM_CONNECT_RESPONSE, userdata, NULL); | 265 | ret = ircomm_do_event(self, IRCOMM_CONNECT_RESPONSE, userdata, NULL); |
278 | 266 | ||
279 | return ret; | 267 | return ret; |
@@ -290,15 +278,13 @@ EXPORT_SYMBOL(ircomm_connect_response); | |||
290 | void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb, | 278 | void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb, |
291 | struct ircomm_info *info) | 279 | struct ircomm_info *info) |
292 | { | 280 | { |
293 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
294 | |||
295 | if (self->notify.connect_confirm ) | 281 | if (self->notify.connect_confirm ) |
296 | self->notify.connect_confirm(self->notify.instance, | 282 | self->notify.connect_confirm(self->notify.instance, |
297 | self, info->qos, | 283 | self, info->qos, |
298 | info->max_data_size, | 284 | info->max_data_size, |
299 | info->max_header_size, skb); | 285 | info->max_header_size, skb); |
300 | else { | 286 | else { |
301 | IRDA_DEBUG(0, "%s(), missing handler\n", __func__ ); | 287 | pr_debug("%s(), missing handler\n", __func__); |
302 | } | 288 | } |
303 | } | 289 | } |
304 | 290 | ||
@@ -312,8 +298,6 @@ int ircomm_data_request(struct ircomm_cb *self, struct sk_buff *skb) | |||
312 | { | 298 | { |
313 | int ret; | 299 | int ret; |
314 | 300 | ||
315 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
316 | |||
317 | IRDA_ASSERT(self != NULL, return -EFAULT;); | 301 | IRDA_ASSERT(self != NULL, return -EFAULT;); |
318 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); | 302 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); |
319 | IRDA_ASSERT(skb != NULL, return -EFAULT;); | 303 | IRDA_ASSERT(skb != NULL, return -EFAULT;); |
@@ -333,14 +317,12 @@ EXPORT_SYMBOL(ircomm_data_request); | |||
333 | */ | 317 | */ |
334 | void ircomm_data_indication(struct ircomm_cb *self, struct sk_buff *skb) | 318 | void ircomm_data_indication(struct ircomm_cb *self, struct sk_buff *skb) |
335 | { | 319 | { |
336 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
337 | |||
338 | IRDA_ASSERT(skb->len > 0, return;); | 320 | IRDA_ASSERT(skb->len > 0, return;); |
339 | 321 | ||
340 | if (self->notify.data_indication) | 322 | if (self->notify.data_indication) |
341 | self->notify.data_indication(self->notify.instance, self, skb); | 323 | self->notify.data_indication(self->notify.instance, self, skb); |
342 | else { | 324 | else { |
343 | IRDA_DEBUG(0, "%s(), missing handler\n", __func__ ); | 325 | pr_debug("%s(), missing handler\n", __func__); |
344 | } | 326 | } |
345 | } | 327 | } |
346 | 328 | ||
@@ -365,8 +347,8 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb) | |||
365 | * fine | 347 | * fine |
366 | */ | 348 | */ |
367 | if (unlikely(skb->len < (clen + 1))) { | 349 | if (unlikely(skb->len < (clen + 1))) { |
368 | IRDA_DEBUG(2, "%s() throwing away illegal frame\n", | 350 | pr_debug("%s() throwing away illegal frame\n", |
369 | __func__ ); | 351 | __func__); |
370 | return; | 352 | return; |
371 | } | 353 | } |
372 | 354 | ||
@@ -384,8 +366,8 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb) | |||
384 | if (skb->len) | 366 | if (skb->len) |
385 | ircomm_data_indication(self, skb); | 367 | ircomm_data_indication(self, skb); |
386 | else { | 368 | else { |
387 | IRDA_DEBUG(4, "%s(), data was control info only!\n", | 369 | pr_debug("%s(), data was control info only!\n", |
388 | __func__ ); | 370 | __func__); |
389 | } | 371 | } |
390 | } | 372 | } |
391 | 373 | ||
@@ -399,8 +381,6 @@ int ircomm_control_request(struct ircomm_cb *self, struct sk_buff *skb) | |||
399 | { | 381 | { |
400 | int ret; | 382 | int ret; |
401 | 383 | ||
402 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
403 | |||
404 | IRDA_ASSERT(self != NULL, return -EFAULT;); | 384 | IRDA_ASSERT(self != NULL, return -EFAULT;); |
405 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); | 385 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); |
406 | IRDA_ASSERT(skb != NULL, return -EFAULT;); | 386 | IRDA_ASSERT(skb != NULL, return -EFAULT;); |
@@ -421,8 +401,6 @@ EXPORT_SYMBOL(ircomm_control_request); | |||
421 | static void ircomm_control_indication(struct ircomm_cb *self, | 401 | static void ircomm_control_indication(struct ircomm_cb *self, |
422 | struct sk_buff *skb, int clen) | 402 | struct sk_buff *skb, int clen) |
423 | { | 403 | { |
424 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
425 | |||
426 | /* Use udata for delivering data on the control channel */ | 404 | /* Use udata for delivering data on the control channel */ |
427 | if (self->notify.udata_indication) { | 405 | if (self->notify.udata_indication) { |
428 | struct sk_buff *ctrl_skb; | 406 | struct sk_buff *ctrl_skb; |
@@ -442,7 +420,7 @@ static void ircomm_control_indication(struct ircomm_cb *self, | |||
442 | * see ircomm_tty_control_indication(). */ | 420 | * see ircomm_tty_control_indication(). */ |
443 | dev_kfree_skb(ctrl_skb); | 421 | dev_kfree_skb(ctrl_skb); |
444 | } else { | 422 | } else { |
445 | IRDA_DEBUG(0, "%s(), missing handler\n", __func__ ); | 423 | pr_debug("%s(), missing handler\n", __func__); |
446 | } | 424 | } |
447 | } | 425 | } |
448 | 426 | ||
@@ -457,8 +435,6 @@ int ircomm_disconnect_request(struct ircomm_cb *self, struct sk_buff *userdata) | |||
457 | struct ircomm_info info; | 435 | struct ircomm_info info; |
458 | int ret; | 436 | int ret; |
459 | 437 | ||
460 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
461 | |||
462 | IRDA_ASSERT(self != NULL, return -1;); | 438 | IRDA_ASSERT(self != NULL, return -1;); |
463 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); | 439 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); |
464 | 440 | ||
@@ -478,15 +454,13 @@ EXPORT_SYMBOL(ircomm_disconnect_request); | |||
478 | void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb, | 454 | void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb, |
479 | struct ircomm_info *info) | 455 | struct ircomm_info *info) |
480 | { | 456 | { |
481 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
482 | |||
483 | IRDA_ASSERT(info != NULL, return;); | 457 | IRDA_ASSERT(info != NULL, return;); |
484 | 458 | ||
485 | if (self->notify.disconnect_indication) { | 459 | if (self->notify.disconnect_indication) { |
486 | self->notify.disconnect_indication(self->notify.instance, self, | 460 | self->notify.disconnect_indication(self->notify.instance, self, |
487 | info->reason, skb); | 461 | info->reason, skb); |
488 | } else { | 462 | } else { |
489 | IRDA_DEBUG(0, "%s(), missing handler\n", __func__ ); | 463 | pr_debug("%s(), missing handler\n", __func__); |
490 | } | 464 | } |
491 | } | 465 | } |
492 | 466 | ||
@@ -498,8 +472,6 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb, | |||
498 | */ | 472 | */ |
499 | void ircomm_flow_request(struct ircomm_cb *self, LOCAL_FLOW flow) | 473 | void ircomm_flow_request(struct ircomm_cb *self, LOCAL_FLOW flow) |
500 | { | 474 | { |
501 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
502 | |||
503 | IRDA_ASSERT(self != NULL, return;); | 475 | IRDA_ASSERT(self != NULL, return;); |
504 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); | 476 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); |
505 | 477 | ||
diff --git a/net/irda/ircomm/ircomm_event.c b/net/irda/ircomm/ircomm_event.c index b172c6522328..0476da24848c 100644 --- a/net/irda/ircomm/ircomm_event.c +++ b/net/irda/ircomm/ircomm_event.c | |||
@@ -106,8 +106,8 @@ static int ircomm_state_idle(struct ircomm_cb *self, IRCOMM_EVENT event, | |||
106 | ircomm_connect_indication(self, skb, info); | 106 | ircomm_connect_indication(self, skb, info); |
107 | break; | 107 | break; |
108 | default: | 108 | default: |
109 | IRDA_DEBUG(4, "%s(), unknown event: %s\n", __func__ , | 109 | pr_debug("%s(), unknown event: %s\n", __func__ , |
110 | ircomm_event[event]); | 110 | ircomm_event[event]); |
111 | ret = -EINVAL; | 111 | ret = -EINVAL; |
112 | } | 112 | } |
113 | return ret; | 113 | return ret; |
@@ -136,8 +136,8 @@ static int ircomm_state_waiti(struct ircomm_cb *self, IRCOMM_EVENT event, | |||
136 | ircomm_disconnect_indication(self, skb, info); | 136 | ircomm_disconnect_indication(self, skb, info); |
137 | break; | 137 | break; |
138 | default: | 138 | default: |
139 | IRDA_DEBUG(0, "%s(), unknown event: %s\n", __func__ , | 139 | pr_debug("%s(), unknown event: %s\n", __func__ , |
140 | ircomm_event[event]); | 140 | ircomm_event[event]); |
141 | ret = -EINVAL; | 141 | ret = -EINVAL; |
142 | } | 142 | } |
143 | return ret; | 143 | return ret; |
@@ -169,8 +169,8 @@ static int ircomm_state_waitr(struct ircomm_cb *self, IRCOMM_EVENT event, | |||
169 | ircomm_disconnect_indication(self, skb, info); | 169 | ircomm_disconnect_indication(self, skb, info); |
170 | break; | 170 | break; |
171 | default: | 171 | default: |
172 | IRDA_DEBUG(0, "%s(), unknown event = %s\n", __func__ , | 172 | pr_debug("%s(), unknown event = %s\n", __func__ , |
173 | ircomm_event[event]); | 173 | ircomm_event[event]); |
174 | ret = -EINVAL; | 174 | ret = -EINVAL; |
175 | } | 175 | } |
176 | return ret; | 176 | return ret; |
@@ -211,8 +211,8 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event, | |||
211 | ret = self->issue.disconnect_request(self, skb, info); | 211 | ret = self->issue.disconnect_request(self, skb, info); |
212 | break; | 212 | break; |
213 | default: | 213 | default: |
214 | IRDA_DEBUG(0, "%s(), unknown event = %s\n", __func__ , | 214 | pr_debug("%s(), unknown event = %s\n", __func__ , |
215 | ircomm_event[event]); | 215 | ircomm_event[event]); |
216 | ret = -EINVAL; | 216 | ret = -EINVAL; |
217 | } | 217 | } |
218 | return ret; | 218 | return ret; |
@@ -227,8 +227,8 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event, | |||
227 | int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event, | 227 | int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event, |
228 | struct sk_buff *skb, struct ircomm_info *info) | 228 | struct sk_buff *skb, struct ircomm_info *info) |
229 | { | 229 | { |
230 | IRDA_DEBUG(4, "%s: state=%s, event=%s\n", __func__ , | 230 | pr_debug("%s: state=%s, event=%s\n", __func__ , |
231 | ircomm_state[self->state], ircomm_event[event]); | 231 | ircomm_state[self->state], ircomm_event[event]); |
232 | 232 | ||
233 | return (*state[self->state])(self, event, skb, info); | 233 | return (*state[self->state])(self, event, skb, info); |
234 | } | 234 | } |
@@ -243,6 +243,6 @@ void ircomm_next_state(struct ircomm_cb *self, IRCOMM_STATE state) | |||
243 | { | 243 | { |
244 | self->state = state; | 244 | self->state = state; |
245 | 245 | ||
246 | IRDA_DEBUG(4, "%s: next state=%s, service type=%d\n", __func__ , | 246 | pr_debug("%s: next state=%s, service type=%d\n", __func__ , |
247 | ircomm_state[self->state], self->service_type); | 247 | ircomm_state[self->state], self->service_type); |
248 | } | 248 | } |
diff --git a/net/irda/ircomm/ircomm_lmp.c b/net/irda/ircomm/ircomm_lmp.c index 05767e3ef0d2..e4cc847bb933 100644 --- a/net/irda/ircomm/ircomm_lmp.c +++ b/net/irda/ircomm/ircomm_lmp.c | |||
@@ -52,8 +52,6 @@ static int ircomm_lmp_connect_request(struct ircomm_cb *self, | |||
52 | { | 52 | { |
53 | int ret = 0; | 53 | int ret = 0; |
54 | 54 | ||
55 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
56 | |||
57 | /* Don't forget to refcount it - should be NULL anyway */ | 55 | /* Don't forget to refcount it - should be NULL anyway */ |
58 | if(userdata) | 56 | if(userdata) |
59 | skb_get(userdata); | 57 | skb_get(userdata); |
@@ -74,8 +72,6 @@ static int ircomm_lmp_connect_response(struct ircomm_cb *self, | |||
74 | { | 72 | { |
75 | struct sk_buff *tx_skb; | 73 | struct sk_buff *tx_skb; |
76 | 74 | ||
77 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
78 | |||
79 | /* Any userdata supplied? */ | 75 | /* Any userdata supplied? */ |
80 | if (userdata == NULL) { | 76 | if (userdata == NULL) { |
81 | tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); | 77 | tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); |
@@ -107,8 +103,6 @@ static int ircomm_lmp_disconnect_request(struct ircomm_cb *self, | |||
107 | struct sk_buff *tx_skb; | 103 | struct sk_buff *tx_skb; |
108 | int ret; | 104 | int ret; |
109 | 105 | ||
110 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
111 | |||
112 | if (!userdata) { | 106 | if (!userdata) { |
113 | tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); | 107 | tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); |
114 | if (!tx_skb) | 108 | if (!tx_skb) |
@@ -144,13 +138,11 @@ static void ircomm_lmp_flow_control(struct sk_buff *skb) | |||
144 | 138 | ||
145 | cb = (struct irda_skb_cb *) skb->cb; | 139 | cb = (struct irda_skb_cb *) skb->cb; |
146 | 140 | ||
147 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
148 | |||
149 | line = cb->line; | 141 | line = cb->line; |
150 | 142 | ||
151 | self = (struct ircomm_cb *) hashbin_lock_find(ircomm, line, NULL); | 143 | self = (struct ircomm_cb *) hashbin_lock_find(ircomm, line, NULL); |
152 | if (!self) { | 144 | if (!self) { |
153 | IRDA_DEBUG(2, "%s(), didn't find myself\n", __func__ ); | 145 | pr_debug("%s(), didn't find myself\n", __func__); |
154 | return; | 146 | return; |
155 | } | 147 | } |
156 | 148 | ||
@@ -160,7 +152,7 @@ static void ircomm_lmp_flow_control(struct sk_buff *skb) | |||
160 | self->pkt_count--; | 152 | self->pkt_count--; |
161 | 153 | ||
162 | if ((self->pkt_count < 2) && (self->flow_status == FLOW_STOP)) { | 154 | if ((self->pkt_count < 2) && (self->flow_status == FLOW_STOP)) { |
163 | IRDA_DEBUG(2, "%s(), asking TTY to start again!\n", __func__ ); | 155 | pr_debug("%s(), asking TTY to start again!\n", __func__); |
164 | self->flow_status = FLOW_START; | 156 | self->flow_status = FLOW_START; |
165 | if (self->notify.flow_indication) | 157 | if (self->notify.flow_indication) |
166 | self->notify.flow_indication(self->notify.instance, | 158 | self->notify.flow_indication(self->notify.instance, |
@@ -187,7 +179,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self, | |||
187 | 179 | ||
188 | cb->line = self->line; | 180 | cb->line = self->line; |
189 | 181 | ||
190 | IRDA_DEBUG(4, "%s(), sending frame\n", __func__ ); | 182 | pr_debug("%s(), sending frame\n", __func__); |
191 | 183 | ||
192 | /* Don't forget to refcount it - see ircomm_tty_do_softint() */ | 184 | /* Don't forget to refcount it - see ircomm_tty_do_softint() */ |
193 | skb_get(skb); | 185 | skb_get(skb); |
@@ -196,7 +188,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self, | |||
196 | skb->destructor = ircomm_lmp_flow_control; | 188 | skb->destructor = ircomm_lmp_flow_control; |
197 | 189 | ||
198 | if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) { | 190 | if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) { |
199 | IRDA_DEBUG(2, "%s(), asking TTY to slow down!\n", __func__ ); | 191 | pr_debug("%s(), asking TTY to slow down!\n", __func__); |
200 | self->flow_status = FLOW_STOP; | 192 | self->flow_status = FLOW_STOP; |
201 | if (self->notify.flow_indication) | 193 | if (self->notify.flow_indication) |
202 | self->notify.flow_indication(self->notify.instance, | 194 | self->notify.flow_indication(self->notify.instance, |
@@ -222,8 +214,6 @@ static int ircomm_lmp_data_indication(void *instance, void *sap, | |||
222 | { | 214 | { |
223 | struct ircomm_cb *self = (struct ircomm_cb *) instance; | 215 | struct ircomm_cb *self = (struct ircomm_cb *) instance; |
224 | 216 | ||
225 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
226 | |||
227 | IRDA_ASSERT(self != NULL, return -1;); | 217 | IRDA_ASSERT(self != NULL, return -1;); |
228 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); | 218 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); |
229 | IRDA_ASSERT(skb != NULL, return -1;); | 219 | IRDA_ASSERT(skb != NULL, return -1;); |
@@ -252,8 +242,6 @@ static void ircomm_lmp_connect_confirm(void *instance, void *sap, | |||
252 | struct ircomm_cb *self = (struct ircomm_cb *) instance; | 242 | struct ircomm_cb *self = (struct ircomm_cb *) instance; |
253 | struct ircomm_info info; | 243 | struct ircomm_info info; |
254 | 244 | ||
255 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
256 | |||
257 | IRDA_ASSERT(self != NULL, return;); | 245 | IRDA_ASSERT(self != NULL, return;); |
258 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); | 246 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); |
259 | IRDA_ASSERT(skb != NULL, return;); | 247 | IRDA_ASSERT(skb != NULL, return;); |
@@ -285,8 +273,6 @@ static void ircomm_lmp_connect_indication(void *instance, void *sap, | |||
285 | struct ircomm_cb *self = (struct ircomm_cb *)instance; | 273 | struct ircomm_cb *self = (struct ircomm_cb *)instance; |
286 | struct ircomm_info info; | 274 | struct ircomm_info info; |
287 | 275 | ||
288 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
289 | |||
290 | IRDA_ASSERT(self != NULL, return;); | 276 | IRDA_ASSERT(self != NULL, return;); |
291 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); | 277 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); |
292 | IRDA_ASSERT(skb != NULL, return;); | 278 | IRDA_ASSERT(skb != NULL, return;); |
@@ -315,8 +301,6 @@ static void ircomm_lmp_disconnect_indication(void *instance, void *sap, | |||
315 | struct ircomm_cb *self = (struct ircomm_cb *) instance; | 301 | struct ircomm_cb *self = (struct ircomm_cb *) instance; |
316 | struct ircomm_info info; | 302 | struct ircomm_info info; |
317 | 303 | ||
318 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
319 | |||
320 | IRDA_ASSERT(self != NULL, return;); | 304 | IRDA_ASSERT(self != NULL, return;); |
321 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); | 305 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); |
322 | 306 | ||
@@ -338,8 +322,6 @@ int ircomm_open_lsap(struct ircomm_cb *self) | |||
338 | { | 322 | { |
339 | notify_t notify; | 323 | notify_t notify; |
340 | 324 | ||
341 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
342 | |||
343 | /* Register callbacks */ | 325 | /* Register callbacks */ |
344 | irda_notify_init(¬ify); | 326 | irda_notify_init(¬ify); |
345 | notify.data_indication = ircomm_lmp_data_indication; | 327 | notify.data_indication = ircomm_lmp_data_indication; |
@@ -351,7 +333,7 @@ int ircomm_open_lsap(struct ircomm_cb *self) | |||
351 | 333 | ||
352 | self->lsap = irlmp_open_lsap(LSAP_ANY, ¬ify, 0); | 334 | self->lsap = irlmp_open_lsap(LSAP_ANY, ¬ify, 0); |
353 | if (!self->lsap) { | 335 | if (!self->lsap) { |
354 | IRDA_DEBUG(0,"%sfailed to allocate tsap\n", __func__ ); | 336 | pr_debug("%sfailed to allocate tsap\n", __func__); |
355 | return -1; | 337 | return -1; |
356 | } | 338 | } |
357 | self->slsap_sel = self->lsap->slsap_sel; | 339 | self->slsap_sel = self->lsap->slsap_sel; |
diff --git a/net/irda/ircomm/ircomm_param.c b/net/irda/ircomm/ircomm_param.c index c203fbb8cdd5..27be782be7e7 100644 --- a/net/irda/ircomm/ircomm_param.c +++ b/net/irda/ircomm/ircomm_param.c | |||
@@ -101,8 +101,6 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush) | |||
101 | struct sk_buff *skb; | 101 | struct sk_buff *skb; |
102 | int count; | 102 | int count; |
103 | 103 | ||
104 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
105 | |||
106 | IRDA_ASSERT(self != NULL, return -1;); | 104 | IRDA_ASSERT(self != NULL, return -1;); |
107 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); | 105 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); |
108 | 106 | ||
@@ -139,7 +137,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush) | |||
139 | 137 | ||
140 | spin_unlock_irqrestore(&self->spinlock, flags); | 138 | spin_unlock_irqrestore(&self->spinlock, flags); |
141 | 139 | ||
142 | IRDA_DEBUG(2, "%s(), skb->len=%d\n", __func__ , skb->len); | 140 | pr_debug("%s(), skb->len=%d\n", __func__ , skb->len); |
143 | 141 | ||
144 | if (flush) { | 142 | if (flush) { |
145 | /* ircomm_tty_do_softint will take care of the rest */ | 143 | /* ircomm_tty_do_softint will take care of the rest */ |
@@ -173,12 +171,11 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param, | |||
173 | /* Find all common service types */ | 171 | /* Find all common service types */ |
174 | service_type &= self->service_type; | 172 | service_type &= self->service_type; |
175 | if (!service_type) { | 173 | if (!service_type) { |
176 | IRDA_DEBUG(2, | 174 | pr_debug("%s(), No common service type to use!\n", __func__); |
177 | "%s(), No common service type to use!\n", __func__ ); | ||
178 | return -1; | 175 | return -1; |
179 | } | 176 | } |
180 | IRDA_DEBUG(0, "%s(), services in common=%02x\n", __func__ , | 177 | pr_debug("%s(), services in common=%02x\n", __func__ , |
181 | service_type); | 178 | service_type); |
182 | 179 | ||
183 | /* | 180 | /* |
184 | * Now choose a preferred service type of those available | 181 | * Now choose a preferred service type of those available |
@@ -192,8 +189,8 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param, | |||
192 | else if (service_type & IRCOMM_3_WIRE_RAW) | 189 | else if (service_type & IRCOMM_3_WIRE_RAW) |
193 | self->settings.service_type = IRCOMM_3_WIRE_RAW; | 190 | self->settings.service_type = IRCOMM_3_WIRE_RAW; |
194 | 191 | ||
195 | IRDA_DEBUG(0, "%s(), resulting service type=0x%02x\n", __func__ , | 192 | pr_debug("%s(), resulting service type=0x%02x\n", __func__ , |
196 | self->settings.service_type); | 193 | self->settings.service_type); |
197 | 194 | ||
198 | /* | 195 | /* |
199 | * Now the line is ready for some communication. Check if we are a | 196 | * Now the line is ready for some communication. Check if we are a |
@@ -235,8 +232,8 @@ static int ircomm_param_port_type(void *instance, irda_param_t *param, int get) | |||
235 | else { | 232 | else { |
236 | self->settings.port_type = (__u8) param->pv.i; | 233 | self->settings.port_type = (__u8) param->pv.i; |
237 | 234 | ||
238 | IRDA_DEBUG(0, "%s(), port type=%d\n", __func__ , | 235 | pr_debug("%s(), port type=%d\n", __func__ , |
239 | self->settings.port_type); | 236 | self->settings.port_type); |
240 | } | 237 | } |
241 | return 0; | 238 | return 0; |
242 | } | 239 | } |
@@ -255,9 +252,9 @@ static int ircomm_param_port_name(void *instance, irda_param_t *param, int get) | |||
255 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); | 252 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); |
256 | 253 | ||
257 | if (get) { | 254 | if (get) { |
258 | IRDA_DEBUG(0, "%s(), not imp!\n", __func__ ); | 255 | pr_debug("%s(), not imp!\n", __func__); |
259 | } else { | 256 | } else { |
260 | IRDA_DEBUG(0, "%s(), port-name=%s\n", __func__ , param->pv.c); | 257 | pr_debug("%s(), port-name=%s\n", __func__ , param->pv.c); |
261 | strncpy(self->settings.port_name, param->pv.c, 32); | 258 | strncpy(self->settings.port_name, param->pv.c, 32); |
262 | } | 259 | } |
263 | 260 | ||
@@ -282,7 +279,7 @@ static int ircomm_param_data_rate(void *instance, irda_param_t *param, int get) | |||
282 | else | 279 | else |
283 | self->settings.data_rate = param->pv.i; | 280 | self->settings.data_rate = param->pv.i; |
284 | 281 | ||
285 | IRDA_DEBUG(2, "%s(), data rate = %d\n", __func__ , param->pv.i); | 282 | pr_debug("%s(), data rate = %d\n", __func__ , param->pv.i); |
286 | 283 | ||
287 | return 0; | 284 | return 0; |
288 | } | 285 | } |
@@ -328,7 +325,7 @@ static int ircomm_param_flow_control(void *instance, irda_param_t *param, | |||
328 | else | 325 | else |
329 | self->settings.flow_control = (__u8) param->pv.i; | 326 | self->settings.flow_control = (__u8) param->pv.i; |
330 | 327 | ||
331 | IRDA_DEBUG(1, "%s(), flow control = 0x%02x\n", __func__ , (__u8) param->pv.i); | 328 | pr_debug("%s(), flow control = 0x%02x\n", __func__ , (__u8)param->pv.i); |
332 | 329 | ||
333 | return 0; | 330 | return 0; |
334 | } | 331 | } |
@@ -354,8 +351,8 @@ static int ircomm_param_xon_xoff(void *instance, irda_param_t *param, int get) | |||
354 | self->settings.xonxoff[1] = (__u16) param->pv.i >> 8; | 351 | self->settings.xonxoff[1] = (__u16) param->pv.i >> 8; |
355 | } | 352 | } |
356 | 353 | ||
357 | IRDA_DEBUG(0, "%s(), XON/XOFF = 0x%02x,0x%02x\n", __func__ , | 354 | pr_debug("%s(), XON/XOFF = 0x%02x,0x%02x\n", __func__ , |
358 | param->pv.i & 0xff, param->pv.i >> 8); | 355 | param->pv.i & 0xff, param->pv.i >> 8); |
359 | 356 | ||
360 | return 0; | 357 | return 0; |
361 | } | 358 | } |
@@ -381,8 +378,8 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get) | |||
381 | self->settings.enqack[1] = (__u16) param->pv.i >> 8; | 378 | self->settings.enqack[1] = (__u16) param->pv.i >> 8; |
382 | } | 379 | } |
383 | 380 | ||
384 | IRDA_DEBUG(0, "%s(), ENQ/ACK = 0x%02x,0x%02x\n", __func__ , | 381 | pr_debug("%s(), ENQ/ACK = 0x%02x,0x%02x\n", __func__ , |
385 | param->pv.i & 0xff, param->pv.i >> 8); | 382 | param->pv.i & 0xff, param->pv.i >> 8); |
386 | 383 | ||
387 | return 0; | 384 | return 0; |
388 | } | 385 | } |
@@ -396,7 +393,7 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get) | |||
396 | static int ircomm_param_line_status(void *instance, irda_param_t *param, | 393 | static int ircomm_param_line_status(void *instance, irda_param_t *param, |
397 | int get) | 394 | int get) |
398 | { | 395 | { |
399 | IRDA_DEBUG(2, "%s(), not impl.\n", __func__ ); | 396 | pr_debug("%s(), not impl.\n", __func__); |
400 | 397 | ||
401 | return 0; | 398 | return 0; |
402 | } | 399 | } |
@@ -457,7 +454,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get) | |||
457 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; | 454 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; |
458 | __u8 dce; | 455 | __u8 dce; |
459 | 456 | ||
460 | IRDA_DEBUG(1, "%s(), dce = 0x%02x\n", __func__ , (__u8) param->pv.i); | 457 | pr_debug("%s(), dce = 0x%02x\n", __func__ , (__u8)param->pv.i); |
461 | 458 | ||
462 | dce = (__u8) param->pv.i; | 459 | dce = (__u8) param->pv.i; |
463 | 460 | ||
@@ -469,7 +466,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get) | |||
469 | /* Check if any of the settings have changed */ | 466 | /* Check if any of the settings have changed */ |
470 | if (dce & 0x0f) { | 467 | if (dce & 0x0f) { |
471 | if (dce & IRCOMM_DELTA_CTS) { | 468 | if (dce & IRCOMM_DELTA_CTS) { |
472 | IRDA_DEBUG(2, "%s(), CTS\n", __func__ ); | 469 | pr_debug("%s(), CTS\n", __func__); |
473 | } | 470 | } |
474 | } | 471 | } |
475 | 472 | ||
diff --git a/net/irda/ircomm/ircomm_ttp.c b/net/irda/ircomm/ircomm_ttp.c index abe9a5ab8d34..4b81e0934770 100644 --- a/net/irda/ircomm/ircomm_ttp.c +++ b/net/irda/ircomm/ircomm_ttp.c | |||
@@ -76,8 +76,6 @@ int ircomm_open_tsap(struct ircomm_cb *self) | |||
76 | { | 76 | { |
77 | notify_t notify; | 77 | notify_t notify; |
78 | 78 | ||
79 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
80 | |||
81 | /* Register callbacks */ | 79 | /* Register callbacks */ |
82 | irda_notify_init(¬ify); | 80 | irda_notify_init(¬ify); |
83 | notify.data_indication = ircomm_ttp_data_indication; | 81 | notify.data_indication = ircomm_ttp_data_indication; |
@@ -91,7 +89,7 @@ int ircomm_open_tsap(struct ircomm_cb *self) | |||
91 | self->tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, | 89 | self->tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, |
92 | ¬ify); | 90 | ¬ify); |
93 | if (!self->tsap) { | 91 | if (!self->tsap) { |
94 | IRDA_DEBUG(0, "%sfailed to allocate tsap\n", __func__ ); | 92 | pr_debug("%sfailed to allocate tsap\n", __func__); |
95 | return -1; | 93 | return -1; |
96 | } | 94 | } |
97 | self->slsap_sel = self->tsap->stsap_sel; | 95 | self->slsap_sel = self->tsap->stsap_sel; |
@@ -119,8 +117,6 @@ static int ircomm_ttp_connect_request(struct ircomm_cb *self, | |||
119 | { | 117 | { |
120 | int ret = 0; | 118 | int ret = 0; |
121 | 119 | ||
122 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
123 | |||
124 | /* Don't forget to refcount it - should be NULL anyway */ | 120 | /* Don't forget to refcount it - should be NULL anyway */ |
125 | if(userdata) | 121 | if(userdata) |
126 | skb_get(userdata); | 122 | skb_get(userdata); |
@@ -143,8 +139,6 @@ static int ircomm_ttp_connect_response(struct ircomm_cb *self, | |||
143 | { | 139 | { |
144 | int ret; | 140 | int ret; |
145 | 141 | ||
146 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
147 | |||
148 | /* Don't forget to refcount it - should be NULL anyway */ | 142 | /* Don't forget to refcount it - should be NULL anyway */ |
149 | if(userdata) | 143 | if(userdata) |
150 | skb_get(userdata); | 144 | skb_get(userdata); |
@@ -171,7 +165,7 @@ static int ircomm_ttp_data_request(struct ircomm_cb *self, | |||
171 | 165 | ||
172 | IRDA_ASSERT(skb != NULL, return -1;); | 166 | IRDA_ASSERT(skb != NULL, return -1;); |
173 | 167 | ||
174 | IRDA_DEBUG(2, "%s(), clen=%d\n", __func__ , clen); | 168 | pr_debug("%s(), clen=%d\n", __func__ , clen); |
175 | 169 | ||
176 | /* | 170 | /* |
177 | * Insert clen field, currently we either send data only, or control | 171 | * Insert clen field, currently we either send data only, or control |
@@ -206,8 +200,6 @@ static int ircomm_ttp_data_indication(void *instance, void *sap, | |||
206 | { | 200 | { |
207 | struct ircomm_cb *self = (struct ircomm_cb *) instance; | 201 | struct ircomm_cb *self = (struct ircomm_cb *) instance; |
208 | 202 | ||
209 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
210 | |||
211 | IRDA_ASSERT(self != NULL, return -1;); | 203 | IRDA_ASSERT(self != NULL, return -1;); |
212 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); | 204 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); |
213 | IRDA_ASSERT(skb != NULL, return -1;); | 205 | IRDA_ASSERT(skb != NULL, return -1;); |
@@ -229,8 +221,6 @@ static void ircomm_ttp_connect_confirm(void *instance, void *sap, | |||
229 | struct ircomm_cb *self = (struct ircomm_cb *) instance; | 221 | struct ircomm_cb *self = (struct ircomm_cb *) instance; |
230 | struct ircomm_info info; | 222 | struct ircomm_info info; |
231 | 223 | ||
232 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
233 | |||
234 | IRDA_ASSERT(self != NULL, return;); | 224 | IRDA_ASSERT(self != NULL, return;); |
235 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); | 225 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); |
236 | IRDA_ASSERT(skb != NULL, return;); | 226 | IRDA_ASSERT(skb != NULL, return;); |
@@ -270,8 +260,6 @@ static void ircomm_ttp_connect_indication(void *instance, void *sap, | |||
270 | struct ircomm_cb *self = (struct ircomm_cb *)instance; | 260 | struct ircomm_cb *self = (struct ircomm_cb *)instance; |
271 | struct ircomm_info info; | 261 | struct ircomm_info info; |
272 | 262 | ||
273 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
274 | |||
275 | IRDA_ASSERT(self != NULL, return;); | 263 | IRDA_ASSERT(self != NULL, return;); |
276 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); | 264 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); |
277 | IRDA_ASSERT(skb != NULL, return;); | 265 | IRDA_ASSERT(skb != NULL, return;); |
@@ -329,8 +317,6 @@ static void ircomm_ttp_disconnect_indication(void *instance, void *sap, | |||
329 | struct ircomm_cb *self = (struct ircomm_cb *) instance; | 317 | struct ircomm_cb *self = (struct ircomm_cb *) instance; |
330 | struct ircomm_info info; | 318 | struct ircomm_info info; |
331 | 319 | ||
332 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
333 | |||
334 | IRDA_ASSERT(self != NULL, return;); | 320 | IRDA_ASSERT(self != NULL, return;); |
335 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); | 321 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); |
336 | 322 | ||
@@ -354,8 +340,6 @@ static void ircomm_ttp_flow_indication(void *instance, void *sap, | |||
354 | { | 340 | { |
355 | struct ircomm_cb *self = (struct ircomm_cb *) instance; | 341 | struct ircomm_cb *self = (struct ircomm_cb *) instance; |
356 | 342 | ||
357 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
358 | |||
359 | IRDA_ASSERT(self != NULL, return;); | 343 | IRDA_ASSERT(self != NULL, return;); |
360 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); | 344 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); |
361 | 345 | ||
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c index 11b0a5ed0252..40695b9751c1 100644 --- a/net/irda/ircomm/ircomm_tty.c +++ b/net/irda/ircomm/ircomm_tty.c | |||
@@ -174,8 +174,6 @@ static int __init ircomm_tty_init(void) | |||
174 | 174 | ||
175 | static void __exit __ircomm_tty_cleanup(struct ircomm_tty_cb *self) | 175 | static void __exit __ircomm_tty_cleanup(struct ircomm_tty_cb *self) |
176 | { | 176 | { |
177 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
178 | |||
179 | IRDA_ASSERT(self != NULL, return;); | 177 | IRDA_ASSERT(self != NULL, return;); |
180 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 178 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
181 | 179 | ||
@@ -196,8 +194,6 @@ static void __exit ircomm_tty_cleanup(void) | |||
196 | { | 194 | { |
197 | int ret; | 195 | int ret; |
198 | 196 | ||
199 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
200 | |||
201 | ret = tty_unregister_driver(driver); | 197 | ret = tty_unregister_driver(driver); |
202 | if (ret) { | 198 | if (ret) { |
203 | net_err_ratelimited("%s(), failed to unregister driver\n", | 199 | net_err_ratelimited("%s(), failed to unregister driver\n", |
@@ -220,14 +216,12 @@ static int ircomm_tty_startup(struct ircomm_tty_cb *self) | |||
220 | notify_t notify; | 216 | notify_t notify; |
221 | int ret = -ENODEV; | 217 | int ret = -ENODEV; |
222 | 218 | ||
223 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
224 | |||
225 | IRDA_ASSERT(self != NULL, return -1;); | 219 | IRDA_ASSERT(self != NULL, return -1;); |
226 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); | 220 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); |
227 | 221 | ||
228 | /* Check if already open */ | 222 | /* Check if already open */ |
229 | if (test_and_set_bit(ASYNCB_INITIALIZED, &self->port.flags)) { | 223 | if (test_and_set_bit(ASYNCB_INITIALIZED, &self->port.flags)) { |
230 | IRDA_DEBUG(2, "%s(), already open so break out!\n", __func__ ); | 224 | pr_debug("%s(), already open so break out!\n", __func__); |
231 | return 0; | 225 | return 0; |
232 | } | 226 | } |
233 | 227 | ||
@@ -282,8 +276,6 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self, | |||
282 | int do_clocal = 0; | 276 | int do_clocal = 0; |
283 | unsigned long flags; | 277 | unsigned long flags; |
284 | 278 | ||
285 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
286 | |||
287 | /* | 279 | /* |
288 | * If non-blocking mode is set, or the port is not enabled, | 280 | * If non-blocking mode is set, or the port is not enabled, |
289 | * then make the check up front and then exit. | 281 | * then make the check up front and then exit. |
@@ -298,12 +290,12 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self, | |||
298 | if (tty->termios.c_cflag & CBAUD) | 290 | if (tty->termios.c_cflag & CBAUD) |
299 | tty_port_raise_dtr_rts(port); | 291 | tty_port_raise_dtr_rts(port); |
300 | port->flags |= ASYNC_NORMAL_ACTIVE; | 292 | port->flags |= ASYNC_NORMAL_ACTIVE; |
301 | IRDA_DEBUG(1, "%s(), O_NONBLOCK requested!\n", __func__ ); | 293 | pr_debug("%s(), O_NONBLOCK requested!\n", __func__); |
302 | return 0; | 294 | return 0; |
303 | } | 295 | } |
304 | 296 | ||
305 | if (tty->termios.c_cflag & CLOCAL) { | 297 | if (tty->termios.c_cflag & CLOCAL) { |
306 | IRDA_DEBUG(1, "%s(), doing CLOCAL!\n", __func__ ); | 298 | pr_debug("%s(), doing CLOCAL!\n", __func__); |
307 | do_clocal = 1; | 299 | do_clocal = 1; |
308 | } | 300 | } |
309 | 301 | ||
@@ -317,8 +309,8 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self, | |||
317 | retval = 0; | 309 | retval = 0; |
318 | add_wait_queue(&port->open_wait, &wait); | 310 | add_wait_queue(&port->open_wait, &wait); |
319 | 311 | ||
320 | IRDA_DEBUG(2, "%s(%d):block_til_ready before block on %s open_count=%d\n", | 312 | pr_debug("%s(%d):block_til_ready before block on %s open_count=%d\n", |
321 | __FILE__, __LINE__, tty->driver->name, port->count); | 313 | __FILE__, __LINE__, tty->driver->name, port->count); |
322 | 314 | ||
323 | spin_lock_irqsave(&port->lock, flags); | 315 | spin_lock_irqsave(&port->lock, flags); |
324 | port->count--; | 316 | port->count--; |
@@ -355,8 +347,8 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self, | |||
355 | break; | 347 | break; |
356 | } | 348 | } |
357 | 349 | ||
358 | IRDA_DEBUG(1, "%s(%d):block_til_ready blocking on %s open_count=%d\n", | 350 | pr_debug("%s(%d):block_til_ready blocking on %s open_count=%d\n", |
359 | __FILE__, __LINE__, tty->driver->name, port->count); | 351 | __FILE__, __LINE__, tty->driver->name, port->count); |
360 | 352 | ||
361 | schedule(); | 353 | schedule(); |
362 | } | 354 | } |
@@ -370,8 +362,8 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self, | |||
370 | port->blocked_open--; | 362 | port->blocked_open--; |
371 | spin_unlock_irqrestore(&port->lock, flags); | 363 | spin_unlock_irqrestore(&port->lock, flags); |
372 | 364 | ||
373 | IRDA_DEBUG(1, "%s(%d):block_til_ready after blocking on %s open_count=%d\n", | 365 | pr_debug("%s(%d):block_til_ready after blocking on %s open_count=%d\n", |
374 | __FILE__, __LINE__, tty->driver->name, port->count); | 366 | __FILE__, __LINE__, tty->driver->name, port->count); |
375 | 367 | ||
376 | if (!retval) | 368 | if (!retval) |
377 | port->flags |= ASYNC_NORMAL_ACTIVE; | 369 | port->flags |= ASYNC_NORMAL_ACTIVE; |
@@ -439,16 +431,14 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) | |||
439 | unsigned long flags; | 431 | unsigned long flags; |
440 | int ret; | 432 | int ret; |
441 | 433 | ||
442 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
443 | |||
444 | /* ++ is not atomic, so this should be protected - Jean II */ | 434 | /* ++ is not atomic, so this should be protected - Jean II */ |
445 | spin_lock_irqsave(&self->port.lock, flags); | 435 | spin_lock_irqsave(&self->port.lock, flags); |
446 | self->port.count++; | 436 | self->port.count++; |
447 | spin_unlock_irqrestore(&self->port.lock, flags); | 437 | spin_unlock_irqrestore(&self->port.lock, flags); |
448 | tty_port_tty_set(&self->port, tty); | 438 | tty_port_tty_set(&self->port, tty); |
449 | 439 | ||
450 | IRDA_DEBUG(1, "%s(), %s%d, count = %d\n", __func__ , tty->driver->name, | 440 | pr_debug("%s(), %s%d, count = %d\n", __func__ , tty->driver->name, |
451 | self->line, self->port.count); | 441 | self->line, self->port.count); |
452 | 442 | ||
453 | /* Not really used by us, but lets do it anyway */ | 443 | /* Not really used by us, but lets do it anyway */ |
454 | self->port.low_latency = (self->port.flags & ASYNC_LOW_LATENCY) ? 1 : 0; | 444 | self->port.low_latency = (self->port.flags & ASYNC_LOW_LATENCY) ? 1 : 0; |
@@ -487,9 +477,9 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) | |||
487 | self->settings.service_type = IRCOMM_9_WIRE; /* 9 wire as default */ | 477 | self->settings.service_type = IRCOMM_9_WIRE; /* 9 wire as default */ |
488 | /* Jan Kiszka -> add DSR/RI -> Conform to IrCOMM spec */ | 478 | /* Jan Kiszka -> add DSR/RI -> Conform to IrCOMM spec */ |
489 | self->settings.dce = IRCOMM_CTS | IRCOMM_CD | IRCOMM_DSR | IRCOMM_RI; /* Default line settings */ | 479 | self->settings.dce = IRCOMM_CTS | IRCOMM_CD | IRCOMM_DSR | IRCOMM_RI; /* Default line settings */ |
490 | IRDA_DEBUG(2, "%s(), IrCOMM device\n", __func__ ); | 480 | pr_debug("%s(), IrCOMM device\n", __func__); |
491 | } else { | 481 | } else { |
492 | IRDA_DEBUG(2, "%s(), IrLPT device\n", __func__ ); | 482 | pr_debug("%s(), IrLPT device\n", __func__); |
493 | self->service_type = IRCOMM_3_WIRE_RAW; | 483 | self->service_type = IRCOMM_3_WIRE_RAW; |
494 | self->settings.service_type = IRCOMM_3_WIRE_RAW; /* Default */ | 484 | self->settings.service_type = IRCOMM_3_WIRE_RAW; /* Default */ |
495 | } | 485 | } |
@@ -500,9 +490,8 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) | |||
500 | 490 | ||
501 | ret = ircomm_tty_block_til_ready(self, tty, filp); | 491 | ret = ircomm_tty_block_til_ready(self, tty, filp); |
502 | if (ret) { | 492 | if (ret) { |
503 | IRDA_DEBUG(2, | 493 | pr_debug("%s(), returning after block_til_ready with %d\n", |
504 | "%s(), returning after block_til_ready with %d\n", __func__ , | 494 | __func__, ret); |
505 | ret); | ||
506 | 495 | ||
507 | return ret; | 496 | return ret; |
508 | } | 497 | } |
@@ -520,8 +509,6 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp) | |||
520 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; | 509 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; |
521 | struct tty_port *port = &self->port; | 510 | struct tty_port *port = &self->port; |
522 | 511 | ||
523 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
524 | |||
525 | IRDA_ASSERT(self != NULL, return;); | 512 | IRDA_ASSERT(self != NULL, return;); |
526 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 513 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
527 | 514 | ||
@@ -571,8 +558,6 @@ static void ircomm_tty_do_softint(struct work_struct *work) | |||
571 | unsigned long flags; | 558 | unsigned long flags; |
572 | struct sk_buff *skb, *ctrl_skb; | 559 | struct sk_buff *skb, *ctrl_skb; |
573 | 560 | ||
574 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
575 | |||
576 | if (!self || self->magic != IRCOMM_TTY_MAGIC) | 561 | if (!self || self->magic != IRCOMM_TTY_MAGIC) |
577 | return; | 562 | return; |
578 | 563 | ||
@@ -638,8 +623,8 @@ static int ircomm_tty_write(struct tty_struct *tty, | |||
638 | int len = 0; | 623 | int len = 0; |
639 | int size; | 624 | int size; |
640 | 625 | ||
641 | IRDA_DEBUG(2, "%s(), count=%d, hw_stopped=%d\n", __func__ , count, | 626 | pr_debug("%s(), count=%d, hw_stopped=%d\n", __func__ , count, |
642 | tty->hw_stopped); | 627 | tty->hw_stopped); |
643 | 628 | ||
644 | IRDA_ASSERT(self != NULL, return -1;); | 629 | IRDA_ASSERT(self != NULL, return -1;); |
645 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); | 630 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); |
@@ -661,7 +646,7 @@ static int ircomm_tty_write(struct tty_struct *tty, | |||
661 | * we don't mess up the original "safe skb" (see tx_data_size). | 646 | * we don't mess up the original "safe skb" (see tx_data_size). |
662 | * Jean II */ | 647 | * Jean II */ |
663 | if (self->max_header_size == IRCOMM_TTY_HDR_UNINITIALISED) { | 648 | if (self->max_header_size == IRCOMM_TTY_HDR_UNINITIALISED) { |
664 | IRDA_DEBUG(1, "%s() : not initialised\n", __func__); | 649 | pr_debug("%s() : not initialised\n", __func__); |
665 | #ifdef IRCOMM_NO_TX_BEFORE_INIT | 650 | #ifdef IRCOMM_NO_TX_BEFORE_INIT |
666 | /* We didn't consume anything, TTY will retry */ | 651 | /* We didn't consume anything, TTY will retry */ |
667 | return 0; | 652 | return 0; |
@@ -790,7 +775,7 @@ static int ircomm_tty_write_room(struct tty_struct *tty) | |||
790 | ret = self->max_data_size; | 775 | ret = self->max_data_size; |
791 | spin_unlock_irqrestore(&self->spinlock, flags); | 776 | spin_unlock_irqrestore(&self->spinlock, flags); |
792 | } | 777 | } |
793 | IRDA_DEBUG(2, "%s(), ret=%d\n", __func__ , ret); | 778 | pr_debug("%s(), ret=%d\n", __func__ , ret); |
794 | 779 | ||
795 | return ret; | 780 | return ret; |
796 | } | 781 | } |
@@ -807,8 +792,6 @@ static void ircomm_tty_wait_until_sent(struct tty_struct *tty, int timeout) | |||
807 | unsigned long orig_jiffies, poll_time; | 792 | unsigned long orig_jiffies, poll_time; |
808 | unsigned long flags; | 793 | unsigned long flags; |
809 | 794 | ||
810 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
811 | |||
812 | IRDA_ASSERT(self != NULL, return;); | 795 | IRDA_ASSERT(self != NULL, return;); |
813 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 796 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
814 | 797 | ||
@@ -842,8 +825,6 @@ static void ircomm_tty_throttle(struct tty_struct *tty) | |||
842 | { | 825 | { |
843 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; | 826 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; |
844 | 827 | ||
845 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
846 | |||
847 | IRDA_ASSERT(self != NULL, return;); | 828 | IRDA_ASSERT(self != NULL, return;); |
848 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 829 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
849 | 830 | ||
@@ -873,8 +854,6 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty) | |||
873 | { | 854 | { |
874 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; | 855 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; |
875 | 856 | ||
876 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
877 | |||
878 | IRDA_ASSERT(self != NULL, return;); | 857 | IRDA_ASSERT(self != NULL, return;); |
879 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 858 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
880 | 859 | ||
@@ -888,7 +867,7 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty) | |||
888 | self->settings.dte |= (IRCOMM_RTS|IRCOMM_DELTA_RTS); | 867 | self->settings.dte |= (IRCOMM_RTS|IRCOMM_DELTA_RTS); |
889 | 868 | ||
890 | ircomm_param_request(self, IRCOMM_DTE, TRUE); | 869 | ircomm_param_request(self, IRCOMM_DTE, TRUE); |
891 | IRDA_DEBUG(1, "%s(), FLOW_START\n", __func__ ); | 870 | pr_debug("%s(), FLOW_START\n", __func__); |
892 | } | 871 | } |
893 | ircomm_flow_request(self->ircomm, FLOW_START); | 872 | ircomm_flow_request(self->ircomm, FLOW_START); |
894 | } | 873 | } |
@@ -925,8 +904,6 @@ static void ircomm_tty_shutdown(struct ircomm_tty_cb *self) | |||
925 | IRDA_ASSERT(self != NULL, return;); | 904 | IRDA_ASSERT(self != NULL, return;); |
926 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 905 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
927 | 906 | ||
928 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
929 | |||
930 | if (!test_and_clear_bit(ASYNCB_INITIALIZED, &self->port.flags)) | 907 | if (!test_and_clear_bit(ASYNCB_INITIALIZED, &self->port.flags)) |
931 | return; | 908 | return; |
932 | 909 | ||
@@ -969,8 +946,6 @@ static void ircomm_tty_hangup(struct tty_struct *tty) | |||
969 | struct tty_port *port = &self->port; | 946 | struct tty_port *port = &self->port; |
970 | unsigned long flags; | 947 | unsigned long flags; |
971 | 948 | ||
972 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
973 | |||
974 | IRDA_ASSERT(self != NULL, return;); | 949 | IRDA_ASSERT(self != NULL, return;); |
975 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 950 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
976 | 951 | ||
@@ -998,7 +973,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty) | |||
998 | */ | 973 | */ |
999 | static void ircomm_tty_send_xchar(struct tty_struct *tty, char ch) | 974 | static void ircomm_tty_send_xchar(struct tty_struct *tty, char ch) |
1000 | { | 975 | { |
1001 | IRDA_DEBUG(0, "%s(), not impl\n", __func__ ); | 976 | pr_debug("%s(), not impl\n", __func__); |
1002 | } | 977 | } |
1003 | 978 | ||
1004 | /* | 979 | /* |
@@ -1042,8 +1017,6 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self) | |||
1042 | struct tty_struct *tty; | 1017 | struct tty_struct *tty; |
1043 | int status; | 1018 | int status; |
1044 | 1019 | ||
1045 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
1046 | |||
1047 | IRDA_ASSERT(self != NULL, return;); | 1020 | IRDA_ASSERT(self != NULL, return;); |
1048 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 1021 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
1049 | 1022 | ||
@@ -1055,15 +1028,13 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self) | |||
1055 | /*wake_up_interruptible(&self->delta_msr_wait);*/ | 1028 | /*wake_up_interruptible(&self->delta_msr_wait);*/ |
1056 | } | 1029 | } |
1057 | if ((self->port.flags & ASYNC_CHECK_CD) && (status & IRCOMM_DELTA_CD)) { | 1030 | if ((self->port.flags & ASYNC_CHECK_CD) && (status & IRCOMM_DELTA_CD)) { |
1058 | IRDA_DEBUG(2, | 1031 | pr_debug("%s(), ircomm%d CD now %s...\n", __func__ , self->line, |
1059 | "%s(), ircomm%d CD now %s...\n", __func__ , self->line, | 1032 | (status & IRCOMM_CD) ? "on" : "off"); |
1060 | (status & IRCOMM_CD) ? "on" : "off"); | ||
1061 | 1033 | ||
1062 | if (status & IRCOMM_CD) { | 1034 | if (status & IRCOMM_CD) { |
1063 | wake_up_interruptible(&self->port.open_wait); | 1035 | wake_up_interruptible(&self->port.open_wait); |
1064 | } else { | 1036 | } else { |
1065 | IRDA_DEBUG(2, | 1037 | pr_debug("%s(), Doing serial hangup..\n", __func__); |
1066 | "%s(), Doing serial hangup..\n", __func__ ); | ||
1067 | if (tty) | 1038 | if (tty) |
1068 | tty_hangup(tty); | 1039 | tty_hangup(tty); |
1069 | 1040 | ||
@@ -1074,8 +1045,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self) | |||
1074 | if (tty && tty_port_cts_enabled(&self->port)) { | 1045 | if (tty && tty_port_cts_enabled(&self->port)) { |
1075 | if (tty->hw_stopped) { | 1046 | if (tty->hw_stopped) { |
1076 | if (status & IRCOMM_CTS) { | 1047 | if (status & IRCOMM_CTS) { |
1077 | IRDA_DEBUG(2, | 1048 | pr_debug("%s(), CTS tx start...\n", __func__); |
1078 | "%s(), CTS tx start...\n", __func__ ); | ||
1079 | tty->hw_stopped = 0; | 1049 | tty->hw_stopped = 0; |
1080 | 1050 | ||
1081 | /* Wake up processes blocked on open */ | 1051 | /* Wake up processes blocked on open */ |
@@ -1086,8 +1056,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self) | |||
1086 | } | 1056 | } |
1087 | } else { | 1057 | } else { |
1088 | if (!(status & IRCOMM_CTS)) { | 1058 | if (!(status & IRCOMM_CTS)) { |
1089 | IRDA_DEBUG(2, | 1059 | pr_debug("%s(), CTS tx stop...\n", __func__); |
1090 | "%s(), CTS tx stop...\n", __func__ ); | ||
1091 | tty->hw_stopped = 1; | 1060 | tty->hw_stopped = 1; |
1092 | } | 1061 | } |
1093 | } | 1062 | } |
@@ -1108,15 +1077,13 @@ static int ircomm_tty_data_indication(void *instance, void *sap, | |||
1108 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; | 1077 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; |
1109 | struct tty_struct *tty; | 1078 | struct tty_struct *tty; |
1110 | 1079 | ||
1111 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
1112 | |||
1113 | IRDA_ASSERT(self != NULL, return -1;); | 1080 | IRDA_ASSERT(self != NULL, return -1;); |
1114 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); | 1081 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); |
1115 | IRDA_ASSERT(skb != NULL, return -1;); | 1082 | IRDA_ASSERT(skb != NULL, return -1;); |
1116 | 1083 | ||
1117 | tty = tty_port_tty_get(&self->port); | 1084 | tty = tty_port_tty_get(&self->port); |
1118 | if (!tty) { | 1085 | if (!tty) { |
1119 | IRDA_DEBUG(0, "%s(), no tty!\n", __func__ ); | 1086 | pr_debug("%s(), no tty!\n", __func__); |
1120 | return 0; | 1087 | return 0; |
1121 | } | 1088 | } |
1122 | 1089 | ||
@@ -1127,7 +1094,7 @@ static int ircomm_tty_data_indication(void *instance, void *sap, | |||
1127 | * params, we can just as well declare the hardware for running. | 1094 | * params, we can just as well declare the hardware for running. |
1128 | */ | 1095 | */ |
1129 | if (tty->hw_stopped && (self->flow == FLOW_START)) { | 1096 | if (tty->hw_stopped && (self->flow == FLOW_START)) { |
1130 | IRDA_DEBUG(0, "%s(), polling for line settings!\n", __func__ ); | 1097 | pr_debug("%s(), polling for line settings!\n", __func__); |
1131 | ircomm_param_request(self, IRCOMM_POLL, TRUE); | 1098 | ircomm_param_request(self, IRCOMM_POLL, TRUE); |
1132 | 1099 | ||
1133 | /* We can just as well declare the hardware for running */ | 1100 | /* We can just as well declare the hardware for running */ |
@@ -1160,8 +1127,6 @@ static int ircomm_tty_control_indication(void *instance, void *sap, | |||
1160 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; | 1127 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; |
1161 | int clen; | 1128 | int clen; |
1162 | 1129 | ||
1163 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
1164 | |||
1165 | IRDA_ASSERT(self != NULL, return -1;); | 1130 | IRDA_ASSERT(self != NULL, return -1;); |
1166 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); | 1131 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); |
1167 | IRDA_ASSERT(skb != NULL, return -1;); | 1132 | IRDA_ASSERT(skb != NULL, return -1;); |
@@ -1196,7 +1161,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap, | |||
1196 | 1161 | ||
1197 | switch (cmd) { | 1162 | switch (cmd) { |
1198 | case FLOW_START: | 1163 | case FLOW_START: |
1199 | IRDA_DEBUG(2, "%s(), hw start!\n", __func__ ); | 1164 | pr_debug("%s(), hw start!\n", __func__); |
1200 | if (tty) | 1165 | if (tty) |
1201 | tty->hw_stopped = 0; | 1166 | tty->hw_stopped = 0; |
1202 | 1167 | ||
@@ -1205,7 +1170,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap, | |||
1205 | break; | 1170 | break; |
1206 | default: /* If we get here, something is very wrong, better stop */ | 1171 | default: /* If we get here, something is very wrong, better stop */ |
1207 | case FLOW_STOP: | 1172 | case FLOW_STOP: |
1208 | IRDA_DEBUG(2, "%s(), hw stopped!\n", __func__ ); | 1173 | pr_debug("%s(), hw stopped!\n", __func__); |
1209 | if (tty) | 1174 | if (tty) |
1210 | tty->hw_stopped = 1; | 1175 | tty->hw_stopped = 1; |
1211 | break; | 1176 | break; |
diff --git a/net/irda/ircomm/ircomm_tty_attach.c b/net/irda/ircomm/ircomm_tty_attach.c index 211904419f68..549ca143f0a9 100644 --- a/net/irda/ircomm/ircomm_tty_attach.c +++ b/net/irda/ircomm/ircomm_tty_attach.c | |||
@@ -130,14 +130,12 @@ int ircomm_tty_attach_cable(struct ircomm_tty_cb *self) | |||
130 | { | 130 | { |
131 | struct tty_struct *tty; | 131 | struct tty_struct *tty; |
132 | 132 | ||
133 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
134 | |||
135 | IRDA_ASSERT(self != NULL, return -1;); | 133 | IRDA_ASSERT(self != NULL, return -1;); |
136 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); | 134 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); |
137 | 135 | ||
138 | /* Check if somebody has already connected to us */ | 136 | /* Check if somebody has already connected to us */ |
139 | if (ircomm_is_connected(self->ircomm)) { | 137 | if (ircomm_is_connected(self->ircomm)) { |
140 | IRDA_DEBUG(0, "%s(), already connected!\n", __func__ ); | 138 | pr_debug("%s(), already connected!\n", __func__); |
141 | return 0; | 139 | return 0; |
142 | } | 140 | } |
143 | 141 | ||
@@ -163,8 +161,6 @@ int ircomm_tty_attach_cable(struct ircomm_tty_cb *self) | |||
163 | */ | 161 | */ |
164 | void ircomm_tty_detach_cable(struct ircomm_tty_cb *self) | 162 | void ircomm_tty_detach_cable(struct ircomm_tty_cb *self) |
165 | { | 163 | { |
166 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
167 | |||
168 | IRDA_ASSERT(self != NULL, return;); | 164 | IRDA_ASSERT(self != NULL, return;); |
169 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 165 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
170 | 166 | ||
@@ -212,8 +208,6 @@ static void ircomm_tty_ias_register(struct ircomm_tty_cb *self) | |||
212 | __u8 oct_seq[6]; | 208 | __u8 oct_seq[6]; |
213 | __u16 hints; | 209 | __u16 hints; |
214 | 210 | ||
215 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
216 | |||
217 | IRDA_ASSERT(self != NULL, return;); | 211 | IRDA_ASSERT(self != NULL, return;); |
218 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 212 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
219 | 213 | ||
@@ -313,17 +307,17 @@ int ircomm_tty_send_initial_parameters(struct ircomm_tty_cb *self) | |||
313 | * Set default values, but only if the application for some reason | 307 | * Set default values, but only if the application for some reason |
314 | * haven't set them already | 308 | * haven't set them already |
315 | */ | 309 | */ |
316 | IRDA_DEBUG(2, "%s(), data-rate = %d\n", __func__ , | 310 | pr_debug("%s(), data-rate = %d\n", __func__ , |
317 | self->settings.data_rate); | 311 | self->settings.data_rate); |
318 | if (!self->settings.data_rate) | 312 | if (!self->settings.data_rate) |
319 | self->settings.data_rate = 9600; | 313 | self->settings.data_rate = 9600; |
320 | IRDA_DEBUG(2, "%s(), data-format = %d\n", __func__ , | 314 | pr_debug("%s(), data-format = %d\n", __func__ , |
321 | self->settings.data_format); | 315 | self->settings.data_format); |
322 | if (!self->settings.data_format) | 316 | if (!self->settings.data_format) |
323 | self->settings.data_format = IRCOMM_WSIZE_8; /* 8N1 */ | 317 | self->settings.data_format = IRCOMM_WSIZE_8; /* 8N1 */ |
324 | 318 | ||
325 | IRDA_DEBUG(2, "%s(), flow-control = %d\n", __func__ , | 319 | pr_debug("%s(), flow-control = %d\n", __func__ , |
326 | self->settings.flow_control); | 320 | self->settings.flow_control); |
327 | /*self->settings.flow_control = IRCOMM_RTS_CTS_IN|IRCOMM_RTS_CTS_OUT;*/ | 321 | /*self->settings.flow_control = IRCOMM_RTS_CTS_IN|IRCOMM_RTS_CTS_OUT;*/ |
328 | 322 | ||
329 | /* Do not set delta values for the initial parameters */ | 323 | /* Do not set delta values for the initial parameters */ |
@@ -367,8 +361,6 @@ static void ircomm_tty_discovery_indication(discinfo_t *discovery, | |||
367 | struct ircomm_tty_cb *self; | 361 | struct ircomm_tty_cb *self; |
368 | struct ircomm_tty_info info; | 362 | struct ircomm_tty_info info; |
369 | 363 | ||
370 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
371 | |||
372 | /* Important note : | 364 | /* Important note : |
373 | * We need to drop all passive discoveries. | 365 | * We need to drop all passive discoveries. |
374 | * The LSAP management of IrComm is deficient and doesn't deal | 366 | * The LSAP management of IrComm is deficient and doesn't deal |
@@ -404,8 +396,6 @@ void ircomm_tty_disconnect_indication(void *instance, void *sap, | |||
404 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; | 396 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; |
405 | struct tty_struct *tty; | 397 | struct tty_struct *tty; |
406 | 398 | ||
407 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
408 | |||
409 | IRDA_ASSERT(self != NULL, return;); | 399 | IRDA_ASSERT(self != NULL, return;); |
410 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 400 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
411 | 401 | ||
@@ -436,8 +426,6 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id, | |||
436 | { | 426 | { |
437 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) priv; | 427 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) priv; |
438 | 428 | ||
439 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
440 | |||
441 | IRDA_ASSERT(self != NULL, return;); | 429 | IRDA_ASSERT(self != NULL, return;); |
442 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 430 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
443 | 431 | ||
@@ -447,13 +435,13 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id, | |||
447 | 435 | ||
448 | /* Check if request succeeded */ | 436 | /* Check if request succeeded */ |
449 | if (result != IAS_SUCCESS) { | 437 | if (result != IAS_SUCCESS) { |
450 | IRDA_DEBUG(4, "%s(), got NULL value!\n", __func__ ); | 438 | pr_debug("%s(), got NULL value!\n", __func__); |
451 | return; | 439 | return; |
452 | } | 440 | } |
453 | 441 | ||
454 | switch (value->type) { | 442 | switch (value->type) { |
455 | case IAS_OCT_SEQ: | 443 | case IAS_OCT_SEQ: |
456 | IRDA_DEBUG(2, "%s(), got octet sequence\n", __func__ ); | 444 | pr_debug("%s(), got octet sequence\n", __func__); |
457 | 445 | ||
458 | irda_param_extract_all(self, value->t.oct_seq, value->len, | 446 | irda_param_extract_all(self, value->t.oct_seq, value->len, |
459 | &ircomm_param_info); | 447 | &ircomm_param_info); |
@@ -463,21 +451,21 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id, | |||
463 | break; | 451 | break; |
464 | case IAS_INTEGER: | 452 | case IAS_INTEGER: |
465 | /* Got LSAP selector */ | 453 | /* Got LSAP selector */ |
466 | IRDA_DEBUG(2, "%s(), got lsapsel = %d\n", __func__ , | 454 | pr_debug("%s(), got lsapsel = %d\n", __func__ , |
467 | value->t.integer); | 455 | value->t.integer); |
468 | 456 | ||
469 | if (value->t.integer == -1) { | 457 | if (value->t.integer == -1) { |
470 | IRDA_DEBUG(0, "%s(), invalid value!\n", __func__ ); | 458 | pr_debug("%s(), invalid value!\n", __func__); |
471 | } else | 459 | } else |
472 | self->dlsap_sel = value->t.integer; | 460 | self->dlsap_sel = value->t.integer; |
473 | 461 | ||
474 | ircomm_tty_do_event(self, IRCOMM_TTY_GOT_LSAPSEL, NULL, NULL); | 462 | ircomm_tty_do_event(self, IRCOMM_TTY_GOT_LSAPSEL, NULL, NULL); |
475 | break; | 463 | break; |
476 | case IAS_MISSING: | 464 | case IAS_MISSING: |
477 | IRDA_DEBUG(0, "%s(), got IAS_MISSING\n", __func__ ); | 465 | pr_debug("%s(), got IAS_MISSING\n", __func__); |
478 | break; | 466 | break; |
479 | default: | 467 | default: |
480 | IRDA_DEBUG(0, "%s(), got unknown type!\n", __func__ ); | 468 | pr_debug("%s(), got unknown type!\n", __func__); |
481 | break; | 469 | break; |
482 | } | 470 | } |
483 | irias_delete_value(value); | 471 | irias_delete_value(value); |
@@ -497,8 +485,6 @@ void ircomm_tty_connect_confirm(void *instance, void *sap, | |||
497 | { | 485 | { |
498 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; | 486 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; |
499 | 487 | ||
500 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
501 | |||
502 | IRDA_ASSERT(self != NULL, return;); | 488 | IRDA_ASSERT(self != NULL, return;); |
503 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 489 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
504 | 490 | ||
@@ -528,8 +514,6 @@ void ircomm_tty_connect_indication(void *instance, void *sap, | |||
528 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; | 514 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; |
529 | int clen; | 515 | int clen; |
530 | 516 | ||
531 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
532 | |||
533 | IRDA_ASSERT(self != NULL, return;); | 517 | IRDA_ASSERT(self != NULL, return;); |
534 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 518 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
535 | 519 | ||
@@ -559,8 +543,6 @@ void ircomm_tty_link_established(struct ircomm_tty_cb *self) | |||
559 | { | 543 | { |
560 | struct tty_struct *tty; | 544 | struct tty_struct *tty; |
561 | 545 | ||
562 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
563 | |||
564 | IRDA_ASSERT(self != NULL, return;); | 546 | IRDA_ASSERT(self != NULL, return;); |
565 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 547 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
566 | 548 | ||
@@ -578,10 +560,10 @@ void ircomm_tty_link_established(struct ircomm_tty_cb *self) | |||
578 | */ | 560 | */ |
579 | if (tty_port_cts_enabled(&self->port) && | 561 | if (tty_port_cts_enabled(&self->port) && |
580 | ((self->settings.dce & IRCOMM_CTS) == 0)) { | 562 | ((self->settings.dce & IRCOMM_CTS) == 0)) { |
581 | IRDA_DEBUG(0, "%s(), waiting for CTS ...\n", __func__ ); | 563 | pr_debug("%s(), waiting for CTS ...\n", __func__); |
582 | goto put; | 564 | goto put; |
583 | } else { | 565 | } else { |
584 | IRDA_DEBUG(1, "%s(), starting hardware!\n", __func__ ); | 566 | pr_debug("%s(), starting hardware!\n", __func__); |
585 | 567 | ||
586 | tty->hw_stopped = 0; | 568 | tty->hw_stopped = 0; |
587 | 569 | ||
@@ -621,8 +603,6 @@ static void ircomm_tty_watchdog_timer_expired(void *data) | |||
621 | { | 603 | { |
622 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) data; | 604 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) data; |
623 | 605 | ||
624 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
625 | |||
626 | IRDA_ASSERT(self != NULL, return;); | 606 | IRDA_ASSERT(self != NULL, return;); |
627 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 607 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
628 | 608 | ||
@@ -642,8 +622,8 @@ int ircomm_tty_do_event(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event, | |||
642 | IRDA_ASSERT(self != NULL, return -1;); | 622 | IRDA_ASSERT(self != NULL, return -1;); |
643 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); | 623 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); |
644 | 624 | ||
645 | IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ , | 625 | pr_debug("%s: state=%s, event=%s\n", __func__ , |
646 | ircomm_tty_state[self->state], ircomm_tty_event[event]); | 626 | ircomm_tty_state[self->state], ircomm_tty_event[event]); |
647 | 627 | ||
648 | return (*state[self->state])(self, event, skb, info); | 628 | return (*state[self->state])(self, event, skb, info); |
649 | } | 629 | } |
@@ -660,8 +640,8 @@ static inline void ircomm_tty_next_state(struct ircomm_tty_cb *self, IRCOMM_TTY_ | |||
660 | IRDA_ASSERT(self != NULL, return;); | 640 | IRDA_ASSERT(self != NULL, return;); |
661 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 641 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
662 | 642 | ||
663 | IRDA_DEBUG(2, "%s: next state=%s, service type=%d\n", __func__ , | 643 | pr_debug("%s: next state=%s, service type=%d\n", __func__ , |
664 | ircomm_tty_state[self->state], self->service_type); | 644 | ircomm_tty_state[self->state], self->service_type); |
665 | */ | 645 | */ |
666 | self->state = state; | 646 | self->state = state; |
667 | } | 647 | } |
@@ -679,8 +659,8 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self, | |||
679 | { | 659 | { |
680 | int ret = 0; | 660 | int ret = 0; |
681 | 661 | ||
682 | IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ , | 662 | pr_debug("%s: state=%s, event=%s\n", __func__ , |
683 | ircomm_tty_state[self->state], ircomm_tty_event[event]); | 663 | ircomm_tty_state[self->state], ircomm_tty_event[event]); |
684 | switch (event) { | 664 | switch (event) { |
685 | case IRCOMM_TTY_ATTACH_CABLE: | 665 | case IRCOMM_TTY_ATTACH_CABLE: |
686 | /* Try to discover any remote devices */ | 666 | /* Try to discover any remote devices */ |
@@ -723,8 +703,8 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self, | |||
723 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); | 703 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); |
724 | break; | 704 | break; |
725 | default: | 705 | default: |
726 | IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ , | 706 | pr_debug("%s(), unknown event: %s\n", __func__ , |
727 | ircomm_tty_event[event]); | 707 | ircomm_tty_event[event]); |
728 | ret = -EINVAL; | 708 | ret = -EINVAL; |
729 | } | 709 | } |
730 | return ret; | 710 | return ret; |
@@ -743,8 +723,8 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self, | |||
743 | { | 723 | { |
744 | int ret = 0; | 724 | int ret = 0; |
745 | 725 | ||
746 | IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ , | 726 | pr_debug("%s: state=%s, event=%s\n", __func__ , |
747 | ircomm_tty_state[self->state], ircomm_tty_event[event]); | 727 | ircomm_tty_state[self->state], ircomm_tty_event[event]); |
748 | 728 | ||
749 | switch (event) { | 729 | switch (event) { |
750 | case IRCOMM_TTY_DISCOVERY_INDICATION: | 730 | case IRCOMM_TTY_DISCOVERY_INDICATION: |
@@ -796,8 +776,8 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self, | |||
796 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); | 776 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); |
797 | break; | 777 | break; |
798 | default: | 778 | default: |
799 | IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ , | 779 | pr_debug("%s(), unknown event: %s\n", __func__ , |
800 | ircomm_tty_event[event]); | 780 | ircomm_tty_event[event]); |
801 | ret = -EINVAL; | 781 | ret = -EINVAL; |
802 | } | 782 | } |
803 | return ret; | 783 | return ret; |
@@ -816,8 +796,8 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self, | |||
816 | { | 796 | { |
817 | int ret = 0; | 797 | int ret = 0; |
818 | 798 | ||
819 | IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ , | 799 | pr_debug("%s: state=%s, event=%s\n", __func__ , |
820 | ircomm_tty_state[self->state], ircomm_tty_event[event]); | 800 | ircomm_tty_state[self->state], ircomm_tty_event[event]); |
821 | 801 | ||
822 | switch (event) { | 802 | switch (event) { |
823 | case IRCOMM_TTY_GOT_PARAMETERS: | 803 | case IRCOMM_TTY_GOT_PARAMETERS: |
@@ -854,8 +834,8 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self, | |||
854 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); | 834 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); |
855 | break; | 835 | break; |
856 | default: | 836 | default: |
857 | IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ , | 837 | pr_debug("%s(), unknown event: %s\n", __func__ , |
858 | ircomm_tty_event[event]); | 838 | ircomm_tty_event[event]); |
859 | ret = -EINVAL; | 839 | ret = -EINVAL; |
860 | } | 840 | } |
861 | return ret; | 841 | return ret; |
@@ -874,8 +854,8 @@ static int ircomm_tty_state_query_lsap_sel(struct ircomm_tty_cb *self, | |||
874 | { | 854 | { |
875 | int ret = 0; | 855 | int ret = 0; |
876 | 856 | ||
877 | IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ , | 857 | pr_debug("%s: state=%s, event=%s\n", __func__ , |
878 | ircomm_tty_state[self->state], ircomm_tty_event[event]); | 858 | ircomm_tty_state[self->state], ircomm_tty_event[event]); |
879 | 859 | ||
880 | switch (event) { | 860 | switch (event) { |
881 | case IRCOMM_TTY_GOT_LSAPSEL: | 861 | case IRCOMM_TTY_GOT_LSAPSEL: |
@@ -903,8 +883,8 @@ static int ircomm_tty_state_query_lsap_sel(struct ircomm_tty_cb *self, | |||
903 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); | 883 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); |
904 | break; | 884 | break; |
905 | default: | 885 | default: |
906 | IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ , | 886 | pr_debug("%s(), unknown event: %s\n", __func__ , |
907 | ircomm_tty_event[event]); | 887 | ircomm_tty_event[event]); |
908 | ret = -EINVAL; | 888 | ret = -EINVAL; |
909 | } | 889 | } |
910 | return ret; | 890 | return ret; |
@@ -923,8 +903,8 @@ static int ircomm_tty_state_setup(struct ircomm_tty_cb *self, | |||
923 | { | 903 | { |
924 | int ret = 0; | 904 | int ret = 0; |
925 | 905 | ||
926 | IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ , | 906 | pr_debug("%s: state=%s, event=%s\n", __func__ , |
927 | ircomm_tty_state[self->state], ircomm_tty_event[event]); | 907 | ircomm_tty_state[self->state], ircomm_tty_event[event]); |
928 | 908 | ||
929 | switch (event) { | 909 | switch (event) { |
930 | case IRCOMM_TTY_CONNECT_CONFIRM: | 910 | case IRCOMM_TTY_CONNECT_CONFIRM: |
@@ -957,8 +937,8 @@ static int ircomm_tty_state_setup(struct ircomm_tty_cb *self, | |||
957 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); | 937 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); |
958 | break; | 938 | break; |
959 | default: | 939 | default: |
960 | IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ , | 940 | pr_debug("%s(), unknown event: %s\n", __func__ , |
961 | ircomm_tty_event[event]); | 941 | ircomm_tty_event[event]); |
962 | ret = -EINVAL; | 942 | ret = -EINVAL; |
963 | } | 943 | } |
964 | return ret; | 944 | return ret; |
@@ -995,13 +975,13 @@ static int ircomm_tty_state_ready(struct ircomm_tty_cb *self, | |||
995 | self->settings.dce = IRCOMM_DELTA_CD; | 975 | self->settings.dce = IRCOMM_DELTA_CD; |
996 | ircomm_tty_check_modem_status(self); | 976 | ircomm_tty_check_modem_status(self); |
997 | } else { | 977 | } else { |
998 | IRDA_DEBUG(0, "%s(), hanging up!\n", __func__ ); | 978 | pr_debug("%s(), hanging up!\n", __func__); |
999 | tty_port_tty_hangup(&self->port, false); | 979 | tty_port_tty_hangup(&self->port, false); |
1000 | } | 980 | } |
1001 | break; | 981 | break; |
1002 | default: | 982 | default: |
1003 | IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ , | 983 | pr_debug("%s(), unknown event: %s\n", __func__ , |
1004 | ircomm_tty_event[event]); | 984 | ircomm_tty_event[event]); |
1005 | ret = -EINVAL; | 985 | ret = -EINVAL; |
1006 | } | 986 | } |
1007 | return ret; | 987 | return ret; |
diff --git a/net/irda/ircomm/ircomm_tty_ioctl.c b/net/irda/ircomm/ircomm_tty_ioctl.c index 7eb06e08f8ed..75ccdbd0728e 100644 --- a/net/irda/ircomm/ircomm_tty_ioctl.c +++ b/net/irda/ircomm/ircomm_tty_ioctl.c | |||
@@ -56,8 +56,6 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self, | |||
56 | unsigned int cflag, cval; | 56 | unsigned int cflag, cval; |
57 | int baud; | 57 | int baud; |
58 | 58 | ||
59 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
60 | |||
61 | if (!self->ircomm) | 59 | if (!self->ircomm) |
62 | return; | 60 | return; |
63 | 61 | ||
@@ -150,8 +148,6 @@ void ircomm_tty_set_termios(struct tty_struct *tty, | |||
150 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; | 148 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; |
151 | unsigned int cflag = tty->termios.c_cflag; | 149 | unsigned int cflag = tty->termios.c_cflag; |
152 | 150 | ||
153 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
154 | |||
155 | if ((cflag == old_termios->c_cflag) && | 151 | if ((cflag == old_termios->c_cflag) && |
156 | (RELEVANT_IFLAG(tty->termios.c_iflag) == | 152 | (RELEVANT_IFLAG(tty->termios.c_iflag) == |
157 | RELEVANT_IFLAG(old_termios->c_iflag))) | 153 | RELEVANT_IFLAG(old_termios->c_iflag))) |
@@ -199,8 +195,6 @@ int ircomm_tty_tiocmget(struct tty_struct *tty) | |||
199 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; | 195 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; |
200 | unsigned int result; | 196 | unsigned int result; |
201 | 197 | ||
202 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
203 | |||
204 | if (tty->flags & (1 << TTY_IO_ERROR)) | 198 | if (tty->flags & (1 << TTY_IO_ERROR)) |
205 | return -EIO; | 199 | return -EIO; |
206 | 200 | ||
@@ -224,8 +218,6 @@ int ircomm_tty_tiocmset(struct tty_struct *tty, | |||
224 | { | 218 | { |
225 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; | 219 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; |
226 | 220 | ||
227 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
228 | |||
229 | if (tty->flags & (1 << TTY_IO_ERROR)) | 221 | if (tty->flags & (1 << TTY_IO_ERROR)) |
230 | return -EIO; | 222 | return -EIO; |
231 | 223 | ||
@@ -266,8 +258,6 @@ static int ircomm_tty_get_serial_info(struct ircomm_tty_cb *self, | |||
266 | if (!retinfo) | 258 | if (!retinfo) |
267 | return -EFAULT; | 259 | return -EFAULT; |
268 | 260 | ||
269 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
270 | |||
271 | memset(&info, 0, sizeof(info)); | 261 | memset(&info, 0, sizeof(info)); |
272 | info.line = self->line; | 262 | info.line = self->line; |
273 | info.flags = self->port.flags; | 263 | info.flags = self->port.flags; |
@@ -302,8 +292,6 @@ static int ircomm_tty_set_serial_info(struct ircomm_tty_cb *self, | |||
302 | struct serial_struct new_serial; | 292 | struct serial_struct new_serial; |
303 | struct ircomm_tty_cb old_state, *state; | 293 | struct ircomm_tty_cb old_state, *state; |
304 | 294 | ||
305 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
306 | |||
307 | if (copy_from_user(&new_serial,new_info,sizeof(new_serial))) | 295 | if (copy_from_user(&new_serial,new_info,sizeof(new_serial))) |
308 | return -EFAULT; | 296 | return -EFAULT; |
309 | 297 | ||
@@ -376,8 +364,6 @@ int ircomm_tty_ioctl(struct tty_struct *tty, | |||
376 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; | 364 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; |
377 | int ret = 0; | 365 | int ret = 0; |
378 | 366 | ||
379 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
380 | |||
381 | if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && | 367 | if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && |
382 | (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) && | 368 | (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) && |
383 | (cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) { | 369 | (cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) { |
@@ -393,11 +379,11 @@ int ircomm_tty_ioctl(struct tty_struct *tty, | |||
393 | ret = ircomm_tty_set_serial_info(self, (struct serial_struct __user *) arg); | 379 | ret = ircomm_tty_set_serial_info(self, (struct serial_struct __user *) arg); |
394 | break; | 380 | break; |
395 | case TIOCMIWAIT: | 381 | case TIOCMIWAIT: |
396 | IRDA_DEBUG(0, "(), TIOCMIWAIT, not impl!\n"); | 382 | pr_debug("(), TIOCMIWAIT, not impl!\n"); |
397 | break; | 383 | break; |
398 | 384 | ||
399 | case TIOCGICOUNT: | 385 | case TIOCGICOUNT: |
400 | IRDA_DEBUG(0, "%s(), TIOCGICOUNT not impl!\n", __func__ ); | 386 | pr_debug("%s(), TIOCGICOUNT not impl!\n", __func__); |
401 | #if 0 | 387 | #if 0 |
402 | save_flags(flags); cli(); | 388 | save_flags(flags); cli(); |
403 | cnow = driver->icount; | 389 | cnow = driver->icount; |
diff --git a/net/irda/irda_device.c b/net/irda/irda_device.c index 96788db1dc31..856736656a30 100644 --- a/net/irda/irda_device.c +++ b/net/irda/irda_device.c | |||
@@ -90,8 +90,6 @@ static void leftover_dongle(void *arg) | |||
90 | 90 | ||
91 | void irda_device_cleanup(void) | 91 | void irda_device_cleanup(void) |
92 | { | 92 | { |
93 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
94 | |||
95 | hashbin_delete(tasks, (FREE_FUNC) __irda_task_delete); | 93 | hashbin_delete(tasks, (FREE_FUNC) __irda_task_delete); |
96 | 94 | ||
97 | hashbin_delete(dongles, leftover_dongle); | 95 | hashbin_delete(dongles, leftover_dongle); |
@@ -107,7 +105,7 @@ void irda_device_set_media_busy(struct net_device *dev, int status) | |||
107 | { | 105 | { |
108 | struct irlap_cb *self; | 106 | struct irlap_cb *self; |
109 | 107 | ||
110 | IRDA_DEBUG(4, "%s(%s)\n", __func__, status ? "TRUE" : "FALSE"); | 108 | pr_debug("%s(%s)\n", __func__, status ? "TRUE" : "FALSE"); |
111 | 109 | ||
112 | self = (struct irlap_cb *) dev->atalk_ptr; | 110 | self = (struct irlap_cb *) dev->atalk_ptr; |
113 | 111 | ||
@@ -127,7 +125,7 @@ void irda_device_set_media_busy(struct net_device *dev, int status) | |||
127 | irlap_start_mbusy_timer(self, SMALLBUSY_TIMEOUT); | 125 | irlap_start_mbusy_timer(self, SMALLBUSY_TIMEOUT); |
128 | else | 126 | else |
129 | irlap_start_mbusy_timer(self, MEDIABUSY_TIMEOUT); | 127 | irlap_start_mbusy_timer(self, MEDIABUSY_TIMEOUT); |
130 | IRDA_DEBUG( 4, "Media busy!\n"); | 128 | pr_debug("Media busy!\n"); |
131 | } else { | 129 | } else { |
132 | self->media_busy = FALSE; | 130 | self->media_busy = FALSE; |
133 | irlap_stop_mbusy_timer(self); | 131 | irlap_stop_mbusy_timer(self); |
@@ -147,8 +145,6 @@ int irda_device_is_receiving(struct net_device *dev) | |||
147 | struct if_irda_req req; | 145 | struct if_irda_req req; |
148 | int ret; | 146 | int ret; |
149 | 147 | ||
150 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
151 | |||
152 | if (!dev->netdev_ops->ndo_do_ioctl) { | 148 | if (!dev->netdev_ops->ndo_do_ioctl) { |
153 | net_err_ratelimited("%s: do_ioctl not impl. by device driver\n", | 149 | net_err_ratelimited("%s: do_ioctl not impl. by device driver\n", |
154 | __func__); | 150 | __func__); |
@@ -192,8 +188,6 @@ static int irda_task_kick(struct irda_task *task) | |||
192 | int count = 0; | 188 | int count = 0; |
193 | int timeout; | 189 | int timeout; |
194 | 190 | ||
195 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
196 | |||
197 | IRDA_ASSERT(task != NULL, return -1;); | 191 | IRDA_ASSERT(task != NULL, return -1;); |
198 | IRDA_ASSERT(task->magic == IRDA_TASK_MAGIC, return -1;); | 192 | IRDA_ASSERT(task->magic == IRDA_TASK_MAGIC, return -1;); |
199 | 193 | ||
@@ -241,8 +235,8 @@ static int irda_task_kick(struct irda_task *task) | |||
241 | irda_task_timer_expired); | 235 | irda_task_timer_expired); |
242 | finished = FALSE; | 236 | finished = FALSE; |
243 | } else { | 237 | } else { |
244 | IRDA_DEBUG(0, "%s(), not finished, and no timeout!\n", | 238 | pr_debug("%s(), not finished, and no timeout!\n", |
245 | __func__); | 239 | __func__); |
246 | finished = FALSE; | 240 | finished = FALSE; |
247 | } | 241 | } |
248 | 242 | ||
@@ -259,8 +253,6 @@ static void irda_task_timer_expired(void *data) | |||
259 | { | 253 | { |
260 | struct irda_task *task; | 254 | struct irda_task *task; |
261 | 255 | ||
262 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
263 | |||
264 | task = data; | 256 | task = data; |
265 | 257 | ||
266 | irda_task_kick(task); | 258 | irda_task_kick(task); |
diff --git a/net/irda/iriap.c b/net/irda/iriap.c index c2ea3443f669..7a93cdd1ac31 100644 --- a/net/irda/iriap.c +++ b/net/irda/iriap.c | |||
@@ -145,7 +145,7 @@ int __init iriap_init(void) | |||
145 | */ | 145 | */ |
146 | server = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL); | 146 | server = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL); |
147 | if (!server) { | 147 | if (!server) { |
148 | IRDA_DEBUG(0, "%s(), unable to open server\n", __func__); | 148 | pr_debug("%s(), unable to open server\n", __func__); |
149 | return -1; | 149 | return -1; |
150 | } | 150 | } |
151 | iriap_register_lsap(server, LSAP_IAS, IAS_SERVER); | 151 | iriap_register_lsap(server, LSAP_IAS, IAS_SERVER); |
@@ -177,8 +177,6 @@ struct iriap_cb *iriap_open(__u8 slsap_sel, int mode, void *priv, | |||
177 | { | 177 | { |
178 | struct iriap_cb *self; | 178 | struct iriap_cb *self; |
179 | 179 | ||
180 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
181 | |||
182 | self = kzalloc(sizeof(*self), GFP_ATOMIC); | 180 | self = kzalloc(sizeof(*self), GFP_ATOMIC); |
183 | if (!self) | 181 | if (!self) |
184 | return NULL; | 182 | return NULL; |
@@ -221,8 +219,6 @@ EXPORT_SYMBOL(iriap_open); | |||
221 | */ | 219 | */ |
222 | static void __iriap_close(struct iriap_cb *self) | 220 | static void __iriap_close(struct iriap_cb *self) |
223 | { | 221 | { |
224 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
225 | |||
226 | IRDA_ASSERT(self != NULL, return;); | 222 | IRDA_ASSERT(self != NULL, return;); |
227 | IRDA_ASSERT(self->magic == IAS_MAGIC, return;); | 223 | IRDA_ASSERT(self->magic == IAS_MAGIC, return;); |
228 | 224 | ||
@@ -245,8 +241,6 @@ void iriap_close(struct iriap_cb *self) | |||
245 | { | 241 | { |
246 | struct iriap_cb *entry; | 242 | struct iriap_cb *entry; |
247 | 243 | ||
248 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
249 | |||
250 | IRDA_ASSERT(self != NULL, return;); | 244 | IRDA_ASSERT(self != NULL, return;); |
251 | IRDA_ASSERT(self->magic == IAS_MAGIC, return;); | 245 | IRDA_ASSERT(self->magic == IAS_MAGIC, return;); |
252 | 246 | ||
@@ -266,8 +260,6 @@ static int iriap_register_lsap(struct iriap_cb *self, __u8 slsap_sel, int mode) | |||
266 | { | 260 | { |
267 | notify_t notify; | 261 | notify_t notify; |
268 | 262 | ||
269 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
270 | |||
271 | irda_notify_init(¬ify); | 263 | irda_notify_init(¬ify); |
272 | notify.connect_confirm = iriap_connect_confirm; | 264 | notify.connect_confirm = iriap_connect_confirm; |
273 | notify.connect_indication = iriap_connect_indication; | 265 | notify.connect_indication = iriap_connect_indication; |
@@ -302,8 +294,8 @@ static void iriap_disconnect_indication(void *instance, void *sap, | |||
302 | { | 294 | { |
303 | struct iriap_cb *self; | 295 | struct iriap_cb *self; |
304 | 296 | ||
305 | IRDA_DEBUG(4, "%s(), reason=%s [%d]\n", __func__, | 297 | pr_debug("%s(), reason=%s [%d]\n", __func__, |
306 | irlmp_reason_str(reason), reason); | 298 | irlmp_reason_str(reason), reason); |
307 | 299 | ||
308 | self = instance; | 300 | self = instance; |
309 | 301 | ||
@@ -319,7 +311,7 @@ static void iriap_disconnect_indication(void *instance, void *sap, | |||
319 | dev_kfree_skb(skb); | 311 | dev_kfree_skb(skb); |
320 | 312 | ||
321 | if (self->mode == IAS_CLIENT) { | 313 | if (self->mode == IAS_CLIENT) { |
322 | IRDA_DEBUG(4, "%s(), disconnect as client\n", __func__); | 314 | pr_debug("%s(), disconnect as client\n", __func__); |
323 | 315 | ||
324 | 316 | ||
325 | iriap_do_client_event(self, IAP_LM_DISCONNECT_INDICATION, | 317 | iriap_do_client_event(self, IAP_LM_DISCONNECT_INDICATION, |
@@ -332,7 +324,7 @@ static void iriap_disconnect_indication(void *instance, void *sap, | |||
332 | if (self->confirm) | 324 | if (self->confirm) |
333 | self->confirm(IAS_DISCONNECT, 0, NULL, self->priv); | 325 | self->confirm(IAS_DISCONNECT, 0, NULL, self->priv); |
334 | } else { | 326 | } else { |
335 | IRDA_DEBUG(4, "%s(), disconnect as server\n", __func__); | 327 | pr_debug("%s(), disconnect as server\n", __func__); |
336 | iriap_do_server_event(self, IAP_LM_DISCONNECT_INDICATION, | 328 | iriap_do_server_event(self, IAP_LM_DISCONNECT_INDICATION, |
337 | NULL); | 329 | NULL); |
338 | iriap_close(self); | 330 | iriap_close(self); |
@@ -346,16 +338,13 @@ static void iriap_disconnect_request(struct iriap_cb *self) | |||
346 | { | 338 | { |
347 | struct sk_buff *tx_skb; | 339 | struct sk_buff *tx_skb; |
348 | 340 | ||
349 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
350 | |||
351 | IRDA_ASSERT(self != NULL, return;); | 341 | IRDA_ASSERT(self != NULL, return;); |
352 | IRDA_ASSERT(self->magic == IAS_MAGIC, return;); | 342 | IRDA_ASSERT(self->magic == IAS_MAGIC, return;); |
353 | 343 | ||
354 | tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); | 344 | tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); |
355 | if (tx_skb == NULL) { | 345 | if (tx_skb == NULL) { |
356 | IRDA_DEBUG(0, | 346 | pr_debug("%s(), Could not allocate an sk_buff of length %d\n", |
357 | "%s(), Could not allocate an sk_buff of length %d\n", | 347 | __func__, LMP_MAX_HEADER); |
358 | __func__, LMP_MAX_HEADER); | ||
359 | return; | 348 | return; |
360 | } | 349 | } |
361 | 350 | ||
@@ -460,14 +449,14 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self, | |||
460 | len = get_unaligned_be16(fp + n); | 449 | len = get_unaligned_be16(fp + n); |
461 | n += 2; | 450 | n += 2; |
462 | 451 | ||
463 | IRDA_DEBUG(4, "%s(), len=%d\n", __func__, len); | 452 | pr_debug("%s(), len=%d\n", __func__, len); |
464 | 453 | ||
465 | /* Get object ID, MSB first */ | 454 | /* Get object ID, MSB first */ |
466 | obj_id = get_unaligned_be16(fp + n); | 455 | obj_id = get_unaligned_be16(fp + n); |
467 | n += 2; | 456 | n += 2; |
468 | 457 | ||
469 | type = fp[n++]; | 458 | type = fp[n++]; |
470 | IRDA_DEBUG(4, "%s(), Value type = %d\n", __func__, type); | 459 | pr_debug("%s(), Value type = %d\n", __func__, type); |
471 | 460 | ||
472 | switch (type) { | 461 | switch (type) { |
473 | case IAS_INTEGER: | 462 | case IAS_INTEGER: |
@@ -476,7 +465,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self, | |||
476 | value = irias_new_integer_value(tmp_cpu32); | 465 | value = irias_new_integer_value(tmp_cpu32); |
477 | 466 | ||
478 | /* Legal values restricted to 0x01-0x6f, page 15 irttp */ | 467 | /* Legal values restricted to 0x01-0x6f, page 15 irttp */ |
479 | IRDA_DEBUG(4, "%s(), lsap=%d\n", __func__, value->t.integer); | 468 | pr_debug("%s(), lsap=%d\n", __func__, value->t.integer); |
480 | break; | 469 | break; |
481 | case IAS_STRING: | 470 | case IAS_STRING: |
482 | charset = fp[n++]; | 471 | charset = fp[n++]; |
@@ -495,11 +484,11 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self, | |||
495 | /* case CS_ISO_8859_9: */ | 484 | /* case CS_ISO_8859_9: */ |
496 | /* case CS_UNICODE: */ | 485 | /* case CS_UNICODE: */ |
497 | default: | 486 | default: |
498 | IRDA_DEBUG(0, "%s(), charset [%d] %s, not supported\n", | 487 | pr_debug("%s(), charset [%d] %s, not supported\n", |
499 | __func__, charset, | 488 | __func__, charset, |
500 | charset < ARRAY_SIZE(ias_charset_types) ? | 489 | charset < ARRAY_SIZE(ias_charset_types) ? |
501 | ias_charset_types[charset] : | 490 | ias_charset_types[charset] : |
502 | "(unknown)"); | 491 | "(unknown)"); |
503 | 492 | ||
504 | /* Aborting, close connection! */ | 493 | /* Aborting, close connection! */ |
505 | iriap_disconnect_request(self); | 494 | iriap_disconnect_request(self); |
@@ -507,12 +496,12 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self, | |||
507 | /* break; */ | 496 | /* break; */ |
508 | } | 497 | } |
509 | value_len = fp[n++]; | 498 | value_len = fp[n++]; |
510 | IRDA_DEBUG(4, "%s(), strlen=%d\n", __func__, value_len); | 499 | pr_debug("%s(), strlen=%d\n", __func__, value_len); |
511 | 500 | ||
512 | /* Make sure the string is null-terminated */ | 501 | /* Make sure the string is null-terminated */ |
513 | if (n + value_len < skb->len) | 502 | if (n + value_len < skb->len) |
514 | fp[n + value_len] = 0x00; | 503 | fp[n + value_len] = 0x00; |
515 | IRDA_DEBUG(4, "Got string %s\n", fp+n); | 504 | pr_debug("Got string %s\n", fp+n); |
516 | 505 | ||
517 | /* Will truncate to IAS_MAX_STRING bytes */ | 506 | /* Will truncate to IAS_MAX_STRING bytes */ |
518 | value = irias_new_string_value(fp+n); | 507 | value = irias_new_string_value(fp+n); |
@@ -538,7 +527,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self, | |||
538 | if (self->confirm) | 527 | if (self->confirm) |
539 | self->confirm(IAS_SUCCESS, obj_id, value, self->priv); | 528 | self->confirm(IAS_SUCCESS, obj_id, value, self->priv); |
540 | else { | 529 | else { |
541 | IRDA_DEBUG(0, "%s(), missing handler!\n", __func__); | 530 | pr_debug("%s(), missing handler!\n", __func__); |
542 | irias_delete_value(value); | 531 | irias_delete_value(value); |
543 | } | 532 | } |
544 | } | 533 | } |
@@ -560,8 +549,6 @@ static void iriap_getvaluebyclass_response(struct iriap_cb *self, | |||
560 | __be16 tmp_be16; | 549 | __be16 tmp_be16; |
561 | __u8 *fp; | 550 | __u8 *fp; |
562 | 551 | ||
563 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
564 | |||
565 | IRDA_ASSERT(self != NULL, return;); | 552 | IRDA_ASSERT(self != NULL, return;); |
566 | IRDA_ASSERT(self->magic == IAS_MAGIC, return;); | 553 | IRDA_ASSERT(self->magic == IAS_MAGIC, return;); |
567 | IRDA_ASSERT(value != NULL, return;); | 554 | IRDA_ASSERT(value != NULL, return;); |
@@ -622,12 +609,12 @@ static void iriap_getvaluebyclass_response(struct iriap_cb *self, | |||
622 | memcpy(fp+n, value->t.oct_seq, value->len); n+=value->len; | 609 | memcpy(fp+n, value->t.oct_seq, value->len); n+=value->len; |
623 | break; | 610 | break; |
624 | case IAS_MISSING: | 611 | case IAS_MISSING: |
625 | IRDA_DEBUG( 3, "%s: sending IAS_MISSING\n", __func__); | 612 | pr_debug("%s: sending IAS_MISSING\n", __func__); |
626 | skb_put(tx_skb, 1); | 613 | skb_put(tx_skb, 1); |
627 | fp[n++] = value->type; | 614 | fp[n++] = value->type; |
628 | break; | 615 | break; |
629 | default: | 616 | default: |
630 | IRDA_DEBUG(0, "%s(), type not implemented!\n", __func__); | 617 | pr_debug("%s(), type not implemented!\n", __func__); |
631 | break; | 618 | break; |
632 | } | 619 | } |
633 | iriap_do_r_connect_event(self, IAP_CALL_RESPONSE, tx_skb); | 620 | iriap_do_r_connect_event(self, IAP_CALL_RESPONSE, tx_skb); |
@@ -654,8 +641,6 @@ static void iriap_getvaluebyclass_indication(struct iriap_cb *self, | |||
654 | __u8 *fp; | 641 | __u8 *fp; |
655 | int n; | 642 | int n; |
656 | 643 | ||
657 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
658 | |||
659 | IRDA_ASSERT(self != NULL, return;); | 644 | IRDA_ASSERT(self != NULL, return;); |
660 | IRDA_ASSERT(self->magic == IAS_MAGIC, return;); | 645 | IRDA_ASSERT(self->magic == IAS_MAGIC, return;); |
661 | IRDA_ASSERT(skb != NULL, return;); | 646 | IRDA_ASSERT(skb != NULL, return;); |
@@ -677,20 +662,20 @@ static void iriap_getvaluebyclass_indication(struct iriap_cb *self, | |||
677 | memcpy(attr, fp+n, attr_len); n+=attr_len; | 662 | memcpy(attr, fp+n, attr_len); n+=attr_len; |
678 | attr[attr_len] = '\0'; | 663 | attr[attr_len] = '\0'; |
679 | 664 | ||
680 | IRDA_DEBUG(4, "LM-IAS: Looking up %s: %s\n", name, attr); | 665 | pr_debug("LM-IAS: Looking up %s: %s\n", name, attr); |
681 | obj = irias_find_object(name); | 666 | obj = irias_find_object(name); |
682 | 667 | ||
683 | if (obj == NULL) { | 668 | if (obj == NULL) { |
684 | IRDA_DEBUG(2, "LM-IAS: Object %s not found\n", name); | 669 | pr_debug("LM-IAS: Object %s not found\n", name); |
685 | iriap_getvaluebyclass_response(self, 0x1235, IAS_CLASS_UNKNOWN, | 670 | iriap_getvaluebyclass_response(self, 0x1235, IAS_CLASS_UNKNOWN, |
686 | &irias_missing); | 671 | &irias_missing); |
687 | return; | 672 | return; |
688 | } | 673 | } |
689 | IRDA_DEBUG(4, "LM-IAS: found %s, id=%d\n", obj->name, obj->id); | 674 | pr_debug("LM-IAS: found %s, id=%d\n", obj->name, obj->id); |
690 | 675 | ||
691 | attrib = irias_find_attrib(obj, attr); | 676 | attrib = irias_find_attrib(obj, attr); |
692 | if (attrib == NULL) { | 677 | if (attrib == NULL) { |
693 | IRDA_DEBUG(2, "LM-IAS: Attribute %s not found\n", attr); | 678 | pr_debug("LM-IAS: Attribute %s not found\n", attr); |
694 | iriap_getvaluebyclass_response(self, obj->id, | 679 | iriap_getvaluebyclass_response(self, obj->id, |
695 | IAS_ATTRIB_UNKNOWN, | 680 | IAS_ATTRIB_UNKNOWN, |
696 | &irias_missing); | 681 | &irias_missing); |
@@ -713,8 +698,6 @@ void iriap_send_ack(struct iriap_cb *self) | |||
713 | struct sk_buff *tx_skb; | 698 | struct sk_buff *tx_skb; |
714 | __u8 *frame; | 699 | __u8 *frame; |
715 | 700 | ||
716 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
717 | |||
718 | IRDA_ASSERT(self != NULL, return;); | 701 | IRDA_ASSERT(self != NULL, return;); |
719 | IRDA_ASSERT(self->magic == IAS_MAGIC, return;); | 702 | IRDA_ASSERT(self->magic == IAS_MAGIC, return;); |
720 | 703 | ||
@@ -744,7 +727,7 @@ void iriap_connect_request(struct iriap_cb *self) | |||
744 | self->saddr, self->daddr, | 727 | self->saddr, self->daddr, |
745 | NULL, NULL); | 728 | NULL, NULL); |
746 | if (ret < 0) { | 729 | if (ret < 0) { |
747 | IRDA_DEBUG(0, "%s(), connect failed!\n", __func__); | 730 | pr_debug("%s(), connect failed!\n", __func__); |
748 | self->confirm(IAS_DISCONNECT, 0, NULL, self->priv); | 731 | self->confirm(IAS_DISCONNECT, 0, NULL, self->priv); |
749 | } | 732 | } |
750 | } | 733 | } |
@@ -792,8 +775,6 @@ static void iriap_connect_indication(void *instance, void *sap, | |||
792 | { | 775 | { |
793 | struct iriap_cb *self, *new; | 776 | struct iriap_cb *self, *new; |
794 | 777 | ||
795 | IRDA_DEBUG(1, "%s()\n", __func__); | ||
796 | |||
797 | self = instance; | 778 | self = instance; |
798 | 779 | ||
799 | IRDA_ASSERT(skb != NULL, return;); | 780 | IRDA_ASSERT(skb != NULL, return;); |
@@ -803,14 +784,14 @@ static void iriap_connect_indication(void *instance, void *sap, | |||
803 | /* Start new server */ | 784 | /* Start new server */ |
804 | new = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL); | 785 | new = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL); |
805 | if (!new) { | 786 | if (!new) { |
806 | IRDA_DEBUG(0, "%s(), open failed\n", __func__); | 787 | pr_debug("%s(), open failed\n", __func__); |
807 | goto out; | 788 | goto out; |
808 | } | 789 | } |
809 | 790 | ||
810 | /* Now attach up the new "socket" */ | 791 | /* Now attach up the new "socket" */ |
811 | new->lsap = irlmp_dup(self->lsap, new); | 792 | new->lsap = irlmp_dup(self->lsap, new); |
812 | if (!new->lsap) { | 793 | if (!new->lsap) { |
813 | IRDA_DEBUG(0, "%s(), dup failed!\n", __func__); | 794 | pr_debug("%s(), dup failed!\n", __func__); |
814 | goto out; | 795 | goto out; |
815 | } | 796 | } |
816 | 797 | ||
@@ -840,8 +821,6 @@ static int iriap_data_indication(void *instance, void *sap, | |||
840 | __u8 *frame; | 821 | __u8 *frame; |
841 | __u8 opcode; | 822 | __u8 opcode; |
842 | 823 | ||
843 | IRDA_DEBUG(3, "%s()\n", __func__); | ||
844 | |||
845 | self = instance; | 824 | self = instance; |
846 | 825 | ||
847 | IRDA_ASSERT(skb != NULL, return 0;); | 826 | IRDA_ASSERT(skb != NULL, return 0;); |
@@ -852,7 +831,7 @@ static int iriap_data_indication(void *instance, void *sap, | |||
852 | 831 | ||
853 | if (self->mode == IAS_SERVER) { | 832 | if (self->mode == IAS_SERVER) { |
854 | /* Call server */ | 833 | /* Call server */ |
855 | IRDA_DEBUG(4, "%s(), Calling server!\n", __func__); | 834 | pr_debug("%s(), Calling server!\n", __func__); |
856 | iriap_do_r_connect_event(self, IAP_RECV_F_LST, skb); | 835 | iriap_do_r_connect_event(self, IAP_RECV_F_LST, skb); |
857 | goto out; | 836 | goto out; |
858 | } | 837 | } |
@@ -865,7 +844,7 @@ static int iriap_data_indication(void *instance, void *sap, | |||
865 | 844 | ||
866 | /* Check for ack frames since they don't contain any data */ | 845 | /* Check for ack frames since they don't contain any data */ |
867 | if (opcode & IAP_ACK) { | 846 | if (opcode & IAP_ACK) { |
868 | IRDA_DEBUG(0, "%s() Got ack frame!\n", __func__); | 847 | pr_debug("%s() Got ack frame!\n", __func__); |
869 | goto out; | 848 | goto out; |
870 | } | 849 | } |
871 | 850 | ||
@@ -873,7 +852,7 @@ static int iriap_data_indication(void *instance, void *sap, | |||
873 | 852 | ||
874 | switch (opcode) { | 853 | switch (opcode) { |
875 | case GET_INFO_BASE: | 854 | case GET_INFO_BASE: |
876 | IRDA_DEBUG(0, "IrLMP GetInfoBaseDetails not implemented!\n"); | 855 | pr_debug("IrLMP GetInfoBaseDetails not implemented!\n"); |
877 | break; | 856 | break; |
878 | case GET_VALUE_BY_CLASS: | 857 | case GET_VALUE_BY_CLASS: |
879 | iriap_do_call_event(self, IAP_RECV_F_LST, NULL); | 858 | iriap_do_call_event(self, IAP_RECV_F_LST, NULL); |
@@ -883,7 +862,7 @@ static int iriap_data_indication(void *instance, void *sap, | |||
883 | iriap_getvaluebyclass_confirm(self, skb); | 862 | iriap_getvaluebyclass_confirm(self, skb); |
884 | break; | 863 | break; |
885 | case IAS_CLASS_UNKNOWN: | 864 | case IAS_CLASS_UNKNOWN: |
886 | IRDA_DEBUG(1, "%s(), No such class!\n", __func__); | 865 | pr_debug("%s(), No such class!\n", __func__); |
887 | /* Finished, close connection! */ | 866 | /* Finished, close connection! */ |
888 | iriap_disconnect_request(self); | 867 | iriap_disconnect_request(self); |
889 | 868 | ||
@@ -896,7 +875,7 @@ static int iriap_data_indication(void *instance, void *sap, | |||
896 | self->priv); | 875 | self->priv); |
897 | break; | 876 | break; |
898 | case IAS_ATTRIB_UNKNOWN: | 877 | case IAS_ATTRIB_UNKNOWN: |
899 | IRDA_DEBUG(1, "%s(), No such attribute!\n", __func__); | 878 | pr_debug("%s(), No such attribute!\n", __func__); |
900 | /* Finished, close connection! */ | 879 | /* Finished, close connection! */ |
901 | iriap_disconnect_request(self); | 880 | iriap_disconnect_request(self); |
902 | 881 | ||
@@ -911,8 +890,8 @@ static int iriap_data_indication(void *instance, void *sap, | |||
911 | } | 890 | } |
912 | break; | 891 | break; |
913 | default: | 892 | default: |
914 | IRDA_DEBUG(0, "%s(), Unknown op-code: %02x\n", __func__, | 893 | pr_debug("%s(), Unknown op-code: %02x\n", __func__, |
915 | opcode); | 894 | opcode); |
916 | break; | 895 | break; |
917 | } | 896 | } |
918 | 897 | ||
@@ -933,8 +912,6 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb) | |||
933 | __u8 *fp; | 912 | __u8 *fp; |
934 | __u8 opcode; | 913 | __u8 opcode; |
935 | 914 | ||
936 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
937 | |||
938 | IRDA_ASSERT(self != NULL, return;); | 915 | IRDA_ASSERT(self != NULL, return;); |
939 | IRDA_ASSERT(self->magic == IAS_MAGIC, return;); | 916 | IRDA_ASSERT(self->magic == IAS_MAGIC, return;); |
940 | IRDA_ASSERT(skb != NULL, return;); | 917 | IRDA_ASSERT(skb != NULL, return;); |
diff --git a/net/irda/iriap_event.c b/net/irda/iriap_event.c index 09de4efc73a7..e6098b2e048a 100644 --- a/net/irda/iriap_event.c +++ b/net/irda/iriap_event.c | |||
@@ -187,7 +187,7 @@ static void state_s_disconnect(struct iriap_cb *self, IRIAP_EVENT event, | |||
187 | case IAP_LM_DISCONNECT_INDICATION: | 187 | case IAP_LM_DISCONNECT_INDICATION: |
188 | break; | 188 | break; |
189 | default: | 189 | default: |
190 | IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event); | 190 | pr_debug("%s(), Unknown event %d\n", __func__, event); |
191 | break; | 191 | break; |
192 | } | 192 | } |
193 | } | 193 | } |
@@ -219,7 +219,7 @@ static void state_s_connecting(struct iriap_cb *self, IRIAP_EVENT event, | |||
219 | iriap_next_client_state(self, S_DISCONNECT); | 219 | iriap_next_client_state(self, S_DISCONNECT); |
220 | break; | 220 | break; |
221 | default: | 221 | default: |
222 | IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event); | 222 | pr_debug("%s(), Unknown event %d\n", __func__, event); |
223 | break; | 223 | break; |
224 | } | 224 | } |
225 | } | 225 | } |
@@ -243,7 +243,7 @@ static void state_s_call(struct iriap_cb *self, IRIAP_EVENT event, | |||
243 | iriap_next_client_state(self, S_DISCONNECT); | 243 | iriap_next_client_state(self, S_DISCONNECT); |
244 | break; | 244 | break; |
245 | default: | 245 | default: |
246 | IRDA_DEBUG(0, "state_s_call: Unknown event %d\n", event); | 246 | pr_debug("state_s_call: Unknown event %d\n", event); |
247 | break; | 247 | break; |
248 | } | 248 | } |
249 | } | 249 | } |
@@ -271,7 +271,7 @@ static void state_s_make_call(struct iriap_cb *self, IRIAP_EVENT event, | |||
271 | iriap_next_call_state(self, S_OUTSTANDING); | 271 | iriap_next_call_state(self, S_OUTSTANDING); |
272 | break; | 272 | break; |
273 | default: | 273 | default: |
274 | IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event); | 274 | pr_debug("%s(), Unknown event %d\n", __func__, event); |
275 | break; | 275 | break; |
276 | } | 276 | } |
277 | } | 277 | } |
@@ -285,7 +285,7 @@ static void state_s_make_call(struct iriap_cb *self, IRIAP_EVENT event, | |||
285 | static void state_s_calling(struct iriap_cb *self, IRIAP_EVENT event, | 285 | static void state_s_calling(struct iriap_cb *self, IRIAP_EVENT event, |
286 | struct sk_buff *skb) | 286 | struct sk_buff *skb) |
287 | { | 287 | { |
288 | IRDA_DEBUG(0, "%s(), Not implemented\n", __func__); | 288 | pr_debug("%s(), Not implemented\n", __func__); |
289 | } | 289 | } |
290 | 290 | ||
291 | /* | 291 | /* |
@@ -307,7 +307,7 @@ static void state_s_outstanding(struct iriap_cb *self, IRIAP_EVENT event, | |||
307 | iriap_next_call_state(self, S_WAIT_FOR_CALL); | 307 | iriap_next_call_state(self, S_WAIT_FOR_CALL); |
308 | break; | 308 | break; |
309 | default: | 309 | default: |
310 | IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event); | 310 | pr_debug("%s(), Unknown event %d\n", __func__, event); |
311 | break; | 311 | break; |
312 | } | 312 | } |
313 | } | 313 | } |
@@ -320,7 +320,7 @@ static void state_s_outstanding(struct iriap_cb *self, IRIAP_EVENT event, | |||
320 | static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event, | 320 | static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event, |
321 | struct sk_buff *skb) | 321 | struct sk_buff *skb) |
322 | { | 322 | { |
323 | IRDA_DEBUG(0, "%s(), Not implemented\n", __func__); | 323 | pr_debug("%s(), Not implemented\n", __func__); |
324 | } | 324 | } |
325 | 325 | ||
326 | /* | 326 | /* |
@@ -332,7 +332,7 @@ static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event, | |||
332 | static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event, | 332 | static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event, |
333 | struct sk_buff *skb) | 333 | struct sk_buff *skb) |
334 | { | 334 | { |
335 | IRDA_DEBUG(0, "%s(), Not implemented\n", __func__); | 335 | pr_debug("%s(), Not implemented\n", __func__); |
336 | } | 336 | } |
337 | 337 | ||
338 | 338 | ||
@@ -345,7 +345,7 @@ static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event, | |||
345 | static void state_s_wait_active(struct iriap_cb *self, IRIAP_EVENT event, | 345 | static void state_s_wait_active(struct iriap_cb *self, IRIAP_EVENT event, |
346 | struct sk_buff *skb) | 346 | struct sk_buff *skb) |
347 | { | 347 | { |
348 | IRDA_DEBUG(0, "%s(), Not implemented\n", __func__); | 348 | pr_debug("%s(), Not implemented\n", __func__); |
349 | } | 349 | } |
350 | 350 | ||
351 | /************************************************************************** | 351 | /************************************************************************** |
@@ -386,7 +386,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event, | |||
386 | iriap_next_r_connect_state(self, R_RECEIVING); | 386 | iriap_next_r_connect_state(self, R_RECEIVING); |
387 | break; | 387 | break; |
388 | default: | 388 | default: |
389 | IRDA_DEBUG(0, "%s(), unknown event %d\n", __func__, event); | 389 | pr_debug("%s(), unknown event %d\n", __func__, event); |
390 | break; | 390 | break; |
391 | } | 391 | } |
392 | } | 392 | } |
@@ -397,8 +397,6 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event, | |||
397 | static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event, | 397 | static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event, |
398 | struct sk_buff *skb) | 398 | struct sk_buff *skb) |
399 | { | 399 | { |
400 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
401 | |||
402 | switch (event) { | 400 | switch (event) { |
403 | case IAP_LM_DISCONNECT_INDICATION: | 401 | case IAP_LM_DISCONNECT_INDICATION: |
404 | /* Abort call */ | 402 | /* Abort call */ |
@@ -406,7 +404,7 @@ static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event, | |||
406 | iriap_next_r_connect_state(self, R_WAITING); | 404 | iriap_next_r_connect_state(self, R_WAITING); |
407 | break; | 405 | break; |
408 | default: | 406 | default: |
409 | IRDA_DEBUG(0, "%s(), unknown event!\n", __func__); | 407 | pr_debug("%s(), unknown event!\n", __func__); |
410 | break; | 408 | break; |
411 | } | 409 | } |
412 | } | 410 | } |
@@ -421,13 +419,13 @@ static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event, | |||
421 | static void state_r_waiting(struct iriap_cb *self, IRIAP_EVENT event, | 419 | static void state_r_waiting(struct iriap_cb *self, IRIAP_EVENT event, |
422 | struct sk_buff *skb) | 420 | struct sk_buff *skb) |
423 | { | 421 | { |
424 | IRDA_DEBUG(0, "%s(), Not implemented\n", __func__); | 422 | pr_debug("%s(), Not implemented\n", __func__); |
425 | } | 423 | } |
426 | 424 | ||
427 | static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event, | 425 | static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event, |
428 | struct sk_buff *skb) | 426 | struct sk_buff *skb) |
429 | { | 427 | { |
430 | IRDA_DEBUG(0, "%s(), Not implemented\n", __func__); | 428 | pr_debug("%s(), Not implemented\n", __func__); |
431 | } | 429 | } |
432 | 430 | ||
433 | /* | 431 | /* |
@@ -439,8 +437,6 @@ static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event, | |||
439 | static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event, | 437 | static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event, |
440 | struct sk_buff *skb) | 438 | struct sk_buff *skb) |
441 | { | 439 | { |
442 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
443 | |||
444 | switch (event) { | 440 | switch (event) { |
445 | case IAP_RECV_F_LST: | 441 | case IAP_RECV_F_LST: |
446 | iriap_next_r_connect_state(self, R_EXECUTE); | 442 | iriap_next_r_connect_state(self, R_EXECUTE); |
@@ -448,7 +444,7 @@ static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event, | |||
448 | iriap_call_indication(self, skb); | 444 | iriap_call_indication(self, skb); |
449 | break; | 445 | break; |
450 | default: | 446 | default: |
451 | IRDA_DEBUG(0, "%s(), unknown event!\n", __func__); | 447 | pr_debug("%s(), unknown event!\n", __func__); |
452 | break; | 448 | break; |
453 | } | 449 | } |
454 | } | 450 | } |
@@ -462,8 +458,6 @@ static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event, | |||
462 | static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event, | 458 | static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event, |
463 | struct sk_buff *skb) | 459 | struct sk_buff *skb) |
464 | { | 460 | { |
465 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
466 | |||
467 | IRDA_ASSERT(skb != NULL, return;); | 461 | IRDA_ASSERT(skb != NULL, return;); |
468 | IRDA_ASSERT(self != NULL, return;); | 462 | IRDA_ASSERT(self != NULL, return;); |
469 | IRDA_ASSERT(self->magic == IAS_MAGIC, return;); | 463 | IRDA_ASSERT(self->magic == IAS_MAGIC, return;); |
@@ -483,7 +477,7 @@ static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event, | |||
483 | irlmp_data_request(self->lsap, skb); | 477 | irlmp_data_request(self->lsap, skb); |
484 | break; | 478 | break; |
485 | default: | 479 | default: |
486 | IRDA_DEBUG(0, "%s(), unknown event!\n", __func__); | 480 | pr_debug("%s(), unknown event!\n", __func__); |
487 | break; | 481 | break; |
488 | } | 482 | } |
489 | } | 483 | } |
@@ -491,7 +485,7 @@ static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event, | |||
491 | static void state_r_returning(struct iriap_cb *self, IRIAP_EVENT event, | 485 | static void state_r_returning(struct iriap_cb *self, IRIAP_EVENT event, |
492 | struct sk_buff *skb) | 486 | struct sk_buff *skb) |
493 | { | 487 | { |
494 | IRDA_DEBUG(0, "%s(), event=%d\n", __func__, event); | 488 | pr_debug("%s(), event=%d\n", __func__, event); |
495 | 489 | ||
496 | switch (event) { | 490 | switch (event) { |
497 | case IAP_RECV_F_LST: | 491 | case IAP_RECV_F_LST: |
diff --git a/net/irda/irias_object.c b/net/irda/irias_object.c index cd53692fe8c9..53b86d0e1630 100644 --- a/net/irda/irias_object.c +++ b/net/irda/irias_object.c | |||
@@ -48,8 +48,6 @@ struct ias_object *irias_new_object( char *name, int id) | |||
48 | { | 48 | { |
49 | struct ias_object *obj; | 49 | struct ias_object *obj; |
50 | 50 | ||
51 | IRDA_DEBUG( 4, "%s()\n", __func__); | ||
52 | |||
53 | obj = kzalloc(sizeof(struct ias_object), GFP_ATOMIC); | 51 | obj = kzalloc(sizeof(struct ias_object), GFP_ATOMIC); |
54 | if (obj == NULL) { | 52 | if (obj == NULL) { |
55 | net_warn_ratelimited("%s(), Unable to allocate object!\n", | 53 | net_warn_ratelimited("%s(), Unable to allocate object!\n", |
@@ -134,8 +132,8 @@ int irias_delete_object(struct ias_object *obj) | |||
134 | /* Remove from list */ | 132 | /* Remove from list */ |
135 | node = hashbin_remove_this(irias_objects, (irda_queue_t *) obj); | 133 | node = hashbin_remove_this(irias_objects, (irda_queue_t *) obj); |
136 | if (!node) | 134 | if (!node) |
137 | IRDA_DEBUG( 0, "%s(), object already removed!\n", | 135 | pr_debug("%s(), object already removed!\n", |
138 | __func__); | 136 | __func__); |
139 | 137 | ||
140 | /* Destroy */ | 138 | /* Destroy */ |
141 | __irias_delete_object(obj); | 139 | __irias_delete_object(obj); |
@@ -287,8 +285,8 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name, | |||
287 | } | 285 | } |
288 | 286 | ||
289 | if ( attrib->value->type != new_value->type) { | 287 | if ( attrib->value->type != new_value->type) { |
290 | IRDA_DEBUG( 0, "%s(), changing value type not allowed!\n", | 288 | pr_debug("%s(), changing value type not allowed!\n", |
291 | __func__); | 289 | __func__); |
292 | spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags); | 290 | spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags); |
293 | return -1; | 291 | return -1; |
294 | } | 292 | } |
@@ -533,8 +531,6 @@ struct ias_value *irias_new_missing_value(void) | |||
533 | */ | 531 | */ |
534 | void irias_delete_value(struct ias_value *value) | 532 | void irias_delete_value(struct ias_value *value) |
535 | { | 533 | { |
536 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
537 | |||
538 | IRDA_ASSERT(value != NULL, return;); | 534 | IRDA_ASSERT(value != NULL, return;); |
539 | 535 | ||
540 | switch (value->type) { | 536 | switch (value->type) { |
@@ -551,7 +547,7 @@ void irias_delete_value(struct ias_value *value) | |||
551 | kfree(value->t.oct_seq); | 547 | kfree(value->t.oct_seq); |
552 | break; | 548 | break; |
553 | default: | 549 | default: |
554 | IRDA_DEBUG(0, "%s(), Unknown value type!\n", __func__); | 550 | pr_debug("%s(), Unknown value type!\n", __func__); |
555 | break; | 551 | break; |
556 | } | 552 | } |
557 | kfree(value); | 553 | kfree(value); |
diff --git a/net/irda/irlan/irlan_client.c b/net/irda/irlan/irlan_client.c index f8eea02843f5..c5837a40c78e 100644 --- a/net/irda/irlan/irlan_client.c +++ b/net/irda/irlan/irlan_client.c | |||
@@ -72,8 +72,6 @@ static void irlan_client_kick_timer_expired(void *data) | |||
72 | { | 72 | { |
73 | struct irlan_cb *self = (struct irlan_cb *) data; | 73 | struct irlan_cb *self = (struct irlan_cb *) data; |
74 | 74 | ||
75 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
76 | |||
77 | IRDA_ASSERT(self != NULL, return;); | 75 | IRDA_ASSERT(self != NULL, return;); |
78 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 76 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
79 | 77 | ||
@@ -91,8 +89,6 @@ static void irlan_client_kick_timer_expired(void *data) | |||
91 | 89 | ||
92 | static void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout) | 90 | static void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout) |
93 | { | 91 | { |
94 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
95 | |||
96 | irda_start_timer(&self->client.kick_timer, timeout, (void *) self, | 92 | irda_start_timer(&self->client.kick_timer, timeout, (void *) self, |
97 | irlan_client_kick_timer_expired); | 93 | irlan_client_kick_timer_expired); |
98 | } | 94 | } |
@@ -105,8 +101,6 @@ static void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout) | |||
105 | */ | 101 | */ |
106 | void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr) | 102 | void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr) |
107 | { | 103 | { |
108 | IRDA_DEBUG(1, "%s()\n", __func__ ); | ||
109 | |||
110 | IRDA_ASSERT(self != NULL, return;); | 104 | IRDA_ASSERT(self != NULL, return;); |
111 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 105 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
112 | 106 | ||
@@ -117,7 +111,7 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr) | |||
117 | if ((self->client.state != IRLAN_IDLE) || | 111 | if ((self->client.state != IRLAN_IDLE) || |
118 | (self->provider.access_type == ACCESS_DIRECT)) | 112 | (self->provider.access_type == ACCESS_DIRECT)) |
119 | { | 113 | { |
120 | IRDA_DEBUG(0, "%s(), already awake!\n", __func__ ); | 114 | pr_debug("%s(), already awake!\n", __func__); |
121 | return; | 115 | return; |
122 | } | 116 | } |
123 | 117 | ||
@@ -126,7 +120,7 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr) | |||
126 | self->daddr = daddr; | 120 | self->daddr = daddr; |
127 | 121 | ||
128 | if (self->disconnect_reason == LM_USER_REQUEST) { | 122 | if (self->disconnect_reason == LM_USER_REQUEST) { |
129 | IRDA_DEBUG(0, "%s(), still stopped by user\n", __func__ ); | 123 | pr_debug("%s(), still stopped by user\n", __func__); |
130 | return; | 124 | return; |
131 | } | 125 | } |
132 | 126 | ||
@@ -153,8 +147,6 @@ void irlan_client_discovery_indication(discinfo_t *discovery, | |||
153 | struct irlan_cb *self; | 147 | struct irlan_cb *self; |
154 | __u32 saddr, daddr; | 148 | __u32 saddr, daddr; |
155 | 149 | ||
156 | IRDA_DEBUG(1, "%s()\n", __func__ ); | ||
157 | |||
158 | IRDA_ASSERT(discovery != NULL, return;); | 150 | IRDA_ASSERT(discovery != NULL, return;); |
159 | 151 | ||
160 | /* | 152 | /* |
@@ -175,8 +167,8 @@ void irlan_client_discovery_indication(discinfo_t *discovery, | |||
175 | if (self) { | 167 | if (self) { |
176 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, goto out;); | 168 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, goto out;); |
177 | 169 | ||
178 | IRDA_DEBUG(1, "%s(), Found instance (%08x)!\n", __func__ , | 170 | pr_debug("%s(), Found instance (%08x)!\n", __func__ , |
179 | daddr); | 171 | daddr); |
180 | 172 | ||
181 | irlan_client_wakeup(self, saddr, daddr); | 173 | irlan_client_wakeup(self, saddr, daddr); |
182 | } | 174 | } |
@@ -195,8 +187,6 @@ static int irlan_client_ctrl_data_indication(void *instance, void *sap, | |||
195 | { | 187 | { |
196 | struct irlan_cb *self; | 188 | struct irlan_cb *self; |
197 | 189 | ||
198 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
199 | |||
200 | self = instance; | 190 | self = instance; |
201 | 191 | ||
202 | IRDA_ASSERT(self != NULL, return -1;); | 192 | IRDA_ASSERT(self != NULL, return -1;); |
@@ -206,7 +196,7 @@ static int irlan_client_ctrl_data_indication(void *instance, void *sap, | |||
206 | irlan_do_client_event(self, IRLAN_DATA_INDICATION, skb); | 196 | irlan_do_client_event(self, IRLAN_DATA_INDICATION, skb); |
207 | 197 | ||
208 | /* Ready for a new command */ | 198 | /* Ready for a new command */ |
209 | IRDA_DEBUG(2, "%s(), clearing tx_busy\n", __func__ ); | 199 | pr_debug("%s(), clearing tx_busy\n", __func__); |
210 | self->client.tx_busy = FALSE; | 200 | self->client.tx_busy = FALSE; |
211 | 201 | ||
212 | /* Check if we have some queued commands waiting to be sent */ | 202 | /* Check if we have some queued commands waiting to be sent */ |
@@ -223,7 +213,7 @@ static void irlan_client_ctrl_disconnect_indication(void *instance, void *sap, | |||
223 | struct tsap_cb *tsap; | 213 | struct tsap_cb *tsap; |
224 | struct sk_buff *skb; | 214 | struct sk_buff *skb; |
225 | 215 | ||
226 | IRDA_DEBUG(4, "%s(), reason=%d\n", __func__ , reason); | 216 | pr_debug("%s(), reason=%d\n", __func__ , reason); |
227 | 217 | ||
228 | self = instance; | 218 | self = instance; |
229 | tsap = sap; | 219 | tsap = sap; |
@@ -255,8 +245,6 @@ static void irlan_client_open_ctrl_tsap(struct irlan_cb *self) | |||
255 | struct tsap_cb *tsap; | 245 | struct tsap_cb *tsap; |
256 | notify_t notify; | 246 | notify_t notify; |
257 | 247 | ||
258 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
259 | |||
260 | IRDA_ASSERT(self != NULL, return;); | 248 | IRDA_ASSERT(self != NULL, return;); |
261 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 249 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
262 | 250 | ||
@@ -275,7 +263,7 @@ static void irlan_client_open_ctrl_tsap(struct irlan_cb *self) | |||
275 | 263 | ||
276 | tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, ¬ify); | 264 | tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, ¬ify); |
277 | if (!tsap) { | 265 | if (!tsap) { |
278 | IRDA_DEBUG(2, "%s(), Got no tsap!\n", __func__ ); | 266 | pr_debug("%s(), Got no tsap!\n", __func__); |
279 | return; | 267 | return; |
280 | } | 268 | } |
281 | self->client.tsap_ctrl = tsap; | 269 | self->client.tsap_ctrl = tsap; |
@@ -295,8 +283,6 @@ static void irlan_client_ctrl_connect_confirm(void *instance, void *sap, | |||
295 | { | 283 | { |
296 | struct irlan_cb *self; | 284 | struct irlan_cb *self; |
297 | 285 | ||
298 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
299 | |||
300 | self = instance; | 286 | self = instance; |
301 | 287 | ||
302 | IRDA_ASSERT(self != NULL, return;); | 288 | IRDA_ASSERT(self != NULL, return;); |
@@ -374,7 +360,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb) | |||
374 | 360 | ||
375 | IRDA_ASSERT(skb != NULL, return;); | 361 | IRDA_ASSERT(skb != NULL, return;); |
376 | 362 | ||
377 | IRDA_DEBUG(4, "%s() skb->len=%d\n", __func__ , (int) skb->len); | 363 | pr_debug("%s() skb->len=%d\n", __func__ , (int)skb->len); |
378 | 364 | ||
379 | IRDA_ASSERT(self != NULL, return;); | 365 | IRDA_ASSERT(self != NULL, return;); |
380 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 366 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
@@ -405,7 +391,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb) | |||
405 | /* How many parameters? */ | 391 | /* How many parameters? */ |
406 | count = frame[1]; | 392 | count = frame[1]; |
407 | 393 | ||
408 | IRDA_DEBUG(4, "%s(), got %d parameters\n", __func__ , count); | 394 | pr_debug("%s(), got %d parameters\n", __func__ , count); |
409 | 395 | ||
410 | ptr = frame+2; | 396 | ptr = frame+2; |
411 | 397 | ||
@@ -413,7 +399,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb) | |||
413 | for (i=0; i<count;i++) { | 399 | for (i=0; i<count;i++) { |
414 | ret = irlan_extract_param(ptr, name, value, &val_len); | 400 | ret = irlan_extract_param(ptr, name, value, &val_len); |
415 | if (ret < 0) { | 401 | if (ret < 0) { |
416 | IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __func__ ); | 402 | pr_debug("%s(), IrLAN, Error!\n", __func__); |
417 | break; | 403 | break; |
418 | } | 404 | } |
419 | ptr += ret; | 405 | ptr += ret; |
@@ -437,7 +423,7 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param, | |||
437 | __u8 *bytes; | 423 | __u8 *bytes; |
438 | int i; | 424 | int i; |
439 | 425 | ||
440 | IRDA_DEBUG(4, "%s(), parm=%s\n", __func__ , param); | 426 | pr_debug("%s(), parm=%s\n", __func__ , param); |
441 | 427 | ||
442 | IRDA_ASSERT(self != NULL, return;); | 428 | IRDA_ASSERT(self != NULL, return;); |
443 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 429 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
@@ -475,13 +461,13 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param, | |||
475 | else if (strcmp(value, "HOSTED") == 0) | 461 | else if (strcmp(value, "HOSTED") == 0) |
476 | self->client.access_type = ACCESS_HOSTED; | 462 | self->client.access_type = ACCESS_HOSTED; |
477 | else { | 463 | else { |
478 | IRDA_DEBUG(2, "%s(), unknown access type!\n", __func__ ); | 464 | pr_debug("%s(), unknown access type!\n", __func__); |
479 | } | 465 | } |
480 | } | 466 | } |
481 | /* IRLAN version */ | 467 | /* IRLAN version */ |
482 | if (strcmp(param, "IRLAN_VER") == 0) { | 468 | if (strcmp(param, "IRLAN_VER") == 0) { |
483 | IRDA_DEBUG(4, "IrLAN version %d.%d\n", (__u8) value[0], | 469 | pr_debug("IrLAN version %d.%d\n", (__u8)value[0], |
484 | (__u8) value[1]); | 470 | (__u8)value[1]); |
485 | 471 | ||
486 | self->version[0] = value[0]; | 472 | self->version[0] = value[0]; |
487 | self->version[1] = value[1]; | 473 | self->version[1] = value[1]; |
@@ -490,37 +476,37 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param, | |||
490 | /* Which remote TSAP to use for data channel */ | 476 | /* Which remote TSAP to use for data channel */ |
491 | if (strcmp(param, "DATA_CHAN") == 0) { | 477 | if (strcmp(param, "DATA_CHAN") == 0) { |
492 | self->dtsap_sel_data = value[0]; | 478 | self->dtsap_sel_data = value[0]; |
493 | IRDA_DEBUG(4, "Data TSAP = %02x\n", self->dtsap_sel_data); | 479 | pr_debug("Data TSAP = %02x\n", self->dtsap_sel_data); |
494 | return; | 480 | return; |
495 | } | 481 | } |
496 | if (strcmp(param, "CON_ARB") == 0) { | 482 | if (strcmp(param, "CON_ARB") == 0) { |
497 | memcpy(&tmp_cpu, value, 2); /* Align value */ | 483 | memcpy(&tmp_cpu, value, 2); /* Align value */ |
498 | le16_to_cpus(&tmp_cpu); /* Convert to host order */ | 484 | le16_to_cpus(&tmp_cpu); /* Convert to host order */ |
499 | self->client.recv_arb_val = tmp_cpu; | 485 | self->client.recv_arb_val = tmp_cpu; |
500 | IRDA_DEBUG(2, "%s(), receive arb val=%d\n", __func__ , | 486 | pr_debug("%s(), receive arb val=%d\n", __func__ , |
501 | self->client.recv_arb_val); | 487 | self->client.recv_arb_val); |
502 | } | 488 | } |
503 | if (strcmp(param, "MAX_FRAME") == 0) { | 489 | if (strcmp(param, "MAX_FRAME") == 0) { |
504 | memcpy(&tmp_cpu, value, 2); /* Align value */ | 490 | memcpy(&tmp_cpu, value, 2); /* Align value */ |
505 | le16_to_cpus(&tmp_cpu); /* Convert to host order */ | 491 | le16_to_cpus(&tmp_cpu); /* Convert to host order */ |
506 | self->client.max_frame = tmp_cpu; | 492 | self->client.max_frame = tmp_cpu; |
507 | IRDA_DEBUG(4, "%s(), max frame=%d\n", __func__ , | 493 | pr_debug("%s(), max frame=%d\n", __func__ , |
508 | self->client.max_frame); | 494 | self->client.max_frame); |
509 | } | 495 | } |
510 | 496 | ||
511 | /* RECONNECT_KEY, in case the link goes down! */ | 497 | /* RECONNECT_KEY, in case the link goes down! */ |
512 | if (strcmp(param, "RECONNECT_KEY") == 0) { | 498 | if (strcmp(param, "RECONNECT_KEY") == 0) { |
513 | IRDA_DEBUG(4, "Got reconnect key: "); | 499 | pr_debug("Got reconnect key: "); |
514 | /* for (i = 0; i < val_len; i++) */ | 500 | /* for (i = 0; i < val_len; i++) */ |
515 | /* printk("%02x", value[i]); */ | 501 | /* printk("%02x", value[i]); */ |
516 | memcpy(self->client.reconnect_key, value, val_len); | 502 | memcpy(self->client.reconnect_key, value, val_len); |
517 | self->client.key_len = val_len; | 503 | self->client.key_len = val_len; |
518 | IRDA_DEBUG(4, "\n"); | 504 | pr_debug("\n"); |
519 | } | 505 | } |
520 | /* FILTER_ENTRY, have we got an ethernet address? */ | 506 | /* FILTER_ENTRY, have we got an ethernet address? */ |
521 | if (strcmp(param, "FILTER_ENTRY") == 0) { | 507 | if (strcmp(param, "FILTER_ENTRY") == 0) { |
522 | bytes = value; | 508 | bytes = value; |
523 | IRDA_DEBUG(4, "Ethernet address = %pM\n", bytes); | 509 | pr_debug("Ethernet address = %pM\n", bytes); |
524 | for (i = 0; i < 6; i++) | 510 | for (i = 0; i < 6; i++) |
525 | self->dev->dev_addr[i] = bytes[i]; | 511 | self->dev->dev_addr[i] = bytes[i]; |
526 | } | 512 | } |
@@ -537,8 +523,6 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id, | |||
537 | { | 523 | { |
538 | struct irlan_cb *self; | 524 | struct irlan_cb *self; |
539 | 525 | ||
540 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
541 | |||
542 | IRDA_ASSERT(priv != NULL, return;); | 526 | IRDA_ASSERT(priv != NULL, return;); |
543 | 527 | ||
544 | self = priv; | 528 | self = priv; |
@@ -550,7 +534,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id, | |||
550 | 534 | ||
551 | /* Check if request succeeded */ | 535 | /* Check if request succeeded */ |
552 | if (result != IAS_SUCCESS) { | 536 | if (result != IAS_SUCCESS) { |
553 | IRDA_DEBUG(2, "%s(), got NULL value!\n", __func__ ); | 537 | pr_debug("%s(), got NULL value!\n", __func__); |
554 | irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, | 538 | irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, |
555 | NULL); | 539 | NULL); |
556 | return; | 540 | return; |
@@ -568,7 +552,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id, | |||
568 | irias_delete_value(value); | 552 | irias_delete_value(value); |
569 | break; | 553 | break; |
570 | default: | 554 | default: |
571 | IRDA_DEBUG(2, "%s(), unknown type!\n", __func__ ); | 555 | pr_debug("%s(), unknown type!\n", __func__); |
572 | break; | 556 | break; |
573 | } | 557 | } |
574 | irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, NULL); | 558 | irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, NULL); |
diff --git a/net/irda/irlan/irlan_client_event.c b/net/irda/irlan/irlan_client_event.c index f9d11bf38157..cc93fabbbb19 100644 --- a/net/irda/irlan/irlan_client_event.c +++ b/net/irda/irlan/irlan_client_event.c | |||
@@ -92,8 +92,6 @@ void irlan_do_client_event(struct irlan_cb *self, IRLAN_EVENT event, | |||
92 | static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event, | 92 | static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event, |
93 | struct sk_buff *skb) | 93 | struct sk_buff *skb) |
94 | { | 94 | { |
95 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
96 | |||
97 | IRDA_ASSERT(self != NULL, return -1;); | 95 | IRDA_ASSERT(self != NULL, return -1;); |
98 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); | 96 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); |
99 | 97 | ||
@@ -114,10 +112,10 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event, | |||
114 | "IrLAN", "IrDA:TinyTP:LsapSel"); | 112 | "IrLAN", "IrDA:TinyTP:LsapSel"); |
115 | break; | 113 | break; |
116 | case IRLAN_WATCHDOG_TIMEOUT: | 114 | case IRLAN_WATCHDOG_TIMEOUT: |
117 | IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ ); | 115 | pr_debug("%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__); |
118 | break; | 116 | break; |
119 | default: | 117 | default: |
120 | IRDA_DEBUG(4, "%s(), Unknown event %d\n", __func__ , event); | 118 | pr_debug("%s(), Unknown event %d\n", __func__ , event); |
121 | break; | 119 | break; |
122 | } | 120 | } |
123 | if (skb) | 121 | if (skb) |
@@ -136,8 +134,6 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event, | |||
136 | static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event, | 134 | static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event, |
137 | struct sk_buff *skb) | 135 | struct sk_buff *skb) |
138 | { | 136 | { |
139 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
140 | |||
141 | IRDA_ASSERT(self != NULL, return -1;); | 137 | IRDA_ASSERT(self != NULL, return -1;); |
142 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); | 138 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); |
143 | 139 | ||
@@ -154,7 +150,7 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event, | |||
154 | irlan_next_client_state(self, IRLAN_CONN); | 150 | irlan_next_client_state(self, IRLAN_CONN); |
155 | break; | 151 | break; |
156 | case IRLAN_IAS_PROVIDER_NOT_AVAIL: | 152 | case IRLAN_IAS_PROVIDER_NOT_AVAIL: |
157 | IRDA_DEBUG(2, "%s(), IAS_PROVIDER_NOT_AVAIL\n", __func__ ); | 153 | pr_debug("%s(), IAS_PROVIDER_NOT_AVAIL\n", __func__); |
158 | irlan_next_client_state(self, IRLAN_IDLE); | 154 | irlan_next_client_state(self, IRLAN_IDLE); |
159 | 155 | ||
160 | /* Give the client a kick! */ | 156 | /* Give the client a kick! */ |
@@ -167,10 +163,10 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event, | |||
167 | irlan_next_client_state(self, IRLAN_IDLE); | 163 | irlan_next_client_state(self, IRLAN_IDLE); |
168 | break; | 164 | break; |
169 | case IRLAN_WATCHDOG_TIMEOUT: | 165 | case IRLAN_WATCHDOG_TIMEOUT: |
170 | IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ ); | 166 | pr_debug("%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__); |
171 | break; | 167 | break; |
172 | default: | 168 | default: |
173 | IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event); | 169 | pr_debug("%s(), Unknown event %d\n", __func__ , event); |
174 | break; | 170 | break; |
175 | } | 171 | } |
176 | if (skb) | 172 | if (skb) |
@@ -189,8 +185,6 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event, | |||
189 | static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event, | 185 | static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event, |
190 | struct sk_buff *skb) | 186 | struct sk_buff *skb) |
191 | { | 187 | { |
192 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
193 | |||
194 | IRDA_ASSERT(self != NULL, return -1;); | 188 | IRDA_ASSERT(self != NULL, return -1;); |
195 | 189 | ||
196 | switch (event) { | 190 | switch (event) { |
@@ -204,10 +198,10 @@ static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event, | |||
204 | irlan_next_client_state(self, IRLAN_IDLE); | 198 | irlan_next_client_state(self, IRLAN_IDLE); |
205 | break; | 199 | break; |
206 | case IRLAN_WATCHDOG_TIMEOUT: | 200 | case IRLAN_WATCHDOG_TIMEOUT: |
207 | IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ ); | 201 | pr_debug("%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__); |
208 | break; | 202 | break; |
209 | default: | 203 | default: |
210 | IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event); | 204 | pr_debug("%s(), Unknown event %d\n", __func__ , event); |
211 | break; | 205 | break; |
212 | } | 206 | } |
213 | if (skb) | 207 | if (skb) |
@@ -224,8 +218,6 @@ static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event, | |||
224 | static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event, | 218 | static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event, |
225 | struct sk_buff *skb) | 219 | struct sk_buff *skb) |
226 | { | 220 | { |
227 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
228 | |||
229 | IRDA_ASSERT(self != NULL, return -1;); | 221 | IRDA_ASSERT(self != NULL, return -1;); |
230 | 222 | ||
231 | switch (event) { | 223 | switch (event) { |
@@ -244,10 +236,10 @@ static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event, | |||
244 | irlan_next_client_state(self, IRLAN_IDLE); | 236 | irlan_next_client_state(self, IRLAN_IDLE); |
245 | break; | 237 | break; |
246 | case IRLAN_WATCHDOG_TIMEOUT: | 238 | case IRLAN_WATCHDOG_TIMEOUT: |
247 | IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ ); | 239 | pr_debug("%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__); |
248 | break; | 240 | break; |
249 | default: | 241 | default: |
250 | IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event); | 242 | pr_debug("%s(), Unknown event %d\n", __func__ , event); |
251 | break; | 243 | break; |
252 | } | 244 | } |
253 | if (skb) | 245 | if (skb) |
@@ -266,8 +258,6 @@ static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event, | |||
266 | static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event, | 258 | static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event, |
267 | struct sk_buff *skb) | 259 | struct sk_buff *skb) |
268 | { | 260 | { |
269 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
270 | |||
271 | IRDA_ASSERT(self != NULL, return -1;); | 261 | IRDA_ASSERT(self != NULL, return -1;); |
272 | 262 | ||
273 | switch(event) { | 263 | switch(event) { |
@@ -281,10 +271,10 @@ static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event, | |||
281 | irlan_next_client_state(self, IRLAN_IDLE); | 271 | irlan_next_client_state(self, IRLAN_IDLE); |
282 | break; | 272 | break; |
283 | case IRLAN_WATCHDOG_TIMEOUT: | 273 | case IRLAN_WATCHDOG_TIMEOUT: |
284 | IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ ); | 274 | pr_debug("%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__); |
285 | break; | 275 | break; |
286 | default: | 276 | default: |
287 | IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event); | 277 | pr_debug("%s(), Unknown event %d\n", __func__ , event); |
288 | break; | 278 | break; |
289 | } | 279 | } |
290 | if (skb) | 280 | if (skb) |
@@ -305,8 +295,6 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event, | |||
305 | { | 295 | { |
306 | struct qos_info qos; | 296 | struct qos_info qos; |
307 | 297 | ||
308 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
309 | |||
310 | IRDA_ASSERT(self != NULL, return -1;); | 298 | IRDA_ASSERT(self != NULL, return -1;); |
311 | 299 | ||
312 | switch(event) { | 300 | switch(event) { |
@@ -344,7 +332,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event, | |||
344 | irlan_next_client_state(self, IRLAN_DATA); | 332 | irlan_next_client_state(self, IRLAN_DATA); |
345 | break; | 333 | break; |
346 | default: | 334 | default: |
347 | IRDA_DEBUG(2, "%s(), unknown access type!\n", __func__ ); | 335 | pr_debug("%s(), unknown access type!\n", __func__); |
348 | break; | 336 | break; |
349 | } | 337 | } |
350 | break; | 338 | break; |
@@ -353,10 +341,10 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event, | |||
353 | irlan_next_client_state(self, IRLAN_IDLE); | 341 | irlan_next_client_state(self, IRLAN_IDLE); |
354 | break; | 342 | break; |
355 | case IRLAN_WATCHDOG_TIMEOUT: | 343 | case IRLAN_WATCHDOG_TIMEOUT: |
356 | IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ ); | 344 | pr_debug("%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__); |
357 | break; | 345 | break; |
358 | default: | 346 | default: |
359 | IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event); | 347 | pr_debug("%s(), Unknown event %d\n", __func__ , event); |
360 | break; | 348 | break; |
361 | } | 349 | } |
362 | 350 | ||
@@ -376,8 +364,6 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event, | |||
376 | static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event, | 364 | static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event, |
377 | struct sk_buff *skb) | 365 | struct sk_buff *skb) |
378 | { | 366 | { |
379 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
380 | |||
381 | IRDA_ASSERT(self != NULL, return -1;); | 367 | IRDA_ASSERT(self != NULL, return -1;); |
382 | 368 | ||
383 | switch(event) { | 369 | switch(event) { |
@@ -390,10 +376,10 @@ static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event, | |||
390 | irlan_next_client_state(self, IRLAN_IDLE); | 376 | irlan_next_client_state(self, IRLAN_IDLE); |
391 | break; | 377 | break; |
392 | case IRLAN_WATCHDOG_TIMEOUT: | 378 | case IRLAN_WATCHDOG_TIMEOUT: |
393 | IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ ); | 379 | pr_debug("%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__); |
394 | break; | 380 | break; |
395 | default: | 381 | default: |
396 | IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event); | 382 | pr_debug("%s(), Unknown event %d\n", __func__ , event); |
397 | break; | 383 | break; |
398 | } | 384 | } |
399 | if (skb) | 385 | if (skb) |
@@ -407,8 +393,6 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event, | |||
407 | { | 393 | { |
408 | struct qos_info qos; | 394 | struct qos_info qos; |
409 | 395 | ||
410 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
411 | |||
412 | IRDA_ASSERT(self != NULL, return -1;); | 396 | IRDA_ASSERT(self != NULL, return -1;); |
413 | 397 | ||
414 | switch(event) { | 398 | switch(event) { |
@@ -429,7 +413,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event, | |||
429 | } else if (self->client.recv_arb_val > | 413 | } else if (self->client.recv_arb_val > |
430 | self->provider.send_arb_val) | 414 | self->provider.send_arb_val) |
431 | { | 415 | { |
432 | IRDA_DEBUG(2, "%s(), lost the battle :-(\n", __func__ ); | 416 | pr_debug("%s(), lost the battle :-(\n", __func__); |
433 | } | 417 | } |
434 | break; | 418 | break; |
435 | case IRLAN_DATA_CONNECT_INDICATION: | 419 | case IRLAN_DATA_CONNECT_INDICATION: |
@@ -440,10 +424,10 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event, | |||
440 | irlan_next_client_state(self, IRLAN_IDLE); | 424 | irlan_next_client_state(self, IRLAN_IDLE); |
441 | break; | 425 | break; |
442 | case IRLAN_WATCHDOG_TIMEOUT: | 426 | case IRLAN_WATCHDOG_TIMEOUT: |
443 | IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ ); | 427 | pr_debug("%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__); |
444 | break; | 428 | break; |
445 | default: | 429 | default: |
446 | IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event); | 430 | pr_debug("%s(), Unknown event %d\n", __func__ , event); |
447 | break; | 431 | break; |
448 | } | 432 | } |
449 | if (skb) | 433 | if (skb) |
@@ -462,8 +446,6 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event, | |||
462 | static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event, | 446 | static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event, |
463 | struct sk_buff *skb) | 447 | struct sk_buff *skb) |
464 | { | 448 | { |
465 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
466 | |||
467 | IRDA_ASSERT(self != NULL, return -1;); | 449 | IRDA_ASSERT(self != NULL, return -1;); |
468 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); | 450 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); |
469 | 451 | ||
@@ -476,7 +458,7 @@ static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event, | |||
476 | irlan_next_client_state(self, IRLAN_IDLE); | 458 | irlan_next_client_state(self, IRLAN_IDLE); |
477 | break; | 459 | break; |
478 | default: | 460 | default: |
479 | IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event); | 461 | pr_debug("%s(), Unknown event %d\n", __func__ , event); |
480 | break; | 462 | break; |
481 | } | 463 | } |
482 | if (skb) | 464 | if (skb) |
@@ -494,8 +476,6 @@ static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event, | |||
494 | static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event, | 476 | static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event, |
495 | struct sk_buff *skb) | 477 | struct sk_buff *skb) |
496 | { | 478 | { |
497 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
498 | |||
499 | if (skb) | 479 | if (skb) |
500 | dev_kfree_skb(skb); | 480 | dev_kfree_skb(skb); |
501 | 481 | ||
@@ -511,8 +491,6 @@ static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event, | |||
511 | static int irlan_client_state_sync(struct irlan_cb *self, IRLAN_EVENT event, | 491 | static int irlan_client_state_sync(struct irlan_cb *self, IRLAN_EVENT event, |
512 | struct sk_buff *skb) | 492 | struct sk_buff *skb) |
513 | { | 493 | { |
514 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
515 | |||
516 | if (skb) | 494 | if (skb) |
517 | dev_kfree_skb(skb); | 495 | dev_kfree_skb(skb); |
518 | 496 | ||
diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c index cc60b4a282ae..481bbc2a4349 100644 --- a/net/irda/irlan/irlan_common.c +++ b/net/irda/irlan/irlan_common.c | |||
@@ -118,8 +118,6 @@ static int __init irlan_init(void) | |||
118 | struct irlan_cb *new; | 118 | struct irlan_cb *new; |
119 | __u16 hints; | 119 | __u16 hints; |
120 | 120 | ||
121 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
122 | |||
123 | #ifdef CONFIG_PROC_FS | 121 | #ifdef CONFIG_PROC_FS |
124 | { struct proc_dir_entry *proc; | 122 | { struct proc_dir_entry *proc; |
125 | proc = proc_create("irlan", 0, proc_irda, &irlan_fops); | 123 | proc = proc_create("irlan", 0, proc_irda, &irlan_fops); |
@@ -130,7 +128,6 @@ static int __init irlan_init(void) | |||
130 | } | 128 | } |
131 | #endif /* CONFIG_PROC_FS */ | 129 | #endif /* CONFIG_PROC_FS */ |
132 | 130 | ||
133 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
134 | hints = irlmp_service_to_hint(S_LAN); | 131 | hints = irlmp_service_to_hint(S_LAN); |
135 | 132 | ||
136 | /* Register with IrLMP as a client */ | 133 | /* Register with IrLMP as a client */ |
@@ -173,8 +170,6 @@ static void __exit irlan_cleanup(void) | |||
173 | { | 170 | { |
174 | struct irlan_cb *self, *next; | 171 | struct irlan_cb *self, *next; |
175 | 172 | ||
176 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
177 | |||
178 | irlmp_unregister_client(ckey); | 173 | irlmp_unregister_client(ckey); |
179 | irlmp_unregister_service(skey); | 174 | irlmp_unregister_service(skey); |
180 | 175 | ||
@@ -201,8 +196,6 @@ static struct irlan_cb __init *irlan_open(__u32 saddr, __u32 daddr) | |||
201 | struct net_device *dev; | 196 | struct net_device *dev; |
202 | struct irlan_cb *self; | 197 | struct irlan_cb *self; |
203 | 198 | ||
204 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
205 | |||
206 | /* Create network device with irlan */ | 199 | /* Create network device with irlan */ |
207 | dev = alloc_irlandev(eth ? "eth%d" : "irlan%d"); | 200 | dev = alloc_irlandev(eth ? "eth%d" : "irlan%d"); |
208 | if (!dev) | 201 | if (!dev) |
@@ -245,8 +238,8 @@ static struct irlan_cb __init *irlan_open(__u32 saddr, __u32 daddr) | |||
245 | irlan_next_provider_state(self, IRLAN_IDLE); | 238 | irlan_next_provider_state(self, IRLAN_IDLE); |
246 | 239 | ||
247 | if (register_netdev(dev)) { | 240 | if (register_netdev(dev)) { |
248 | IRDA_DEBUG(2, "%s(), register_netdev() failed!\n", | 241 | pr_debug("%s(), register_netdev() failed!\n", |
249 | __func__ ); | 242 | __func__); |
250 | self = NULL; | 243 | self = NULL; |
251 | free_netdev(dev); | 244 | free_netdev(dev); |
252 | } else { | 245 | } else { |
@@ -266,8 +259,6 @@ static struct irlan_cb __init *irlan_open(__u32 saddr, __u32 daddr) | |||
266 | */ | 259 | */ |
267 | static void __irlan_close(struct irlan_cb *self) | 260 | static void __irlan_close(struct irlan_cb *self) |
268 | { | 261 | { |
269 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
270 | |||
271 | ASSERT_RTNL(); | 262 | ASSERT_RTNL(); |
272 | IRDA_ASSERT(self != NULL, return;); | 263 | IRDA_ASSERT(self != NULL, return;); |
273 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 264 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
@@ -314,8 +305,6 @@ static void irlan_connect_indication(void *instance, void *sap, | |||
314 | struct irlan_cb *self; | 305 | struct irlan_cb *self; |
315 | struct tsap_cb *tsap; | 306 | struct tsap_cb *tsap; |
316 | 307 | ||
317 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
318 | |||
319 | self = instance; | 308 | self = instance; |
320 | tsap = sap; | 309 | tsap = sap; |
321 | 310 | ||
@@ -326,7 +315,7 @@ static void irlan_connect_indication(void *instance, void *sap, | |||
326 | self->max_sdu_size = max_sdu_size; | 315 | self->max_sdu_size = max_sdu_size; |
327 | self->max_header_size = max_header_size; | 316 | self->max_header_size = max_header_size; |
328 | 317 | ||
329 | IRDA_DEBUG(0, "%s: We are now connected!\n", __func__); | 318 | pr_debug("%s: We are now connected!\n", __func__); |
330 | 319 | ||
331 | del_timer(&self->watchdog_timer); | 320 | del_timer(&self->watchdog_timer); |
332 | 321 | ||
@@ -370,7 +359,7 @@ static void irlan_connect_confirm(void *instance, void *sap, | |||
370 | 359 | ||
371 | /* TODO: we could set the MTU depending on the max_sdu_size */ | 360 | /* TODO: we could set the MTU depending on the max_sdu_size */ |
372 | 361 | ||
373 | IRDA_DEBUG(0, "%s: We are now connected!\n", __func__); | 362 | pr_debug("%s: We are now connected!\n", __func__); |
374 | del_timer(&self->watchdog_timer); | 363 | del_timer(&self->watchdog_timer); |
375 | 364 | ||
376 | /* | 365 | /* |
@@ -403,7 +392,7 @@ static void irlan_disconnect_indication(void *instance, | |||
403 | struct irlan_cb *self; | 392 | struct irlan_cb *self; |
404 | struct tsap_cb *tsap; | 393 | struct tsap_cb *tsap; |
405 | 394 | ||
406 | IRDA_DEBUG(0, "%s(), reason=%d\n", __func__ , reason); | 395 | pr_debug("%s(), reason=%d\n", __func__ , reason); |
407 | 396 | ||
408 | self = instance; | 397 | self = instance; |
409 | tsap = sap; | 398 | tsap = sap; |
@@ -415,26 +404,26 @@ static void irlan_disconnect_indication(void *instance, | |||
415 | 404 | ||
416 | IRDA_ASSERT(tsap == self->tsap_data, return;); | 405 | IRDA_ASSERT(tsap == self->tsap_data, return;); |
417 | 406 | ||
418 | IRDA_DEBUG(2, "IrLAN, data channel disconnected by peer!\n"); | 407 | pr_debug("IrLAN, data channel disconnected by peer!\n"); |
419 | 408 | ||
420 | /* Save reason so we know if we should try to reconnect or not */ | 409 | /* Save reason so we know if we should try to reconnect or not */ |
421 | self->disconnect_reason = reason; | 410 | self->disconnect_reason = reason; |
422 | 411 | ||
423 | switch (reason) { | 412 | switch (reason) { |
424 | case LM_USER_REQUEST: /* User request */ | 413 | case LM_USER_REQUEST: /* User request */ |
425 | IRDA_DEBUG(2, "%s(), User requested\n", __func__ ); | 414 | pr_debug("%s(), User requested\n", __func__); |
426 | break; | 415 | break; |
427 | case LM_LAP_DISCONNECT: /* Unexpected IrLAP disconnect */ | 416 | case LM_LAP_DISCONNECT: /* Unexpected IrLAP disconnect */ |
428 | IRDA_DEBUG(2, "%s(), Unexpected IrLAP disconnect\n", __func__ ); | 417 | pr_debug("%s(), Unexpected IrLAP disconnect\n", __func__); |
429 | break; | 418 | break; |
430 | case LM_CONNECT_FAILURE: /* Failed to establish IrLAP connection */ | 419 | case LM_CONNECT_FAILURE: /* Failed to establish IrLAP connection */ |
431 | IRDA_DEBUG(2, "%s(), IrLAP connect failed\n", __func__ ); | 420 | pr_debug("%s(), IrLAP connect failed\n", __func__); |
432 | break; | 421 | break; |
433 | case LM_LAP_RESET: /* IrLAP reset */ | 422 | case LM_LAP_RESET: /* IrLAP reset */ |
434 | IRDA_DEBUG(2, "%s(), IrLAP reset\n", __func__ ); | 423 | pr_debug("%s(), IrLAP reset\n", __func__); |
435 | break; | 424 | break; |
436 | case LM_INIT_DISCONNECT: | 425 | case LM_INIT_DISCONNECT: |
437 | IRDA_DEBUG(2, "%s(), IrLMP connect failed\n", __func__ ); | 426 | pr_debug("%s(), IrLMP connect failed\n", __func__); |
438 | break; | 427 | break; |
439 | default: | 428 | default: |
440 | net_err_ratelimited("%s(), Unknown disconnect reason\n", | 429 | net_err_ratelimited("%s(), Unknown disconnect reason\n", |
@@ -460,8 +449,6 @@ void irlan_open_data_tsap(struct irlan_cb *self) | |||
460 | struct tsap_cb *tsap; | 449 | struct tsap_cb *tsap; |
461 | notify_t notify; | 450 | notify_t notify; |
462 | 451 | ||
463 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
464 | |||
465 | IRDA_ASSERT(self != NULL, return;); | 452 | IRDA_ASSERT(self != NULL, return;); |
466 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 453 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
467 | 454 | ||
@@ -482,7 +469,7 @@ void irlan_open_data_tsap(struct irlan_cb *self) | |||
482 | 469 | ||
483 | tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, ¬ify); | 470 | tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, ¬ify); |
484 | if (!tsap) { | 471 | if (!tsap) { |
485 | IRDA_DEBUG(2, "%s(), Got no tsap!\n", __func__ ); | 472 | pr_debug("%s(), Got no tsap!\n", __func__); |
486 | return; | 473 | return; |
487 | } | 474 | } |
488 | self->tsap_data = tsap; | 475 | self->tsap_data = tsap; |
@@ -496,8 +483,6 @@ void irlan_open_data_tsap(struct irlan_cb *self) | |||
496 | 483 | ||
497 | void irlan_close_tsaps(struct irlan_cb *self) | 484 | void irlan_close_tsaps(struct irlan_cb *self) |
498 | { | 485 | { |
499 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
500 | |||
501 | IRDA_ASSERT(self != NULL, return;); | 486 | IRDA_ASSERT(self != NULL, return;); |
502 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 487 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
503 | 488 | ||
@@ -586,8 +571,6 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self) | |||
586 | { | 571 | { |
587 | struct sk_buff *skb; | 572 | struct sk_buff *skb; |
588 | 573 | ||
589 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
590 | |||
591 | if (irda_lock(&self->client.tx_busy) == FALSE) | 574 | if (irda_lock(&self->client.tx_busy) == FALSE) |
592 | return -EBUSY; | 575 | return -EBUSY; |
593 | 576 | ||
@@ -605,7 +588,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self) | |||
605 | dev_kfree_skb(skb); | 588 | dev_kfree_skb(skb); |
606 | return -1; | 589 | return -1; |
607 | } | 590 | } |
608 | IRDA_DEBUG(2, "%s(), sending ...\n", __func__ ); | 591 | pr_debug("%s(), sending ...\n", __func__); |
609 | 592 | ||
610 | return irttp_data_request(self->client.tsap_ctrl, skb); | 593 | return irttp_data_request(self->client.tsap_ctrl, skb); |
611 | } | 594 | } |
@@ -618,8 +601,6 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self) | |||
618 | */ | 601 | */ |
619 | static void irlan_ctrl_data_request(struct irlan_cb *self, struct sk_buff *skb) | 602 | static void irlan_ctrl_data_request(struct irlan_cb *self, struct sk_buff *skb) |
620 | { | 603 | { |
621 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
622 | |||
623 | /* Queue command */ | 604 | /* Queue command */ |
624 | skb_queue_tail(&self->client.txq, skb); | 605 | skb_queue_tail(&self->client.txq, skb); |
625 | 606 | ||
@@ -638,8 +619,6 @@ void irlan_get_provider_info(struct irlan_cb *self) | |||
638 | struct sk_buff *skb; | 619 | struct sk_buff *skb; |
639 | __u8 *frame; | 620 | __u8 *frame; |
640 | 621 | ||
641 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
642 | |||
643 | IRDA_ASSERT(self != NULL, return;); | 622 | IRDA_ASSERT(self != NULL, return;); |
644 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 623 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
645 | 624 | ||
@@ -671,8 +650,6 @@ void irlan_open_data_channel(struct irlan_cb *self) | |||
671 | struct sk_buff *skb; | 650 | struct sk_buff *skb; |
672 | __u8 *frame; | 651 | __u8 *frame; |
673 | 652 | ||
674 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
675 | |||
676 | IRDA_ASSERT(self != NULL, return;); | 653 | IRDA_ASSERT(self != NULL, return;); |
677 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 654 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
678 | 655 | ||
@@ -706,8 +683,6 @@ void irlan_close_data_channel(struct irlan_cb *self) | |||
706 | struct sk_buff *skb; | 683 | struct sk_buff *skb; |
707 | __u8 *frame; | 684 | __u8 *frame; |
708 | 685 | ||
709 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
710 | |||
711 | IRDA_ASSERT(self != NULL, return;); | 686 | IRDA_ASSERT(self != NULL, return;); |
712 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 687 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
713 | 688 | ||
@@ -747,8 +722,6 @@ static void irlan_open_unicast_addr(struct irlan_cb *self) | |||
747 | struct sk_buff *skb; | 722 | struct sk_buff *skb; |
748 | __u8 *frame; | 723 | __u8 *frame; |
749 | 724 | ||
750 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
751 | |||
752 | IRDA_ASSERT(self != NULL, return;); | 725 | IRDA_ASSERT(self != NULL, return;); |
753 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 726 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
754 | 727 | ||
@@ -789,8 +762,6 @@ void irlan_set_broadcast_filter(struct irlan_cb *self, int status) | |||
789 | struct sk_buff *skb; | 762 | struct sk_buff *skb; |
790 | __u8 *frame; | 763 | __u8 *frame; |
791 | 764 | ||
792 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
793 | |||
794 | IRDA_ASSERT(self != NULL, return;); | 765 | IRDA_ASSERT(self != NULL, return;); |
795 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 766 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
796 | 767 | ||
@@ -833,8 +804,6 @@ void irlan_set_multicast_filter(struct irlan_cb *self, int status) | |||
833 | struct sk_buff *skb; | 804 | struct sk_buff *skb; |
834 | __u8 *frame; | 805 | __u8 *frame; |
835 | 806 | ||
836 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
837 | |||
838 | IRDA_ASSERT(self != NULL, return;); | 807 | IRDA_ASSERT(self != NULL, return;); |
839 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 808 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
840 | 809 | ||
@@ -878,8 +847,6 @@ static void irlan_get_unicast_addr(struct irlan_cb *self) | |||
878 | struct sk_buff *skb; | 847 | struct sk_buff *skb; |
879 | __u8 *frame; | 848 | __u8 *frame; |
880 | 849 | ||
881 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
882 | |||
883 | IRDA_ASSERT(self != NULL, return;); | 850 | IRDA_ASSERT(self != NULL, return;); |
884 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 851 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
885 | 852 | ||
@@ -918,8 +885,6 @@ void irlan_get_media_char(struct irlan_cb *self) | |||
918 | struct sk_buff *skb; | 885 | struct sk_buff *skb; |
919 | __u8 *frame; | 886 | __u8 *frame; |
920 | 887 | ||
921 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
922 | |||
923 | IRDA_ASSERT(self != NULL, return;); | 888 | IRDA_ASSERT(self != NULL, return;); |
924 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 889 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
925 | 890 | ||
@@ -1006,7 +971,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type, | |||
1006 | int n=0; | 971 | int n=0; |
1007 | 972 | ||
1008 | if (skb == NULL) { | 973 | if (skb == NULL) { |
1009 | IRDA_DEBUG(2, "%s(), Got NULL skb\n", __func__ ); | 974 | pr_debug("%s(), Got NULL skb\n", __func__); |
1010 | return 0; | 975 | return 0; |
1011 | } | 976 | } |
1012 | 977 | ||
@@ -1023,7 +988,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type, | |||
1023 | IRDA_ASSERT(value_len > 0, return 0;); | 988 | IRDA_ASSERT(value_len > 0, return 0;); |
1024 | break; | 989 | break; |
1025 | default: | 990 | default: |
1026 | IRDA_DEBUG(2, "%s(), Unknown parameter type!\n", __func__ ); | 991 | pr_debug("%s(), Unknown parameter type!\n", __func__); |
1027 | return 0; | 992 | return 0; |
1028 | } | 993 | } |
1029 | 994 | ||
@@ -1032,7 +997,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type, | |||
1032 | 997 | ||
1033 | /* Make space for data */ | 998 | /* Make space for data */ |
1034 | if (skb_tailroom(skb) < (param_len+value_len+3)) { | 999 | if (skb_tailroom(skb) < (param_len+value_len+3)) { |
1035 | IRDA_DEBUG(2, "%s(), No more space at end of skb\n", __func__ ); | 1000 | pr_debug("%s(), No more space at end of skb\n", __func__); |
1036 | return 0; | 1001 | return 0; |
1037 | } | 1002 | } |
1038 | skb_put(skb, param_len+value_len+3); | 1003 | skb_put(skb, param_len+value_len+3); |
@@ -1079,13 +1044,11 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len) | |||
1079 | __u16 val_len; | 1044 | __u16 val_len; |
1080 | int n=0; | 1045 | int n=0; |
1081 | 1046 | ||
1082 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
1083 | |||
1084 | /* get length of parameter name (1 byte) */ | 1047 | /* get length of parameter name (1 byte) */ |
1085 | name_len = buf[n++]; | 1048 | name_len = buf[n++]; |
1086 | 1049 | ||
1087 | if (name_len > 254) { | 1050 | if (name_len > 254) { |
1088 | IRDA_DEBUG(2, "%s(), name_len > 254\n", __func__ ); | 1051 | pr_debug("%s(), name_len > 254\n", __func__); |
1089 | return -RSP_INVALID_COMMAND_FORMAT; | 1052 | return -RSP_INVALID_COMMAND_FORMAT; |
1090 | } | 1053 | } |
1091 | 1054 | ||
@@ -1102,7 +1065,7 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len) | |||
1102 | le16_to_cpus(&val_len); n+=2; | 1065 | le16_to_cpus(&val_len); n+=2; |
1103 | 1066 | ||
1104 | if (val_len >= 1016) { | 1067 | if (val_len >= 1016) { |
1105 | IRDA_DEBUG(2, "%s(), parameter length to long\n", __func__ ); | 1068 | pr_debug("%s(), parameter length to long\n", __func__); |
1106 | return -RSP_INVALID_COMMAND_FORMAT; | 1069 | return -RSP_INVALID_COMMAND_FORMAT; |
1107 | } | 1070 | } |
1108 | *len = val_len; | 1071 | *len = val_len; |
@@ -1112,8 +1075,8 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len) | |||
1112 | value[val_len] = '\0'; | 1075 | value[val_len] = '\0'; |
1113 | n+=val_len; | 1076 | n+=val_len; |
1114 | 1077 | ||
1115 | IRDA_DEBUG(4, "Parameter: %s ", name); | 1078 | pr_debug("Parameter: %s ", name); |
1116 | IRDA_DEBUG(4, "Value: %s\n", value); | 1079 | pr_debug("Value: %s\n", value); |
1117 | 1080 | ||
1118 | return n; | 1081 | return n; |
1119 | } | 1082 | } |
diff --git a/net/irda/irlan/irlan_eth.c b/net/irda/irlan/irlan_eth.c index 94b948ef36f9..fcfbe579434a 100644 --- a/net/irda/irlan/irlan_eth.c +++ b/net/irda/irlan/irlan_eth.c | |||
@@ -110,8 +110,6 @@ static int irlan_eth_open(struct net_device *dev) | |||
110 | { | 110 | { |
111 | struct irlan_cb *self = netdev_priv(dev); | 111 | struct irlan_cb *self = netdev_priv(dev); |
112 | 112 | ||
113 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
114 | |||
115 | /* Ready to play! */ | 113 | /* Ready to play! */ |
116 | netif_stop_queue(dev); /* Wait until data link is ready */ | 114 | netif_stop_queue(dev); /* Wait until data link is ready */ |
117 | 115 | ||
@@ -137,8 +135,6 @@ static int irlan_eth_close(struct net_device *dev) | |||
137 | { | 135 | { |
138 | struct irlan_cb *self = netdev_priv(dev); | 136 | struct irlan_cb *self = netdev_priv(dev); |
139 | 137 | ||
140 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
141 | |||
142 | /* Stop device */ | 138 | /* Stop device */ |
143 | netif_stop_queue(dev); | 139 | netif_stop_queue(dev); |
144 | 140 | ||
@@ -231,8 +227,8 @@ int irlan_eth_receive(void *instance, void *sap, struct sk_buff *skb) | |||
231 | return 0; | 227 | return 0; |
232 | } | 228 | } |
233 | if (skb->len < ETH_HLEN) { | 229 | if (skb->len < ETH_HLEN) { |
234 | IRDA_DEBUG(0, "%s() : IrLAN frame too short (%d)\n", | 230 | pr_debug("%s() : IrLAN frame too short (%d)\n", |
235 | __func__, skb->len); | 231 | __func__, skb->len); |
236 | dev->stats.rx_dropped++; | 232 | dev->stats.rx_dropped++; |
237 | dev_kfree_skb(skb); | 233 | dev_kfree_skb(skb); |
238 | return 0; | 234 | return 0; |
@@ -281,9 +277,9 @@ void irlan_eth_flow_indication(void *instance, void *sap, LOCAL_FLOW flow) | |||
281 | 277 | ||
282 | IRDA_ASSERT(dev != NULL, return;); | 278 | IRDA_ASSERT(dev != NULL, return;); |
283 | 279 | ||
284 | IRDA_DEBUG(0, "%s() : flow %s ; running %d\n", __func__, | 280 | pr_debug("%s() : flow %s ; running %d\n", __func__, |
285 | flow == FLOW_STOP ? "FLOW_STOP" : "FLOW_START", | 281 | flow == FLOW_STOP ? "FLOW_STOP" : "FLOW_START", |
286 | netif_running(dev)); | 282 | netif_running(dev)); |
287 | 283 | ||
288 | switch (flow) { | 284 | switch (flow) { |
289 | case FLOW_STOP: | 285 | case FLOW_STOP: |
@@ -310,11 +306,9 @@ static void irlan_eth_set_multicast_list(struct net_device *dev) | |||
310 | { | 306 | { |
311 | struct irlan_cb *self = netdev_priv(dev); | 307 | struct irlan_cb *self = netdev_priv(dev); |
312 | 308 | ||
313 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
314 | |||
315 | /* Check if data channel has been connected yet */ | 309 | /* Check if data channel has been connected yet */ |
316 | if (self->client.state != IRLAN_DATA) { | 310 | if (self->client.state != IRLAN_DATA) { |
317 | IRDA_DEBUG(1, "%s(), delaying!\n", __func__); | 311 | pr_debug("%s(), delaying!\n", __func__); |
318 | return; | 312 | return; |
319 | } | 313 | } |
320 | 314 | ||
@@ -324,18 +318,18 @@ static void irlan_eth_set_multicast_list(struct net_device *dev) | |||
324 | } else if ((dev->flags & IFF_ALLMULTI) || | 318 | } else if ((dev->flags & IFF_ALLMULTI) || |
325 | netdev_mc_count(dev) > HW_MAX_ADDRS) { | 319 | netdev_mc_count(dev) > HW_MAX_ADDRS) { |
326 | /* Disable promiscuous mode, use normal mode. */ | 320 | /* Disable promiscuous mode, use normal mode. */ |
327 | IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __func__); | 321 | pr_debug("%s(), Setting multicast filter\n", __func__); |
328 | /* hardware_set_filter(NULL); */ | 322 | /* hardware_set_filter(NULL); */ |
329 | 323 | ||
330 | irlan_set_multicast_filter(self, TRUE); | 324 | irlan_set_multicast_filter(self, TRUE); |
331 | } else if (!netdev_mc_empty(dev)) { | 325 | } else if (!netdev_mc_empty(dev)) { |
332 | IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __func__); | 326 | pr_debug("%s(), Setting multicast filter\n", __func__); |
333 | /* Walk the address list, and load the filter */ | 327 | /* Walk the address list, and load the filter */ |
334 | /* hardware_set_filter(dev->mc_list); */ | 328 | /* hardware_set_filter(dev->mc_list); */ |
335 | 329 | ||
336 | irlan_set_multicast_filter(self, TRUE); | 330 | irlan_set_multicast_filter(self, TRUE); |
337 | } else { | 331 | } else { |
338 | IRDA_DEBUG(4, "%s(), Clearing multicast filter\n", __func__); | 332 | pr_debug("%s(), Clearing multicast filter\n", __func__); |
339 | irlan_set_multicast_filter(self, FALSE); | 333 | irlan_set_multicast_filter(self, FALSE); |
340 | } | 334 | } |
341 | 335 | ||
diff --git a/net/irda/irlan/irlan_event.c b/net/irda/irlan/irlan_event.c index 43f16040a6fe..9a1cc11c16f6 100644 --- a/net/irda/irlan/irlan_event.c +++ b/net/irda/irlan/irlan_event.c | |||
@@ -40,7 +40,7 @@ const char * const irlan_state[] = { | |||
40 | 40 | ||
41 | void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state) | 41 | void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state) |
42 | { | 42 | { |
43 | IRDA_DEBUG(2, "%s(), %s\n", __func__ , irlan_state[state]); | 43 | pr_debug("%s(), %s\n", __func__ , irlan_state[state]); |
44 | 44 | ||
45 | IRDA_ASSERT(self != NULL, return;); | 45 | IRDA_ASSERT(self != NULL, return;); |
46 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 46 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
@@ -50,7 +50,7 @@ void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state) | |||
50 | 50 | ||
51 | void irlan_next_provider_state(struct irlan_cb *self, IRLAN_STATE state) | 51 | void irlan_next_provider_state(struct irlan_cb *self, IRLAN_STATE state) |
52 | { | 52 | { |
53 | IRDA_DEBUG(2, "%s(), %s\n", __func__ , irlan_state[state]); | 53 | pr_debug("%s(), %s\n", __func__ , irlan_state[state]); |
54 | 54 | ||
55 | IRDA_ASSERT(self != NULL, return;); | 55 | IRDA_ASSERT(self != NULL, return;); |
56 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 56 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
diff --git a/net/irda/irlan/irlan_filter.c b/net/irda/irlan/irlan_filter.c index 7977be7caf0f..e755e90b2f26 100644 --- a/net/irda/irlan/irlan_filter.c +++ b/net/irda/irlan/irlan_filter.c | |||
@@ -43,7 +43,7 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb) | |||
43 | if ((self->provider.filter_type == IRLAN_DIRECTED) && | 43 | if ((self->provider.filter_type == IRLAN_DIRECTED) && |
44 | (self->provider.filter_operation == DYNAMIC)) | 44 | (self->provider.filter_operation == DYNAMIC)) |
45 | { | 45 | { |
46 | IRDA_DEBUG(0, "Giving peer a dynamic Ethernet address\n"); | 46 | pr_debug("Giving peer a dynamic Ethernet address\n"); |
47 | self->provider.mac_address[0] = 0x40; | 47 | self->provider.mac_address[0] = 0x40; |
48 | self->provider.mac_address[1] = 0x00; | 48 | self->provider.mac_address[1] = 0x00; |
49 | self->provider.mac_address[2] = 0x00; | 49 | self->provider.mac_address[2] = 0x00; |
@@ -73,7 +73,7 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb) | |||
73 | if ((self->provider.filter_type == IRLAN_DIRECTED) && | 73 | if ((self->provider.filter_type == IRLAN_DIRECTED) && |
74 | (self->provider.filter_mode == FILTER)) | 74 | (self->provider.filter_mode == FILTER)) |
75 | { | 75 | { |
76 | IRDA_DEBUG(0, "Directed filter on\n"); | 76 | pr_debug("Directed filter on\n"); |
77 | skb->data[0] = 0x00; /* Success */ | 77 | skb->data[0] = 0x00; /* Success */ |
78 | skb->data[1] = 0x00; | 78 | skb->data[1] = 0x00; |
79 | return; | 79 | return; |
@@ -81,7 +81,7 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb) | |||
81 | if ((self->provider.filter_type == IRLAN_DIRECTED) && | 81 | if ((self->provider.filter_type == IRLAN_DIRECTED) && |
82 | (self->provider.filter_mode == NONE)) | 82 | (self->provider.filter_mode == NONE)) |
83 | { | 83 | { |
84 | IRDA_DEBUG(0, "Directed filter off\n"); | 84 | pr_debug("Directed filter off\n"); |
85 | skb->data[0] = 0x00; /* Success */ | 85 | skb->data[0] = 0x00; /* Success */ |
86 | skb->data[1] = 0x00; | 86 | skb->data[1] = 0x00; |
87 | return; | 87 | return; |
@@ -90,7 +90,7 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb) | |||
90 | if ((self->provider.filter_type == IRLAN_BROADCAST) && | 90 | if ((self->provider.filter_type == IRLAN_BROADCAST) && |
91 | (self->provider.filter_mode == FILTER)) | 91 | (self->provider.filter_mode == FILTER)) |
92 | { | 92 | { |
93 | IRDA_DEBUG(0, "Broadcast filter on\n"); | 93 | pr_debug("Broadcast filter on\n"); |
94 | skb->data[0] = 0x00; /* Success */ | 94 | skb->data[0] = 0x00; /* Success */ |
95 | skb->data[1] = 0x00; | 95 | skb->data[1] = 0x00; |
96 | return; | 96 | return; |
@@ -98,7 +98,7 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb) | |||
98 | if ((self->provider.filter_type == IRLAN_BROADCAST) && | 98 | if ((self->provider.filter_type == IRLAN_BROADCAST) && |
99 | (self->provider.filter_mode == NONE)) | 99 | (self->provider.filter_mode == NONE)) |
100 | { | 100 | { |
101 | IRDA_DEBUG(0, "Broadcast filter off\n"); | 101 | pr_debug("Broadcast filter off\n"); |
102 | skb->data[0] = 0x00; /* Success */ | 102 | skb->data[0] = 0x00; /* Success */ |
103 | skb->data[1] = 0x00; | 103 | skb->data[1] = 0x00; |
104 | return; | 104 | return; |
@@ -106,7 +106,7 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb) | |||
106 | if ((self->provider.filter_type == IRLAN_MULTICAST) && | 106 | if ((self->provider.filter_type == IRLAN_MULTICAST) && |
107 | (self->provider.filter_mode == FILTER)) | 107 | (self->provider.filter_mode == FILTER)) |
108 | { | 108 | { |
109 | IRDA_DEBUG(0, "Multicast filter on\n"); | 109 | pr_debug("Multicast filter on\n"); |
110 | skb->data[0] = 0x00; /* Success */ | 110 | skb->data[0] = 0x00; /* Success */ |
111 | skb->data[1] = 0x00; | 111 | skb->data[1] = 0x00; |
112 | return; | 112 | return; |
@@ -114,7 +114,7 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb) | |||
114 | if ((self->provider.filter_type == IRLAN_MULTICAST) && | 114 | if ((self->provider.filter_type == IRLAN_MULTICAST) && |
115 | (self->provider.filter_mode == NONE)) | 115 | (self->provider.filter_mode == NONE)) |
116 | { | 116 | { |
117 | IRDA_DEBUG(0, "Multicast filter off\n"); | 117 | pr_debug("Multicast filter off\n"); |
118 | skb->data[0] = 0x00; /* Success */ | 118 | skb->data[0] = 0x00; /* Success */ |
119 | skb->data[1] = 0x00; | 119 | skb->data[1] = 0x00; |
120 | return; | 120 | return; |
@@ -122,7 +122,7 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb) | |||
122 | if ((self->provider.filter_type == IRLAN_MULTICAST) && | 122 | if ((self->provider.filter_type == IRLAN_MULTICAST) && |
123 | (self->provider.filter_operation == GET)) | 123 | (self->provider.filter_operation == GET)) |
124 | { | 124 | { |
125 | IRDA_DEBUG(0, "Multicast filter get\n"); | 125 | pr_debug("Multicast filter get\n"); |
126 | skb->data[0] = 0x00; /* Success? */ | 126 | skb->data[0] = 0x00; /* Success? */ |
127 | skb->data[1] = 0x02; | 127 | skb->data[1] = 0x02; |
128 | irlan_insert_string_param(skb, "FILTER_MODE", "NONE"); | 128 | irlan_insert_string_param(skb, "FILTER_MODE", "NONE"); |
@@ -132,7 +132,7 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb) | |||
132 | skb->data[0] = 0x00; /* Command not supported */ | 132 | skb->data[0] = 0x00; /* Command not supported */ |
133 | skb->data[1] = 0x00; | 133 | skb->data[1] = 0x00; |
134 | 134 | ||
135 | IRDA_DEBUG(0, "Not implemented!\n"); | 135 | pr_debug("Not implemented!\n"); |
136 | } | 136 | } |
137 | 137 | ||
138 | /* | 138 | /* |
@@ -143,18 +143,15 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb) | |||
143 | */ | 143 | */ |
144 | void irlan_check_command_param(struct irlan_cb *self, char *param, char *value) | 144 | void irlan_check_command_param(struct irlan_cb *self, char *param, char *value) |
145 | { | 145 | { |
146 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
147 | |||
148 | IRDA_ASSERT(self != NULL, return;); | 146 | IRDA_ASSERT(self != NULL, return;); |
149 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 147 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
150 | 148 | ||
151 | IRDA_DEBUG(4, "%s, %s\n", param, value); | 149 | pr_debug("%s, %s\n", param, value); |
152 | 150 | ||
153 | /* | 151 | /* |
154 | * This is experimental!! DB. | 152 | * This is experimental!! DB. |
155 | */ | 153 | */ |
156 | if (strcmp(param, "MODE") == 0) { | 154 | if (strcmp(param, "MODE") == 0) { |
157 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
158 | self->use_udata = TRUE; | 155 | self->use_udata = TRUE; |
159 | return; | 156 | return; |
160 | } | 157 | } |
diff --git a/net/irda/irlan/irlan_provider.c b/net/irda/irlan/irlan_provider.c index 4664855222f4..15c292cf2644 100644 --- a/net/irda/irlan/irlan_provider.c +++ b/net/irda/irlan/irlan_provider.c | |||
@@ -70,8 +70,6 @@ static int irlan_provider_data_indication(void *instance, void *sap, | |||
70 | struct irlan_cb *self; | 70 | struct irlan_cb *self; |
71 | __u8 code; | 71 | __u8 code; |
72 | 72 | ||
73 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
74 | |||
75 | self = instance; | 73 | self = instance; |
76 | 74 | ||
77 | IRDA_ASSERT(self != NULL, return -1;); | 75 | IRDA_ASSERT(self != NULL, return -1;); |
@@ -82,32 +80,32 @@ static int irlan_provider_data_indication(void *instance, void *sap, | |||
82 | code = skb->data[0]; | 80 | code = skb->data[0]; |
83 | switch(code) { | 81 | switch(code) { |
84 | case CMD_GET_PROVIDER_INFO: | 82 | case CMD_GET_PROVIDER_INFO: |
85 | IRDA_DEBUG(4, "Got GET_PROVIDER_INFO command!\n"); | 83 | pr_debug("Got GET_PROVIDER_INFO command!\n"); |
86 | irlan_do_provider_event(self, IRLAN_GET_INFO_CMD, skb); | 84 | irlan_do_provider_event(self, IRLAN_GET_INFO_CMD, skb); |
87 | break; | 85 | break; |
88 | 86 | ||
89 | case CMD_GET_MEDIA_CHAR: | 87 | case CMD_GET_MEDIA_CHAR: |
90 | IRDA_DEBUG(4, "Got GET_MEDIA_CHAR command!\n"); | 88 | pr_debug("Got GET_MEDIA_CHAR command!\n"); |
91 | irlan_do_provider_event(self, IRLAN_GET_MEDIA_CMD, skb); | 89 | irlan_do_provider_event(self, IRLAN_GET_MEDIA_CMD, skb); |
92 | break; | 90 | break; |
93 | case CMD_OPEN_DATA_CHANNEL: | 91 | case CMD_OPEN_DATA_CHANNEL: |
94 | IRDA_DEBUG(4, "Got OPEN_DATA_CHANNEL command!\n"); | 92 | pr_debug("Got OPEN_DATA_CHANNEL command!\n"); |
95 | irlan_do_provider_event(self, IRLAN_OPEN_DATA_CMD, skb); | 93 | irlan_do_provider_event(self, IRLAN_OPEN_DATA_CMD, skb); |
96 | break; | 94 | break; |
97 | case CMD_FILTER_OPERATION: | 95 | case CMD_FILTER_OPERATION: |
98 | IRDA_DEBUG(4, "Got FILTER_OPERATION command!\n"); | 96 | pr_debug("Got FILTER_OPERATION command!\n"); |
99 | irlan_do_provider_event(self, IRLAN_FILTER_CONFIG_CMD, skb); | 97 | irlan_do_provider_event(self, IRLAN_FILTER_CONFIG_CMD, skb); |
100 | break; | 98 | break; |
101 | case CMD_RECONNECT_DATA_CHAN: | 99 | case CMD_RECONNECT_DATA_CHAN: |
102 | IRDA_DEBUG(2, "%s(), Got RECONNECT_DATA_CHAN command\n", __func__ ); | 100 | pr_debug("%s(), Got RECONNECT_DATA_CHAN command\n", __func__); |
103 | IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __func__ ); | 101 | pr_debug("%s(), NOT IMPLEMENTED\n", __func__); |
104 | break; | 102 | break; |
105 | case CMD_CLOSE_DATA_CHAN: | 103 | case CMD_CLOSE_DATA_CHAN: |
106 | IRDA_DEBUG(2, "Got CLOSE_DATA_CHAN command!\n"); | 104 | pr_debug("Got CLOSE_DATA_CHAN command!\n"); |
107 | IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __func__ ); | 105 | pr_debug("%s(), NOT IMPLEMENTED\n", __func__); |
108 | break; | 106 | break; |
109 | default: | 107 | default: |
110 | IRDA_DEBUG(2, "%s(), Unknown command!\n", __func__ ); | 108 | pr_debug("%s(), Unknown command!\n", __func__); |
111 | break; | 109 | break; |
112 | } | 110 | } |
113 | return 0; | 111 | return 0; |
@@ -128,8 +126,6 @@ static void irlan_provider_connect_indication(void *instance, void *sap, | |||
128 | struct irlan_cb *self; | 126 | struct irlan_cb *self; |
129 | struct tsap_cb *tsap; | 127 | struct tsap_cb *tsap; |
130 | 128 | ||
131 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
132 | |||
133 | self = instance; | 129 | self = instance; |
134 | tsap = sap; | 130 | tsap = sap; |
135 | 131 | ||
@@ -179,7 +175,7 @@ static void irlan_provider_disconnect_indication(void *instance, void *sap, | |||
179 | struct irlan_cb *self; | 175 | struct irlan_cb *self; |
180 | struct tsap_cb *tsap; | 176 | struct tsap_cb *tsap; |
181 | 177 | ||
182 | IRDA_DEBUG(4, "%s(), reason=%d\n", __func__ , reason); | 178 | pr_debug("%s(), reason=%d\n", __func__ , reason); |
183 | 179 | ||
184 | self = instance; | 180 | self = instance; |
185 | tsap = sap; | 181 | tsap = sap; |
@@ -233,7 +229,7 @@ int irlan_provider_parse_command(struct irlan_cb *self, int cmd, | |||
233 | 229 | ||
234 | IRDA_ASSERT(skb != NULL, return -RSP_PROTOCOL_ERROR;); | 230 | IRDA_ASSERT(skb != NULL, return -RSP_PROTOCOL_ERROR;); |
235 | 231 | ||
236 | IRDA_DEBUG(4, "%s(), skb->len=%d\n", __func__ , (int)skb->len); | 232 | pr_debug("%s(), skb->len=%d\n", __func__ , (int)skb->len); |
237 | 233 | ||
238 | IRDA_ASSERT(self != NULL, return -RSP_PROTOCOL_ERROR;); | 234 | IRDA_ASSERT(self != NULL, return -RSP_PROTOCOL_ERROR;); |
239 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -RSP_PROTOCOL_ERROR;); | 235 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -RSP_PROTOCOL_ERROR;); |
@@ -255,7 +251,7 @@ int irlan_provider_parse_command(struct irlan_cb *self, int cmd, | |||
255 | /* How many parameters? */ | 251 | /* How many parameters? */ |
256 | count = frame[1]; | 252 | count = frame[1]; |
257 | 253 | ||
258 | IRDA_DEBUG(4, "Got %d parameters\n", count); | 254 | pr_debug("Got %d parameters\n", count); |
259 | 255 | ||
260 | ptr = frame+2; | 256 | ptr = frame+2; |
261 | 257 | ||
@@ -263,7 +259,7 @@ int irlan_provider_parse_command(struct irlan_cb *self, int cmd, | |||
263 | for (i=0; i<count;i++) { | 259 | for (i=0; i<count;i++) { |
264 | ret = irlan_extract_param(ptr, name, value, &val_len); | 260 | ret = irlan_extract_param(ptr, name, value, &val_len); |
265 | if (ret < 0) { | 261 | if (ret < 0) { |
266 | IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __func__ ); | 262 | pr_debug("%s(), IrLAN, Error!\n", __func__); |
267 | break; | 263 | break; |
268 | } | 264 | } |
269 | ptr+=ret; | 265 | ptr+=ret; |
@@ -288,8 +284,6 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command, | |||
288 | { | 284 | { |
289 | struct sk_buff *skb; | 285 | struct sk_buff *skb; |
290 | 286 | ||
291 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
292 | |||
293 | IRDA_ASSERT(self != NULL, return;); | 287 | IRDA_ASSERT(self != NULL, return;); |
294 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 288 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
295 | 289 | ||
@@ -320,7 +314,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command, | |||
320 | irlan_insert_string_param(skb, "MEDIA", "802.5"); | 314 | irlan_insert_string_param(skb, "MEDIA", "802.5"); |
321 | break; | 315 | break; |
322 | default: | 316 | default: |
323 | IRDA_DEBUG(2, "%s(), unknown media type!\n", __func__ ); | 317 | pr_debug("%s(), unknown media type!\n", __func__); |
324 | break; | 318 | break; |
325 | } | 319 | } |
326 | irlan_insert_short_param(skb, "IRLAN_VER", 0x0101); | 320 | irlan_insert_short_param(skb, "IRLAN_VER", 0x0101); |
@@ -344,7 +338,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command, | |||
344 | irlan_insert_string_param(skb, "ACCESS_TYPE", "HOSTED"); | 338 | irlan_insert_string_param(skb, "ACCESS_TYPE", "HOSTED"); |
345 | break; | 339 | break; |
346 | default: | 340 | default: |
347 | IRDA_DEBUG(2, "%s(), Unknown access type\n", __func__ ); | 341 | pr_debug("%s(), Unknown access type\n", __func__); |
348 | break; | 342 | break; |
349 | } | 343 | } |
350 | irlan_insert_short_param(skb, "MAX_FRAME", 0x05ee); | 344 | irlan_insert_short_param(skb, "MAX_FRAME", 0x05ee); |
@@ -364,7 +358,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command, | |||
364 | irlan_filter_request(self, skb); | 358 | irlan_filter_request(self, skb); |
365 | break; | 359 | break; |
366 | default: | 360 | default: |
367 | IRDA_DEBUG(2, "%s(), Unknown command!\n", __func__ ); | 361 | pr_debug("%s(), Unknown command!\n", __func__); |
368 | break; | 362 | break; |
369 | } | 363 | } |
370 | 364 | ||
@@ -382,8 +376,6 @@ int irlan_provider_open_ctrl_tsap(struct irlan_cb *self) | |||
382 | struct tsap_cb *tsap; | 376 | struct tsap_cb *tsap; |
383 | notify_t notify; | 377 | notify_t notify; |
384 | 378 | ||
385 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
386 | |||
387 | IRDA_ASSERT(self != NULL, return -1;); | 379 | IRDA_ASSERT(self != NULL, return -1;); |
388 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); | 380 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); |
389 | 381 | ||
@@ -403,7 +395,7 @@ int irlan_provider_open_ctrl_tsap(struct irlan_cb *self) | |||
403 | 395 | ||
404 | tsap = irttp_open_tsap(LSAP_ANY, 1, ¬ify); | 396 | tsap = irttp_open_tsap(LSAP_ANY, 1, ¬ify); |
405 | if (!tsap) { | 397 | if (!tsap) { |
406 | IRDA_DEBUG(2, "%s(), Got no tsap!\n", __func__ ); | 398 | pr_debug("%s(), Got no tsap!\n", __func__); |
407 | return -1; | 399 | return -1; |
408 | } | 400 | } |
409 | self->provider.tsap_ctrl = tsap; | 401 | self->provider.tsap_ctrl = tsap; |
diff --git a/net/irda/irlan/irlan_provider_event.c b/net/irda/irlan/irlan_provider_event.c index 01a9d7c993ee..9c4f7f51d6b5 100644 --- a/net/irda/irlan/irlan_provider_event.c +++ b/net/irda/irlan/irlan_provider_event.c | |||
@@ -72,8 +72,6 @@ void irlan_do_provider_event(struct irlan_cb *self, IRLAN_EVENT event, | |||
72 | static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event, | 72 | static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event, |
73 | struct sk_buff *skb) | 73 | struct sk_buff *skb) |
74 | { | 74 | { |
75 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
76 | |||
77 | IRDA_ASSERT(self != NULL, return -1;); | 75 | IRDA_ASSERT(self != NULL, return -1;); |
78 | 76 | ||
79 | switch(event) { | 77 | switch(event) { |
@@ -82,7 +80,7 @@ static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event, | |||
82 | irlan_next_provider_state( self, IRLAN_INFO); | 80 | irlan_next_provider_state( self, IRLAN_INFO); |
83 | break; | 81 | break; |
84 | default: | 82 | default: |
85 | IRDA_DEBUG(4, "%s(), Unknown event %d\n", __func__ , event); | 83 | pr_debug("%s(), Unknown event %d\n", __func__ , event); |
86 | break; | 84 | break; |
87 | } | 85 | } |
88 | if (skb) | 86 | if (skb) |
@@ -101,8 +99,6 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event, | |||
101 | { | 99 | { |
102 | int ret; | 100 | int ret; |
103 | 101 | ||
104 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
105 | |||
106 | IRDA_ASSERT(self != NULL, return -1;); | 102 | IRDA_ASSERT(self != NULL, return -1;); |
107 | 103 | ||
108 | switch(event) { | 104 | switch(event) { |
@@ -147,7 +143,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event, | |||
147 | irlan_next_provider_state(self, IRLAN_IDLE); | 143 | irlan_next_provider_state(self, IRLAN_IDLE); |
148 | break; | 144 | break; |
149 | default: | 145 | default: |
150 | IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __func__ , event); | 146 | pr_debug("%s(), Unknown event %d\n", __func__ , event); |
151 | break; | 147 | break; |
152 | } | 148 | } |
153 | if (skb) | 149 | if (skb) |
@@ -166,8 +162,6 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event, | |||
166 | static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event, | 162 | static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event, |
167 | struct sk_buff *skb) | 163 | struct sk_buff *skb) |
168 | { | 164 | { |
169 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
170 | |||
171 | IRDA_ASSERT(self != NULL, return -1;); | 165 | IRDA_ASSERT(self != NULL, return -1;); |
172 | 166 | ||
173 | switch(event) { | 167 | switch(event) { |
@@ -186,7 +180,7 @@ static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event, | |||
186 | irlan_next_provider_state(self, IRLAN_IDLE); | 180 | irlan_next_provider_state(self, IRLAN_IDLE); |
187 | break; | 181 | break; |
188 | default: | 182 | default: |
189 | IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event); | 183 | pr_debug("%s(), Unknown event %d\n", __func__ , event); |
190 | break; | 184 | break; |
191 | } | 185 | } |
192 | if (skb) | 186 | if (skb) |
@@ -205,8 +199,6 @@ static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event, | |||
205 | static int irlan_provider_state_data(struct irlan_cb *self, IRLAN_EVENT event, | 199 | static int irlan_provider_state_data(struct irlan_cb *self, IRLAN_EVENT event, |
206 | struct sk_buff *skb) | 200 | struct sk_buff *skb) |
207 | { | 201 | { |
208 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
209 | |||
210 | IRDA_ASSERT(self != NULL, return -1;); | 202 | IRDA_ASSERT(self != NULL, return -1;); |
211 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); | 203 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); |
212 | 204 | ||
@@ -221,7 +213,7 @@ static int irlan_provider_state_data(struct irlan_cb *self, IRLAN_EVENT event, | |||
221 | irlan_next_provider_state(self, IRLAN_IDLE); | 213 | irlan_next_provider_state(self, IRLAN_IDLE); |
222 | break; | 214 | break; |
223 | default: | 215 | default: |
224 | IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __func__ , event); | 216 | pr_debug("%s(), Unknown event %d\n", __func__ , event); |
225 | break; | 217 | break; |
226 | } | 218 | } |
227 | if (skb) | 219 | if (skb) |
diff --git a/net/irda/irlap.c b/net/irda/irlap.c index 2e3bc6ccf4b5..4b011b7aac80 100644 --- a/net/irda/irlap.c +++ b/net/irda/irlap.c | |||
@@ -111,8 +111,6 @@ struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos, | |||
111 | { | 111 | { |
112 | struct irlap_cb *self; | 112 | struct irlap_cb *self; |
113 | 113 | ||
114 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
115 | |||
116 | /* Initialize the irlap structure. */ | 114 | /* Initialize the irlap structure. */ |
117 | self = kzalloc(sizeof(struct irlap_cb), GFP_KERNEL); | 115 | self = kzalloc(sizeof(struct irlap_cb), GFP_KERNEL); |
118 | if (self == NULL) | 116 | if (self == NULL) |
@@ -213,8 +211,6 @@ void irlap_close(struct irlap_cb *self) | |||
213 | { | 211 | { |
214 | struct irlap_cb *lap; | 212 | struct irlap_cb *lap; |
215 | 213 | ||
216 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
217 | |||
218 | IRDA_ASSERT(self != NULL, return;); | 214 | IRDA_ASSERT(self != NULL, return;); |
219 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 215 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
220 | 216 | ||
@@ -229,7 +225,7 @@ void irlap_close(struct irlap_cb *self) | |||
229 | /* Be sure that we manage to remove ourself from the hash */ | 225 | /* Be sure that we manage to remove ourself from the hash */ |
230 | lap = hashbin_remove(irlap, self->saddr, NULL); | 226 | lap = hashbin_remove(irlap, self->saddr, NULL); |
231 | if (!lap) { | 227 | if (!lap) { |
232 | IRDA_DEBUG(1, "%s(), Didn't find myself!\n", __func__); | 228 | pr_debug("%s(), Didn't find myself!\n", __func__); |
233 | return; | 229 | return; |
234 | } | 230 | } |
235 | __irlap_close(lap); | 231 | __irlap_close(lap); |
@@ -244,8 +240,6 @@ EXPORT_SYMBOL(irlap_close); | |||
244 | */ | 240 | */ |
245 | void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb) | 241 | void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb) |
246 | { | 242 | { |
247 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
248 | |||
249 | IRDA_ASSERT(self != NULL, return;); | 243 | IRDA_ASSERT(self != NULL, return;); |
250 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 244 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
251 | 245 | ||
@@ -263,8 +257,6 @@ void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb) | |||
263 | */ | 257 | */ |
264 | void irlap_connect_response(struct irlap_cb *self, struct sk_buff *userdata) | 258 | void irlap_connect_response(struct irlap_cb *self, struct sk_buff *userdata) |
265 | { | 259 | { |
266 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
267 | |||
268 | irlap_do_event(self, CONNECT_RESPONSE, userdata, NULL); | 260 | irlap_do_event(self, CONNECT_RESPONSE, userdata, NULL); |
269 | } | 261 | } |
270 | 262 | ||
@@ -278,7 +270,7 @@ void irlap_connect_response(struct irlap_cb *self, struct sk_buff *userdata) | |||
278 | void irlap_connect_request(struct irlap_cb *self, __u32 daddr, | 270 | void irlap_connect_request(struct irlap_cb *self, __u32 daddr, |
279 | struct qos_info *qos_user, int sniff) | 271 | struct qos_info *qos_user, int sniff) |
280 | { | 272 | { |
281 | IRDA_DEBUG(3, "%s(), daddr=0x%08x\n", __func__, daddr); | 273 | pr_debug("%s(), daddr=0x%08x\n", __func__, daddr); |
282 | 274 | ||
283 | IRDA_ASSERT(self != NULL, return;); | 275 | IRDA_ASSERT(self != NULL, return;); |
284 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 276 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
@@ -305,8 +297,6 @@ void irlap_connect_request(struct irlap_cb *self, __u32 daddr, | |||
305 | */ | 297 | */ |
306 | void irlap_connect_confirm(struct irlap_cb *self, struct sk_buff *skb) | 298 | void irlap_connect_confirm(struct irlap_cb *self, struct sk_buff *skb) |
307 | { | 299 | { |
308 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
309 | |||
310 | IRDA_ASSERT(self != NULL, return;); | 300 | IRDA_ASSERT(self != NULL, return;); |
311 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 301 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
312 | 302 | ||
@@ -342,8 +332,6 @@ void irlap_data_request(struct irlap_cb *self, struct sk_buff *skb, | |||
342 | IRDA_ASSERT(self != NULL, return;); | 332 | IRDA_ASSERT(self != NULL, return;); |
343 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 333 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
344 | 334 | ||
345 | IRDA_DEBUG(3, "%s()\n", __func__); | ||
346 | |||
347 | IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER), | 335 | IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER), |
348 | return;); | 336 | return;); |
349 | skb_push(skb, LAP_ADDR_HEADER+LAP_CTRL_HEADER); | 337 | skb_push(skb, LAP_ADDR_HEADER+LAP_CTRL_HEADER); |
@@ -389,8 +377,6 @@ void irlap_unitdata_request(struct irlap_cb *self, struct sk_buff *skb) | |||
389 | IRDA_ASSERT(self != NULL, return;); | 377 | IRDA_ASSERT(self != NULL, return;); |
390 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 378 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
391 | 379 | ||
392 | IRDA_DEBUG(3, "%s()\n", __func__); | ||
393 | |||
394 | IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER), | 380 | IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER), |
395 | return;); | 381 | return;); |
396 | skb_push(skb, LAP_ADDR_HEADER+LAP_CTRL_HEADER); | 382 | skb_push(skb, LAP_ADDR_HEADER+LAP_CTRL_HEADER); |
@@ -415,8 +401,6 @@ void irlap_unitdata_request(struct irlap_cb *self, struct sk_buff *skb) | |||
415 | #ifdef CONFIG_IRDA_ULTRA | 401 | #ifdef CONFIG_IRDA_ULTRA |
416 | void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb) | 402 | void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb) |
417 | { | 403 | { |
418 | IRDA_DEBUG(1, "%s()\n", __func__); | ||
419 | |||
420 | IRDA_ASSERT(self != NULL, return;); | 404 | IRDA_ASSERT(self != NULL, return;); |
421 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 405 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
422 | IRDA_ASSERT(skb != NULL, return;); | 406 | IRDA_ASSERT(skb != NULL, return;); |
@@ -435,8 +419,6 @@ void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb) | |||
435 | */ | 419 | */ |
436 | void irlap_disconnect_request(struct irlap_cb *self) | 420 | void irlap_disconnect_request(struct irlap_cb *self) |
437 | { | 421 | { |
438 | IRDA_DEBUG(3, "%s()\n", __func__); | ||
439 | |||
440 | IRDA_ASSERT(self != NULL, return;); | 422 | IRDA_ASSERT(self != NULL, return;); |
441 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 423 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
442 | 424 | ||
@@ -456,7 +438,7 @@ void irlap_disconnect_request(struct irlap_cb *self) | |||
456 | irlap_do_event(self, DISCONNECT_REQUEST, NULL, NULL); | 438 | irlap_do_event(self, DISCONNECT_REQUEST, NULL, NULL); |
457 | break; | 439 | break; |
458 | default: | 440 | default: |
459 | IRDA_DEBUG(2, "%s(), disconnect pending!\n", __func__); | 441 | pr_debug("%s(), disconnect pending!\n", __func__); |
460 | self->disconnect_pending = TRUE; | 442 | self->disconnect_pending = TRUE; |
461 | break; | 443 | break; |
462 | } | 444 | } |
@@ -470,7 +452,7 @@ void irlap_disconnect_request(struct irlap_cb *self) | |||
470 | */ | 452 | */ |
471 | void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason) | 453 | void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason) |
472 | { | 454 | { |
473 | IRDA_DEBUG(1, "%s(), reason=%s\n", __func__, lap_reasons[reason]); | 455 | pr_debug("%s(), reason=%s\n", __func__, lap_reasons[reason]); |
474 | 456 | ||
475 | IRDA_ASSERT(self != NULL, return;); | 457 | IRDA_ASSERT(self != NULL, return;); |
476 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 458 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
@@ -480,7 +462,7 @@ void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason) | |||
480 | 462 | ||
481 | switch (reason) { | 463 | switch (reason) { |
482 | case LAP_RESET_INDICATION: | 464 | case LAP_RESET_INDICATION: |
483 | IRDA_DEBUG(1, "%s(), Sending reset request!\n", __func__); | 465 | pr_debug("%s(), Sending reset request!\n", __func__); |
484 | irlap_do_event(self, RESET_REQUEST, NULL, NULL); | 466 | irlap_do_event(self, RESET_REQUEST, NULL, NULL); |
485 | break; | 467 | break; |
486 | case LAP_NO_RESPONSE: /* FALLTHROUGH */ | 468 | case LAP_NO_RESPONSE: /* FALLTHROUGH */ |
@@ -510,7 +492,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery) | |||
510 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 492 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
511 | IRDA_ASSERT(discovery != NULL, return;); | 493 | IRDA_ASSERT(discovery != NULL, return;); |
512 | 494 | ||
513 | IRDA_DEBUG(4, "%s(), nslots = %d\n", __func__, discovery->nslots); | 495 | pr_debug("%s(), nslots = %d\n", __func__, discovery->nslots); |
514 | 496 | ||
515 | IRDA_ASSERT((discovery->nslots == 1) || (discovery->nslots == 6) || | 497 | IRDA_ASSERT((discovery->nslots == 1) || (discovery->nslots == 6) || |
516 | (discovery->nslots == 8) || (discovery->nslots == 16), | 498 | (discovery->nslots == 8) || (discovery->nslots == 16), |
@@ -518,8 +500,8 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery) | |||
518 | 500 | ||
519 | /* Discovery is only possible in NDM mode */ | 501 | /* Discovery is only possible in NDM mode */ |
520 | if (self->state != LAP_NDM) { | 502 | if (self->state != LAP_NDM) { |
521 | IRDA_DEBUG(4, "%s(), discovery only possible in NDM mode\n", | 503 | pr_debug("%s(), discovery only possible in NDM mode\n", |
522 | __func__); | 504 | __func__); |
523 | irlap_discovery_confirm(self, NULL); | 505 | irlap_discovery_confirm(self, NULL); |
524 | /* Note : in theory, if we are not in NDM, we could postpone | 506 | /* Note : in theory, if we are not in NDM, we could postpone |
525 | * the discovery like we do for connection request. | 507 | * the discovery like we do for connection request. |
@@ -597,8 +579,6 @@ void irlap_discovery_confirm(struct irlap_cb *self, hashbin_t *discovery_log) | |||
597 | */ | 579 | */ |
598 | void irlap_discovery_indication(struct irlap_cb *self, discovery_t *discovery) | 580 | void irlap_discovery_indication(struct irlap_cb *self, discovery_t *discovery) |
599 | { | 581 | { |
600 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
601 | |||
602 | IRDA_ASSERT(self != NULL, return;); | 582 | IRDA_ASSERT(self != NULL, return;); |
603 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 583 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
604 | IRDA_ASSERT(discovery != NULL, return;); | 584 | IRDA_ASSERT(discovery != NULL, return;); |
@@ -643,8 +623,6 @@ void irlap_status_indication(struct irlap_cb *self, int quality_of_link) | |||
643 | */ | 623 | */ |
644 | void irlap_reset_indication(struct irlap_cb *self) | 624 | void irlap_reset_indication(struct irlap_cb *self) |
645 | { | 625 | { |
646 | IRDA_DEBUG(1, "%s()\n", __func__); | ||
647 | |||
648 | IRDA_ASSERT(self != NULL, return;); | 626 | IRDA_ASSERT(self != NULL, return;); |
649 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 627 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
650 | 628 | ||
@@ -659,7 +637,6 @@ void irlap_reset_indication(struct irlap_cb *self) | |||
659 | */ | 637 | */ |
660 | void irlap_reset_confirm(void) | 638 | void irlap_reset_confirm(void) |
661 | { | 639 | { |
662 | IRDA_DEBUG(1, "%s()\n", __func__); | ||
663 | } | 640 | } |
664 | 641 | ||
665 | /* | 642 | /* |
@@ -759,7 +736,7 @@ int irlap_validate_nr_received(struct irlap_cb *self, int nr) | |||
759 | { | 736 | { |
760 | /* nr as expected? */ | 737 | /* nr as expected? */ |
761 | if (nr == self->vs) { | 738 | if (nr == self->vs) { |
762 | IRDA_DEBUG(4, "%s(), expected!\n", __func__); | 739 | pr_debug("%s(), expected!\n", __func__); |
763 | return NR_EXPECTED; | 740 | return NR_EXPECTED; |
764 | } | 741 | } |
765 | 742 | ||
@@ -787,8 +764,6 @@ int irlap_validate_nr_received(struct irlap_cb *self, int nr) | |||
787 | */ | 764 | */ |
788 | void irlap_initiate_connection_state(struct irlap_cb *self) | 765 | void irlap_initiate_connection_state(struct irlap_cb *self) |
789 | { | 766 | { |
790 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
791 | |||
792 | IRDA_ASSERT(self != NULL, return;); | 767 | IRDA_ASSERT(self != NULL, return;); |
793 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 768 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
794 | 769 | ||
@@ -870,7 +845,7 @@ static void irlap_change_speed(struct irlap_cb *self, __u32 speed, int now) | |||
870 | { | 845 | { |
871 | struct sk_buff *skb; | 846 | struct sk_buff *skb; |
872 | 847 | ||
873 | IRDA_DEBUG(0, "%s(), setting speed to %d\n", __func__, speed); | 848 | pr_debug("%s(), setting speed to %d\n", __func__, speed); |
874 | 849 | ||
875 | IRDA_ASSERT(self != NULL, return;); | 850 | IRDA_ASSERT(self != NULL, return;); |
876 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 851 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
@@ -913,7 +888,7 @@ static void irlap_init_qos_capabilities(struct irlap_cb *self, | |||
913 | * user may not have set all of them. | 888 | * user may not have set all of them. |
914 | */ | 889 | */ |
915 | if (qos_user) { | 890 | if (qos_user) { |
916 | IRDA_DEBUG(1, "%s(), Found user specified QoS!\n", __func__); | 891 | pr_debug("%s(), Found user specified QoS!\n", __func__); |
917 | 892 | ||
918 | if (qos_user->baud_rate.bits) | 893 | if (qos_user->baud_rate.bits) |
919 | self->qos_rx.baud_rate.bits &= qos_user->baud_rate.bits; | 894 | self->qos_rx.baud_rate.bits &= qos_user->baud_rate.bits; |
@@ -943,8 +918,6 @@ static void irlap_init_qos_capabilities(struct irlap_cb *self, | |||
943 | */ | 918 | */ |
944 | void irlap_apply_default_connection_parameters(struct irlap_cb *self) | 919 | void irlap_apply_default_connection_parameters(struct irlap_cb *self) |
945 | { | 920 | { |
946 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
947 | |||
948 | IRDA_ASSERT(self != NULL, return;); | 921 | IRDA_ASSERT(self != NULL, return;); |
949 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 922 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
950 | 923 | ||
@@ -1006,8 +979,6 @@ void irlap_apply_default_connection_parameters(struct irlap_cb *self) | |||
1006 | */ | 979 | */ |
1007 | void irlap_apply_connection_parameters(struct irlap_cb *self, int now) | 980 | void irlap_apply_connection_parameters(struct irlap_cb *self, int now) |
1008 | { | 981 | { |
1009 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
1010 | |||
1011 | IRDA_ASSERT(self != NULL, return;); | 982 | IRDA_ASSERT(self != NULL, return;); |
1012 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 983 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
1013 | 984 | ||
@@ -1086,12 +1057,12 @@ void irlap_apply_connection_parameters(struct irlap_cb *self, int now) | |||
1086 | self->N1 = sysctl_warn_noreply_time * 1000 / | 1057 | self->N1 = sysctl_warn_noreply_time * 1000 / |
1087 | self->qos_rx.max_turn_time.value; | 1058 | self->qos_rx.max_turn_time.value; |
1088 | 1059 | ||
1089 | IRDA_DEBUG(4, "Setting N1 = %d\n", self->N1); | 1060 | pr_debug("Setting N1 = %d\n", self->N1); |
1090 | 1061 | ||
1091 | /* Set N2 to match our own disconnect time */ | 1062 | /* Set N2 to match our own disconnect time */ |
1092 | self->N2 = self->qos_tx.link_disc_time.value * 1000 / | 1063 | self->N2 = self->qos_tx.link_disc_time.value * 1000 / |
1093 | self->qos_rx.max_turn_time.value; | 1064 | self->qos_rx.max_turn_time.value; |
1094 | IRDA_DEBUG(4, "Setting N2 = %d\n", self->N2); | 1065 | pr_debug("Setting N2 = %d\n", self->N2); |
1095 | } | 1066 | } |
1096 | 1067 | ||
1097 | #ifdef CONFIG_PROC_FS | 1068 | #ifdef CONFIG_PROC_FS |
diff --git a/net/irda/irlap_event.c b/net/irda/irlap_event.c index 5f4a84eb35c7..245d87b42020 100644 --- a/net/irda/irlap_event.c +++ b/net/irda/irlap_event.c | |||
@@ -218,7 +218,7 @@ static void irlap_start_poll_timer(struct irlap_cb *self, int timeout) | |||
218 | } else | 218 | } else |
219 | self->fast_RR = FALSE; | 219 | self->fast_RR = FALSE; |
220 | 220 | ||
221 | IRDA_DEBUG(3, "%s(), timeout=%d (%ld)\n", __func__, timeout, jiffies); | 221 | pr_debug("%s(), timeout=%d (%ld)\n", __func__, timeout, jiffies); |
222 | #endif /* CONFIG_IRDA_FAST_RR */ | 222 | #endif /* CONFIG_IRDA_FAST_RR */ |
223 | 223 | ||
224 | if (timeout == 0) | 224 | if (timeout == 0) |
@@ -242,8 +242,8 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event, | |||
242 | if (!self || self->magic != LAP_MAGIC) | 242 | if (!self || self->magic != LAP_MAGIC) |
243 | return; | 243 | return; |
244 | 244 | ||
245 | IRDA_DEBUG(3, "%s(), event = %s, state = %s\n", __func__, | 245 | pr_debug("%s(), event = %s, state = %s\n", __func__, |
246 | irlap_event[event], irlap_state[self->state]); | 246 | irlap_event[event], irlap_state[self->state]); |
247 | 247 | ||
248 | ret = (*state[self->state])(self, event, skb, info); | 248 | ret = (*state[self->state])(self, event, skb, info); |
249 | 249 | ||
@@ -260,8 +260,8 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event, | |||
260 | * try to disconnect link if we send any data frames, since | 260 | * try to disconnect link if we send any data frames, since |
261 | * that will change the state away form XMIT | 261 | * that will change the state away form XMIT |
262 | */ | 262 | */ |
263 | IRDA_DEBUG(2, "%s() : queue len = %d\n", __func__, | 263 | pr_debug("%s() : queue len = %d\n", __func__, |
264 | skb_queue_len(&self->txq)); | 264 | skb_queue_len(&self->txq)); |
265 | 265 | ||
266 | if (!skb_queue_empty(&self->txq)) { | 266 | if (!skb_queue_empty(&self->txq)) { |
267 | /* Prevent race conditions with irlap_data_request() */ | 267 | /* Prevent race conditions with irlap_data_request() */ |
@@ -340,8 +340,8 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, | |||
340 | /* Note : this will never happen, because we test | 340 | /* Note : this will never happen, because we test |
341 | * media busy in irlap_connect_request() and | 341 | * media busy in irlap_connect_request() and |
342 | * postpone the event... - Jean II */ | 342 | * postpone the event... - Jean II */ |
343 | IRDA_DEBUG(0, "%s(), CONNECT_REQUEST: media busy!\n", | 343 | pr_debug("%s(), CONNECT_REQUEST: media busy!\n", |
344 | __func__); | 344 | __func__); |
345 | 345 | ||
346 | /* Always switch state before calling upper layers */ | 346 | /* Always switch state before calling upper layers */ |
347 | irlap_next_state(self, LAP_NDM); | 347 | irlap_next_state(self, LAP_NDM); |
@@ -367,16 +367,16 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, | |||
367 | 367 | ||
368 | irlap_connect_indication(self, skb); | 368 | irlap_connect_indication(self, skb); |
369 | } else { | 369 | } else { |
370 | IRDA_DEBUG(0, "%s(), SNRM frame does not " | 370 | pr_debug("%s(), SNRM frame does not contain an I field!\n", |
371 | "contain an I field!\n", __func__); | 371 | __func__); |
372 | } | 372 | } |
373 | break; | 373 | break; |
374 | case DISCOVERY_REQUEST: | 374 | case DISCOVERY_REQUEST: |
375 | IRDA_ASSERT(info != NULL, return -1;); | 375 | IRDA_ASSERT(info != NULL, return -1;); |
376 | 376 | ||
377 | if (self->media_busy) { | 377 | if (self->media_busy) { |
378 | IRDA_DEBUG(1, "%s(), DISCOVERY_REQUEST: media busy!\n", | 378 | pr_debug("%s(), DISCOVERY_REQUEST: media busy!\n", |
379 | __func__); | 379 | __func__); |
380 | /* irlap->log.condition = MEDIA_BUSY; */ | 380 | /* irlap->log.condition = MEDIA_BUSY; */ |
381 | 381 | ||
382 | /* This will make IrLMP try again */ | 382 | /* This will make IrLMP try again */ |
@@ -442,7 +442,8 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, | |||
442 | * those cases... | 442 | * those cases... |
443 | * Jean II | 443 | * Jean II |
444 | */ | 444 | */ |
445 | IRDA_DEBUG(1, "%s(), Receiving final discovery request, missed the discovery slots :-(\n", __func__); | 445 | pr_debug("%s(), Receiving final discovery request, missed the discovery slots :-(\n", |
446 | __func__); | ||
446 | 447 | ||
447 | /* Last discovery request -> in the log */ | 448 | /* Last discovery request -> in the log */ |
448 | irlap_discovery_indication(self, info->discovery); | 449 | irlap_discovery_indication(self, info->discovery); |
@@ -520,8 +521,8 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, | |||
520 | case RECV_UI_FRAME: | 521 | case RECV_UI_FRAME: |
521 | /* Only accept broadcast frames in NDM mode */ | 522 | /* Only accept broadcast frames in NDM mode */ |
522 | if (info->caddr != CBROADCAST) { | 523 | if (info->caddr != CBROADCAST) { |
523 | IRDA_DEBUG(0, "%s(), not a broadcast frame!\n", | 524 | pr_debug("%s(), not a broadcast frame!\n", |
524 | __func__); | 525 | __func__); |
525 | } else | 526 | } else |
526 | irlap_unitdata_indication(self, skb); | 527 | irlap_unitdata_indication(self, skb); |
527 | break; | 528 | break; |
@@ -537,11 +538,11 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, | |||
537 | irlap_send_test_frame(self, CBROADCAST, info->daddr, skb); | 538 | irlap_send_test_frame(self, CBROADCAST, info->daddr, skb); |
538 | break; | 539 | break; |
539 | case RECV_TEST_RSP: | 540 | case RECV_TEST_RSP: |
540 | IRDA_DEBUG(0, "%s() not implemented!\n", __func__); | 541 | pr_debug("%s() not implemented!\n", __func__); |
541 | break; | 542 | break; |
542 | default: | 543 | default: |
543 | IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__, | 544 | pr_debug("%s(), Unknown event %s\n", __func__, |
544 | irlap_event[event]); | 545 | irlap_event[event]); |
545 | 546 | ||
546 | ret = -1; | 547 | ret = -1; |
547 | break; | 548 | break; |
@@ -568,8 +569,8 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event, | |||
568 | IRDA_ASSERT(info != NULL, return -1;); | 569 | IRDA_ASSERT(info != NULL, return -1;); |
569 | IRDA_ASSERT(info->discovery != NULL, return -1;); | 570 | IRDA_ASSERT(info->discovery != NULL, return -1;); |
570 | 571 | ||
571 | IRDA_DEBUG(4, "%s(), daddr=%08x\n", __func__, | 572 | pr_debug("%s(), daddr=%08x\n", __func__, |
572 | info->discovery->data.daddr); | 573 | info->discovery->data.daddr); |
573 | 574 | ||
574 | if (!self->discovery_log) { | 575 | if (!self->discovery_log) { |
575 | net_warn_ratelimited("%s: discovery log is gone! maybe the discovery timeout has been set too short?\n", | 576 | net_warn_ratelimited("%s: discovery log is gone! maybe the discovery timeout has been set too short?\n", |
@@ -598,7 +599,8 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event, | |||
598 | 599 | ||
599 | IRDA_ASSERT(info != NULL, return -1;); | 600 | IRDA_ASSERT(info != NULL, return -1;); |
600 | 601 | ||
601 | IRDA_DEBUG(1, "%s(), Receiving discovery request (s = %d) while performing discovery :-(\n", __func__, info->s); | 602 | pr_debug("%s(), Receiving discovery request (s = %d) while performing discovery :-(\n", |
603 | __func__, info->s); | ||
602 | 604 | ||
603 | /* Last discovery request ? */ | 605 | /* Last discovery request ? */ |
604 | if (info->s == 0xff) | 606 | if (info->s == 0xff) |
@@ -612,8 +614,8 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event, | |||
612 | * timing requirements. | 614 | * timing requirements. |
613 | */ | 615 | */ |
614 | if (irda_device_is_receiving(self->netdev) && !self->add_wait) { | 616 | if (irda_device_is_receiving(self->netdev) && !self->add_wait) { |
615 | IRDA_DEBUG(2, "%s(), device is slow to answer, " | 617 | pr_debug("%s(), device is slow to answer, waiting some more!\n", |
616 | "waiting some more!\n", __func__); | 618 | __func__); |
617 | irlap_start_slot_timer(self, msecs_to_jiffies(10)); | 619 | irlap_start_slot_timer(self, msecs_to_jiffies(10)); |
618 | self->add_wait = TRUE; | 620 | self->add_wait = TRUE; |
619 | return ret; | 621 | return ret; |
@@ -649,8 +651,8 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event, | |||
649 | } | 651 | } |
650 | break; | 652 | break; |
651 | default: | 653 | default: |
652 | IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__, | 654 | pr_debug("%s(), Unknown event %s\n", __func__, |
653 | irlap_event[event]); | 655 | irlap_event[event]); |
654 | 656 | ||
655 | ret = -1; | 657 | ret = -1; |
656 | break; | 658 | break; |
@@ -671,15 +673,13 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event, | |||
671 | discovery_t *discovery_rsp; | 673 | discovery_t *discovery_rsp; |
672 | int ret=0; | 674 | int ret=0; |
673 | 675 | ||
674 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
675 | |||
676 | IRDA_ASSERT(self != NULL, return -1;); | 676 | IRDA_ASSERT(self != NULL, return -1;); |
677 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 677 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
678 | 678 | ||
679 | switch (event) { | 679 | switch (event) { |
680 | case QUERY_TIMER_EXPIRED: | 680 | case QUERY_TIMER_EXPIRED: |
681 | IRDA_DEBUG(0, "%s(), QUERY_TIMER_EXPIRED <%ld>\n", | 681 | pr_debug("%s(), QUERY_TIMER_EXPIRED <%ld>\n", |
682 | __func__, jiffies); | 682 | __func__, jiffies); |
683 | irlap_next_state(self, LAP_NDM); | 683 | irlap_next_state(self, LAP_NDM); |
684 | break; | 684 | break; |
685 | case RECV_DISCOVERY_XID_CMD: | 685 | case RECV_DISCOVERY_XID_CMD: |
@@ -717,8 +717,8 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event, | |||
717 | } | 717 | } |
718 | break; | 718 | break; |
719 | default: | 719 | default: |
720 | IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __func__, | 720 | pr_debug("%s(), Unknown event %d, %s\n", __func__, |
721 | event, irlap_event[event]); | 721 | event, irlap_event[event]); |
722 | 722 | ||
723 | ret = -1; | 723 | ret = -1; |
724 | break; | 724 | break; |
@@ -738,7 +738,7 @@ static int irlap_state_conn(struct irlap_cb *self, IRLAP_EVENT event, | |||
738 | { | 738 | { |
739 | int ret = 0; | 739 | int ret = 0; |
740 | 740 | ||
741 | IRDA_DEBUG(4, "%s(), event=%s\n", __func__, irlap_event[ event]); | 741 | pr_debug("%s(), event=%s\n", __func__, irlap_event[event]); |
742 | 742 | ||
743 | IRDA_ASSERT(self != NULL, return -1;); | 743 | IRDA_ASSERT(self != NULL, return -1;); |
744 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 744 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
@@ -798,20 +798,20 @@ static int irlap_state_conn(struct irlap_cb *self, IRLAP_EVENT event, | |||
798 | 798 | ||
799 | break; | 799 | break; |
800 | case RECV_DISCOVERY_XID_CMD: | 800 | case RECV_DISCOVERY_XID_CMD: |
801 | IRDA_DEBUG(3, "%s(), event RECV_DISCOVER_XID_CMD!\n", | 801 | pr_debug("%s(), event RECV_DISCOVER_XID_CMD!\n", |
802 | __func__); | 802 | __func__); |
803 | irlap_next_state(self, LAP_NDM); | 803 | irlap_next_state(self, LAP_NDM); |
804 | 804 | ||
805 | break; | 805 | break; |
806 | case DISCONNECT_REQUEST: | 806 | case DISCONNECT_REQUEST: |
807 | IRDA_DEBUG(0, "%s(), Disconnect request!\n", __func__); | 807 | pr_debug("%s(), Disconnect request!\n", __func__); |
808 | irlap_send_dm_frame(self); | 808 | irlap_send_dm_frame(self); |
809 | irlap_next_state( self, LAP_NDM); | 809 | irlap_next_state( self, LAP_NDM); |
810 | irlap_disconnect_indication(self, LAP_DISC_INDICATION); | 810 | irlap_disconnect_indication(self, LAP_DISC_INDICATION); |
811 | break; | 811 | break; |
812 | default: | 812 | default: |
813 | IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __func__, | 813 | pr_debug("%s(), Unknown event %d, %s\n", __func__, |
814 | event, irlap_event[event]); | 814 | event, irlap_event[event]); |
815 | 815 | ||
816 | ret = -1; | 816 | ret = -1; |
817 | break; | 817 | break; |
@@ -832,8 +832,6 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event, | |||
832 | { | 832 | { |
833 | int ret = 0; | 833 | int ret = 0; |
834 | 834 | ||
835 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
836 | |||
837 | IRDA_ASSERT(self != NULL, return -1;); | 835 | IRDA_ASSERT(self != NULL, return -1;); |
838 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 836 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
839 | 837 | ||
@@ -861,7 +859,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event, | |||
861 | self->retry_count++; | 859 | self->retry_count++; |
862 | break; | 860 | break; |
863 | case RECV_SNRM_CMD: | 861 | case RECV_SNRM_CMD: |
864 | IRDA_DEBUG(4, "%s(), SNRM battle!\n", __func__); | 862 | pr_debug("%s(), SNRM battle!\n", __func__); |
865 | 863 | ||
866 | IRDA_ASSERT(skb != NULL, return 0;); | 864 | IRDA_ASSERT(skb != NULL, return 0;); |
867 | IRDA_ASSERT(info != NULL, return 0;); | 865 | IRDA_ASSERT(info != NULL, return 0;); |
@@ -948,8 +946,8 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event, | |||
948 | irlap_disconnect_indication(self, LAP_DISC_INDICATION); | 946 | irlap_disconnect_indication(self, LAP_DISC_INDICATION); |
949 | break; | 947 | break; |
950 | default: | 948 | default: |
951 | IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __func__, | 949 | pr_debug("%s(), Unknown event %d, %s\n", __func__, |
952 | event, irlap_event[event]); | 950 | event, irlap_event[event]); |
953 | 951 | ||
954 | ret = -1; | 952 | ret = -1; |
955 | break; | 953 | break; |
@@ -966,7 +964,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event, | |||
966 | static int irlap_state_offline(struct irlap_cb *self, IRLAP_EVENT event, | 964 | static int irlap_state_offline(struct irlap_cb *self, IRLAP_EVENT event, |
967 | struct sk_buff *skb, struct irlap_info *info) | 965 | struct sk_buff *skb, struct irlap_info *info) |
968 | { | 966 | { |
969 | IRDA_DEBUG( 0, "%s(), Unknown event\n", __func__); | 967 | pr_debug("%s(), Unknown event\n", __func__); |
970 | 968 | ||
971 | return -1; | 969 | return -1; |
972 | } | 970 | } |
@@ -1029,8 +1027,8 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1029 | * speed and turn-around-time. | 1027 | * speed and turn-around-time. |
1030 | */ | 1028 | */ |
1031 | if((!nextfit) && (skb->len > self->bytes_left)) { | 1029 | if((!nextfit) && (skb->len > self->bytes_left)) { |
1032 | IRDA_DEBUG(0, "%s(), Not allowed to transmit" | 1030 | pr_debug("%s(), Not allowed to transmit more bytes!\n", |
1033 | " more bytes!\n", __func__); | 1031 | __func__); |
1034 | /* Requeue the skb */ | 1032 | /* Requeue the skb */ |
1035 | skb_queue_head(&self->txq, skb_get(skb)); | 1033 | skb_queue_head(&self->txq, skb_get(skb)); |
1036 | /* | 1034 | /* |
@@ -1081,8 +1079,8 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1081 | self->fast_RR = FALSE; | 1079 | self->fast_RR = FALSE; |
1082 | #endif /* CONFIG_IRDA_FAST_RR */ | 1080 | #endif /* CONFIG_IRDA_FAST_RR */ |
1083 | } else { | 1081 | } else { |
1084 | IRDA_DEBUG(4, "%s(), Unable to send! remote busy?\n", | 1082 | pr_debug("%s(), Unable to send! remote busy?\n", |
1085 | __func__); | 1083 | __func__); |
1086 | skb_queue_head(&self->txq, skb_get(skb)); | 1084 | skb_queue_head(&self->txq, skb_get(skb)); |
1087 | 1085 | ||
1088 | /* | 1086 | /* |
@@ -1093,8 +1091,8 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1093 | } | 1091 | } |
1094 | break; | 1092 | break; |
1095 | case POLL_TIMER_EXPIRED: | 1093 | case POLL_TIMER_EXPIRED: |
1096 | IRDA_DEBUG(3, "%s(), POLL_TIMER_EXPIRED <%ld>\n", | 1094 | pr_debug("%s(), POLL_TIMER_EXPIRED <%ld>\n", |
1097 | __func__, jiffies); | 1095 | __func__, jiffies); |
1098 | irlap_send_rr_frame(self, CMD_FRAME); | 1096 | irlap_send_rr_frame(self, CMD_FRAME); |
1099 | /* Return to NRM properly - Jean II */ | 1097 | /* Return to NRM properly - Jean II */ |
1100 | self->window = self->window_size; | 1098 | self->window = self->window_size; |
@@ -1119,8 +1117,8 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1119 | * when we return... - Jean II */ | 1117 | * when we return... - Jean II */ |
1120 | break; | 1118 | break; |
1121 | default: | 1119 | default: |
1122 | IRDA_DEBUG(0, "%s(), Unknown event %s\n", | 1120 | pr_debug("%s(), Unknown event %s\n", |
1123 | __func__, irlap_event[event]); | 1121 | __func__, irlap_event[event]); |
1124 | 1122 | ||
1125 | ret = -EINVAL; | 1123 | ret = -EINVAL; |
1126 | break; | 1124 | break; |
@@ -1138,8 +1136,6 @@ static int irlap_state_pclose(struct irlap_cb *self, IRLAP_EVENT event, | |||
1138 | { | 1136 | { |
1139 | int ret = 0; | 1137 | int ret = 0; |
1140 | 1138 | ||
1141 | IRDA_DEBUG(1, "%s()\n", __func__); | ||
1142 | |||
1143 | IRDA_ASSERT(self != NULL, return -1;); | 1139 | IRDA_ASSERT(self != NULL, return -1;); |
1144 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 1140 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
1145 | 1141 | ||
@@ -1173,7 +1169,7 @@ static int irlap_state_pclose(struct irlap_cb *self, IRLAP_EVENT event, | |||
1173 | } | 1169 | } |
1174 | break; | 1170 | break; |
1175 | default: | 1171 | default: |
1176 | IRDA_DEBUG(1, "%s(), Unknown event %d\n", __func__, event); | 1172 | pr_debug("%s(), Unknown event %d\n", __func__, event); |
1177 | 1173 | ||
1178 | ret = -1; | 1174 | ret = -1; |
1179 | break; | 1175 | break; |
@@ -1295,9 +1291,8 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1295 | /* Keep state */ | 1291 | /* Keep state */ |
1296 | irlap_next_state(self, LAP_NRM_P); | 1292 | irlap_next_state(self, LAP_NRM_P); |
1297 | } else { | 1293 | } else { |
1298 | IRDA_DEBUG(4, | 1294 | pr_debug("%s(), missing or duplicate frame!\n", |
1299 | "%s(), missing or duplicate frame!\n", | 1295 | __func__); |
1300 | __func__); | ||
1301 | 1296 | ||
1302 | /* Update Nr received */ | 1297 | /* Update Nr received */ |
1303 | irlap_update_nr_received(self, info->nr); | 1298 | irlap_update_nr_received(self, info->nr); |
@@ -1366,8 +1361,8 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1366 | if ((ns_status == NS_UNEXPECTED) && | 1361 | if ((ns_status == NS_UNEXPECTED) && |
1367 | (nr_status == NR_UNEXPECTED)) | 1362 | (nr_status == NR_UNEXPECTED)) |
1368 | { | 1363 | { |
1369 | IRDA_DEBUG(4, "%s(), unexpected nr and ns!\n", | 1364 | pr_debug("%s(), unexpected nr and ns!\n", |
1370 | __func__); | 1365 | __func__); |
1371 | if (info->pf) { | 1366 | if (info->pf) { |
1372 | /* Resend rejected frames */ | 1367 | /* Resend rejected frames */ |
1373 | irlap_resend_rejected_frames(self, CMD_FRAME); | 1368 | irlap_resend_rejected_frames(self, CMD_FRAME); |
@@ -1407,9 +1402,9 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1407 | } | 1402 | } |
1408 | break; | 1403 | break; |
1409 | } | 1404 | } |
1410 | IRDA_DEBUG(1, "%s(), Not implemented!\n", __func__); | 1405 | pr_debug("%s(), Not implemented!\n", __func__); |
1411 | IRDA_DEBUG(1, "%s(), event=%s, ns_status=%d, nr_status=%d\n", | 1406 | pr_debug("%s(), event=%s, ns_status=%d, nr_status=%d\n", |
1412 | __func__, irlap_event[event], ns_status, nr_status); | 1407 | __func__, irlap_event[event], ns_status, nr_status); |
1413 | break; | 1408 | break; |
1414 | case RECV_UI_FRAME: | 1409 | case RECV_UI_FRAME: |
1415 | /* Poll bit cleared? */ | 1410 | /* Poll bit cleared? */ |
@@ -1420,7 +1415,8 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1420 | del_timer(&self->final_timer); | 1415 | del_timer(&self->final_timer); |
1421 | irlap_data_indication(self, skb, TRUE); | 1416 | irlap_data_indication(self, skb, TRUE); |
1422 | irlap_next_state(self, LAP_XMIT_P); | 1417 | irlap_next_state(self, LAP_XMIT_P); |
1423 | IRDA_DEBUG(1, "%s: RECV_UI_FRAME: next state %s\n", __func__, irlap_state[self->state]); | 1418 | pr_debug("%s: RECV_UI_FRAME: next state %s\n", |
1419 | __func__, irlap_state[self->state]); | ||
1424 | irlap_start_poll_timer(self, self->poll_timeout); | 1420 | irlap_start_poll_timer(self, self->poll_timeout); |
1425 | } | 1421 | } |
1426 | break; | 1422 | break; |
@@ -1463,10 +1459,9 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1463 | /* Update Nr received */ | 1459 | /* Update Nr received */ |
1464 | irlap_update_nr_received(self, info->nr); | 1460 | irlap_update_nr_received(self, info->nr); |
1465 | 1461 | ||
1466 | IRDA_DEBUG(4, "RECV_RR_FRAME: Retrans:%d, nr=%d, va=%d, " | 1462 | pr_debug("RECV_RR_FRAME: Retrans:%d, nr=%d, va=%d, vs=%d, vr=%d\n", |
1467 | "vs=%d, vr=%d\n", | 1463 | self->retry_count, info->nr, self->va, |
1468 | self->retry_count, info->nr, self->va, | 1464 | self->vs, self->vr); |
1469 | self->vs, self->vr); | ||
1470 | 1465 | ||
1471 | /* Resend rejected frames */ | 1466 | /* Resend rejected frames */ |
1472 | irlap_resend_rejected_frames(self, CMD_FRAME); | 1467 | irlap_resend_rejected_frames(self, CMD_FRAME); |
@@ -1474,8 +1469,8 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1474 | 1469 | ||
1475 | irlap_next_state(self, LAP_NRM_P); | 1470 | irlap_next_state(self, LAP_NRM_P); |
1476 | } else if (ret == NR_INVALID) { | 1471 | } else if (ret == NR_INVALID) { |
1477 | IRDA_DEBUG(1, "%s(), Received RR with " | 1472 | pr_debug("%s(), Received RR with invalid nr !\n", |
1478 | "invalid nr !\n", __func__); | 1473 | __func__); |
1479 | 1474 | ||
1480 | irlap_next_state(self, LAP_RESET_WAIT); | 1475 | irlap_next_state(self, LAP_RESET_WAIT); |
1481 | 1476 | ||
@@ -1511,8 +1506,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1511 | * we only do this once for each frame. | 1506 | * we only do this once for each frame. |
1512 | */ | 1507 | */ |
1513 | if (irda_device_is_receiving(self->netdev) && !self->add_wait) { | 1508 | if (irda_device_is_receiving(self->netdev) && !self->add_wait) { |
1514 | IRDA_DEBUG(1, "FINAL_TIMER_EXPIRED when receiving a " | 1509 | pr_debug("FINAL_TIMER_EXPIRED when receiving a frame! Waiting a little bit more!\n"); |
1515 | "frame! Waiting a little bit more!\n"); | ||
1516 | irlap_start_final_timer(self, msecs_to_jiffies(300)); | 1510 | irlap_start_final_timer(self, msecs_to_jiffies(300)); |
1517 | 1511 | ||
1518 | /* | 1512 | /* |
@@ -1529,18 +1523,18 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1529 | if (self->retry_count < self->N2) { | 1523 | if (self->retry_count < self->N2) { |
1530 | if (skb_peek(&self->wx_list) == NULL) { | 1524 | if (skb_peek(&self->wx_list) == NULL) { |
1531 | /* Retry sending the pf bit to the secondary */ | 1525 | /* Retry sending the pf bit to the secondary */ |
1532 | IRDA_DEBUG(4, "nrm_p: resending rr"); | 1526 | pr_debug("nrm_p: resending rr"); |
1533 | irlap_wait_min_turn_around(self, &self->qos_tx); | 1527 | irlap_wait_min_turn_around(self, &self->qos_tx); |
1534 | irlap_send_rr_frame(self, CMD_FRAME); | 1528 | irlap_send_rr_frame(self, CMD_FRAME); |
1535 | } else { | 1529 | } else { |
1536 | IRDA_DEBUG(4, "nrm_p: resend frames"); | 1530 | pr_debug("nrm_p: resend frames"); |
1537 | irlap_resend_rejected_frames(self, CMD_FRAME); | 1531 | irlap_resend_rejected_frames(self, CMD_FRAME); |
1538 | } | 1532 | } |
1539 | 1533 | ||
1540 | irlap_start_final_timer(self, self->final_timeout); | 1534 | irlap_start_final_timer(self, self->final_timeout); |
1541 | self->retry_count++; | 1535 | self->retry_count++; |
1542 | IRDA_DEBUG(4, "irlap_state_nrm_p: FINAL_TIMER_EXPIRED:" | 1536 | pr_debug("irlap_state_nrm_p: FINAL_TIMER_EXPIRED: retry_count=%d\n", |
1543 | " retry_count=%d\n", self->retry_count); | 1537 | self->retry_count); |
1544 | 1538 | ||
1545 | /* Early warning event. I'm using a pretty liberal | 1539 | /* Early warning event. I'm using a pretty liberal |
1546 | * interpretation of the spec and generate an event | 1540 | * interpretation of the spec and generate an event |
@@ -1580,7 +1574,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1580 | irlap_start_final_timer(self, 2 * self->final_timeout); | 1574 | irlap_start_final_timer(self, 2 * self->final_timeout); |
1581 | break; | 1575 | break; |
1582 | case RECV_RD_RSP: | 1576 | case RECV_RD_RSP: |
1583 | IRDA_DEBUG(1, "%s(), RECV_RD_RSP\n", __func__); | 1577 | pr_debug("%s(), RECV_RD_RSP\n", __func__); |
1584 | 1578 | ||
1585 | irlap_flush_all_queues(self); | 1579 | irlap_flush_all_queues(self); |
1586 | irlap_next_state(self, LAP_XMIT_P); | 1580 | irlap_next_state(self, LAP_XMIT_P); |
@@ -1588,8 +1582,8 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1588 | irlap_disconnect_request(self); | 1582 | irlap_disconnect_request(self); |
1589 | break; | 1583 | break; |
1590 | default: | 1584 | default: |
1591 | IRDA_DEBUG(1, "%s(), Unknown event %s\n", | 1585 | pr_debug("%s(), Unknown event %s\n", |
1592 | __func__, irlap_event[event]); | 1586 | __func__, irlap_event[event]); |
1593 | 1587 | ||
1594 | ret = -1; | 1588 | ret = -1; |
1595 | break; | 1589 | break; |
@@ -1609,7 +1603,7 @@ static int irlap_state_reset_wait(struct irlap_cb *self, IRLAP_EVENT event, | |||
1609 | { | 1603 | { |
1610 | int ret = 0; | 1604 | int ret = 0; |
1611 | 1605 | ||
1612 | IRDA_DEBUG(3, "%s(), event = %s\n", __func__, irlap_event[event]); | 1606 | pr_debug("%s(), event = %s\n", __func__, irlap_event[event]); |
1613 | 1607 | ||
1614 | IRDA_ASSERT(self != NULL, return -1;); | 1608 | IRDA_ASSERT(self != NULL, return -1;); |
1615 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 1609 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
@@ -1635,8 +1629,8 @@ static int irlap_state_reset_wait(struct irlap_cb *self, IRLAP_EVENT event, | |||
1635 | irlap_next_state( self, LAP_PCLOSE); | 1629 | irlap_next_state( self, LAP_PCLOSE); |
1636 | break; | 1630 | break; |
1637 | default: | 1631 | default: |
1638 | IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__, | 1632 | pr_debug("%s(), Unknown event %s\n", __func__, |
1639 | irlap_event[event]); | 1633 | irlap_event[event]); |
1640 | 1634 | ||
1641 | ret = -1; | 1635 | ret = -1; |
1642 | break; | 1636 | break; |
@@ -1656,7 +1650,7 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event, | |||
1656 | { | 1650 | { |
1657 | int ret = 0; | 1651 | int ret = 0; |
1658 | 1652 | ||
1659 | IRDA_DEBUG(3, "%s(), event = %s\n", __func__, irlap_event[event]); | 1653 | pr_debug("%s(), event = %s\n", __func__, irlap_event[event]); |
1660 | 1654 | ||
1661 | IRDA_ASSERT(self != NULL, return -1;); | 1655 | IRDA_ASSERT(self != NULL, return -1;); |
1662 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 1656 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
@@ -1714,7 +1708,7 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event, | |||
1714 | * state | 1708 | * state |
1715 | */ | 1709 | */ |
1716 | if (!info) { | 1710 | if (!info) { |
1717 | IRDA_DEBUG(3, "%s(), RECV_SNRM_CMD\n", __func__); | 1711 | pr_debug("%s(), RECV_SNRM_CMD\n", __func__); |
1718 | irlap_initiate_connection_state(self); | 1712 | irlap_initiate_connection_state(self); |
1719 | irlap_wait_min_turn_around(self, &self->qos_tx); | 1713 | irlap_wait_min_turn_around(self, &self->qos_tx); |
1720 | irlap_send_ua_response_frame(self, &self->qos_rx); | 1714 | irlap_send_ua_response_frame(self, &self->qos_rx); |
@@ -1722,14 +1716,13 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event, | |||
1722 | irlap_start_wd_timer(self, self->wd_timeout); | 1716 | irlap_start_wd_timer(self, self->wd_timeout); |
1723 | irlap_next_state(self, LAP_NDM); | 1717 | irlap_next_state(self, LAP_NDM); |
1724 | } else { | 1718 | } else { |
1725 | IRDA_DEBUG(0, | 1719 | pr_debug("%s(), SNRM frame contained an I field!\n", |
1726 | "%s(), SNRM frame contained an I field!\n", | 1720 | __func__); |
1727 | __func__); | ||
1728 | } | 1721 | } |
1729 | break; | 1722 | break; |
1730 | default: | 1723 | default: |
1731 | IRDA_DEBUG(1, "%s(), Unknown event %s\n", | 1724 | pr_debug("%s(), Unknown event %s\n", |
1732 | __func__, irlap_event[event]); | 1725 | __func__, irlap_event[event]); |
1733 | 1726 | ||
1734 | ret = -1; | 1727 | ret = -1; |
1735 | break; | 1728 | break; |
@@ -1749,7 +1742,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
1749 | { | 1742 | { |
1750 | int ret = 0; | 1743 | int ret = 0; |
1751 | 1744 | ||
1752 | IRDA_DEBUG(4, "%s(), event=%s\n", __func__, irlap_event[event]); | 1745 | pr_debug("%s(), event=%s\n", __func__, irlap_event[event]); |
1753 | 1746 | ||
1754 | IRDA_ASSERT(self != NULL, return -ENODEV;); | 1747 | IRDA_ASSERT(self != NULL, return -ENODEV;); |
1755 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); | 1748 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); |
@@ -1785,8 +1778,8 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
1785 | * speed and turn-around-time. | 1778 | * speed and turn-around-time. |
1786 | */ | 1779 | */ |
1787 | if((!nextfit) && (skb->len > self->bytes_left)) { | 1780 | if((!nextfit) && (skb->len > self->bytes_left)) { |
1788 | IRDA_DEBUG(0, "%s(), Not allowed to transmit" | 1781 | pr_debug("%s(), Not allowed to transmit more bytes!\n", |
1789 | " more bytes!\n", __func__); | 1782 | __func__); |
1790 | /* Requeue the skb */ | 1783 | /* Requeue the skb */ |
1791 | skb_queue_head(&self->txq, skb_get(skb)); | 1784 | skb_queue_head(&self->txq, skb_get(skb)); |
1792 | 1785 | ||
@@ -1832,7 +1825,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
1832 | ret = -EPROTO; | 1825 | ret = -EPROTO; |
1833 | } | 1826 | } |
1834 | } else { | 1827 | } else { |
1835 | IRDA_DEBUG(2, "%s(), Unable to send!\n", __func__); | 1828 | pr_debug("%s(), Unable to send!\n", __func__); |
1836 | skb_queue_head(&self->txq, skb_get(skb)); | 1829 | skb_queue_head(&self->txq, skb_get(skb)); |
1837 | ret = -EPROTO; | 1830 | ret = -EPROTO; |
1838 | } | 1831 | } |
@@ -1848,8 +1841,8 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
1848 | * when we return... - Jean II */ | 1841 | * when we return... - Jean II */ |
1849 | break; | 1842 | break; |
1850 | default: | 1843 | default: |
1851 | IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__, | 1844 | pr_debug("%s(), Unknown event %s\n", __func__, |
1852 | irlap_event[event]); | 1845 | irlap_event[event]); |
1853 | 1846 | ||
1854 | ret = -EINVAL; | 1847 | ret = -EINVAL; |
1855 | break; | 1848 | break; |
@@ -1871,7 +1864,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
1871 | int nr_status; | 1864 | int nr_status; |
1872 | int ret = 0; | 1865 | int ret = 0; |
1873 | 1866 | ||
1874 | IRDA_DEBUG(4, "%s(), event=%s\n", __func__, irlap_event[ event]); | 1867 | pr_debug("%s(), event=%s\n", __func__, irlap_event[event]); |
1875 | 1868 | ||
1876 | IRDA_ASSERT(self != NULL, return -1;); | 1869 | IRDA_ASSERT(self != NULL, return -1;); |
1877 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 1870 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
@@ -1879,10 +1872,9 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
1879 | switch (event) { | 1872 | switch (event) { |
1880 | case RECV_I_CMD: /* Optimize for the common case */ | 1873 | case RECV_I_CMD: /* Optimize for the common case */ |
1881 | /* FIXME: must check for remote_busy below */ | 1874 | /* FIXME: must check for remote_busy below */ |
1882 | IRDA_DEBUG(4, "%s(), event=%s nr=%d, vs=%d, ns=%d, " | 1875 | pr_debug("%s(), event=%s nr=%d, vs=%d, ns=%d, vr=%d, pf=%d\n", |
1883 | "vr=%d, pf=%d\n", __func__, | 1876 | __func__, irlap_event[event], info->nr, |
1884 | irlap_event[event], info->nr, | 1877 | self->vs, info->ns, self->vr, info->pf); |
1885 | self->vs, info->ns, self->vr, info->pf); | ||
1886 | 1878 | ||
1887 | self->retry_count = 0; | 1879 | self->retry_count = 0; |
1888 | 1880 | ||
@@ -1982,7 +1974,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
1982 | if ((ns_status == NS_EXPECTED) && (nr_status == NR_UNEXPECTED)) | 1974 | if ((ns_status == NS_EXPECTED) && (nr_status == NR_UNEXPECTED)) |
1983 | { | 1975 | { |
1984 | if (info->pf) { | 1976 | if (info->pf) { |
1985 | IRDA_DEBUG(4, "RECV_I_RSP: frame(s) lost\n"); | 1977 | pr_debug("RECV_I_RSP: frame(s) lost\n"); |
1986 | 1978 | ||
1987 | self->vr = (self->vr + 1) % 8; | 1979 | self->vr = (self->vr + 1) % 8; |
1988 | 1980 | ||
@@ -2019,10 +2011,10 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
2019 | } | 2011 | } |
2020 | 2012 | ||
2021 | if (ret == NR_INVALID) { | 2013 | if (ret == NR_INVALID) { |
2022 | IRDA_DEBUG(0, "NRM_S, NR_INVALID not implemented!\n"); | 2014 | pr_debug("NRM_S, NR_INVALID not implemented!\n"); |
2023 | } | 2015 | } |
2024 | if (ret == NS_INVALID) { | 2016 | if (ret == NS_INVALID) { |
2025 | IRDA_DEBUG(0, "NRM_S, NS_INVALID not implemented!\n"); | 2017 | pr_debug("NRM_S, NS_INVALID not implemented!\n"); |
2026 | } | 2018 | } |
2027 | break; | 2019 | break; |
2028 | case RECV_UI_FRAME: | 2020 | case RECV_UI_FRAME: |
@@ -2111,22 +2103,21 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
2111 | /* Keep state */ | 2103 | /* Keep state */ |
2112 | irlap_next_state(self, LAP_NRM_S); | 2104 | irlap_next_state(self, LAP_NRM_S); |
2113 | } else { | 2105 | } else { |
2114 | IRDA_DEBUG(1, "%s(), invalid nr not implemented!\n", | 2106 | pr_debug("%s(), invalid nr not implemented!\n", |
2115 | __func__); | 2107 | __func__); |
2116 | } | 2108 | } |
2117 | break; | 2109 | break; |
2118 | case RECV_SNRM_CMD: | 2110 | case RECV_SNRM_CMD: |
2119 | /* SNRM frame is not allowed to contain an I-field */ | 2111 | /* SNRM frame is not allowed to contain an I-field */ |
2120 | if (!info) { | 2112 | if (!info) { |
2121 | del_timer(&self->wd_timer); | 2113 | del_timer(&self->wd_timer); |
2122 | IRDA_DEBUG(1, "%s(), received SNRM cmd\n", __func__); | 2114 | pr_debug("%s(), received SNRM cmd\n", __func__); |
2123 | irlap_next_state(self, LAP_RESET_CHECK); | 2115 | irlap_next_state(self, LAP_RESET_CHECK); |
2124 | 2116 | ||
2125 | irlap_reset_indication(self); | 2117 | irlap_reset_indication(self); |
2126 | } else { | 2118 | } else { |
2127 | IRDA_DEBUG(0, | 2119 | pr_debug("%s(), SNRM frame contained an I-field!\n", |
2128 | "%s(), SNRM frame contained an I-field!\n", | 2120 | __func__); |
2129 | __func__); | ||
2130 | 2121 | ||
2131 | } | 2122 | } |
2132 | break; | 2123 | break; |
@@ -2158,8 +2149,8 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
2158 | * which explain why we use (self->N2 / 2) here !!! | 2149 | * which explain why we use (self->N2 / 2) here !!! |
2159 | * Jean II | 2150 | * Jean II |
2160 | */ | 2151 | */ |
2161 | IRDA_DEBUG(1, "%s(), retry_count = %d\n", __func__, | 2152 | pr_debug("%s(), retry_count = %d\n", __func__, |
2162 | self->retry_count); | 2153 | self->retry_count); |
2163 | 2154 | ||
2164 | if (self->retry_count < (self->N2 / 2)) { | 2155 | if (self->retry_count < (self->N2 / 2)) { |
2165 | /* No retry, just wait for primary */ | 2156 | /* No retry, just wait for primary */ |
@@ -2211,8 +2202,8 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
2211 | irlap_send_test_frame(self, self->caddr, info->daddr, skb); | 2202 | irlap_send_test_frame(self, self->caddr, info->daddr, skb); |
2212 | break; | 2203 | break; |
2213 | default: | 2204 | default: |
2214 | IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __func__, | 2205 | pr_debug("%s(), Unknown event %d, (%s)\n", __func__, |
2215 | event, irlap_event[event]); | 2206 | event, irlap_event[event]); |
2216 | 2207 | ||
2217 | ret = -EINVAL; | 2208 | ret = -EINVAL; |
2218 | break; | 2209 | break; |
@@ -2226,8 +2217,6 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
2226 | static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event, | 2217 | static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event, |
2227 | struct sk_buff *skb, struct irlap_info *info) | 2218 | struct sk_buff *skb, struct irlap_info *info) |
2228 | { | 2219 | { |
2229 | IRDA_DEBUG(1, "%s()\n", __func__); | ||
2230 | |||
2231 | IRDA_ASSERT(self != NULL, return -ENODEV;); | 2220 | IRDA_ASSERT(self != NULL, return -ENODEV;); |
2232 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); | 2221 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); |
2233 | 2222 | ||
@@ -2283,8 +2272,8 @@ static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event, | |||
2283 | break; /* stay in SCLOSE */ | 2272 | break; /* stay in SCLOSE */ |
2284 | } | 2273 | } |
2285 | 2274 | ||
2286 | IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __func__, | 2275 | pr_debug("%s(), Unknown event %d, (%s)\n", __func__, |
2287 | event, irlap_event[event]); | 2276 | event, irlap_event[event]); |
2288 | 2277 | ||
2289 | break; | 2278 | break; |
2290 | } | 2279 | } |
@@ -2298,7 +2287,7 @@ static int irlap_state_reset_check( struct irlap_cb *self, IRLAP_EVENT event, | |||
2298 | { | 2287 | { |
2299 | int ret = 0; | 2288 | int ret = 0; |
2300 | 2289 | ||
2301 | IRDA_DEBUG(1, "%s(), event=%s\n", __func__, irlap_event[event]); | 2290 | pr_debug("%s(), event=%s\n", __func__, irlap_event[event]); |
2302 | 2291 | ||
2303 | IRDA_ASSERT(self != NULL, return -ENODEV;); | 2292 | IRDA_ASSERT(self != NULL, return -ENODEV;); |
2304 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); | 2293 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); |
@@ -2319,8 +2308,8 @@ static int irlap_state_reset_check( struct irlap_cb *self, IRLAP_EVENT event, | |||
2319 | irlap_next_state(self, LAP_SCLOSE); | 2308 | irlap_next_state(self, LAP_SCLOSE); |
2320 | break; | 2309 | break; |
2321 | default: | 2310 | default: |
2322 | IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __func__, | 2311 | pr_debug("%s(), Unknown event %d, (%s)\n", __func__, |
2323 | event, irlap_event[event]); | 2312 | event, irlap_event[event]); |
2324 | 2313 | ||
2325 | ret = -EINVAL; | 2314 | ret = -EINVAL; |
2326 | break; | 2315 | break; |
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c index 90ef03658a74..b936b1251a66 100644 --- a/net/irda/irlap_frame.c +++ b/net/irda/irlap_frame.c | |||
@@ -103,8 +103,8 @@ void irlap_queue_xmit(struct irlap_cb *self, struct sk_buff *skb) | |||
103 | irlap_insert_info(self, skb); | 103 | irlap_insert_info(self, skb); |
104 | 104 | ||
105 | if (unlikely(self->mode & IRDA_MODE_MONITOR)) { | 105 | if (unlikely(self->mode & IRDA_MODE_MONITOR)) { |
106 | IRDA_DEBUG(3, "%s(): %s is in monitor mode\n", __func__, | 106 | pr_debug("%s(): %s is in monitor mode\n", __func__, |
107 | self->netdev->name); | 107 | self->netdev->name); |
108 | dev_kfree_skb(skb); | 108 | dev_kfree_skb(skb); |
109 | return; | 109 | return; |
110 | } | 110 | } |
@@ -182,8 +182,8 @@ static void irlap_recv_snrm_cmd(struct irlap_cb *self, struct sk_buff *skb, | |||
182 | 182 | ||
183 | /* Check if the new connection address is valid */ | 183 | /* Check if the new connection address is valid */ |
184 | if ((info->caddr == 0x00) || (info->caddr == 0xfe)) { | 184 | if ((info->caddr == 0x00) || (info->caddr == 0xfe)) { |
185 | IRDA_DEBUG(3, "%s(), invalid connection address!\n", | 185 | pr_debug("%s(), invalid connection address!\n", |
186 | __func__); | 186 | __func__); |
187 | return; | 187 | return; |
188 | } | 188 | } |
189 | 189 | ||
@@ -193,8 +193,8 @@ static void irlap_recv_snrm_cmd(struct irlap_cb *self, struct sk_buff *skb, | |||
193 | 193 | ||
194 | /* Only accept if addressed directly to us */ | 194 | /* Only accept if addressed directly to us */ |
195 | if (info->saddr != self->saddr) { | 195 | if (info->saddr != self->saddr) { |
196 | IRDA_DEBUG(2, "%s(), not addressed to us!\n", | 196 | pr_debug("%s(), not addressed to us!\n", |
197 | __func__); | 197 | __func__); |
198 | return; | 198 | return; |
199 | } | 199 | } |
200 | irlap_do_event(self, RECV_SNRM_CMD, skb, info); | 200 | irlap_do_event(self, RECV_SNRM_CMD, skb, info); |
@@ -216,7 +216,7 @@ void irlap_send_ua_response_frame(struct irlap_cb *self, struct qos_info *qos) | |||
216 | struct ua_frame *frame; | 216 | struct ua_frame *frame; |
217 | int ret; | 217 | int ret; |
218 | 218 | ||
219 | IRDA_DEBUG(2, "%s() <%ld>\n", __func__, jiffies); | 219 | pr_debug("%s() <%ld>\n", __func__, jiffies); |
220 | 220 | ||
221 | IRDA_ASSERT(self != NULL, return;); | 221 | IRDA_ASSERT(self != NULL, return;); |
222 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 222 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
@@ -291,8 +291,6 @@ void irlap_send_disc_frame(struct irlap_cb *self) | |||
291 | struct sk_buff *tx_skb = NULL; | 291 | struct sk_buff *tx_skb = NULL; |
292 | struct disc_frame *frame; | 292 | struct disc_frame *frame; |
293 | 293 | ||
294 | IRDA_DEBUG(3, "%s()\n", __func__); | ||
295 | |||
296 | IRDA_ASSERT(self != NULL, return;); | 294 | IRDA_ASSERT(self != NULL, return;); |
297 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 295 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
298 | 296 | ||
@@ -322,8 +320,8 @@ void irlap_send_discovery_xid_frame(struct irlap_cb *self, int S, __u8 s, | |||
322 | __u32 bcast = BROADCAST; | 320 | __u32 bcast = BROADCAST; |
323 | __u8 *info; | 321 | __u8 *info; |
324 | 322 | ||
325 | IRDA_DEBUG(4, "%s(), s=%d, S=%d, command=%d\n", __func__, | 323 | pr_debug("%s(), s=%d, S=%d, command=%d\n", __func__, |
326 | s, S, command); | 324 | s, S, command); |
327 | 325 | ||
328 | IRDA_ASSERT(self != NULL, return;); | 326 | IRDA_ASSERT(self != NULL, return;); |
329 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 327 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
@@ -415,8 +413,6 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self, | |||
415 | __u8 *discovery_info; | 413 | __u8 *discovery_info; |
416 | char *text; | 414 | char *text; |
417 | 415 | ||
418 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
419 | |||
420 | IRDA_ASSERT(self != NULL, return;); | 416 | IRDA_ASSERT(self != NULL, return;); |
421 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 417 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
422 | 418 | ||
@@ -432,8 +428,8 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self, | |||
432 | 428 | ||
433 | /* Make sure frame is addressed to us */ | 429 | /* Make sure frame is addressed to us */ |
434 | if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) { | 430 | if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) { |
435 | IRDA_DEBUG(0, "%s(), frame is not addressed to us!\n", | 431 | pr_debug("%s(), frame is not addressed to us!\n", |
436 | __func__); | 432 | __func__); |
437 | return; | 433 | return; |
438 | } | 434 | } |
439 | 435 | ||
@@ -446,15 +442,15 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self, | |||
446 | discovery->data.saddr = self->saddr; | 442 | discovery->data.saddr = self->saddr; |
447 | discovery->timestamp = jiffies; | 443 | discovery->timestamp = jiffies; |
448 | 444 | ||
449 | IRDA_DEBUG(4, "%s(), daddr=%08x\n", __func__, | 445 | pr_debug("%s(), daddr=%08x\n", __func__, |
450 | discovery->data.daddr); | 446 | discovery->data.daddr); |
451 | 447 | ||
452 | discovery_info = skb_pull(skb, sizeof(struct xid_frame)); | 448 | discovery_info = skb_pull(skb, sizeof(struct xid_frame)); |
453 | 449 | ||
454 | /* Get info returned from peer */ | 450 | /* Get info returned from peer */ |
455 | discovery->data.hints[0] = discovery_info[0]; | 451 | discovery->data.hints[0] = discovery_info[0]; |
456 | if (discovery_info[0] & HINT_EXTENSION) { | 452 | if (discovery_info[0] & HINT_EXTENSION) { |
457 | IRDA_DEBUG(4, "EXTENSION\n"); | 453 | pr_debug("EXTENSION\n"); |
458 | discovery->data.hints[1] = discovery_info[1]; | 454 | discovery->data.hints[1] = discovery_info[1]; |
459 | discovery->data.charset = discovery_info[2]; | 455 | discovery->data.charset = discovery_info[2]; |
460 | text = (char *) &discovery_info[3]; | 456 | text = (char *) &discovery_info[3]; |
@@ -503,8 +499,8 @@ static void irlap_recv_discovery_xid_cmd(struct irlap_cb *self, | |||
503 | 499 | ||
504 | /* Make sure frame is addressed to us */ | 500 | /* Make sure frame is addressed to us */ |
505 | if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) { | 501 | if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) { |
506 | IRDA_DEBUG(0, "%s(), frame is not addressed to us!\n", | 502 | pr_debug("%s(), frame is not addressed to us!\n", |
507 | __func__); | 503 | __func__); |
508 | return; | 504 | return; |
509 | } | 505 | } |
510 | 506 | ||
@@ -656,7 +652,7 @@ static void irlap_recv_rnr_frame(struct irlap_cb *self, struct sk_buff *skb, | |||
656 | { | 652 | { |
657 | info->nr = skb->data[1] >> 5; | 653 | info->nr = skb->data[1] >> 5; |
658 | 654 | ||
659 | IRDA_DEBUG(4, "%s(), nr=%d, %ld\n", __func__, info->nr, jiffies); | 655 | pr_debug("%s(), nr=%d, %ld\n", __func__, info->nr, jiffies); |
660 | 656 | ||
661 | if (command) | 657 | if (command) |
662 | irlap_do_event(self, RECV_RNR_CMD, skb, info); | 658 | irlap_do_event(self, RECV_RNR_CMD, skb, info); |
@@ -667,8 +663,6 @@ static void irlap_recv_rnr_frame(struct irlap_cb *self, struct sk_buff *skb, | |||
667 | static void irlap_recv_rej_frame(struct irlap_cb *self, struct sk_buff *skb, | 663 | static void irlap_recv_rej_frame(struct irlap_cb *self, struct sk_buff *skb, |
668 | struct irlap_info *info, int command) | 664 | struct irlap_info *info, int command) |
669 | { | 665 | { |
670 | IRDA_DEBUG(0, "%s()\n", __func__); | ||
671 | |||
672 | info->nr = skb->data[1] >> 5; | 666 | info->nr = skb->data[1] >> 5; |
673 | 667 | ||
674 | /* Check if this is a command or a response frame */ | 668 | /* Check if this is a command or a response frame */ |
@@ -681,8 +675,6 @@ static void irlap_recv_rej_frame(struct irlap_cb *self, struct sk_buff *skb, | |||
681 | static void irlap_recv_srej_frame(struct irlap_cb *self, struct sk_buff *skb, | 675 | static void irlap_recv_srej_frame(struct irlap_cb *self, struct sk_buff *skb, |
682 | struct irlap_info *info, int command) | 676 | struct irlap_info *info, int command) |
683 | { | 677 | { |
684 | IRDA_DEBUG(0, "%s()\n", __func__); | ||
685 | |||
686 | info->nr = skb->data[1] >> 5; | 678 | info->nr = skb->data[1] >> 5; |
687 | 679 | ||
688 | /* Check if this is a command or a response frame */ | 680 | /* Check if this is a command or a response frame */ |
@@ -695,8 +687,6 @@ static void irlap_recv_srej_frame(struct irlap_cb *self, struct sk_buff *skb, | |||
695 | static void irlap_recv_disc_frame(struct irlap_cb *self, struct sk_buff *skb, | 687 | static void irlap_recv_disc_frame(struct irlap_cb *self, struct sk_buff *skb, |
696 | struct irlap_info *info, int command) | 688 | struct irlap_info *info, int command) |
697 | { | 689 | { |
698 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
699 | |||
700 | /* Check if this is a command or a response frame */ | 690 | /* Check if this is a command or a response frame */ |
701 | if (command) | 691 | if (command) |
702 | irlap_do_event(self, RECV_DISC_CMD, skb, info); | 692 | irlap_do_event(self, RECV_DISC_CMD, skb, info); |
@@ -754,7 +744,7 @@ void irlap_send_data_primary(struct irlap_cb *self, struct sk_buff *skb) | |||
754 | 744 | ||
755 | irlap_send_i_frame( self, tx_skb, CMD_FRAME); | 745 | irlap_send_i_frame( self, tx_skb, CMD_FRAME); |
756 | } else { | 746 | } else { |
757 | IRDA_DEBUG(4, "%s(), sending unreliable frame\n", __func__); | 747 | pr_debug("%s(), sending unreliable frame\n", __func__); |
758 | irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME); | 748 | irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME); |
759 | self->window -= 1; | 749 | self->window -= 1; |
760 | } | 750 | } |
@@ -807,7 +797,7 @@ void irlap_send_data_primary_poll(struct irlap_cb *self, struct sk_buff *skb) | |||
807 | irlap_next_state(self, LAP_NRM_P); | 797 | irlap_next_state(self, LAP_NRM_P); |
808 | irlap_send_i_frame(self, tx_skb, CMD_FRAME); | 798 | irlap_send_i_frame(self, tx_skb, CMD_FRAME); |
809 | } else { | 799 | } else { |
810 | IRDA_DEBUG(4, "%s(), sending unreliable frame\n", __func__); | 800 | pr_debug("%s(), sending unreliable frame\n", __func__); |
811 | 801 | ||
812 | if (self->ack_required) { | 802 | if (self->ack_required) { |
813 | irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME); | 803 | irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME); |
@@ -834,7 +824,9 @@ void irlap_send_data_primary_poll(struct irlap_cb *self, struct sk_buff *skb) | |||
834 | * See max_line_capacities[][] in qos.c for details. Jean II */ | 824 | * See max_line_capacities[][] in qos.c for details. Jean II */ |
835 | transmission_time -= (self->final_timeout * self->bytes_left | 825 | transmission_time -= (self->final_timeout * self->bytes_left |
836 | / self->line_capacity); | 826 | / self->line_capacity); |
837 | IRDA_DEBUG(4, "%s() adjusting transmission_time : ft=%d, bl=%d, lc=%d -> tt=%d\n", __func__, self->final_timeout, self->bytes_left, self->line_capacity, transmission_time); | 827 | pr_debug("%s() adjusting transmission_time : ft=%d, bl=%d, lc=%d -> tt=%d\n", |
828 | __func__, self->final_timeout, self->bytes_left, | ||
829 | self->line_capacity, transmission_time); | ||
838 | 830 | ||
839 | /* We are allowed to transmit a maximum number of bytes again. */ | 831 | /* We are allowed to transmit a maximum number of bytes again. */ |
840 | self->bytes_left = self->line_capacity; | 832 | self->bytes_left = self->line_capacity; |
@@ -995,7 +987,7 @@ void irlap_resend_rejected_frames(struct irlap_cb *self, int command) | |||
995 | /* tx_skb = skb_clone( skb, GFP_ATOMIC); */ | 987 | /* tx_skb = skb_clone( skb, GFP_ATOMIC); */ |
996 | tx_skb = skb_copy(skb, GFP_ATOMIC); | 988 | tx_skb = skb_copy(skb, GFP_ATOMIC); |
997 | if (!tx_skb) { | 989 | if (!tx_skb) { |
998 | IRDA_DEBUG(0, "%s(), unable to copy\n", __func__); | 990 | pr_debug("%s(), unable to copy\n", __func__); |
999 | return; | 991 | return; |
1000 | } | 992 | } |
1001 | 993 | ||
@@ -1018,7 +1010,7 @@ void irlap_resend_rejected_frames(struct irlap_cb *self, int command) | |||
1018 | */ | 1010 | */ |
1019 | while (!skb_queue_empty(&self->txq)) { | 1011 | while (!skb_queue_empty(&self->txq)) { |
1020 | 1012 | ||
1021 | IRDA_DEBUG(0, "%s(), sending additional frames!\n", __func__); | 1013 | pr_debug("%s(), sending additional frames!\n", __func__); |
1022 | if (self->window > 0) { | 1014 | if (self->window > 0) { |
1023 | skb = skb_dequeue( &self->txq); | 1015 | skb = skb_dequeue( &self->txq); |
1024 | IRDA_ASSERT(skb != NULL, return;); | 1016 | IRDA_ASSERT(skb != NULL, return;); |
@@ -1058,7 +1050,7 @@ void irlap_resend_rejected_frame(struct irlap_cb *self, int command) | |||
1058 | /* tx_skb = skb_clone( skb, GFP_ATOMIC); */ | 1050 | /* tx_skb = skb_clone( skb, GFP_ATOMIC); */ |
1059 | tx_skb = skb_copy(skb, GFP_ATOMIC); | 1051 | tx_skb = skb_copy(skb, GFP_ATOMIC); |
1060 | if (!tx_skb) { | 1052 | if (!tx_skb) { |
1061 | IRDA_DEBUG(0, "%s(), unable to copy\n", __func__); | 1053 | pr_debug("%s(), unable to copy\n", __func__); |
1062 | return; | 1054 | return; |
1063 | } | 1055 | } |
1064 | 1056 | ||
@@ -1081,8 +1073,6 @@ void irlap_resend_rejected_frame(struct irlap_cb *self, int command) | |||
1081 | void irlap_send_ui_frame(struct irlap_cb *self, struct sk_buff *skb, | 1073 | void irlap_send_ui_frame(struct irlap_cb *self, struct sk_buff *skb, |
1082 | __u8 caddr, int command) | 1074 | __u8 caddr, int command) |
1083 | { | 1075 | { |
1084 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
1085 | |||
1086 | IRDA_ASSERT(self != NULL, return;); | 1076 | IRDA_ASSERT(self != NULL, return;); |
1087 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 1077 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
1088 | IRDA_ASSERT(skb != NULL, return;); | 1078 | IRDA_ASSERT(skb != NULL, return;); |
@@ -1141,8 +1131,6 @@ static inline void irlap_recv_i_frame(struct irlap_cb *self, | |||
1141 | static void irlap_recv_ui_frame(struct irlap_cb *self, struct sk_buff *skb, | 1131 | static void irlap_recv_ui_frame(struct irlap_cb *self, struct sk_buff *skb, |
1142 | struct irlap_info *info) | 1132 | struct irlap_info *info) |
1143 | { | 1133 | { |
1144 | IRDA_DEBUG( 4, "%s()\n", __func__); | ||
1145 | |||
1146 | info->pf = skb->data[1] & PF_BIT; /* Final bit */ | 1134 | info->pf = skb->data[1] & PF_BIT; /* Final bit */ |
1147 | 1135 | ||
1148 | irlap_do_event(self, RECV_UI_FRAME, skb, info); | 1136 | irlap_do_event(self, RECV_UI_FRAME, skb, info); |
@@ -1160,8 +1148,6 @@ static void irlap_recv_frmr_frame(struct irlap_cb *self, struct sk_buff *skb, | |||
1160 | __u8 *frame; | 1148 | __u8 *frame; |
1161 | int w, x, y, z; | 1149 | int w, x, y, z; |
1162 | 1150 | ||
1163 | IRDA_DEBUG(0, "%s()\n", __func__); | ||
1164 | |||
1165 | IRDA_ASSERT(self != NULL, return;); | 1151 | IRDA_ASSERT(self != NULL, return;); |
1166 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 1152 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
1167 | IRDA_ASSERT(skb != NULL, return;); | 1153 | IRDA_ASSERT(skb != NULL, return;); |
@@ -1184,21 +1170,16 @@ static void irlap_recv_frmr_frame(struct irlap_cb *self, struct sk_buff *skb, | |||
1184 | z = frame[3] & 0x08; | 1170 | z = frame[3] & 0x08; |
1185 | 1171 | ||
1186 | if (w) { | 1172 | if (w) { |
1187 | IRDA_DEBUG(0, "Rejected control field is undefined or not " | 1173 | pr_debug("Rejected control field is undefined or not implemented\n"); |
1188 | "implemented.\n"); | ||
1189 | } | 1174 | } |
1190 | if (x) { | 1175 | if (x) { |
1191 | IRDA_DEBUG(0, "Rejected control field was invalid because it " | 1176 | pr_debug("Rejected control field was invalid because it contained a non permitted I field\n"); |
1192 | "contained a non permitted I field.\n"); | ||
1193 | } | 1177 | } |
1194 | if (y) { | 1178 | if (y) { |
1195 | IRDA_DEBUG(0, "Received I field exceeded the maximum negotiated " | 1179 | pr_debug("Received I field exceeded the maximum negotiated for the existing connection or exceeded the maximum this station supports if no connection exists\n"); |
1196 | "for the existing connection or exceeded the maximum " | ||
1197 | "this station supports if no connection exists.\n"); | ||
1198 | } | 1180 | } |
1199 | if (z) { | 1181 | if (z) { |
1200 | IRDA_DEBUG(0, "Rejected control field control field contained an " | 1182 | pr_debug("Rejected control field control field contained an invalid Nr count\n"); |
1201 | "invalid Nr count.\n"); | ||
1202 | } | 1183 | } |
1203 | irlap_do_event(self, RECV_FRMR_RSP, skb, info); | 1184 | irlap_do_event(self, RECV_FRMR_RSP, skb, info); |
1204 | } | 1185 | } |
@@ -1254,8 +1235,6 @@ static void irlap_recv_test_frame(struct irlap_cb *self, struct sk_buff *skb, | |||
1254 | { | 1235 | { |
1255 | struct test_frame *frame; | 1236 | struct test_frame *frame; |
1256 | 1237 | ||
1257 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
1258 | |||
1259 | if (!pskb_may_pull(skb, sizeof(*frame))) { | 1238 | if (!pskb_may_pull(skb, sizeof(*frame))) { |
1260 | net_err_ratelimited("%s: frame too short!\n", __func__); | 1239 | net_err_ratelimited("%s: frame too short!\n", __func__); |
1261 | return; | 1240 | return; |
@@ -1265,8 +1244,8 @@ static void irlap_recv_test_frame(struct irlap_cb *self, struct sk_buff *skb, | |||
1265 | /* Broadcast frames must carry saddr and daddr fields */ | 1244 | /* Broadcast frames must carry saddr and daddr fields */ |
1266 | if (info->caddr == CBROADCAST) { | 1245 | if (info->caddr == CBROADCAST) { |
1267 | if (skb->len < sizeof(struct test_frame)) { | 1246 | if (skb->len < sizeof(struct test_frame)) { |
1268 | IRDA_DEBUG(0, "%s() test frame too short!\n", | 1247 | pr_debug("%s() test frame too short!\n", |
1269 | __func__); | 1248 | __func__); |
1270 | return; | 1249 | return; |
1271 | } | 1250 | } |
1272 | 1251 | ||
@@ -1346,8 +1325,8 @@ int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev, | |||
1346 | 1325 | ||
1347 | /* First we check if this frame has a valid connection address */ | 1326 | /* First we check if this frame has a valid connection address */ |
1348 | if ((info.caddr != self->caddr) && (info.caddr != CBROADCAST)) { | 1327 | if ((info.caddr != self->caddr) && (info.caddr != CBROADCAST)) { |
1349 | IRDA_DEBUG(0, "%s(), wrong connection address!\n", | 1328 | pr_debug("%s(), wrong connection address!\n", |
1350 | __func__); | 1329 | __func__); |
1351 | goto out; | 1330 | goto out; |
1352 | } | 1331 | } |
1353 | /* | 1332 | /* |
diff --git a/net/irda/irlmp.c b/net/irda/irlmp.c index 6178e71f3a51..a26c401ef4a4 100644 --- a/net/irda/irlmp.c +++ b/net/irda/irlmp.c | |||
@@ -83,7 +83,6 @@ const char *irlmp_reason_str(LM_REASON reason) | |||
83 | */ | 83 | */ |
84 | int __init irlmp_init(void) | 84 | int __init irlmp_init(void) |
85 | { | 85 | { |
86 | IRDA_DEBUG(1, "%s()\n", __func__); | ||
87 | /* Initialize the irlmp structure. */ | 86 | /* Initialize the irlmp structure. */ |
88 | irlmp = kzalloc( sizeof(struct irlmp_cb), GFP_KERNEL); | 87 | irlmp = kzalloc( sizeof(struct irlmp_cb), GFP_KERNEL); |
89 | if (irlmp == NULL) | 88 | if (irlmp == NULL) |
@@ -207,8 +206,6 @@ EXPORT_SYMBOL(irlmp_open_lsap); | |||
207 | */ | 206 | */ |
208 | static void __irlmp_close_lsap(struct lsap_cb *self) | 207 | static void __irlmp_close_lsap(struct lsap_cb *self) |
209 | { | 208 | { |
210 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
211 | |||
212 | IRDA_ASSERT(self != NULL, return;); | 209 | IRDA_ASSERT(self != NULL, return;); |
213 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); | 210 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); |
214 | 211 | ||
@@ -267,9 +264,8 @@ void irlmp_close_lsap(struct lsap_cb *self) | |||
267 | NULL); | 264 | NULL); |
268 | } | 265 | } |
269 | if (!lsap) { | 266 | if (!lsap) { |
270 | IRDA_DEBUG(0, | 267 | pr_debug("%s(), Looks like somebody has removed me already!\n", |
271 | "%s(), Looks like somebody has removed me already!\n", | 268 | __func__); |
272 | __func__); | ||
273 | return; | 269 | return; |
274 | } | 270 | } |
275 | __irlmp_close_lsap(self); | 271 | __irlmp_close_lsap(self); |
@@ -340,8 +336,6 @@ void irlmp_unregister_link(__u32 saddr) | |||
340 | { | 336 | { |
341 | struct lap_cb *link; | 337 | struct lap_cb *link; |
342 | 338 | ||
343 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
344 | |||
345 | /* We must remove ourselves from the hashbin *first*. This ensure | 339 | /* We must remove ourselves from the hashbin *first*. This ensure |
346 | * that no more LSAPs will be open on this link and no discovery | 340 | * that no more LSAPs will be open on this link and no discovery |
347 | * will be triggered anymore. Jean II */ | 341 | * will be triggered anymore. Jean II */ |
@@ -383,9 +377,8 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel, | |||
383 | IRDA_ASSERT(self != NULL, return -EBADR;); | 377 | IRDA_ASSERT(self != NULL, return -EBADR;); |
384 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -EBADR;); | 378 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -EBADR;); |
385 | 379 | ||
386 | IRDA_DEBUG(2, | 380 | pr_debug("%s(), slsap_sel=%02x, dlsap_sel=%02x, saddr=%08x, daddr=%08x\n", |
387 | "%s(), slsap_sel=%02x, dlsap_sel=%02x, saddr=%08x, daddr=%08x\n", | 381 | __func__, self->slsap_sel, dlsap_sel, saddr, daddr); |
388 | __func__, self->slsap_sel, dlsap_sel, saddr, daddr); | ||
389 | 382 | ||
390 | if (test_bit(0, &self->connected)) { | 383 | if (test_bit(0, &self->connected)) { |
391 | ret = -EISCONN; | 384 | ret = -EISCONN; |
@@ -429,7 +422,7 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel, | |||
429 | if (daddr != DEV_ADDR_ANY) | 422 | if (daddr != DEV_ADDR_ANY) |
430 | discovery = hashbin_find(irlmp->cachelog, daddr, NULL); | 423 | discovery = hashbin_find(irlmp->cachelog, daddr, NULL); |
431 | else { | 424 | else { |
432 | IRDA_DEBUG(2, "%s(), no daddr\n", __func__); | 425 | pr_debug("%s(), no daddr\n", __func__); |
433 | discovery = (discovery_t *) | 426 | discovery = (discovery_t *) |
434 | hashbin_get_first(irlmp->cachelog); | 427 | hashbin_get_first(irlmp->cachelog); |
435 | } | 428 | } |
@@ -442,7 +435,7 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel, | |||
442 | } | 435 | } |
443 | lap = hashbin_lock_find(irlmp->links, saddr, NULL); | 436 | lap = hashbin_lock_find(irlmp->links, saddr, NULL); |
444 | if (lap == NULL) { | 437 | if (lap == NULL) { |
445 | IRDA_DEBUG(1, "%s(), Unable to find a usable link!\n", __func__); | 438 | pr_debug("%s(), Unable to find a usable link!\n", __func__); |
446 | ret = -EHOSTUNREACH; | 439 | ret = -EHOSTUNREACH; |
447 | goto err; | 440 | goto err; |
448 | } | 441 | } |
@@ -457,14 +450,15 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel, | |||
457 | * disconnected yet (waiting for timeout in LAP). | 450 | * disconnected yet (waiting for timeout in LAP). |
458 | * Maybe we could give LAP a bit of help in this case. | 451 | * Maybe we could give LAP a bit of help in this case. |
459 | */ | 452 | */ |
460 | IRDA_DEBUG(0, "%s(), sorry, but I'm waiting for LAP to timeout!\n", __func__); | 453 | pr_debug("%s(), sorry, but I'm waiting for LAP to timeout!\n", |
454 | __func__); | ||
461 | ret = -EAGAIN; | 455 | ret = -EAGAIN; |
462 | goto err; | 456 | goto err; |
463 | } | 457 | } |
464 | 458 | ||
465 | /* LAP is already connected to a different node, and LAP | 459 | /* LAP is already connected to a different node, and LAP |
466 | * can only talk to one node at a time */ | 460 | * can only talk to one node at a time */ |
467 | IRDA_DEBUG(0, "%s(), sorry, but link is busy!\n", __func__); | 461 | pr_debug("%s(), sorry, but link is busy!\n", __func__); |
468 | ret = -EBUSY; | 462 | ret = -EBUSY; |
469 | goto err; | 463 | goto err; |
470 | } | 464 | } |
@@ -525,8 +519,8 @@ void irlmp_connect_indication(struct lsap_cb *self, struct sk_buff *skb) | |||
525 | IRDA_ASSERT(skb != NULL, return;); | 519 | IRDA_ASSERT(skb != NULL, return;); |
526 | IRDA_ASSERT(self->lap != NULL, return;); | 520 | IRDA_ASSERT(self->lap != NULL, return;); |
527 | 521 | ||
528 | IRDA_DEBUG(2, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n", | 522 | pr_debug("%s(), slsap_sel=%02x, dlsap_sel=%02x\n", |
529 | __func__, self->slsap_sel, self->dlsap_sel); | 523 | __func__, self->slsap_sel, self->dlsap_sel); |
530 | 524 | ||
531 | /* Note : self->lap is set in irlmp_link_data_indication(), | 525 | /* Note : self->lap is set in irlmp_link_data_indication(), |
532 | * (case CONNECT_CMD:) because we have no way to set it here. | 526 | * (case CONNECT_CMD:) because we have no way to set it here. |
@@ -566,8 +560,8 @@ int irlmp_connect_response(struct lsap_cb *self, struct sk_buff *userdata) | |||
566 | /* We set the connected bit and move the lsap to the connected list | 560 | /* We set the connected bit and move the lsap to the connected list |
567 | * in the state machine itself. Jean II */ | 561 | * in the state machine itself. Jean II */ |
568 | 562 | ||
569 | IRDA_DEBUG(2, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n", | 563 | pr_debug("%s(), slsap_sel=%02x, dlsap_sel=%02x\n", |
570 | __func__, self->slsap_sel, self->dlsap_sel); | 564 | __func__, self->slsap_sel, self->dlsap_sel); |
571 | 565 | ||
572 | /* Make room for MUX control header (3 bytes) */ | 566 | /* Make room for MUX control header (3 bytes) */ |
573 | IRDA_ASSERT(skb_headroom(userdata) >= LMP_CONTROL_HEADER, return -1;); | 567 | IRDA_ASSERT(skb_headroom(userdata) >= LMP_CONTROL_HEADER, return -1;); |
@@ -593,8 +587,6 @@ void irlmp_connect_confirm(struct lsap_cb *self, struct sk_buff *skb) | |||
593 | int lap_header_size; | 587 | int lap_header_size; |
594 | int max_seg_size; | 588 | int max_seg_size; |
595 | 589 | ||
596 | IRDA_DEBUG(3, "%s()\n", __func__); | ||
597 | |||
598 | IRDA_ASSERT(skb != NULL, return;); | 590 | IRDA_ASSERT(skb != NULL, return;); |
599 | IRDA_ASSERT(self != NULL, return;); | 591 | IRDA_ASSERT(self != NULL, return;); |
600 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); | 592 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); |
@@ -606,8 +598,8 @@ void irlmp_connect_confirm(struct lsap_cb *self, struct sk_buff *skb) | |||
606 | lap_header_size = IRLAP_GET_HEADER_SIZE(self->lap->irlap); | 598 | lap_header_size = IRLAP_GET_HEADER_SIZE(self->lap->irlap); |
607 | max_header_size = LMP_HEADER + lap_header_size; | 599 | max_header_size = LMP_HEADER + lap_header_size; |
608 | 600 | ||
609 | IRDA_DEBUG(2, "%s(), max_header_size=%d\n", | 601 | pr_debug("%s(), max_header_size=%d\n", |
610 | __func__, max_header_size); | 602 | __func__, max_header_size); |
611 | 603 | ||
612 | /* Hide LMP_CONTROL_HEADER header from layer above */ | 604 | /* Hide LMP_CONTROL_HEADER header from layer above */ |
613 | skb_pull(skb, LMP_CONTROL_HEADER); | 605 | skb_pull(skb, LMP_CONTROL_HEADER); |
@@ -633,16 +625,14 @@ struct lsap_cb *irlmp_dup(struct lsap_cb *orig, void *instance) | |||
633 | struct lsap_cb *new; | 625 | struct lsap_cb *new; |
634 | unsigned long flags; | 626 | unsigned long flags; |
635 | 627 | ||
636 | IRDA_DEBUG(1, "%s()\n", __func__); | ||
637 | |||
638 | spin_lock_irqsave(&irlmp->unconnected_lsaps->hb_spinlock, flags); | 628 | spin_lock_irqsave(&irlmp->unconnected_lsaps->hb_spinlock, flags); |
639 | 629 | ||
640 | /* Only allowed to duplicate unconnected LSAP's, and only LSAPs | 630 | /* Only allowed to duplicate unconnected LSAP's, and only LSAPs |
641 | * that have received a connect indication. Jean II */ | 631 | * that have received a connect indication. Jean II */ |
642 | if ((!hashbin_find(irlmp->unconnected_lsaps, (long) orig, NULL)) || | 632 | if ((!hashbin_find(irlmp->unconnected_lsaps, (long) orig, NULL)) || |
643 | (orig->lap == NULL)) { | 633 | (orig->lap == NULL)) { |
644 | IRDA_DEBUG(0, "%s(), invalid LSAP (wrong state)\n", | 634 | pr_debug("%s(), invalid LSAP (wrong state)\n", |
645 | __func__); | 635 | __func__); |
646 | spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock, | 636 | spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock, |
647 | flags); | 637 | flags); |
648 | return NULL; | 638 | return NULL; |
@@ -651,7 +641,7 @@ struct lsap_cb *irlmp_dup(struct lsap_cb *orig, void *instance) | |||
651 | /* Allocate a new instance */ | 641 | /* Allocate a new instance */ |
652 | new = kmemdup(orig, sizeof(*new), GFP_ATOMIC); | 642 | new = kmemdup(orig, sizeof(*new), GFP_ATOMIC); |
653 | if (!new) { | 643 | if (!new) { |
654 | IRDA_DEBUG(0, "%s(), unable to kmalloc\n", __func__); | 644 | pr_debug("%s(), unable to kmalloc\n", __func__); |
655 | spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock, | 645 | spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock, |
656 | flags); | 646 | flags); |
657 | return NULL; | 647 | return NULL; |
@@ -697,7 +687,7 @@ int irlmp_disconnect_request(struct lsap_cb *self, struct sk_buff *userdata) | |||
697 | * and us that might mess up the hashbins below. This fixes it. | 687 | * and us that might mess up the hashbins below. This fixes it. |
698 | * Jean II */ | 688 | * Jean II */ |
699 | if (! test_and_clear_bit(0, &self->connected)) { | 689 | if (! test_and_clear_bit(0, &self->connected)) { |
700 | IRDA_DEBUG(0, "%s(), already disconnected!\n", __func__); | 690 | pr_debug("%s(), already disconnected!\n", __func__); |
701 | dev_kfree_skb(userdata); | 691 | dev_kfree_skb(userdata); |
702 | return -1; | 692 | return -1; |
703 | } | 693 | } |
@@ -751,20 +741,20 @@ void irlmp_disconnect_indication(struct lsap_cb *self, LM_REASON reason, | |||
751 | { | 741 | { |
752 | struct lsap_cb *lsap; | 742 | struct lsap_cb *lsap; |
753 | 743 | ||
754 | IRDA_DEBUG(1, "%s(), reason=%s [%d]\n", __func__, | 744 | pr_debug("%s(), reason=%s [%d]\n", __func__, |
755 | irlmp_reason_str(reason), reason); | 745 | irlmp_reason_str(reason), reason); |
756 | IRDA_ASSERT(self != NULL, return;); | 746 | IRDA_ASSERT(self != NULL, return;); |
757 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); | 747 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); |
758 | 748 | ||
759 | IRDA_DEBUG(3, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n", | 749 | pr_debug("%s(), slsap_sel=%02x, dlsap_sel=%02x\n", |
760 | __func__, self->slsap_sel, self->dlsap_sel); | 750 | __func__, self->slsap_sel, self->dlsap_sel); |
761 | 751 | ||
762 | /* Already disconnected ? | 752 | /* Already disconnected ? |
763 | * There is a race condition between irlmp_disconnect_request() | 753 | * There is a race condition between irlmp_disconnect_request() |
764 | * and us that might mess up the hashbins below. This fixes it. | 754 | * and us that might mess up the hashbins below. This fixes it. |
765 | * Jean II */ | 755 | * Jean II */ |
766 | if (! test_and_clear_bit(0, &self->connected)) { | 756 | if (! test_and_clear_bit(0, &self->connected)) { |
767 | IRDA_DEBUG(0, "%s(), already disconnected!\n", __func__); | 757 | pr_debug("%s(), already disconnected!\n", __func__); |
768 | return; | 758 | return; |
769 | } | 759 | } |
770 | 760 | ||
@@ -797,7 +787,7 @@ void irlmp_disconnect_indication(struct lsap_cb *self, LM_REASON reason, | |||
797 | self->notify.disconnect_indication(self->notify.instance, | 787 | self->notify.disconnect_indication(self->notify.instance, |
798 | self, reason, skb); | 788 | self, reason, skb); |
799 | } else { | 789 | } else { |
800 | IRDA_DEBUG(0, "%s(), no handler\n", __func__); | 790 | pr_debug("%s(), no handler\n", __func__); |
801 | } | 791 | } |
802 | } | 792 | } |
803 | 793 | ||
@@ -968,8 +958,6 @@ irlmp_notify_client(irlmp_client_t *client, | |||
968 | int number; /* Number of nodes in the log */ | 958 | int number; /* Number of nodes in the log */ |
969 | int i; | 959 | int i; |
970 | 960 | ||
971 | IRDA_DEBUG(3, "%s()\n", __func__); | ||
972 | |||
973 | /* Check if client wants or not partial/selective log (optimisation) */ | 961 | /* Check if client wants or not partial/selective log (optimisation) */ |
974 | if (!client->disco_callback) | 962 | if (!client->disco_callback) |
975 | return; | 963 | return; |
@@ -1019,8 +1007,6 @@ void irlmp_discovery_confirm(hashbin_t *log, DISCOVERY_MODE mode) | |||
1019 | irlmp_client_t *client; | 1007 | irlmp_client_t *client; |
1020 | irlmp_client_t *client_next; | 1008 | irlmp_client_t *client_next; |
1021 | 1009 | ||
1022 | IRDA_DEBUG(3, "%s()\n", __func__); | ||
1023 | |||
1024 | IRDA_ASSERT(log != NULL, return;); | 1010 | IRDA_ASSERT(log != NULL, return;); |
1025 | 1011 | ||
1026 | if (!(HASHBIN_GET_SIZE(log))) | 1012 | if (!(HASHBIN_GET_SIZE(log))) |
@@ -1054,8 +1040,6 @@ void irlmp_discovery_expiry(discinfo_t *expiries, int number) | |||
1054 | irlmp_client_t *client_next; | 1040 | irlmp_client_t *client_next; |
1055 | int i; | 1041 | int i; |
1056 | 1042 | ||
1057 | IRDA_DEBUG(3, "%s()\n", __func__); | ||
1058 | |||
1059 | IRDA_ASSERT(expiries != NULL, return;); | 1043 | IRDA_ASSERT(expiries != NULL, return;); |
1060 | 1044 | ||
1061 | /* For each client - notify callback may touch client list */ | 1045 | /* For each client - notify callback may touch client list */ |
@@ -1088,8 +1072,6 @@ void irlmp_discovery_expiry(discinfo_t *expiries, int number) | |||
1088 | */ | 1072 | */ |
1089 | discovery_t *irlmp_get_discovery_response(void) | 1073 | discovery_t *irlmp_get_discovery_response(void) |
1090 | { | 1074 | { |
1091 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
1092 | |||
1093 | IRDA_ASSERT(irlmp != NULL, return NULL;); | 1075 | IRDA_ASSERT(irlmp != NULL, return NULL;); |
1094 | 1076 | ||
1095 | put_unaligned(irlmp->hints.word, (__u16 *)irlmp->discovery_rsp.data.hints); | 1077 | put_unaligned(irlmp->hints.word, (__u16 *)irlmp->discovery_rsp.data.hints); |
@@ -1166,8 +1148,6 @@ int irlmp_udata_request(struct lsap_cb *self, struct sk_buff *userdata) | |||
1166 | { | 1148 | { |
1167 | int ret; | 1149 | int ret; |
1168 | 1150 | ||
1169 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
1170 | |||
1171 | IRDA_ASSERT(userdata != NULL, return -1;); | 1151 | IRDA_ASSERT(userdata != NULL, return -1;); |
1172 | 1152 | ||
1173 | /* Make room for MUX header */ | 1153 | /* Make room for MUX header */ |
@@ -1190,8 +1170,6 @@ int irlmp_udata_request(struct lsap_cb *self, struct sk_buff *userdata) | |||
1190 | */ | 1170 | */ |
1191 | void irlmp_udata_indication(struct lsap_cb *self, struct sk_buff *skb) | 1171 | void irlmp_udata_indication(struct lsap_cb *self, struct sk_buff *skb) |
1192 | { | 1172 | { |
1193 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
1194 | |||
1195 | IRDA_ASSERT(self != NULL, return;); | 1173 | IRDA_ASSERT(self != NULL, return;); |
1196 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); | 1174 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); |
1197 | IRDA_ASSERT(skb != NULL, return;); | 1175 | IRDA_ASSERT(skb != NULL, return;); |
@@ -1217,8 +1195,6 @@ int irlmp_connless_data_request(struct lsap_cb *self, struct sk_buff *userdata, | |||
1217 | struct sk_buff *clone_skb; | 1195 | struct sk_buff *clone_skb; |
1218 | struct lap_cb *lap; | 1196 | struct lap_cb *lap; |
1219 | 1197 | ||
1220 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
1221 | |||
1222 | IRDA_ASSERT(userdata != NULL, return -1;); | 1198 | IRDA_ASSERT(userdata != NULL, return -1;); |
1223 | 1199 | ||
1224 | /* Make room for MUX and PID header */ | 1200 | /* Make room for MUX and PID header */ |
@@ -1268,8 +1244,6 @@ int irlmp_connless_data_request(struct lsap_cb *self, struct sk_buff *userdata, | |||
1268 | #ifdef CONFIG_IRDA_ULTRA | 1244 | #ifdef CONFIG_IRDA_ULTRA |
1269 | void irlmp_connless_data_indication(struct lsap_cb *self, struct sk_buff *skb) | 1245 | void irlmp_connless_data_indication(struct lsap_cb *self, struct sk_buff *skb) |
1270 | { | 1246 | { |
1271 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
1272 | |||
1273 | IRDA_ASSERT(self != NULL, return;); | 1247 | IRDA_ASSERT(self != NULL, return;); |
1274 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); | 1248 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); |
1275 | IRDA_ASSERT(skb != NULL, return;); | 1249 | IRDA_ASSERT(skb != NULL, return;); |
@@ -1311,7 +1285,7 @@ void irlmp_status_indication(struct lap_cb *self, | |||
1311 | curr->notify.status_indication(curr->notify.instance, | 1285 | curr->notify.status_indication(curr->notify.instance, |
1312 | link, lock); | 1286 | link, lock); |
1313 | else | 1287 | else |
1314 | IRDA_DEBUG(2, "%s(), no handler\n", __func__); | 1288 | pr_debug("%s(), no handler\n", __func__); |
1315 | 1289 | ||
1316 | curr = next; | 1290 | curr = next; |
1317 | } | 1291 | } |
@@ -1339,7 +1313,7 @@ void irlmp_flow_indication(struct lap_cb *self, LOCAL_FLOW flow) | |||
1339 | /* Get the number of lsap. That's the only safe way to know | 1313 | /* Get the number of lsap. That's the only safe way to know |
1340 | * that we have looped around... - Jean II */ | 1314 | * that we have looped around... - Jean II */ |
1341 | lsap_todo = HASHBIN_GET_SIZE(self->lsaps); | 1315 | lsap_todo = HASHBIN_GET_SIZE(self->lsaps); |
1342 | IRDA_DEBUG(4, "%s() : %d lsaps to scan\n", __func__, lsap_todo); | 1316 | pr_debug("%s() : %d lsaps to scan\n", __func__, lsap_todo); |
1343 | 1317 | ||
1344 | /* Poll lsap in order until the queue is full or until we | 1318 | /* Poll lsap in order until the queue is full or until we |
1345 | * tried them all. | 1319 | * tried them all. |
@@ -1358,14 +1332,16 @@ void irlmp_flow_indication(struct lap_cb *self, LOCAL_FLOW flow) | |||
1358 | /* Uh-oh... Paranoia */ | 1332 | /* Uh-oh... Paranoia */ |
1359 | if(curr == NULL) | 1333 | if(curr == NULL) |
1360 | break; | 1334 | break; |
1361 | IRDA_DEBUG(4, "%s() : curr is %p, next was %p and is now %p, still %d to go - queue len = %d\n", __func__, curr, next, self->flow_next, lsap_todo, IRLAP_GET_TX_QUEUE_LEN(self->irlap)); | 1335 | pr_debug("%s() : curr is %p, next was %p and is now %p, still %d to go - queue len = %d\n", |
1336 | __func__, curr, next, self->flow_next, lsap_todo, | ||
1337 | IRLAP_GET_TX_QUEUE_LEN(self->irlap)); | ||
1362 | 1338 | ||
1363 | /* Inform lsap user that it can send one more packet. */ | 1339 | /* Inform lsap user that it can send one more packet. */ |
1364 | if (curr->notify.flow_indication != NULL) | 1340 | if (curr->notify.flow_indication != NULL) |
1365 | curr->notify.flow_indication(curr->notify.instance, | 1341 | curr->notify.flow_indication(curr->notify.instance, |
1366 | curr, flow); | 1342 | curr, flow); |
1367 | else | 1343 | else |
1368 | IRDA_DEBUG(1, "%s(), no handler\n", __func__); | 1344 | pr_debug("%s(), no handler\n", __func__); |
1369 | } | 1345 | } |
1370 | } | 1346 | } |
1371 | 1347 | ||
@@ -1386,32 +1362,30 @@ __u8 *irlmp_hint_to_service(__u8 *hint) | |||
1386 | * since we currently only support 2 hint bytes | 1362 | * since we currently only support 2 hint bytes |
1387 | */ | 1363 | */ |
1388 | service = kmalloc(16, GFP_ATOMIC); | 1364 | service = kmalloc(16, GFP_ATOMIC); |
1389 | if (!service) { | 1365 | if (!service) |
1390 | IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __func__); | ||
1391 | return NULL; | 1366 | return NULL; |
1392 | } | ||
1393 | 1367 | ||
1394 | if (!hint[0]) { | 1368 | if (!hint[0]) { |
1395 | IRDA_DEBUG(1, "<None>\n"); | 1369 | pr_debug("<None>\n"); |
1396 | kfree(service); | 1370 | kfree(service); |
1397 | return NULL; | 1371 | return NULL; |
1398 | } | 1372 | } |
1399 | if (hint[0] & HINT_PNP) | 1373 | if (hint[0] & HINT_PNP) |
1400 | IRDA_DEBUG(1, "PnP Compatible "); | 1374 | pr_debug("PnP Compatible "); |
1401 | if (hint[0] & HINT_PDA) | 1375 | if (hint[0] & HINT_PDA) |
1402 | IRDA_DEBUG(1, "PDA/Palmtop "); | 1376 | pr_debug("PDA/Palmtop "); |
1403 | if (hint[0] & HINT_COMPUTER) | 1377 | if (hint[0] & HINT_COMPUTER) |
1404 | IRDA_DEBUG(1, "Computer "); | 1378 | pr_debug("Computer "); |
1405 | if (hint[0] & HINT_PRINTER) { | 1379 | if (hint[0] & HINT_PRINTER) { |
1406 | IRDA_DEBUG(1, "Printer "); | 1380 | pr_debug("Printer "); |
1407 | service[i++] = S_PRINTER; | 1381 | service[i++] = S_PRINTER; |
1408 | } | 1382 | } |
1409 | if (hint[0] & HINT_MODEM) | 1383 | if (hint[0] & HINT_MODEM) |
1410 | IRDA_DEBUG(1, "Modem "); | 1384 | pr_debug("Modem "); |
1411 | if (hint[0] & HINT_FAX) | 1385 | if (hint[0] & HINT_FAX) |
1412 | IRDA_DEBUG(1, "Fax "); | 1386 | pr_debug("Fax "); |
1413 | if (hint[0] & HINT_LAN) { | 1387 | if (hint[0] & HINT_LAN) { |
1414 | IRDA_DEBUG(1, "LAN Access "); | 1388 | pr_debug("LAN Access "); |
1415 | service[i++] = S_LAN; | 1389 | service[i++] = S_LAN; |
1416 | } | 1390 | } |
1417 | /* | 1391 | /* |
@@ -1421,22 +1395,22 @@ __u8 *irlmp_hint_to_service(__u8 *hint) | |||
1421 | */ | 1395 | */ |
1422 | if (hint[0] & HINT_EXTENSION) { | 1396 | if (hint[0] & HINT_EXTENSION) { |
1423 | if (hint[1] & HINT_TELEPHONY) { | 1397 | if (hint[1] & HINT_TELEPHONY) { |
1424 | IRDA_DEBUG(1, "Telephony "); | 1398 | pr_debug("Telephony "); |
1425 | service[i++] = S_TELEPHONY; | 1399 | service[i++] = S_TELEPHONY; |
1426 | } | 1400 | } |
1427 | if (hint[1] & HINT_FILE_SERVER) | 1401 | if (hint[1] & HINT_FILE_SERVER) |
1428 | IRDA_DEBUG(1, "File Server "); | 1402 | pr_debug("File Server "); |
1429 | 1403 | ||
1430 | if (hint[1] & HINT_COMM) { | 1404 | if (hint[1] & HINT_COMM) { |
1431 | IRDA_DEBUG(1, "IrCOMM "); | 1405 | pr_debug("IrCOMM "); |
1432 | service[i++] = S_COMM; | 1406 | service[i++] = S_COMM; |
1433 | } | 1407 | } |
1434 | if (hint[1] & HINT_OBEX) { | 1408 | if (hint[1] & HINT_OBEX) { |
1435 | IRDA_DEBUG(1, "IrOBEX "); | 1409 | pr_debug("IrOBEX "); |
1436 | service[i++] = S_OBEX; | 1410 | service[i++] = S_OBEX; |
1437 | } | 1411 | } |
1438 | } | 1412 | } |
1439 | IRDA_DEBUG(1, "\n"); | 1413 | pr_debug("\n"); |
1440 | 1414 | ||
1441 | /* So that client can be notified about any discovery */ | 1415 | /* So that client can be notified about any discovery */ |
1442 | service[i++] = S_ANY; | 1416 | service[i++] = S_ANY; |
@@ -1489,14 +1463,13 @@ void *irlmp_register_service(__u16 hints) | |||
1489 | { | 1463 | { |
1490 | irlmp_service_t *service; | 1464 | irlmp_service_t *service; |
1491 | 1465 | ||
1492 | IRDA_DEBUG(4, "%s(), hints = %04x\n", __func__, hints); | 1466 | pr_debug("%s(), hints = %04x\n", __func__, hints); |
1493 | 1467 | ||
1494 | /* Make a new registration */ | 1468 | /* Make a new registration */ |
1495 | service = kmalloc(sizeof(irlmp_service_t), GFP_ATOMIC); | 1469 | service = kmalloc(sizeof(irlmp_service_t), GFP_ATOMIC); |
1496 | if (!service) { | 1470 | if (!service) |
1497 | IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __func__); | ||
1498 | return NULL; | 1471 | return NULL; |
1499 | } | 1472 | |
1500 | service->hints.word = hints; | 1473 | service->hints.word = hints; |
1501 | hashbin_insert(irlmp->services, (irda_queue_t *) service, | 1474 | hashbin_insert(irlmp->services, (irda_queue_t *) service, |
1502 | (long) service, NULL); | 1475 | (long) service, NULL); |
@@ -1519,15 +1492,13 @@ int irlmp_unregister_service(void *handle) | |||
1519 | irlmp_service_t *service; | 1492 | irlmp_service_t *service; |
1520 | unsigned long flags; | 1493 | unsigned long flags; |
1521 | 1494 | ||
1522 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
1523 | |||
1524 | if (!handle) | 1495 | if (!handle) |
1525 | return -1; | 1496 | return -1; |
1526 | 1497 | ||
1527 | /* Caller may call with invalid handle (it's legal) - Jean II */ | 1498 | /* Caller may call with invalid handle (it's legal) - Jean II */ |
1528 | service = hashbin_lock_find(irlmp->services, (long) handle, NULL); | 1499 | service = hashbin_lock_find(irlmp->services, (long) handle, NULL); |
1529 | if (!service) { | 1500 | if (!service) { |
1530 | IRDA_DEBUG(1, "%s(), Unknown service!\n", __func__); | 1501 | pr_debug("%s(), Unknown service!\n", __func__); |
1531 | return -1; | 1502 | return -1; |
1532 | } | 1503 | } |
1533 | 1504 | ||
@@ -1564,15 +1535,12 @@ void *irlmp_register_client(__u16 hint_mask, DISCOVERY_CALLBACK1 disco_clb, | |||
1564 | { | 1535 | { |
1565 | irlmp_client_t *client; | 1536 | irlmp_client_t *client; |
1566 | 1537 | ||
1567 | IRDA_DEBUG(1, "%s()\n", __func__); | ||
1568 | IRDA_ASSERT(irlmp != NULL, return NULL;); | 1538 | IRDA_ASSERT(irlmp != NULL, return NULL;); |
1569 | 1539 | ||
1570 | /* Make a new registration */ | 1540 | /* Make a new registration */ |
1571 | client = kmalloc(sizeof(irlmp_client_t), GFP_ATOMIC); | 1541 | client = kmalloc(sizeof(irlmp_client_t), GFP_ATOMIC); |
1572 | if (!client) { | 1542 | if (!client) |
1573 | IRDA_DEBUG( 1, "%s(), Unable to kmalloc!\n", __func__); | ||
1574 | return NULL; | 1543 | return NULL; |
1575 | } | ||
1576 | 1544 | ||
1577 | /* Register the details */ | 1545 | /* Register the details */ |
1578 | client->hint_mask.word = hint_mask; | 1546 | client->hint_mask.word = hint_mask; |
@@ -1606,7 +1574,7 @@ int irlmp_update_client(void *handle, __u16 hint_mask, | |||
1606 | 1574 | ||
1607 | client = hashbin_lock_find(irlmp->clients, (long) handle, NULL); | 1575 | client = hashbin_lock_find(irlmp->clients, (long) handle, NULL); |
1608 | if (!client) { | 1576 | if (!client) { |
1609 | IRDA_DEBUG(1, "%s(), Unknown client!\n", __func__); | 1577 | pr_debug("%s(), Unknown client!\n", __func__); |
1610 | return -1; | 1578 | return -1; |
1611 | } | 1579 | } |
1612 | 1580 | ||
@@ -1629,19 +1597,17 @@ int irlmp_unregister_client(void *handle) | |||
1629 | { | 1597 | { |
1630 | struct irlmp_client *client; | 1598 | struct irlmp_client *client; |
1631 | 1599 | ||
1632 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
1633 | |||
1634 | if (!handle) | 1600 | if (!handle) |
1635 | return -1; | 1601 | return -1; |
1636 | 1602 | ||
1637 | /* Caller may call with invalid handle (it's legal) - Jean II */ | 1603 | /* Caller may call with invalid handle (it's legal) - Jean II */ |
1638 | client = hashbin_lock_find(irlmp->clients, (long) handle, NULL); | 1604 | client = hashbin_lock_find(irlmp->clients, (long) handle, NULL); |
1639 | if (!client) { | 1605 | if (!client) { |
1640 | IRDA_DEBUG(1, "%s(), Unknown client!\n", __func__); | 1606 | pr_debug("%s(), Unknown client!\n", __func__); |
1641 | return -1; | 1607 | return -1; |
1642 | } | 1608 | } |
1643 | 1609 | ||
1644 | IRDA_DEBUG(4, "%s(), removing client!\n", __func__); | 1610 | pr_debug("%s(), removing client!\n", __func__); |
1645 | hashbin_remove_this(irlmp->clients, (irda_queue_t *) client); | 1611 | hashbin_remove_this(irlmp->clients, (irda_queue_t *) client); |
1646 | kfree(client); | 1612 | kfree(client); |
1647 | 1613 | ||
@@ -1670,8 +1636,6 @@ static int irlmp_slsap_inuse(__u8 slsap_sel) | |||
1670 | IRDA_ASSERT(irlmp->magic == LMP_MAGIC, return TRUE;); | 1636 | IRDA_ASSERT(irlmp->magic == LMP_MAGIC, return TRUE;); |
1671 | IRDA_ASSERT(slsap_sel != LSAP_ANY, return TRUE;); | 1637 | IRDA_ASSERT(slsap_sel != LSAP_ANY, return TRUE;); |
1672 | 1638 | ||
1673 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
1674 | |||
1675 | #ifdef CONFIG_IRDA_ULTRA | 1639 | #ifdef CONFIG_IRDA_ULTRA |
1676 | /* Accept all bindings to the connectionless LSAP */ | 1640 | /* Accept all bindings to the connectionless LSAP */ |
1677 | if (slsap_sel == LSAP_CONNLESS) | 1641 | if (slsap_sel == LSAP_CONNLESS) |
@@ -1705,8 +1669,8 @@ static int irlmp_slsap_inuse(__u8 slsap_sel) | |||
1705 | goto errlsap;); | 1669 | goto errlsap;); |
1706 | 1670 | ||
1707 | if ((self->slsap_sel == slsap_sel)) { | 1671 | if ((self->slsap_sel == slsap_sel)) { |
1708 | IRDA_DEBUG(4, "Source LSAP selector=%02x in use\n", | 1672 | pr_debug("Source LSAP selector=%02x in use\n", |
1709 | self->slsap_sel); | 1673 | self->slsap_sel); |
1710 | goto errlsap; | 1674 | goto errlsap; |
1711 | } | 1675 | } |
1712 | self = (struct lsap_cb*) hashbin_get_next(lap->lsaps); | 1676 | self = (struct lsap_cb*) hashbin_get_next(lap->lsaps); |
@@ -1730,8 +1694,8 @@ static int irlmp_slsap_inuse(__u8 slsap_sel) | |||
1730 | while (self != NULL) { | 1694 | while (self != NULL) { |
1731 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, goto erruncon;); | 1695 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, goto erruncon;); |
1732 | if ((self->slsap_sel == slsap_sel)) { | 1696 | if ((self->slsap_sel == slsap_sel)) { |
1733 | IRDA_DEBUG(4, "Source LSAP selector=%02x in use (unconnected)\n", | 1697 | pr_debug("Source LSAP selector=%02x in use (unconnected)\n", |
1734 | self->slsap_sel); | 1698 | self->slsap_sel); |
1735 | goto erruncon; | 1699 | goto erruncon; |
1736 | } | 1700 | } |
1737 | self = (struct lsap_cb*) hashbin_get_next(irlmp->unconnected_lsaps); | 1701 | self = (struct lsap_cb*) hashbin_get_next(irlmp->unconnected_lsaps); |
@@ -1811,8 +1775,8 @@ static __u8 irlmp_find_free_slsap(void) | |||
1811 | 1775 | ||
1812 | /* Got it ! */ | 1776 | /* Got it ! */ |
1813 | lsap_sel = irlmp->last_lsap_sel; | 1777 | lsap_sel = irlmp->last_lsap_sel; |
1814 | IRDA_DEBUG(4, "%s(), found free lsap_sel=%02x\n", | 1778 | pr_debug("%s(), found free lsap_sel=%02x\n", |
1815 | __func__, lsap_sel); | 1779 | __func__, lsap_sel); |
1816 | 1780 | ||
1817 | return lsap_sel; | 1781 | return lsap_sel; |
1818 | } | 1782 | } |
@@ -1830,26 +1794,27 @@ LM_REASON irlmp_convert_lap_reason( LAP_REASON lap_reason) | |||
1830 | 1794 | ||
1831 | switch (lap_reason) { | 1795 | switch (lap_reason) { |
1832 | case LAP_DISC_INDICATION: /* Received a disconnect request from peer */ | 1796 | case LAP_DISC_INDICATION: /* Received a disconnect request from peer */ |
1833 | IRDA_DEBUG( 1, "%s(), LAP_DISC_INDICATION\n", __func__); | 1797 | pr_debug("%s(), LAP_DISC_INDICATION\n", __func__); |
1834 | reason = LM_USER_REQUEST; | 1798 | reason = LM_USER_REQUEST; |
1835 | break; | 1799 | break; |
1836 | case LAP_NO_RESPONSE: /* To many retransmits without response */ | 1800 | case LAP_NO_RESPONSE: /* To many retransmits without response */ |
1837 | IRDA_DEBUG( 1, "%s(), LAP_NO_RESPONSE\n", __func__); | 1801 | pr_debug("%s(), LAP_NO_RESPONSE\n", __func__); |
1838 | reason = LM_LAP_DISCONNECT; | 1802 | reason = LM_LAP_DISCONNECT; |
1839 | break; | 1803 | break; |
1840 | case LAP_RESET_INDICATION: | 1804 | case LAP_RESET_INDICATION: |
1841 | IRDA_DEBUG( 1, "%s(), LAP_RESET_INDICATION\n", __func__); | 1805 | pr_debug("%s(), LAP_RESET_INDICATION\n", __func__); |
1842 | reason = LM_LAP_RESET; | 1806 | reason = LM_LAP_RESET; |
1843 | break; | 1807 | break; |
1844 | case LAP_FOUND_NONE: | 1808 | case LAP_FOUND_NONE: |
1845 | case LAP_MEDIA_BUSY: | 1809 | case LAP_MEDIA_BUSY: |
1846 | case LAP_PRIMARY_CONFLICT: | 1810 | case LAP_PRIMARY_CONFLICT: |
1847 | IRDA_DEBUG(1, "%s(), LAP_FOUND_NONE, LAP_MEDIA_BUSY or LAP_PRIMARY_CONFLICT\n", __func__); | 1811 | pr_debug("%s(), LAP_FOUND_NONE, LAP_MEDIA_BUSY or LAP_PRIMARY_CONFLICT\n", |
1812 | __func__); | ||
1848 | reason = LM_CONNECT_FAILURE; | 1813 | reason = LM_CONNECT_FAILURE; |
1849 | break; | 1814 | break; |
1850 | default: | 1815 | default: |
1851 | IRDA_DEBUG(1, "%s(), Unknown IrLAP disconnect reason %d!\n", | 1816 | pr_debug("%s(), Unknown IrLAP disconnect reason %d!\n", |
1852 | __func__, lap_reason); | 1817 | __func__, lap_reason); |
1853 | reason = LM_LAP_DISCONNECT; | 1818 | reason = LM_LAP_DISCONNECT; |
1854 | break; | 1819 | break; |
1855 | } | 1820 | } |
diff --git a/net/irda/irlmp_event.c b/net/irda/irlmp_event.c index 30e51f9f4baf..22c019ccd4af 100644 --- a/net/irda/irlmp_event.c +++ b/net/irda/irlmp_event.c | |||
@@ -120,7 +120,7 @@ static inline void irlmp_next_lap_state(struct lap_cb *self, | |||
120 | IRLMP_STATE state) | 120 | IRLMP_STATE state) |
121 | { | 121 | { |
122 | /* | 122 | /* |
123 | IRDA_DEBUG(4, "%s(), LMP LAP = %s\n", __func__, irlmp_state[state]); | 123 | pr_debug("%s(), LMP LAP = %s\n", __func__, irlmp_state[state]); |
124 | */ | 124 | */ |
125 | self->lap_state = state; | 125 | self->lap_state = state; |
126 | } | 126 | } |
@@ -130,7 +130,7 @@ static inline void irlmp_next_lsap_state(struct lsap_cb *self, | |||
130 | { | 130 | { |
131 | /* | 131 | /* |
132 | IRDA_ASSERT(self != NULL, return;); | 132 | IRDA_ASSERT(self != NULL, return;); |
133 | IRDA_DEBUG(4, "%s(), LMP LSAP = %s\n", __func__, irlsap_state[state]); | 133 | pr_debug("%s(), LMP LSAP = %s\n", __func__, irlsap_state[state]); |
134 | */ | 134 | */ |
135 | self->lsap_state = state; | 135 | self->lsap_state = state; |
136 | } | 136 | } |
@@ -142,8 +142,8 @@ int irlmp_do_lsap_event(struct lsap_cb *self, IRLMP_EVENT event, | |||
142 | IRDA_ASSERT(self != NULL, return -1;); | 142 | IRDA_ASSERT(self != NULL, return -1;); |
143 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); | 143 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); |
144 | 144 | ||
145 | IRDA_DEBUG(4, "%s(), EVENT = %s, STATE = %s\n", | 145 | pr_debug("%s(), EVENT = %s, STATE = %s\n", |
146 | __func__, irlmp_event[event], irlsap_state[ self->lsap_state]); | 146 | __func__, irlmp_event[event], irlsap_state[self->lsap_state]); |
147 | 147 | ||
148 | return (*lsap_state[self->lsap_state]) (self, event, skb); | 148 | return (*lsap_state[self->lsap_state]) (self, event, skb); |
149 | } | 149 | } |
@@ -160,17 +160,15 @@ void irlmp_do_lap_event(struct lap_cb *self, IRLMP_EVENT event, | |||
160 | IRDA_ASSERT(self != NULL, return;); | 160 | IRDA_ASSERT(self != NULL, return;); |
161 | IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); | 161 | IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); |
162 | 162 | ||
163 | IRDA_DEBUG(4, "%s(), EVENT = %s, STATE = %s\n", __func__, | 163 | pr_debug("%s(), EVENT = %s, STATE = %s\n", __func__, |
164 | irlmp_event[event], | 164 | irlmp_event[event], |
165 | irlmp_state[self->lap_state]); | 165 | irlmp_state[self->lap_state]); |
166 | 166 | ||
167 | (*lap_state[self->lap_state]) (self, event, skb); | 167 | (*lap_state[self->lap_state]) (self, event, skb); |
168 | } | 168 | } |
169 | 169 | ||
170 | void irlmp_discovery_timer_expired(void *data) | 170 | void irlmp_discovery_timer_expired(void *data) |
171 | { | 171 | { |
172 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
173 | |||
174 | /* We always cleanup the log (active & passive discovery) */ | 172 | /* We always cleanup the log (active & passive discovery) */ |
175 | irlmp_do_expiry(); | 173 | irlmp_do_expiry(); |
176 | 174 | ||
@@ -184,8 +182,6 @@ void irlmp_watchdog_timer_expired(void *data) | |||
184 | { | 182 | { |
185 | struct lsap_cb *self = (struct lsap_cb *) data; | 183 | struct lsap_cb *self = (struct lsap_cb *) data; |
186 | 184 | ||
187 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
188 | |||
189 | IRDA_ASSERT(self != NULL, return;); | 185 | IRDA_ASSERT(self != NULL, return;); |
190 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); | 186 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); |
191 | 187 | ||
@@ -196,8 +192,6 @@ void irlmp_idle_timer_expired(void *data) | |||
196 | { | 192 | { |
197 | struct lap_cb *self = (struct lap_cb *) data; | 193 | struct lap_cb *self = (struct lap_cb *) data; |
198 | 194 | ||
199 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
200 | |||
201 | IRDA_ASSERT(self != NULL, return;); | 195 | IRDA_ASSERT(self != NULL, return;); |
202 | IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); | 196 | IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); |
203 | 197 | ||
@@ -256,7 +250,6 @@ irlmp_do_all_lsap_event(hashbin_t * lsap_hashbin, | |||
256 | static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event, | 250 | static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event, |
257 | struct sk_buff *skb) | 251 | struct sk_buff *skb) |
258 | { | 252 | { |
259 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
260 | IRDA_ASSERT(self->irlap != NULL, return;); | 253 | IRDA_ASSERT(self->irlap != NULL, return;); |
261 | 254 | ||
262 | switch (event) { | 255 | switch (event) { |
@@ -276,7 +269,7 @@ static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event, | |||
276 | irlap_connect_response(self->irlap, skb); | 269 | irlap_connect_response(self->irlap, skb); |
277 | break; | 270 | break; |
278 | case LM_LAP_CONNECT_REQUEST: | 271 | case LM_LAP_CONNECT_REQUEST: |
279 | IRDA_DEBUG(4, "%s() LS_CONNECT_REQUEST\n", __func__); | 272 | pr_debug("%s() LS_CONNECT_REQUEST\n", __func__); |
280 | 273 | ||
281 | irlmp_next_lap_state(self, LAP_U_CONNECT); | 274 | irlmp_next_lap_state(self, LAP_U_CONNECT); |
282 | 275 | ||
@@ -284,14 +277,14 @@ static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event, | |||
284 | irlap_connect_request(self->irlap, self->daddr, NULL, 0); | 277 | irlap_connect_request(self->irlap, self->daddr, NULL, 0); |
285 | break; | 278 | break; |
286 | case LM_LAP_DISCONNECT_INDICATION: | 279 | case LM_LAP_DISCONNECT_INDICATION: |
287 | IRDA_DEBUG(4, "%s(), Error LM_LAP_DISCONNECT_INDICATION\n", | 280 | pr_debug("%s(), Error LM_LAP_DISCONNECT_INDICATION\n", |
288 | __func__); | 281 | __func__); |
289 | 282 | ||
290 | irlmp_next_lap_state(self, LAP_STANDBY); | 283 | irlmp_next_lap_state(self, LAP_STANDBY); |
291 | break; | 284 | break; |
292 | default: | 285 | default: |
293 | IRDA_DEBUG(0, "%s(), Unknown event %s\n", | 286 | pr_debug("%s(), Unknown event %s\n", |
294 | __func__, irlmp_event[event]); | 287 | __func__, irlmp_event[event]); |
295 | break; | 288 | break; |
296 | } | 289 | } |
297 | } | 290 | } |
@@ -306,7 +299,7 @@ static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event, | |||
306 | static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event, | 299 | static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event, |
307 | struct sk_buff *skb) | 300 | struct sk_buff *skb) |
308 | { | 301 | { |
309 | IRDA_DEBUG(2, "%s(), event=%s\n", __func__, irlmp_event[event]); | 302 | pr_debug("%s(), event=%s\n", __func__, irlmp_event[event]); |
310 | 303 | ||
311 | switch (event) { | 304 | switch (event) { |
312 | case LM_LAP_CONNECT_INDICATION: | 305 | case LM_LAP_CONNECT_INDICATION: |
@@ -326,7 +319,7 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event, | |||
326 | * the lsaps may already have gone. This avoid getting stuck | 319 | * the lsaps may already have gone. This avoid getting stuck |
327 | * forever in LAP_ACTIVE state - Jean II */ | 320 | * forever in LAP_ACTIVE state - Jean II */ |
328 | if (HASHBIN_GET_SIZE(self->lsaps) == 0) { | 321 | if (HASHBIN_GET_SIZE(self->lsaps) == 0) { |
329 | IRDA_DEBUG(0, "%s() NO LSAPs !\n", __func__); | 322 | pr_debug("%s() NO LSAPs !\n", __func__); |
330 | irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT); | 323 | irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT); |
331 | } | 324 | } |
332 | break; | 325 | break; |
@@ -344,12 +337,12 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event, | |||
344 | * the lsaps may already have gone. This avoid getting stuck | 337 | * the lsaps may already have gone. This avoid getting stuck |
345 | * forever in LAP_ACTIVE state - Jean II */ | 338 | * forever in LAP_ACTIVE state - Jean II */ |
346 | if (HASHBIN_GET_SIZE(self->lsaps) == 0) { | 339 | if (HASHBIN_GET_SIZE(self->lsaps) == 0) { |
347 | IRDA_DEBUG(0, "%s() NO LSAPs !\n", __func__); | 340 | pr_debug("%s() NO LSAPs !\n", __func__); |
348 | irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT); | 341 | irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT); |
349 | } | 342 | } |
350 | break; | 343 | break; |
351 | case LM_LAP_DISCONNECT_INDICATION: | 344 | case LM_LAP_DISCONNECT_INDICATION: |
352 | IRDA_DEBUG(4, "%s(), LM_LAP_DISCONNECT_INDICATION\n", __func__); | 345 | pr_debug("%s(), LM_LAP_DISCONNECT_INDICATION\n", __func__); |
353 | irlmp_next_lap_state(self, LAP_STANDBY); | 346 | irlmp_next_lap_state(self, LAP_STANDBY); |
354 | 347 | ||
355 | /* Send disconnect event to all LSAPs using this link */ | 348 | /* Send disconnect event to all LSAPs using this link */ |
@@ -357,7 +350,7 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event, | |||
357 | LM_LAP_DISCONNECT_INDICATION); | 350 | LM_LAP_DISCONNECT_INDICATION); |
358 | break; | 351 | break; |
359 | case LM_LAP_DISCONNECT_REQUEST: | 352 | case LM_LAP_DISCONNECT_REQUEST: |
360 | IRDA_DEBUG(4, "%s(), LM_LAP_DISCONNECT_REQUEST\n", __func__); | 353 | pr_debug("%s(), LM_LAP_DISCONNECT_REQUEST\n", __func__); |
361 | 354 | ||
362 | /* One of the LSAP did timeout or was closed, if it was | 355 | /* One of the LSAP did timeout or was closed, if it was |
363 | * the last one, try to get out of here - Jean II */ | 356 | * the last one, try to get out of here - Jean II */ |
@@ -366,7 +359,7 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event, | |||
366 | } | 359 | } |
367 | break; | 360 | break; |
368 | default: | 361 | default: |
369 | IRDA_DEBUG(0, "%s(), Unknown event %s\n", | 362 | pr_debug("%s(), Unknown event %s\n", |
370 | __func__, irlmp_event[event]); | 363 | __func__, irlmp_event[event]); |
371 | break; | 364 | break; |
372 | } | 365 | } |
@@ -381,11 +374,9 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event, | |||
381 | static void irlmp_state_active(struct lap_cb *self, IRLMP_EVENT event, | 374 | static void irlmp_state_active(struct lap_cb *self, IRLMP_EVENT event, |
382 | struct sk_buff *skb) | 375 | struct sk_buff *skb) |
383 | { | 376 | { |
384 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
385 | |||
386 | switch (event) { | 377 | switch (event) { |
387 | case LM_LAP_CONNECT_REQUEST: | 378 | case LM_LAP_CONNECT_REQUEST: |
388 | IRDA_DEBUG(4, "%s(), LS_CONNECT_REQUEST\n", __func__); | 379 | pr_debug("%s(), LS_CONNECT_REQUEST\n", __func__); |
389 | 380 | ||
390 | /* | 381 | /* |
391 | * IrLAP may have a pending disconnect. We tried to close | 382 | * IrLAP may have a pending disconnect. We tried to close |
@@ -467,7 +458,7 @@ static void irlmp_state_active(struct lap_cb *self, IRLMP_EVENT event, | |||
467 | irlmp_do_expiry(); | 458 | irlmp_do_expiry(); |
468 | break; | 459 | break; |
469 | default: | 460 | default: |
470 | IRDA_DEBUG(0, "%s(), Unknown event %s\n", | 461 | pr_debug("%s(), Unknown event %s\n", |
471 | __func__, irlmp_event[event]); | 462 | __func__, irlmp_event[event]); |
472 | break; | 463 | break; |
473 | } | 464 | } |
@@ -490,8 +481,6 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event, | |||
490 | { | 481 | { |
491 | int ret = 0; | 482 | int ret = 0; |
492 | 483 | ||
493 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
494 | |||
495 | IRDA_ASSERT(self != NULL, return -1;); | 484 | IRDA_ASSERT(self != NULL, return -1;); |
496 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); | 485 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); |
497 | 486 | ||
@@ -505,7 +494,7 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event, | |||
505 | break; | 494 | break; |
506 | #endif /* CONFIG_IRDA_ULTRA */ | 495 | #endif /* CONFIG_IRDA_ULTRA */ |
507 | case LM_CONNECT_REQUEST: | 496 | case LM_CONNECT_REQUEST: |
508 | IRDA_DEBUG(4, "%s(), LM_CONNECT_REQUEST\n", __func__); | 497 | pr_debug("%s(), LM_CONNECT_REQUEST\n", __func__); |
509 | 498 | ||
510 | if (self->conn_skb) { | 499 | if (self->conn_skb) { |
511 | net_warn_ratelimited("%s: busy with another request!\n", | 500 | net_warn_ratelimited("%s: busy with another request!\n", |
@@ -551,8 +540,8 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event, | |||
551 | irlmp_do_lap_event(self->lap, LM_LAP_CONNECT_REQUEST, NULL); | 540 | irlmp_do_lap_event(self->lap, LM_LAP_CONNECT_REQUEST, NULL); |
552 | break; | 541 | break; |
553 | default: | 542 | default: |
554 | IRDA_DEBUG(1, "%s(), Unknown event %s on LSAP %#02x\n", | 543 | pr_debug("%s(), Unknown event %s on LSAP %#02x\n", |
555 | __func__, irlmp_event[event], self->slsap_sel); | 544 | __func__, irlmp_event[event], self->slsap_sel); |
556 | break; | 545 | break; |
557 | } | 546 | } |
558 | return ret; | 547 | return ret; |
@@ -570,8 +559,6 @@ static int irlmp_state_connect(struct lsap_cb *self, IRLMP_EVENT event, | |||
570 | struct lsap_cb *lsap; | 559 | struct lsap_cb *lsap; |
571 | int ret = 0; | 560 | int ret = 0; |
572 | 561 | ||
573 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
574 | |||
575 | IRDA_ASSERT(self != NULL, return -1;); | 562 | IRDA_ASSERT(self != NULL, return -1;); |
576 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); | 563 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); |
577 | 564 | ||
@@ -603,7 +590,7 @@ static int irlmp_state_connect(struct lsap_cb *self, IRLMP_EVENT event, | |||
603 | case LM_WATCHDOG_TIMEOUT: | 590 | case LM_WATCHDOG_TIMEOUT: |
604 | /* May happen, who knows... | 591 | /* May happen, who knows... |
605 | * Jean II */ | 592 | * Jean II */ |
606 | IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __func__); | 593 | pr_debug("%s() WATCHDOG_TIMEOUT!\n", __func__); |
607 | 594 | ||
608 | /* Disconnect, get out... - Jean II */ | 595 | /* Disconnect, get out... - Jean II */ |
609 | self->lap = NULL; | 596 | self->lap = NULL; |
@@ -613,8 +600,8 @@ static int irlmp_state_connect(struct lsap_cb *self, IRLMP_EVENT event, | |||
613 | default: | 600 | default: |
614 | /* LM_LAP_DISCONNECT_INDICATION : Should never happen, we | 601 | /* LM_LAP_DISCONNECT_INDICATION : Should never happen, we |
615 | * are *not* yet bound to the IrLAP link. Jean II */ | 602 | * are *not* yet bound to the IrLAP link. Jean II */ |
616 | IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n", | 603 | pr_debug("%s(), Unknown event %s on LSAP %#02x\n", |
617 | __func__, irlmp_event[event], self->slsap_sel); | 604 | __func__, irlmp_event[event], self->slsap_sel); |
618 | break; | 605 | break; |
619 | } | 606 | } |
620 | return ret; | 607 | return ret; |
@@ -632,8 +619,6 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event, | |||
632 | struct sk_buff *tx_skb; | 619 | struct sk_buff *tx_skb; |
633 | int ret = 0; | 620 | int ret = 0; |
634 | 621 | ||
635 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
636 | |||
637 | IRDA_ASSERT(self != NULL, return -1;); | 622 | IRDA_ASSERT(self != NULL, return -1;); |
638 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); | 623 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); |
639 | 624 | ||
@@ -642,17 +627,17 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event, | |||
642 | /* Keep state */ | 627 | /* Keep state */ |
643 | break; | 628 | break; |
644 | case LM_CONNECT_RESPONSE: | 629 | case LM_CONNECT_RESPONSE: |
645 | IRDA_DEBUG(0, "%s(), LM_CONNECT_RESPONSE, " | 630 | pr_debug("%s(), LM_CONNECT_RESPONSE, no indication issued yet\n", |
646 | "no indication issued yet\n", __func__); | 631 | __func__); |
647 | /* Keep state */ | 632 | /* Keep state */ |
648 | break; | 633 | break; |
649 | case LM_DISCONNECT_REQUEST: | 634 | case LM_DISCONNECT_REQUEST: |
650 | IRDA_DEBUG(0, "%s(), LM_DISCONNECT_REQUEST, " | 635 | pr_debug("%s(), LM_DISCONNECT_REQUEST, not yet bound to IrLAP connection\n", |
651 | "not yet bound to IrLAP connection\n", __func__); | 636 | __func__); |
652 | /* Keep state */ | 637 | /* Keep state */ |
653 | break; | 638 | break; |
654 | case LM_LAP_CONNECT_CONFIRM: | 639 | case LM_LAP_CONNECT_CONFIRM: |
655 | IRDA_DEBUG(4, "%s(), LS_CONNECT_CONFIRM\n", __func__); | 640 | pr_debug("%s(), LS_CONNECT_CONFIRM\n", __func__); |
656 | irlmp_next_lsap_state(self, LSAP_CONNECT); | 641 | irlmp_next_lsap_state(self, LSAP_CONNECT); |
657 | 642 | ||
658 | tx_skb = self->conn_skb; | 643 | tx_skb = self->conn_skb; |
@@ -666,7 +651,7 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event, | |||
666 | /* Will happen in some rare cases because of a race condition. | 651 | /* Will happen in some rare cases because of a race condition. |
667 | * Just make sure we don't stay there forever... | 652 | * Just make sure we don't stay there forever... |
668 | * Jean II */ | 653 | * Jean II */ |
669 | IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __func__); | 654 | pr_debug("%s() WATCHDOG_TIMEOUT!\n", __func__); |
670 | 655 | ||
671 | /* Go back to disconnected mode, keep the socket waiting */ | 656 | /* Go back to disconnected mode, keep the socket waiting */ |
672 | self->lap = NULL; | 657 | self->lap = NULL; |
@@ -679,8 +664,8 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event, | |||
679 | default: | 664 | default: |
680 | /* LM_LAP_DISCONNECT_INDICATION : Should never happen, we | 665 | /* LM_LAP_DISCONNECT_INDICATION : Should never happen, we |
681 | * are *not* yet bound to the IrLAP link. Jean II */ | 666 | * are *not* yet bound to the IrLAP link. Jean II */ |
682 | IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n", | 667 | pr_debug("%s(), Unknown event %s on LSAP %#02x\n", |
683 | __func__, irlmp_event[event], self->slsap_sel); | 668 | __func__, irlmp_event[event], self->slsap_sel); |
684 | break; | 669 | break; |
685 | } | 670 | } |
686 | return ret; | 671 | return ret; |
@@ -698,8 +683,6 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event, | |||
698 | LM_REASON reason; | 683 | LM_REASON reason; |
699 | int ret = 0; | 684 | int ret = 0; |
700 | 685 | ||
701 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
702 | |||
703 | IRDA_ASSERT(self != NULL, return -1;); | 686 | IRDA_ASSERT(self != NULL, return -1;); |
704 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); | 687 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); |
705 | IRDA_ASSERT(self->lap != NULL, return -1;); | 688 | IRDA_ASSERT(self->lap != NULL, return -1;); |
@@ -721,13 +704,13 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event, | |||
721 | irlmp_udata_indication(self, skb); | 704 | irlmp_udata_indication(self, skb); |
722 | break; | 705 | break; |
723 | case LM_CONNECT_REQUEST: | 706 | case LM_CONNECT_REQUEST: |
724 | IRDA_DEBUG(0, "%s(), LM_CONNECT_REQUEST, " | 707 | pr_debug("%s(), LM_CONNECT_REQUEST, error, LSAP already connected\n", |
725 | "error, LSAP already connected\n", __func__); | 708 | __func__); |
726 | /* Keep state */ | 709 | /* Keep state */ |
727 | break; | 710 | break; |
728 | case LM_CONNECT_RESPONSE: | 711 | case LM_CONNECT_RESPONSE: |
729 | IRDA_DEBUG(0, "%s(), LM_CONNECT_RESPONSE, " | 712 | pr_debug("%s(), LM_CONNECT_RESPONSE, error, LSAP already connected\n", |
730 | "error, LSAP already connected\n", __func__); | 713 | __func__); |
731 | /* Keep state */ | 714 | /* Keep state */ |
732 | break; | 715 | break; |
733 | case LM_DISCONNECT_REQUEST: | 716 | case LM_DISCONNECT_REQUEST: |
@@ -739,8 +722,8 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event, | |||
739 | 722 | ||
740 | /* Try to close the LAP connection if its still there */ | 723 | /* Try to close the LAP connection if its still there */ |
741 | if (self->lap) { | 724 | if (self->lap) { |
742 | IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", | 725 | pr_debug("%s(), trying to close IrLAP\n", |
743 | __func__); | 726 | __func__); |
744 | irlmp_do_lap_event(self->lap, | 727 | irlmp_do_lap_event(self->lap, |
745 | LM_LAP_DISCONNECT_REQUEST, | 728 | LM_LAP_DISCONNECT_REQUEST, |
746 | NULL); | 729 | NULL); |
@@ -764,14 +747,14 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event, | |||
764 | reason = skb->data[3]; | 747 | reason = skb->data[3]; |
765 | 748 | ||
766 | /* Try to close the LAP connection */ | 749 | /* Try to close the LAP connection */ |
767 | IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", __func__); | 750 | pr_debug("%s(), trying to close IrLAP\n", __func__); |
768 | irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); | 751 | irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); |
769 | 752 | ||
770 | irlmp_disconnect_indication(self, reason, skb); | 753 | irlmp_disconnect_indication(self, reason, skb); |
771 | break; | 754 | break; |
772 | default: | 755 | default: |
773 | IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n", | 756 | pr_debug("%s(), Unknown event %s on LSAP %#02x\n", |
774 | __func__, irlmp_event[event], self->slsap_sel); | 757 | __func__, irlmp_event[event], self->slsap_sel); |
775 | break; | 758 | break; |
776 | } | 759 | } |
777 | return ret; | 760 | return ret; |
@@ -793,8 +776,6 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event, | |||
793 | IRDA_ASSERT(self != NULL, return -1;); | 776 | IRDA_ASSERT(self != NULL, return -1;); |
794 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); | 777 | IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); |
795 | 778 | ||
796 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
797 | |||
798 | switch (event) { | 779 | switch (event) { |
799 | case LM_CONNECT_CONFIRM: | 780 | case LM_CONNECT_CONFIRM: |
800 | irlmp_next_lsap_state(self, LSAP_DATA_TRANSFER_READY); | 781 | irlmp_next_lsap_state(self, LSAP_DATA_TRANSFER_READY); |
@@ -814,7 +795,7 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event, | |||
814 | reason = skb->data[3]; | 795 | reason = skb->data[3]; |
815 | 796 | ||
816 | /* Try to close the LAP connection */ | 797 | /* Try to close the LAP connection */ |
817 | IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", __func__); | 798 | pr_debug("%s(), trying to close IrLAP\n", __func__); |
818 | irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); | 799 | irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); |
819 | 800 | ||
820 | irlmp_disconnect_indication(self, reason, skb); | 801 | irlmp_disconnect_indication(self, reason, skb); |
@@ -832,7 +813,7 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event, | |||
832 | irlmp_disconnect_indication(self, reason, skb); | 813 | irlmp_disconnect_indication(self, reason, skb); |
833 | break; | 814 | break; |
834 | case LM_WATCHDOG_TIMEOUT: | 815 | case LM_WATCHDOG_TIMEOUT: |
835 | IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __func__); | 816 | pr_debug("%s() WATCHDOG_TIMEOUT!\n", __func__); |
836 | 817 | ||
837 | IRDA_ASSERT(self->lap != NULL, return -1;); | 818 | IRDA_ASSERT(self->lap != NULL, return -1;); |
838 | irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); | 819 | irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); |
@@ -841,8 +822,8 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event, | |||
841 | irlmp_disconnect_indication(self, LM_CONNECT_FAILURE, NULL); | 822 | irlmp_disconnect_indication(self, LM_CONNECT_FAILURE, NULL); |
842 | break; | 823 | break; |
843 | default: | 824 | default: |
844 | IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n", | 825 | pr_debug("%s(), Unknown event %s on LSAP %#02x\n", |
845 | __func__, irlmp_event[event], self->slsap_sel); | 826 | __func__, irlmp_event[event], self->slsap_sel); |
846 | break; | 827 | break; |
847 | } | 828 | } |
848 | return ret; | 829 | return ret; |
@@ -863,8 +844,6 @@ static int irlmp_state_setup_pend(struct lsap_cb *self, IRLMP_EVENT event, | |||
863 | LM_REASON reason; | 844 | LM_REASON reason; |
864 | int ret = 0; | 845 | int ret = 0; |
865 | 846 | ||
866 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
867 | |||
868 | IRDA_ASSERT(self != NULL, return -1;); | 847 | IRDA_ASSERT(self != NULL, return -1;); |
869 | IRDA_ASSERT(irlmp != NULL, return -1;); | 848 | IRDA_ASSERT(irlmp != NULL, return -1;); |
870 | 849 | ||
@@ -883,7 +862,7 @@ static int irlmp_state_setup_pend(struct lsap_cb *self, IRLMP_EVENT event, | |||
883 | irlmp_next_lsap_state(self, LSAP_SETUP); | 862 | irlmp_next_lsap_state(self, LSAP_SETUP); |
884 | break; | 863 | break; |
885 | case LM_WATCHDOG_TIMEOUT: | 864 | case LM_WATCHDOG_TIMEOUT: |
886 | IRDA_DEBUG(0, "%s() : WATCHDOG_TIMEOUT !\n", __func__); | 865 | pr_debug("%s() : WATCHDOG_TIMEOUT !\n", __func__); |
887 | 866 | ||
888 | IRDA_ASSERT(self->lap != NULL, return -1;); | 867 | IRDA_ASSERT(self->lap != NULL, return -1;); |
889 | irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); | 868 | irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); |
@@ -901,8 +880,8 @@ static int irlmp_state_setup_pend(struct lsap_cb *self, IRLMP_EVENT event, | |||
901 | irlmp_disconnect_indication(self, reason, NULL); | 880 | irlmp_disconnect_indication(self, reason, NULL); |
902 | break; | 881 | break; |
903 | default: | 882 | default: |
904 | IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n", | 883 | pr_debug("%s(), Unknown event %s on LSAP %#02x\n", |
905 | __func__, irlmp_event[event], self->slsap_sel); | 884 | __func__, irlmp_event[event], self->slsap_sel); |
906 | break; | 885 | break; |
907 | } | 886 | } |
908 | return ret; | 887 | return ret; |
diff --git a/net/irda/irlmp_frame.c b/net/irda/irlmp_frame.c index 062e63b1c5c4..38b0f994bc7b 100644 --- a/net/irda/irlmp_frame.c +++ b/net/irda/irlmp_frame.c | |||
@@ -44,7 +44,7 @@ inline void irlmp_send_data_pdu(struct lap_cb *self, __u8 dlsap, __u8 slsap, | |||
44 | skb->data[1] = slsap; | 44 | skb->data[1] = slsap; |
45 | 45 | ||
46 | if (expedited) { | 46 | if (expedited) { |
47 | IRDA_DEBUG(4, "%s(), sending expedited data\n", __func__); | 47 | pr_debug("%s(), sending expedited data\n", __func__); |
48 | irlap_data_request(self->irlap, skb, TRUE); | 48 | irlap_data_request(self->irlap, skb, TRUE); |
49 | } else | 49 | } else |
50 | irlap_data_request(self->irlap, skb, FALSE); | 50 | irlap_data_request(self->irlap, skb, FALSE); |
@@ -60,8 +60,6 @@ void irlmp_send_lcf_pdu(struct lap_cb *self, __u8 dlsap, __u8 slsap, | |||
60 | { | 60 | { |
61 | __u8 *frame; | 61 | __u8 *frame; |
62 | 62 | ||
63 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
64 | |||
65 | IRDA_ASSERT(self != NULL, return;); | 63 | IRDA_ASSERT(self != NULL, return;); |
66 | IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); | 64 | IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); |
67 | IRDA_ASSERT(skb != NULL, return;); | 65 | IRDA_ASSERT(skb != NULL, return;); |
@@ -95,8 +93,6 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb, | |||
95 | __u8 dlsap_sel; /* Destination LSAP address */ | 93 | __u8 dlsap_sel; /* Destination LSAP address */ |
96 | __u8 *fp; | 94 | __u8 *fp; |
97 | 95 | ||
98 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
99 | |||
100 | IRDA_ASSERT(self != NULL, return;); | 96 | IRDA_ASSERT(self != NULL, return;); |
101 | IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); | 97 | IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); |
102 | IRDA_ASSERT(skb->len > 2, return;); | 98 | IRDA_ASSERT(skb->len > 2, return;); |
@@ -115,9 +111,8 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb, | |||
115 | * it in a different way than other established connections. | 111 | * it in a different way than other established connections. |
116 | */ | 112 | */ |
117 | if ((fp[0] & CONTROL_BIT) && (fp[2] == CONNECT_CMD)) { | 113 | if ((fp[0] & CONTROL_BIT) && (fp[2] == CONNECT_CMD)) { |
118 | IRDA_DEBUG(3, "%s(), incoming connection, " | 114 | pr_debug("%s(), incoming connection, source LSAP=%d, dest LSAP=%d\n", |
119 | "source LSAP=%d, dest LSAP=%d\n", | 115 | __func__, slsap_sel, dlsap_sel); |
120 | __func__, slsap_sel, dlsap_sel); | ||
121 | 116 | ||
122 | /* Try to find LSAP among the unconnected LSAPs */ | 117 | /* Try to find LSAP among the unconnected LSAPs */ |
123 | lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, CONNECT_CMD, | 118 | lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, CONNECT_CMD, |
@@ -125,7 +120,8 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb, | |||
125 | 120 | ||
126 | /* Maybe LSAP was already connected, so try one more time */ | 121 | /* Maybe LSAP was already connected, so try one more time */ |
127 | if (!lsap) { | 122 | if (!lsap) { |
128 | IRDA_DEBUG(1, "%s(), incoming connection for LSAP already connected\n", __func__); | 123 | pr_debug("%s(), incoming connection for LSAP already connected\n", |
124 | __func__); | ||
129 | lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, 0, | 125 | lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, 0, |
130 | self->lsaps); | 126 | self->lsaps); |
131 | } | 127 | } |
@@ -134,14 +130,14 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb, | |||
134 | self->lsaps); | 130 | self->lsaps); |
135 | 131 | ||
136 | if (lsap == NULL) { | 132 | if (lsap == NULL) { |
137 | IRDA_DEBUG(2, "IrLMP, Sorry, no LSAP for received frame!\n"); | 133 | pr_debug("IrLMP, Sorry, no LSAP for received frame!\n"); |
138 | IRDA_DEBUG(2, "%s(), slsap_sel = %02x, dlsap_sel = %02x\n", | 134 | pr_debug("%s(), slsap_sel = %02x, dlsap_sel = %02x\n", |
139 | __func__, slsap_sel, dlsap_sel); | 135 | __func__, slsap_sel, dlsap_sel); |
140 | if (fp[0] & CONTROL_BIT) { | 136 | if (fp[0] & CONTROL_BIT) { |
141 | IRDA_DEBUG(2, "%s(), received control frame %02x\n", | 137 | pr_debug("%s(), received control frame %02x\n", |
142 | __func__, fp[2]); | 138 | __func__, fp[2]); |
143 | } else { | 139 | } else { |
144 | IRDA_DEBUG(2, "%s(), received data frame\n", __func__); | 140 | pr_debug("%s(), received data frame\n", __func__); |
145 | } | 141 | } |
146 | return; | 142 | return; |
147 | } | 143 | } |
@@ -159,20 +155,20 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb, | |||
159 | irlmp_do_lsap_event(lsap, LM_CONNECT_CONFIRM, skb); | 155 | irlmp_do_lsap_event(lsap, LM_CONNECT_CONFIRM, skb); |
160 | break; | 156 | break; |
161 | case DISCONNECT: | 157 | case DISCONNECT: |
162 | IRDA_DEBUG(4, "%s(), Disconnect indication!\n", | 158 | pr_debug("%s(), Disconnect indication!\n", |
163 | __func__); | 159 | __func__); |
164 | irlmp_do_lsap_event(lsap, LM_DISCONNECT_INDICATION, | 160 | irlmp_do_lsap_event(lsap, LM_DISCONNECT_INDICATION, |
165 | skb); | 161 | skb); |
166 | break; | 162 | break; |
167 | case ACCESSMODE_CMD: | 163 | case ACCESSMODE_CMD: |
168 | IRDA_DEBUG(0, "Access mode cmd not implemented!\n"); | 164 | pr_debug("Access mode cmd not implemented!\n"); |
169 | break; | 165 | break; |
170 | case ACCESSMODE_CNF: | 166 | case ACCESSMODE_CNF: |
171 | IRDA_DEBUG(0, "Access mode cnf not implemented!\n"); | 167 | pr_debug("Access mode cnf not implemented!\n"); |
172 | break; | 168 | break; |
173 | default: | 169 | default: |
174 | IRDA_DEBUG(0, "%s(), Unknown control frame %02x\n", | 170 | pr_debug("%s(), Unknown control frame %02x\n", |
175 | __func__, fp[2]); | 171 | __func__, fp[2]); |
176 | break; | 172 | break; |
177 | } | 173 | } |
178 | } else if (unreliable) { | 174 | } else if (unreliable) { |
@@ -206,8 +202,6 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb) | |||
206 | __u8 *fp; | 202 | __u8 *fp; |
207 | unsigned long flags; | 203 | unsigned long flags; |
208 | 204 | ||
209 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
210 | |||
211 | IRDA_ASSERT(self != NULL, return;); | 205 | IRDA_ASSERT(self != NULL, return;); |
212 | IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); | 206 | IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); |
213 | IRDA_ASSERT(skb->len > 2, return;); | 207 | IRDA_ASSERT(skb->len > 2, return;); |
@@ -223,14 +217,14 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb) | |||
223 | pid = fp[2]; | 217 | pid = fp[2]; |
224 | 218 | ||
225 | if (pid & 0x80) { | 219 | if (pid & 0x80) { |
226 | IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", | 220 | pr_debug("%s(), extension in PID not supp!\n", |
227 | __func__); | 221 | __func__); |
228 | return; | 222 | return; |
229 | } | 223 | } |
230 | 224 | ||
231 | /* Check if frame is addressed to the connectionless LSAP */ | 225 | /* Check if frame is addressed to the connectionless LSAP */ |
232 | if ((slsap_sel != LSAP_CONNLESS) || (dlsap_sel != LSAP_CONNLESS)) { | 226 | if ((slsap_sel != LSAP_CONNLESS) || (dlsap_sel != LSAP_CONNLESS)) { |
233 | IRDA_DEBUG(0, "%s(), dropping frame!\n", __func__); | 227 | pr_debug("%s(), dropping frame!\n", __func__); |
234 | return; | 228 | return; |
235 | } | 229 | } |
236 | 230 | ||
@@ -254,7 +248,7 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb) | |||
254 | if (lsap) | 248 | if (lsap) |
255 | irlmp_connless_data_indication(lsap, skb); | 249 | irlmp_connless_data_indication(lsap, skb); |
256 | else { | 250 | else { |
257 | IRDA_DEBUG(0, "%s(), found no matching LSAP!\n", __func__); | 251 | pr_debug("%s(), found no matching LSAP!\n", __func__); |
258 | } | 252 | } |
259 | } | 253 | } |
260 | #endif /* CONFIG_IRDA_ULTRA */ | 254 | #endif /* CONFIG_IRDA_ULTRA */ |
@@ -270,8 +264,6 @@ void irlmp_link_disconnect_indication(struct lap_cb *lap, | |||
270 | LAP_REASON reason, | 264 | LAP_REASON reason, |
271 | struct sk_buff *skb) | 265 | struct sk_buff *skb) |
272 | { | 266 | { |
273 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
274 | |||
275 | IRDA_ASSERT(lap != NULL, return;); | 267 | IRDA_ASSERT(lap != NULL, return;); |
276 | IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, return;); | 268 | IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, return;); |
277 | 269 | ||
@@ -296,8 +288,6 @@ void irlmp_link_connect_indication(struct lap_cb *self, __u32 saddr, | |||
296 | __u32 daddr, struct qos_info *qos, | 288 | __u32 daddr, struct qos_info *qos, |
297 | struct sk_buff *skb) | 289 | struct sk_buff *skb) |
298 | { | 290 | { |
299 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
300 | |||
301 | /* Copy QoS settings for this session */ | 291 | /* Copy QoS settings for this session */ |
302 | self->qos = qos; | 292 | self->qos = qos; |
303 | 293 | ||
@@ -317,8 +307,6 @@ void irlmp_link_connect_indication(struct lap_cb *self, __u32 saddr, | |||
317 | void irlmp_link_connect_confirm(struct lap_cb *self, struct qos_info *qos, | 307 | void irlmp_link_connect_confirm(struct lap_cb *self, struct qos_info *qos, |
318 | struct sk_buff *skb) | 308 | struct sk_buff *skb) |
319 | { | 309 | { |
320 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
321 | |||
322 | IRDA_ASSERT(self != NULL, return;); | 310 | IRDA_ASSERT(self != NULL, return;); |
323 | IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); | 311 | IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); |
324 | IRDA_ASSERT(qos != NULL, return;); | 312 | IRDA_ASSERT(qos != NULL, return;); |
@@ -383,8 +371,6 @@ void irlmp_link_discovery_indication(struct lap_cb *self, | |||
383 | */ | 371 | */ |
384 | void irlmp_link_discovery_confirm(struct lap_cb *self, hashbin_t *log) | 372 | void irlmp_link_discovery_confirm(struct lap_cb *self, hashbin_t *log) |
385 | { | 373 | { |
386 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
387 | |||
388 | IRDA_ASSERT(self != NULL, return;); | 374 | IRDA_ASSERT(self != NULL, return;); |
389 | IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); | 375 | IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); |
390 | 376 | ||
diff --git a/net/irda/irmod.c b/net/irda/irmod.c index 303a68d92731..c5e35b85c477 100644 --- a/net/irda/irmod.c +++ b/net/irda/irmod.c | |||
@@ -42,16 +42,6 @@ | |||
42 | #include <net/irda/irttp.h> /* irttp_init */ | 42 | #include <net/irda/irttp.h> /* irttp_init */ |
43 | #include <net/irda/irda_device.h> /* irda_device_init */ | 43 | #include <net/irda/irda_device.h> /* irda_device_init */ |
44 | 44 | ||
45 | /* | ||
46 | * Module parameters | ||
47 | */ | ||
48 | #ifdef CONFIG_IRDA_DEBUG | ||
49 | unsigned int irda_debug = IRDA_DEBUG_LEVEL; | ||
50 | module_param_named(debug, irda_debug, uint, 0); | ||
51 | MODULE_PARM_DESC(debug, "IRDA debugging level"); | ||
52 | EXPORT_SYMBOL(irda_debug); | ||
53 | #endif | ||
54 | |||
55 | /* Packet type handler. | 45 | /* Packet type handler. |
56 | * Tell the kernel how IrDA packets should be handled. | 46 | * Tell the kernel how IrDA packets should be handled. |
57 | */ | 47 | */ |
@@ -90,8 +80,6 @@ static int __init irda_init(void) | |||
90 | { | 80 | { |
91 | int ret = 0; | 81 | int ret = 0; |
92 | 82 | ||
93 | IRDA_DEBUG(0, "%s()\n", __func__); | ||
94 | |||
95 | /* Lower layer of the stack */ | 83 | /* Lower layer of the stack */ |
96 | irlmp_init(); | 84 | irlmp_init(); |
97 | irlap_init(); | 85 | irlap_init(); |
diff --git a/net/irda/irnetlink.c b/net/irda/irnetlink.c index a37b81fe0479..e15c40e86660 100644 --- a/net/irda/irnetlink.c +++ b/net/irda/irnetlink.c | |||
@@ -41,7 +41,7 @@ static struct net_device * ifname_to_netdev(struct net *net, struct genl_info *i | |||
41 | 41 | ||
42 | ifname = nla_data(info->attrs[IRDA_NL_ATTR_IFNAME]); | 42 | ifname = nla_data(info->attrs[IRDA_NL_ATTR_IFNAME]); |
43 | 43 | ||
44 | IRDA_DEBUG(5, "%s(): Looking for %s\n", __func__, ifname); | 44 | pr_debug("%s(): Looking for %s\n", __func__, ifname); |
45 | 45 | ||
46 | return dev_get_by_name(net, ifname); | 46 | return dev_get_by_name(net, ifname); |
47 | } | 47 | } |
@@ -57,7 +57,7 @@ static int irda_nl_set_mode(struct sk_buff *skb, struct genl_info *info) | |||
57 | 57 | ||
58 | mode = nla_get_u32(info->attrs[IRDA_NL_ATTR_MODE]); | 58 | mode = nla_get_u32(info->attrs[IRDA_NL_ATTR_MODE]); |
59 | 59 | ||
60 | IRDA_DEBUG(5, "%s(): Switching to mode: %d\n", __func__, mode); | 60 | pr_debug("%s(): Switching to mode: %d\n", __func__, mode); |
61 | 61 | ||
62 | dev = ifname_to_netdev(&init_net, info); | 62 | dev = ifname_to_netdev(&init_net, info); |
63 | if (!dev) | 63 | if (!dev) |
diff --git a/net/irda/irqueue.c b/net/irda/irqueue.c index 7152624ed5f1..acbe61c7e683 100644 --- a/net/irda/irqueue.c +++ b/net/irda/irqueue.c | |||
@@ -233,8 +233,6 @@ static __u32 hash( const char* name) | |||
233 | static void enqueue_first(irda_queue_t **queue, irda_queue_t* element) | 233 | static void enqueue_first(irda_queue_t **queue, irda_queue_t* element) |
234 | { | 234 | { |
235 | 235 | ||
236 | IRDA_DEBUG( 4, "%s()\n", __func__); | ||
237 | |||
238 | /* | 236 | /* |
239 | * Check if queue is empty. | 237 | * Check if queue is empty. |
240 | */ | 238 | */ |
@@ -267,7 +265,7 @@ static irda_queue_t *dequeue_first(irda_queue_t **queue) | |||
267 | { | 265 | { |
268 | irda_queue_t *ret; | 266 | irda_queue_t *ret; |
269 | 267 | ||
270 | IRDA_DEBUG( 4, "dequeue_first()\n"); | 268 | pr_debug("dequeue_first()\n"); |
271 | 269 | ||
272 | /* | 270 | /* |
273 | * Set return value | 271 | * Set return value |
@@ -308,7 +306,7 @@ static irda_queue_t *dequeue_general(irda_queue_t **queue, irda_queue_t* element | |||
308 | { | 306 | { |
309 | irda_queue_t *ret; | 307 | irda_queue_t *ret; |
310 | 308 | ||
311 | IRDA_DEBUG( 4, "dequeue_general()\n"); | 309 | pr_debug("dequeue_general()\n"); |
312 | 310 | ||
313 | /* | 311 | /* |
314 | * Set return value | 312 | * Set return value |
@@ -452,8 +450,6 @@ void hashbin_insert(hashbin_t* hashbin, irda_queue_t* entry, long hashv, | |||
452 | unsigned long flags = 0; | 450 | unsigned long flags = 0; |
453 | int bin; | 451 | int bin; |
454 | 452 | ||
455 | IRDA_DEBUG( 4, "%s()\n", __func__); | ||
456 | |||
457 | IRDA_ASSERT( hashbin != NULL, return;); | 453 | IRDA_ASSERT( hashbin != NULL, return;); |
458 | IRDA_ASSERT( hashbin->magic == HB_MAGIC, return;); | 454 | IRDA_ASSERT( hashbin->magic == HB_MAGIC, return;); |
459 | 455 | ||
@@ -565,8 +561,6 @@ void* hashbin_remove( hashbin_t* hashbin, long hashv, const char* name) | |||
565 | unsigned long flags = 0; | 561 | unsigned long flags = 0; |
566 | irda_queue_t* entry; | 562 | irda_queue_t* entry; |
567 | 563 | ||
568 | IRDA_DEBUG( 4, "%s()\n", __func__); | ||
569 | |||
570 | IRDA_ASSERT( hashbin != NULL, return NULL;); | 564 | IRDA_ASSERT( hashbin != NULL, return NULL;); |
571 | IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;); | 565 | IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;); |
572 | 566 | ||
@@ -658,8 +652,6 @@ void* hashbin_remove_this( hashbin_t* hashbin, irda_queue_t* entry) | |||
658 | int bin; | 652 | int bin; |
659 | long hashv; | 653 | long hashv; |
660 | 654 | ||
661 | IRDA_DEBUG( 4, "%s()\n", __func__); | ||
662 | |||
663 | IRDA_ASSERT( hashbin != NULL, return NULL;); | 655 | IRDA_ASSERT( hashbin != NULL, return NULL;); |
664 | IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;); | 656 | IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;); |
665 | IRDA_ASSERT( entry != NULL, return NULL;); | 657 | IRDA_ASSERT( entry != NULL, return NULL;); |
@@ -719,7 +711,7 @@ void* hashbin_find( hashbin_t* hashbin, long hashv, const char* name ) | |||
719 | int bin; | 711 | int bin; |
720 | irda_queue_t* entry; | 712 | irda_queue_t* entry; |
721 | 713 | ||
722 | IRDA_DEBUG( 4, "hashbin_find()\n"); | 714 | pr_debug("hashbin_find()\n"); |
723 | 715 | ||
724 | IRDA_ASSERT( hashbin != NULL, return NULL;); | 716 | IRDA_ASSERT( hashbin != NULL, return NULL;); |
725 | IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;); | 717 | IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;); |
diff --git a/net/irda/irsysctl.c b/net/irda/irsysctl.c index d6a59651767a..873da5e7d428 100644 --- a/net/irda/irsysctl.c +++ b/net/irda/irsysctl.c | |||
@@ -126,15 +126,6 @@ static struct ctl_table irda_table[] = { | |||
126 | .mode = 0644, | 126 | .mode = 0644, |
127 | .proc_handler = do_devname, | 127 | .proc_handler = do_devname, |
128 | }, | 128 | }, |
129 | #ifdef CONFIG_IRDA_DEBUG | ||
130 | { | ||
131 | .procname = "debug", | ||
132 | .data = &irda_debug, | ||
133 | .maxlen = sizeof(int), | ||
134 | .mode = 0644, | ||
135 | .proc_handler = proc_dointvec | ||
136 | }, | ||
137 | #endif | ||
138 | #ifdef CONFIG_IRDA_FAST_RR | 129 | #ifdef CONFIG_IRDA_FAST_RR |
139 | { | 130 | { |
140 | .procname = "fast_poll_increase", | 131 | .procname = "fast_poll_increase", |
diff --git a/net/irda/irttp.c b/net/irda/irttp.c index e0b2b0d9af14..3ef0b08b6bf5 100644 --- a/net/irda/irttp.c +++ b/net/irda/irttp.c | |||
@@ -166,7 +166,7 @@ static void irttp_todo_expired(unsigned long data) | |||
166 | if (!self || self->magic != TTP_TSAP_MAGIC) | 166 | if (!self || self->magic != TTP_TSAP_MAGIC) |
167 | return; | 167 | return; |
168 | 168 | ||
169 | IRDA_DEBUG(4, "%s(instance=%p)\n", __func__, self); | 169 | pr_debug("%s(instance=%p)\n", __func__, self); |
170 | 170 | ||
171 | /* Try to make some progress, especially on Tx side - Jean II */ | 171 | /* Try to make some progress, especially on Tx side - Jean II */ |
172 | irttp_run_rx_queue(self); | 172 | irttp_run_rx_queue(self); |
@@ -207,8 +207,6 @@ static void irttp_flush_queues(struct tsap_cb *self) | |||
207 | { | 207 | { |
208 | struct sk_buff *skb; | 208 | struct sk_buff *skb; |
209 | 209 | ||
210 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
211 | |||
212 | IRDA_ASSERT(self != NULL, return;); | 210 | IRDA_ASSERT(self != NULL, return;); |
213 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); | 211 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); |
214 | 212 | ||
@@ -240,8 +238,8 @@ static struct sk_buff *irttp_reassemble_skb(struct tsap_cb *self) | |||
240 | IRDA_ASSERT(self != NULL, return NULL;); | 238 | IRDA_ASSERT(self != NULL, return NULL;); |
241 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return NULL;); | 239 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return NULL;); |
242 | 240 | ||
243 | IRDA_DEBUG(2, "%s(), self->rx_sdu_size=%d\n", __func__, | 241 | pr_debug("%s(), self->rx_sdu_size=%d\n", __func__, |
244 | self->rx_sdu_size); | 242 | self->rx_sdu_size); |
245 | 243 | ||
246 | skb = dev_alloc_skb(TTP_HEADER + self->rx_sdu_size); | 244 | skb = dev_alloc_skb(TTP_HEADER + self->rx_sdu_size); |
247 | if (!skb) | 245 | if (!skb) |
@@ -264,9 +262,8 @@ static struct sk_buff *irttp_reassemble_skb(struct tsap_cb *self) | |||
264 | dev_kfree_skb(frag); | 262 | dev_kfree_skb(frag); |
265 | } | 263 | } |
266 | 264 | ||
267 | IRDA_DEBUG(2, | 265 | pr_debug("%s(), frame len=%d, rx_sdu_size=%d, rx_max_sdu_size=%d\n", |
268 | "%s(), frame len=%d, rx_sdu_size=%d, rx_max_sdu_size=%d\n", | 266 | __func__, n, self->rx_sdu_size, self->rx_max_sdu_size); |
269 | __func__, n, self->rx_sdu_size, self->rx_max_sdu_size); | ||
270 | /* Note : irttp_run_rx_queue() calculate self->rx_sdu_size | 267 | /* Note : irttp_run_rx_queue() calculate self->rx_sdu_size |
271 | * by summing the size of all fragments, so we should always | 268 | * by summing the size of all fragments, so we should always |
272 | * have n == self->rx_sdu_size, except in cases where we | 269 | * have n == self->rx_sdu_size, except in cases where we |
@@ -295,8 +292,6 @@ static inline void irttp_fragment_skb(struct tsap_cb *self, | |||
295 | struct sk_buff *frag; | 292 | struct sk_buff *frag; |
296 | __u8 *frame; | 293 | __u8 *frame; |
297 | 294 | ||
298 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
299 | |||
300 | IRDA_ASSERT(self != NULL, return;); | 295 | IRDA_ASSERT(self != NULL, return;); |
301 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); | 296 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); |
302 | IRDA_ASSERT(skb != NULL, return;); | 297 | IRDA_ASSERT(skb != NULL, return;); |
@@ -305,7 +300,7 @@ static inline void irttp_fragment_skb(struct tsap_cb *self, | |||
305 | * Split frame into a number of segments | 300 | * Split frame into a number of segments |
306 | */ | 301 | */ |
307 | while (skb->len > self->max_seg_size) { | 302 | while (skb->len > self->max_seg_size) { |
308 | IRDA_DEBUG(2, "%s(), fragmenting ...\n", __func__); | 303 | pr_debug("%s(), fragmenting ...\n", __func__); |
309 | 304 | ||
310 | /* Make new segment */ | 305 | /* Make new segment */ |
311 | frag = alloc_skb(self->max_seg_size+self->max_header_size, | 306 | frag = alloc_skb(self->max_seg_size+self->max_header_size, |
@@ -330,7 +325,7 @@ static inline void irttp_fragment_skb(struct tsap_cb *self, | |||
330 | skb_queue_tail(&self->tx_queue, frag); | 325 | skb_queue_tail(&self->tx_queue, frag); |
331 | } | 326 | } |
332 | /* Queue what is left of the original skb */ | 327 | /* Queue what is left of the original skb */ |
333 | IRDA_DEBUG(2, "%s(), queuing last segment\n", __func__); | 328 | pr_debug("%s(), queuing last segment\n", __func__); |
334 | 329 | ||
335 | frame = skb_push(skb, TTP_HEADER); | 330 | frame = skb_push(skb, TTP_HEADER); |
336 | frame[0] = 0x00; /* Clear more bit */ | 331 | frame[0] = 0x00; /* Clear more bit */ |
@@ -361,7 +356,7 @@ static int irttp_param_max_sdu_size(void *instance, irda_param_t *param, | |||
361 | else | 356 | else |
362 | self->tx_max_sdu_size = param->pv.i; | 357 | self->tx_max_sdu_size = param->pv.i; |
363 | 358 | ||
364 | IRDA_DEBUG(1, "%s(), MaxSduSize=%d\n", __func__, param->pv.i); | 359 | pr_debug("%s(), MaxSduSize=%d\n", __func__, param->pv.i); |
365 | 360 | ||
366 | return 0; | 361 | return 0; |
367 | } | 362 | } |
@@ -402,15 +397,13 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify) | |||
402 | * JeanII */ | 397 | * JeanII */ |
403 | if ((stsap_sel != LSAP_ANY) && | 398 | if ((stsap_sel != LSAP_ANY) && |
404 | ((stsap_sel < 0x01) || (stsap_sel >= 0x70))) { | 399 | ((stsap_sel < 0x01) || (stsap_sel >= 0x70))) { |
405 | IRDA_DEBUG(0, "%s(), invalid tsap!\n", __func__); | 400 | pr_debug("%s(), invalid tsap!\n", __func__); |
406 | return NULL; | 401 | return NULL; |
407 | } | 402 | } |
408 | 403 | ||
409 | self = kzalloc(sizeof(struct tsap_cb), GFP_ATOMIC); | 404 | self = kzalloc(sizeof(struct tsap_cb), GFP_ATOMIC); |
410 | if (self == NULL) { | 405 | if (self == NULL) |
411 | IRDA_DEBUG(0, "%s(), unable to kmalloc!\n", __func__); | ||
412 | return NULL; | 406 | return NULL; |
413 | } | ||
414 | 407 | ||
415 | /* Initialize internal objects */ | 408 | /* Initialize internal objects */ |
416 | irttp_init_tsap(self); | 409 | irttp_init_tsap(self); |
@@ -440,7 +433,7 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify) | |||
440 | */ | 433 | */ |
441 | lsap = irlmp_open_lsap(stsap_sel, &ttp_notify, 0); | 434 | lsap = irlmp_open_lsap(stsap_sel, &ttp_notify, 0); |
442 | if (lsap == NULL) { | 435 | if (lsap == NULL) { |
443 | IRDA_DEBUG(0, "%s: unable to allocate LSAP!!\n", __func__); | 436 | pr_debug("%s: unable to allocate LSAP!!\n", __func__); |
444 | __irttp_close_tsap(self); | 437 | __irttp_close_tsap(self); |
445 | return NULL; | 438 | return NULL; |
446 | } | 439 | } |
@@ -451,7 +444,7 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify) | |||
451 | * the stsap_sel we have might not be valid anymore | 444 | * the stsap_sel we have might not be valid anymore |
452 | */ | 445 | */ |
453 | self->stsap_sel = lsap->slsap_sel; | 446 | self->stsap_sel = lsap->slsap_sel; |
454 | IRDA_DEBUG(4, "%s(), stsap_sel=%02x\n", __func__, self->stsap_sel); | 447 | pr_debug("%s(), stsap_sel=%02x\n", __func__, self->stsap_sel); |
455 | 448 | ||
456 | self->notify = *notify; | 449 | self->notify = *notify; |
457 | self->lsap = lsap; | 450 | self->lsap = lsap; |
@@ -509,8 +502,6 @@ int irttp_close_tsap(struct tsap_cb *self) | |||
509 | { | 502 | { |
510 | struct tsap_cb *tsap; | 503 | struct tsap_cb *tsap; |
511 | 504 | ||
512 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
513 | |||
514 | IRDA_ASSERT(self != NULL, return -1;); | 505 | IRDA_ASSERT(self != NULL, return -1;); |
515 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); | 506 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); |
516 | 507 | ||
@@ -558,8 +549,6 @@ int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb) | |||
558 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); | 549 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); |
559 | IRDA_ASSERT(skb != NULL, return -1;); | 550 | IRDA_ASSERT(skb != NULL, return -1;); |
560 | 551 | ||
561 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
562 | |||
563 | /* Take shortcut on zero byte packets */ | 552 | /* Take shortcut on zero byte packets */ |
564 | if (skb->len == 0) { | 553 | if (skb->len == 0) { |
565 | ret = 0; | 554 | ret = 0; |
@@ -607,8 +596,8 @@ int irttp_data_request(struct tsap_cb *self, struct sk_buff *skb) | |||
607 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); | 596 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); |
608 | IRDA_ASSERT(skb != NULL, return -1;); | 597 | IRDA_ASSERT(skb != NULL, return -1;); |
609 | 598 | ||
610 | IRDA_DEBUG(2, "%s() : queue len = %d\n", __func__, | 599 | pr_debug("%s() : queue len = %d\n", __func__, |
611 | skb_queue_len(&self->tx_queue)); | 600 | skb_queue_len(&self->tx_queue)); |
612 | 601 | ||
613 | /* Take shortcut on zero byte packets */ | 602 | /* Take shortcut on zero byte packets */ |
614 | if (skb->len == 0) { | 603 | if (skb->len == 0) { |
@@ -720,9 +709,9 @@ static void irttp_run_tx_queue(struct tsap_cb *self) | |||
720 | unsigned long flags; | 709 | unsigned long flags; |
721 | int n; | 710 | int n; |
722 | 711 | ||
723 | IRDA_DEBUG(2, "%s() : send_credit = %d, queue_len = %d\n", | 712 | pr_debug("%s() : send_credit = %d, queue_len = %d\n", |
724 | __func__, | 713 | __func__, |
725 | self->send_credit, skb_queue_len(&self->tx_queue)); | 714 | self->send_credit, skb_queue_len(&self->tx_queue)); |
726 | 715 | ||
727 | /* Get exclusive access to the tx queue, otherwise don't touch it */ | 716 | /* Get exclusive access to the tx queue, otherwise don't touch it */ |
728 | if (irda_lock(&self->tx_queue_lock) == FALSE) | 717 | if (irda_lock(&self->tx_queue_lock) == FALSE) |
@@ -827,9 +816,9 @@ static inline void irttp_give_credit(struct tsap_cb *self) | |||
827 | IRDA_ASSERT(self != NULL, return;); | 816 | IRDA_ASSERT(self != NULL, return;); |
828 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); | 817 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); |
829 | 818 | ||
830 | IRDA_DEBUG(4, "%s() send=%d,avail=%d,remote=%d\n", | 819 | pr_debug("%s() send=%d,avail=%d,remote=%d\n", |
831 | __func__, | 820 | __func__, |
832 | self->send_credit, self->avail_credit, self->remote_credit); | 821 | self->send_credit, self->avail_credit, self->remote_credit); |
833 | 822 | ||
834 | /* Give credit to peer */ | 823 | /* Give credit to peer */ |
835 | tx_skb = alloc_skb(TTP_MAX_HEADER, GFP_ATOMIC); | 824 | tx_skb = alloc_skb(TTP_MAX_HEADER, GFP_ATOMIC); |
@@ -877,8 +866,6 @@ static int irttp_udata_indication(void *instance, void *sap, | |||
877 | struct tsap_cb *self; | 866 | struct tsap_cb *self; |
878 | int err; | 867 | int err; |
879 | 868 | ||
880 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
881 | |||
882 | self = instance; | 869 | self = instance; |
883 | 870 | ||
884 | IRDA_ASSERT(self != NULL, return -1;); | 871 | IRDA_ASSERT(self != NULL, return -1;); |
@@ -994,8 +981,6 @@ static void irttp_status_indication(void *instance, | |||
994 | { | 981 | { |
995 | struct tsap_cb *self; | 982 | struct tsap_cb *self; |
996 | 983 | ||
997 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
998 | |||
999 | self = instance; | 984 | self = instance; |
1000 | 985 | ||
1001 | IRDA_ASSERT(self != NULL, return;); | 986 | IRDA_ASSERT(self != NULL, return;); |
@@ -1012,7 +997,7 @@ static void irttp_status_indication(void *instance, | |||
1012 | self->notify.status_indication(self->notify.instance, | 997 | self->notify.status_indication(self->notify.instance, |
1013 | link, lock); | 998 | link, lock); |
1014 | else | 999 | else |
1015 | IRDA_DEBUG(2, "%s(), no handler\n", __func__); | 1000 | pr_debug("%s(), no handler\n", __func__); |
1016 | } | 1001 | } |
1017 | 1002 | ||
1018 | /* | 1003 | /* |
@@ -1030,7 +1015,7 @@ static void irttp_flow_indication(void *instance, void *sap, LOCAL_FLOW flow) | |||
1030 | IRDA_ASSERT(self != NULL, return;); | 1015 | IRDA_ASSERT(self != NULL, return;); |
1031 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); | 1016 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); |
1032 | 1017 | ||
1033 | IRDA_DEBUG(4, "%s(instance=%p)\n", __func__, self); | 1018 | pr_debug("%s(instance=%p)\n", __func__, self); |
1034 | 1019 | ||
1035 | /* We are "polled" directly from LAP, and the LAP want to fill | 1020 | /* We are "polled" directly from LAP, and the LAP want to fill |
1036 | * its Tx window. We want to do our best to send it data, so that | 1021 | * its Tx window. We want to do our best to send it data, so that |
@@ -1068,18 +1053,16 @@ static void irttp_flow_indication(void *instance, void *sap, LOCAL_FLOW flow) | |||
1068 | */ | 1053 | */ |
1069 | void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow) | 1054 | void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow) |
1070 | { | 1055 | { |
1071 | IRDA_DEBUG(1, "%s()\n", __func__); | ||
1072 | |||
1073 | IRDA_ASSERT(self != NULL, return;); | 1056 | IRDA_ASSERT(self != NULL, return;); |
1074 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); | 1057 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); |
1075 | 1058 | ||
1076 | switch (flow) { | 1059 | switch (flow) { |
1077 | case FLOW_STOP: | 1060 | case FLOW_STOP: |
1078 | IRDA_DEBUG(1, "%s(), flow stop\n", __func__); | 1061 | pr_debug("%s(), flow stop\n", __func__); |
1079 | self->rx_sdu_busy = TRUE; | 1062 | self->rx_sdu_busy = TRUE; |
1080 | break; | 1063 | break; |
1081 | case FLOW_START: | 1064 | case FLOW_START: |
1082 | IRDA_DEBUG(1, "%s(), flow start\n", __func__); | 1065 | pr_debug("%s(), flow start\n", __func__); |
1083 | self->rx_sdu_busy = FALSE; | 1066 | self->rx_sdu_busy = FALSE; |
1084 | 1067 | ||
1085 | /* Client say he can accept more data, try to free our | 1068 | /* Client say he can accept more data, try to free our |
@@ -1088,7 +1071,7 @@ void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow) | |||
1088 | 1071 | ||
1089 | break; | 1072 | break; |
1090 | default: | 1073 | default: |
1091 | IRDA_DEBUG(1, "%s(), Unknown flow command!\n", __func__); | 1074 | pr_debug("%s(), Unknown flow command!\n", __func__); |
1092 | } | 1075 | } |
1093 | } | 1076 | } |
1094 | EXPORT_SYMBOL(irttp_flow_request); | 1077 | EXPORT_SYMBOL(irttp_flow_request); |
@@ -1108,7 +1091,7 @@ int irttp_connect_request(struct tsap_cb *self, __u8 dtsap_sel, | |||
1108 | __u8 *frame; | 1091 | __u8 *frame; |
1109 | __u8 n; | 1092 | __u8 n; |
1110 | 1093 | ||
1111 | IRDA_DEBUG(4, "%s(), max_sdu_size=%d\n", __func__, max_sdu_size); | 1094 | pr_debug("%s(), max_sdu_size=%d\n", __func__, max_sdu_size); |
1112 | 1095 | ||
1113 | IRDA_ASSERT(self != NULL, return -EBADR;); | 1096 | IRDA_ASSERT(self != NULL, return -EBADR;); |
1114 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -EBADR;); | 1097 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -EBADR;); |
@@ -1206,8 +1189,6 @@ static void irttp_connect_confirm(void *instance, void *sap, | |||
1206 | __u8 plen; | 1189 | __u8 plen; |
1207 | __u8 n; | 1190 | __u8 n; |
1208 | 1191 | ||
1209 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
1210 | |||
1211 | self = instance; | 1192 | self = instance; |
1212 | 1193 | ||
1213 | IRDA_ASSERT(self != NULL, return;); | 1194 | IRDA_ASSERT(self != NULL, return;); |
@@ -1222,15 +1203,15 @@ static void irttp_connect_confirm(void *instance, void *sap, | |||
1222 | * negotiated QoS for the link. | 1203 | * negotiated QoS for the link. |
1223 | */ | 1204 | */ |
1224 | if (qos) { | 1205 | if (qos) { |
1225 | IRDA_DEBUG(4, "IrTTP, Negotiated BAUD_RATE: %02x\n", | 1206 | pr_debug("IrTTP, Negotiated BAUD_RATE: %02x\n", |
1226 | qos->baud_rate.bits); | 1207 | qos->baud_rate.bits); |
1227 | IRDA_DEBUG(4, "IrTTP, Negotiated BAUD_RATE: %d bps.\n", | 1208 | pr_debug("IrTTP, Negotiated BAUD_RATE: %d bps.\n", |
1228 | qos->baud_rate.value); | 1209 | qos->baud_rate.value); |
1229 | } | 1210 | } |
1230 | 1211 | ||
1231 | n = skb->data[0] & 0x7f; | 1212 | n = skb->data[0] & 0x7f; |
1232 | 1213 | ||
1233 | IRDA_DEBUG(4, "%s(), Initial send_credit=%d\n", __func__, n); | 1214 | pr_debug("%s(), Initial send_credit=%d\n", __func__, n); |
1234 | 1215 | ||
1235 | self->send_credit = n; | 1216 | self->send_credit = n; |
1236 | self->tx_max_sdu_size = 0; | 1217 | self->tx_max_sdu_size = 0; |
@@ -1261,11 +1242,11 @@ static void irttp_connect_confirm(void *instance, void *sap, | |||
1261 | skb_pull(skb, IRDA_MIN(skb->len, plen+1)); | 1242 | skb_pull(skb, IRDA_MIN(skb->len, plen+1)); |
1262 | } | 1243 | } |
1263 | 1244 | ||
1264 | IRDA_DEBUG(4, "%s() send=%d,avail=%d,remote=%d\n", __func__, | 1245 | pr_debug("%s() send=%d,avail=%d,remote=%d\n", __func__, |
1265 | self->send_credit, self->avail_credit, self->remote_credit); | 1246 | self->send_credit, self->avail_credit, self->remote_credit); |
1266 | 1247 | ||
1267 | IRDA_DEBUG(2, "%s(), MaxSduSize=%d\n", __func__, | 1248 | pr_debug("%s(), MaxSduSize=%d\n", __func__, |
1268 | self->tx_max_sdu_size); | 1249 | self->tx_max_sdu_size); |
1269 | 1250 | ||
1270 | if (self->notify.connect_confirm) { | 1251 | if (self->notify.connect_confirm) { |
1271 | self->notify.connect_confirm(self->notify.instance, self, qos, | 1252 | self->notify.connect_confirm(self->notify.instance, self, qos, |
@@ -1303,7 +1284,7 @@ static void irttp_connect_indication(void *instance, void *sap, | |||
1303 | self->max_seg_size = max_seg_size - TTP_HEADER; | 1284 | self->max_seg_size = max_seg_size - TTP_HEADER; |
1304 | self->max_header_size = max_header_size+TTP_HEADER; | 1285 | self->max_header_size = max_header_size+TTP_HEADER; |
1305 | 1286 | ||
1306 | IRDA_DEBUG(4, "%s(), TSAP sel=%02x\n", __func__, self->stsap_sel); | 1287 | pr_debug("%s(), TSAP sel=%02x\n", __func__, self->stsap_sel); |
1307 | 1288 | ||
1308 | /* Need to update dtsap_sel if its equal to LSAP_ANY */ | 1289 | /* Need to update dtsap_sel if its equal to LSAP_ANY */ |
1309 | self->dtsap_sel = lsap->dlsap_sel; | 1290 | self->dtsap_sel = lsap->dlsap_sel; |
@@ -1365,8 +1346,8 @@ int irttp_connect_response(struct tsap_cb *self, __u32 max_sdu_size, | |||
1365 | IRDA_ASSERT(self != NULL, return -1;); | 1346 | IRDA_ASSERT(self != NULL, return -1;); |
1366 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); | 1347 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); |
1367 | 1348 | ||
1368 | IRDA_DEBUG(4, "%s(), Source TSAP selector=%02x\n", __func__, | 1349 | pr_debug("%s(), Source TSAP selector=%02x\n", __func__, |
1369 | self->stsap_sel); | 1350 | self->stsap_sel); |
1370 | 1351 | ||
1371 | /* Any userdata supplied? */ | 1352 | /* Any userdata supplied? */ |
1372 | if (userdata == NULL) { | 1353 | if (userdata == NULL) { |
@@ -1447,14 +1428,12 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance) | |||
1447 | struct tsap_cb *new; | 1428 | struct tsap_cb *new; |
1448 | unsigned long flags; | 1429 | unsigned long flags; |
1449 | 1430 | ||
1450 | IRDA_DEBUG(1, "%s()\n", __func__); | ||
1451 | |||
1452 | /* Protect our access to the old tsap instance */ | 1431 | /* Protect our access to the old tsap instance */ |
1453 | spin_lock_irqsave(&irttp->tsaps->hb_spinlock, flags); | 1432 | spin_lock_irqsave(&irttp->tsaps->hb_spinlock, flags); |
1454 | 1433 | ||
1455 | /* Find the old instance */ | 1434 | /* Find the old instance */ |
1456 | if (!hashbin_find(irttp->tsaps, (long) orig, NULL)) { | 1435 | if (!hashbin_find(irttp->tsaps, (long) orig, NULL)) { |
1457 | IRDA_DEBUG(0, "%s(), unable to find TSAP\n", __func__); | 1436 | pr_debug("%s(), unable to find TSAP\n", __func__); |
1458 | spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags); | 1437 | spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags); |
1459 | return NULL; | 1438 | return NULL; |
1460 | } | 1439 | } |
@@ -1462,7 +1441,7 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance) | |||
1462 | /* Allocate a new instance */ | 1441 | /* Allocate a new instance */ |
1463 | new = kmemdup(orig, sizeof(struct tsap_cb), GFP_ATOMIC); | 1442 | new = kmemdup(orig, sizeof(struct tsap_cb), GFP_ATOMIC); |
1464 | if (!new) { | 1443 | if (!new) { |
1465 | IRDA_DEBUG(0, "%s(), unable to kmalloc\n", __func__); | 1444 | pr_debug("%s(), unable to kmalloc\n", __func__); |
1466 | spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags); | 1445 | spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags); |
1467 | return NULL; | 1446 | return NULL; |
1468 | } | 1447 | } |
@@ -1474,7 +1453,7 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance) | |||
1474 | /* Try to dup the LSAP (may fail if we were too slow) */ | 1453 | /* Try to dup the LSAP (may fail if we were too slow) */ |
1475 | new->lsap = irlmp_dup(orig->lsap, new); | 1454 | new->lsap = irlmp_dup(orig->lsap, new); |
1476 | if (!new->lsap) { | 1455 | if (!new->lsap) { |
1477 | IRDA_DEBUG(0, "%s(), dup failed!\n", __func__); | 1456 | pr_debug("%s(), dup failed!\n", __func__); |
1478 | kfree(new); | 1457 | kfree(new); |
1479 | return NULL; | 1458 | return NULL; |
1480 | } | 1459 | } |
@@ -1509,7 +1488,7 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata, | |||
1509 | 1488 | ||
1510 | /* Already disconnected? */ | 1489 | /* Already disconnected? */ |
1511 | if (!self->connected) { | 1490 | if (!self->connected) { |
1512 | IRDA_DEBUG(4, "%s(), already disconnected!\n", __func__); | 1491 | pr_debug("%s(), already disconnected!\n", __func__); |
1513 | if (userdata) | 1492 | if (userdata) |
1514 | dev_kfree_skb(userdata); | 1493 | dev_kfree_skb(userdata); |
1515 | return -1; | 1494 | return -1; |
@@ -1521,8 +1500,8 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata, | |||
1521 | * for following a disconnect_indication() (i.e. net_bh). | 1500 | * for following a disconnect_indication() (i.e. net_bh). |
1522 | * Jean II */ | 1501 | * Jean II */ |
1523 | if (test_and_set_bit(0, &self->disconnect_pend)) { | 1502 | if (test_and_set_bit(0, &self->disconnect_pend)) { |
1524 | IRDA_DEBUG(0, "%s(), disconnect already pending\n", | 1503 | pr_debug("%s(), disconnect already pending\n", |
1525 | __func__); | 1504 | __func__); |
1526 | if (userdata) | 1505 | if (userdata) |
1527 | dev_kfree_skb(userdata); | 1506 | dev_kfree_skb(userdata); |
1528 | 1507 | ||
@@ -1541,7 +1520,7 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata, | |||
1541 | * disconnecting right now since the data will | 1520 | * disconnecting right now since the data will |
1542 | * not have any usable connection to be sent on | 1521 | * not have any usable connection to be sent on |
1543 | */ | 1522 | */ |
1544 | IRDA_DEBUG(1, "%s(): High priority!!()\n", __func__); | 1523 | pr_debug("%s(): High priority!!()\n", __func__); |
1545 | irttp_flush_queues(self); | 1524 | irttp_flush_queues(self); |
1546 | } else if (priority == P_NORMAL) { | 1525 | } else if (priority == P_NORMAL) { |
1547 | /* | 1526 | /* |
@@ -1562,7 +1541,7 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata, | |||
1562 | * be sent at the LMP level (so even if the peer has its Tx queue | 1541 | * be sent at the LMP level (so even if the peer has its Tx queue |
1563 | * full of data). - Jean II */ | 1542 | * full of data). - Jean II */ |
1564 | 1543 | ||
1565 | IRDA_DEBUG(1, "%s(), Disconnecting ...\n", __func__); | 1544 | pr_debug("%s(), Disconnecting ...\n", __func__); |
1566 | self->connected = FALSE; | 1545 | self->connected = FALSE; |
1567 | 1546 | ||
1568 | if (!userdata) { | 1547 | if (!userdata) { |
@@ -1598,8 +1577,6 @@ static void irttp_disconnect_indication(void *instance, void *sap, | |||
1598 | { | 1577 | { |
1599 | struct tsap_cb *self; | 1578 | struct tsap_cb *self; |
1600 | 1579 | ||
1601 | IRDA_DEBUG(4, "%s()\n", __func__); | ||
1602 | |||
1603 | self = instance; | 1580 | self = instance; |
1604 | 1581 | ||
1605 | IRDA_ASSERT(self != NULL, return;); | 1582 | IRDA_ASSERT(self != NULL, return;); |
@@ -1658,7 +1635,7 @@ static void irttp_do_data_indication(struct tsap_cb *self, struct sk_buff *skb) | |||
1658 | * give an error back | 1635 | * give an error back |
1659 | */ | 1636 | */ |
1660 | if (err) { | 1637 | if (err) { |
1661 | IRDA_DEBUG(0, "%s() requeueing skb!\n", __func__); | 1638 | pr_debug("%s() requeueing skb!\n", __func__); |
1662 | 1639 | ||
1663 | /* Make sure we take a break */ | 1640 | /* Make sure we take a break */ |
1664 | self->rx_sdu_busy = TRUE; | 1641 | self->rx_sdu_busy = TRUE; |
@@ -1683,8 +1660,8 @@ static void irttp_run_rx_queue(struct tsap_cb *self) | |||
1683 | struct sk_buff *skb; | 1660 | struct sk_buff *skb; |
1684 | int more = 0; | 1661 | int more = 0; |
1685 | 1662 | ||
1686 | IRDA_DEBUG(2, "%s() send=%d,avail=%d,remote=%d\n", __func__, | 1663 | pr_debug("%s() send=%d,avail=%d,remote=%d\n", __func__, |
1687 | self->send_credit, self->avail_credit, self->remote_credit); | 1664 | self->send_credit, self->avail_credit, self->remote_credit); |
1688 | 1665 | ||
1689 | /* Get exclusive access to the rx queue, otherwise don't touch it */ | 1666 | /* Get exclusive access to the rx queue, otherwise don't touch it */ |
1690 | if (irda_lock(&self->rx_queue_lock) == FALSE) | 1667 | if (irda_lock(&self->rx_queue_lock) == FALSE) |
@@ -1723,8 +1700,8 @@ static void irttp_run_rx_queue(struct tsap_cb *self) | |||
1723 | * limits of the maximum size of the rx_sdu | 1700 | * limits of the maximum size of the rx_sdu |
1724 | */ | 1701 | */ |
1725 | if (self->rx_sdu_size <= self->rx_max_sdu_size) { | 1702 | if (self->rx_sdu_size <= self->rx_max_sdu_size) { |
1726 | IRDA_DEBUG(4, "%s(), queueing frag\n", | 1703 | pr_debug("%s(), queueing frag\n", |
1727 | __func__); | 1704 | __func__); |
1728 | skb_queue_tail(&self->rx_fragments, skb); | 1705 | skb_queue_tail(&self->rx_fragments, skb); |
1729 | } else { | 1706 | } else { |
1730 | /* Free the part of the SDU that is too big */ | 1707 | /* Free the part of the SDU that is too big */ |
@@ -1753,7 +1730,7 @@ static void irttp_run_rx_queue(struct tsap_cb *self) | |||
1753 | /* Now we can deliver the reassembled skb */ | 1730 | /* Now we can deliver the reassembled skb */ |
1754 | irttp_do_data_indication(self, skb); | 1731 | irttp_do_data_indication(self, skb); |
1755 | } else { | 1732 | } else { |
1756 | IRDA_DEBUG(1, "%s(), Truncated frame\n", __func__); | 1733 | pr_debug("%s(), Truncated frame\n", __func__); |
1757 | 1734 | ||
1758 | /* Free the part of the SDU that is too big */ | 1735 | /* Free the part of the SDU that is too big */ |
1759 | dev_kfree_skb(skb); | 1736 | dev_kfree_skb(skb); |
diff --git a/net/irda/parameters.c b/net/irda/parameters.c index d7a5778262ef..006786bfdd65 100644 --- a/net/irda/parameters.c +++ b/net/irda/parameters.c | |||
@@ -146,13 +146,13 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi, | |||
146 | */ | 146 | */ |
147 | if (p.pl == 0) { | 147 | if (p.pl == 0) { |
148 | if (p.pv.i < 0xff) { | 148 | if (p.pv.i < 0xff) { |
149 | IRDA_DEBUG(2, "%s(), using 1 byte\n", __func__); | 149 | pr_debug("%s(), using 1 byte\n", __func__); |
150 | p.pl = 1; | 150 | p.pl = 1; |
151 | } else if (p.pv.i < 0xffff) { | 151 | } else if (p.pv.i < 0xffff) { |
152 | IRDA_DEBUG(2, "%s(), using 2 bytes\n", __func__); | 152 | pr_debug("%s(), using 2 bytes\n", __func__); |
153 | p.pl = 2; | 153 | p.pl = 2; |
154 | } else { | 154 | } else { |
155 | IRDA_DEBUG(2, "%s(), using 4 bytes\n", __func__); | 155 | pr_debug("%s(), using 4 bytes\n", __func__); |
156 | p.pl = 4; /* Default length */ | 156 | p.pl = 4; /* Default length */ |
157 | } | 157 | } |
158 | } | 158 | } |
@@ -162,8 +162,8 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi, | |||
162 | __func__); | 162 | __func__); |
163 | return -1; | 163 | return -1; |
164 | } | 164 | } |
165 | IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __func__, | 165 | pr_debug("%s(), pi=%#x, pl=%d, pi=%d\n", __func__, |
166 | p.pi, p.pl, p.pv.i); | 166 | p.pi, p.pl, p.pv.i); |
167 | switch (p.pl) { | 167 | switch (p.pl) { |
168 | case 1: | 168 | case 1: |
169 | n += irda_param_pack(buf, "bbb", p.pi, p.pl, (__u8) p.pv.i); | 169 | n += irda_param_pack(buf, "bbb", p.pi, p.pl, (__u8) p.pv.i); |
@@ -270,8 +270,8 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi, | |||
270 | return p.pl+2; | 270 | return p.pl+2; |
271 | } | 271 | } |
272 | 272 | ||
273 | IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __func__, | 273 | pr_debug("%s(), pi=%#x, pl=%d, pi=%d\n", __func__, |
274 | p.pi, p.pl, p.pv.i); | 274 | p.pi, p.pl, p.pv.i); |
275 | /* Call handler for this parameter */ | 275 | /* Call handler for this parameter */ |
276 | err = (*func)(self, &p, PV_PUT); | 276 | err = (*func)(self, &p, PV_PUT); |
277 | if (err < 0) | 277 | if (err < 0) |
@@ -290,15 +290,13 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi, | |||
290 | irda_param_t p; | 290 | irda_param_t p; |
291 | int err; | 291 | int err; |
292 | 292 | ||
293 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
294 | |||
295 | p.pi = pi; /* In case handler needs to know */ | 293 | p.pi = pi; /* In case handler needs to know */ |
296 | p.pl = buf[1]; /* Extract length of value */ | 294 | p.pl = buf[1]; /* Extract length of value */ |
297 | if (p.pl > 32) | 295 | if (p.pl > 32) |
298 | p.pl = 32; | 296 | p.pl = 32; |
299 | 297 | ||
300 | IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d\n", __func__, | 298 | pr_debug("%s(), pi=%#x, pl=%d\n", __func__, |
301 | p.pi, p.pl); | 299 | p.pi, p.pl); |
302 | 300 | ||
303 | /* Check if buffer is long enough for parsing */ | 301 | /* Check if buffer is long enough for parsing */ |
304 | if (len < (2+p.pl)) { | 302 | if (len < (2+p.pl)) { |
@@ -311,8 +309,8 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi, | |||
311 | * checked that the buffer is long enough */ | 309 | * checked that the buffer is long enough */ |
312 | strncpy(str, buf+2, p.pl); | 310 | strncpy(str, buf+2, p.pl); |
313 | 311 | ||
314 | IRDA_DEBUG(2, "%s(), str=0x%02x 0x%02x\n", __func__, | 312 | pr_debug("%s(), str=0x%02x 0x%02x\n", |
315 | (__u8) str[0], (__u8) str[1]); | 313 | __func__, (__u8)str[0], (__u8)str[1]); |
316 | 314 | ||
317 | /* Null terminate string */ | 315 | /* Null terminate string */ |
318 | str[p.pl] = '\0'; | 316 | str[p.pl] = '\0'; |
@@ -345,7 +343,7 @@ static int irda_extract_octseq(void *self, __u8 *buf, int len, __u8 pi, | |||
345 | return -1; | 343 | return -1; |
346 | } | 344 | } |
347 | 345 | ||
348 | IRDA_DEBUG(0, "%s(), not impl\n", __func__); | 346 | pr_debug("%s(), not impl\n", __func__); |
349 | 347 | ||
350 | return p.pl+2; /* Extracted pl+2 bytes */ | 348 | return p.pl+2; /* Extracted pl+2 bytes */ |
351 | } | 349 | } |
@@ -468,8 +466,8 @@ int irda_param_insert(void *self, __u8 pi, __u8 *buf, int len, | |||
468 | if ((pi_major > info->len-1) || | 466 | if ((pi_major > info->len-1) || |
469 | (pi_minor > info->tables[pi_major].len-1)) | 467 | (pi_minor > info->tables[pi_major].len-1)) |
470 | { | 468 | { |
471 | IRDA_DEBUG(0, "%s(), no handler for parameter=0x%02x\n", | 469 | pr_debug("%s(), no handler for parameter=0x%02x\n", |
472 | __func__, pi); | 470 | __func__, pi); |
473 | 471 | ||
474 | /* Skip this parameter */ | 472 | /* Skip this parameter */ |
475 | return -1; | 473 | return -1; |
@@ -523,8 +521,8 @@ static int irda_param_extract(void *self, __u8 *buf, int len, | |||
523 | if ((pi_major > info->len-1) || | 521 | if ((pi_major > info->len-1) || |
524 | (pi_minor > info->tables[pi_major].len-1)) | 522 | (pi_minor > info->tables[pi_major].len-1)) |
525 | { | 523 | { |
526 | IRDA_DEBUG(0, "%s(), no handler for parameter=0x%02x\n", | 524 | pr_debug("%s(), no handler for parameter=0x%02x\n", |
527 | __func__, buf[0]); | 525 | __func__, buf[0]); |
528 | 526 | ||
529 | /* Skip this parameter */ | 527 | /* Skip this parameter */ |
530 | return 2 + buf[n + 1]; /* Continue */ | 528 | return 2 + buf[n + 1]; /* Continue */ |
@@ -536,8 +534,8 @@ static int irda_param_extract(void *self, __u8 *buf, int len, | |||
536 | /* Find expected data type for this parameter identifier (pi)*/ | 534 | /* Find expected data type for this parameter identifier (pi)*/ |
537 | type = pi_minor_info->type; | 535 | type = pi_minor_info->type; |
538 | 536 | ||
539 | IRDA_DEBUG(3, "%s(), pi=[%d,%d], type=%d\n", __func__, | 537 | pr_debug("%s(), pi=[%d,%d], type=%d\n", __func__, |
540 | pi_major, pi_minor, type); | 538 | pi_major, pi_minor, type); |
541 | 539 | ||
542 | /* Check if handler has been implemented */ | 540 | /* Check if handler has been implemented */ |
543 | if (!pi_minor_info->func) { | 541 | if (!pi_minor_info->func) { |
diff --git a/net/irda/qos.c b/net/irda/qos.c index f3b588c17d3b..5ed6c9a7baee 100644 --- a/net/irda/qos.c +++ b/net/irda/qos.c | |||
@@ -342,8 +342,6 @@ static void irlap_adjust_qos_settings(struct qos_info *qos) | |||
342 | __u32 line_capacity; | 342 | __u32 line_capacity; |
343 | int index; | 343 | int index; |
344 | 344 | ||
345 | IRDA_DEBUG(2, "%s()\n", __func__); | ||
346 | |||
347 | /* | 345 | /* |
348 | * Make sure the mintt is sensible. | 346 | * Make sure the mintt is sensible. |
349 | * Main culprit : Ericsson T39. - Jean II | 347 | * Main culprit : Ericsson T39. - Jean II |
@@ -368,9 +366,8 @@ static void irlap_adjust_qos_settings(struct qos_info *qos) | |||
368 | if ((qos->baud_rate.value < 115200) && | 366 | if ((qos->baud_rate.value < 115200) && |
369 | (qos->max_turn_time.value < 500)) | 367 | (qos->max_turn_time.value < 500)) |
370 | { | 368 | { |
371 | IRDA_DEBUG(0, | 369 | pr_debug("%s(), adjusting max turn time from %d to 500 ms\n", |
372 | "%s(), adjusting max turn time from %d to 500 ms\n", | 370 | __func__, qos->max_turn_time.value); |
373 | __func__, qos->max_turn_time.value); | ||
374 | qos->max_turn_time.value = 500; | 371 | qos->max_turn_time.value = 500; |
375 | } | 372 | } |
376 | 373 | ||
@@ -385,8 +382,8 @@ static void irlap_adjust_qos_settings(struct qos_info *qos) | |||
385 | #ifdef CONFIG_IRDA_DYNAMIC_WINDOW | 382 | #ifdef CONFIG_IRDA_DYNAMIC_WINDOW |
386 | while ((qos->data_size.value > line_capacity) && (index > 0)) { | 383 | while ((qos->data_size.value > line_capacity) && (index > 0)) { |
387 | qos->data_size.value = data_sizes[index--]; | 384 | qos->data_size.value = data_sizes[index--]; |
388 | IRDA_DEBUG(2, "%s(), reducing data size to %d\n", | 385 | pr_debug("%s(), reducing data size to %d\n", |
389 | __func__, qos->data_size.value); | 386 | __func__, qos->data_size.value); |
390 | } | 387 | } |
391 | #else /* Use method described in section 6.6.11 of IrLAP */ | 388 | #else /* Use method described in section 6.6.11 of IrLAP */ |
392 | while (irlap_requested_line_capacity(qos) > line_capacity) { | 389 | while (irlap_requested_line_capacity(qos) > line_capacity) { |
@@ -395,12 +392,12 @@ static void irlap_adjust_qos_settings(struct qos_info *qos) | |||
395 | /* Must be able to send at least one frame */ | 392 | /* Must be able to send at least one frame */ |
396 | if (qos->window_size.value > 1) { | 393 | if (qos->window_size.value > 1) { |
397 | qos->window_size.value--; | 394 | qos->window_size.value--; |
398 | IRDA_DEBUG(2, "%s(), reducing window size to %d\n", | 395 | pr_debug("%s(), reducing window size to %d\n", |
399 | __func__, qos->window_size.value); | 396 | __func__, qos->window_size.value); |
400 | } else if (index > 1) { | 397 | } else if (index > 1) { |
401 | qos->data_size.value = data_sizes[index--]; | 398 | qos->data_size.value = data_sizes[index--]; |
402 | IRDA_DEBUG(2, "%s(), reducing data size to %d\n", | 399 | pr_debug("%s(), reducing data size to %d\n", |
403 | __func__, qos->data_size.value); | 400 | __func__, qos->data_size.value); |
404 | } else { | 401 | } else { |
405 | net_warn_ratelimited("%s(), nothing more we can do!\n", | 402 | net_warn_ratelimited("%s(), nothing more we can do!\n", |
406 | __func__); | 403 | __func__); |
@@ -440,20 +437,20 @@ int irlap_qos_negotiate(struct irlap_cb *self, struct sk_buff *skb) | |||
440 | 437 | ||
441 | irlap_adjust_qos_settings(&self->qos_tx); | 438 | irlap_adjust_qos_settings(&self->qos_tx); |
442 | 439 | ||
443 | IRDA_DEBUG(2, "Setting BAUD_RATE to %d bps.\n", | 440 | pr_debug("Setting BAUD_RATE to %d bps.\n", |
444 | self->qos_tx.baud_rate.value); | 441 | self->qos_tx.baud_rate.value); |
445 | IRDA_DEBUG(2, "Setting DATA_SIZE to %d bytes\n", | 442 | pr_debug("Setting DATA_SIZE to %d bytes\n", |
446 | self->qos_tx.data_size.value); | 443 | self->qos_tx.data_size.value); |
447 | IRDA_DEBUG(2, "Setting WINDOW_SIZE to %d\n", | 444 | pr_debug("Setting WINDOW_SIZE to %d\n", |
448 | self->qos_tx.window_size.value); | 445 | self->qos_tx.window_size.value); |
449 | IRDA_DEBUG(2, "Setting XBOFS to %d\n", | 446 | pr_debug("Setting XBOFS to %d\n", |
450 | self->qos_tx.additional_bofs.value); | 447 | self->qos_tx.additional_bofs.value); |
451 | IRDA_DEBUG(2, "Setting MAX_TURN_TIME to %d ms.\n", | 448 | pr_debug("Setting MAX_TURN_TIME to %d ms.\n", |
452 | self->qos_tx.max_turn_time.value); | 449 | self->qos_tx.max_turn_time.value); |
453 | IRDA_DEBUG(2, "Setting MIN_TURN_TIME to %d usecs.\n", | 450 | pr_debug("Setting MIN_TURN_TIME to %d usecs.\n", |
454 | self->qos_tx.min_turn_time.value); | 451 | self->qos_tx.min_turn_time.value); |
455 | IRDA_DEBUG(2, "Setting LINK_DISC to %d secs.\n", | 452 | pr_debug("Setting LINK_DISC to %d secs.\n", |
456 | self->qos_tx.link_disc_time.value); | 453 | self->qos_tx.link_disc_time.value); |
457 | return ret; | 454 | return ret; |
458 | } | 455 | } |
459 | 456 | ||
@@ -537,17 +534,17 @@ static int irlap_param_baud_rate(void *instance, irda_param_t *param, int get) | |||
537 | 534 | ||
538 | if (get) { | 535 | if (get) { |
539 | param->pv.i = self->qos_rx.baud_rate.bits; | 536 | param->pv.i = self->qos_rx.baud_rate.bits; |
540 | IRDA_DEBUG(2, "%s(), baud rate = 0x%02x\n", | 537 | pr_debug("%s(), baud rate = 0x%02x\n", |
541 | __func__, param->pv.i); | 538 | __func__, param->pv.i); |
542 | } else { | 539 | } else { |
543 | /* | 540 | /* |
544 | * Stations must agree on baud rate, so calculate | 541 | * Stations must agree on baud rate, so calculate |
545 | * intersection | 542 | * intersection |
546 | */ | 543 | */ |
547 | IRDA_DEBUG(2, "Requested BAUD_RATE: 0x%04x\n", (__u16) param->pv.i); | 544 | pr_debug("Requested BAUD_RATE: 0x%04x\n", (__u16)param->pv.i); |
548 | final = (__u16) param->pv.i & self->qos_rx.baud_rate.bits; | 545 | final = (__u16) param->pv.i & self->qos_rx.baud_rate.bits; |
549 | 546 | ||
550 | IRDA_DEBUG(2, "Final BAUD_RATE: 0x%04x\n", final); | 547 | pr_debug("Final BAUD_RATE: 0x%04x\n", final); |
551 | self->qos_tx.baud_rate.bits = final; | 548 | self->qos_tx.baud_rate.bits = final; |
552 | self->qos_rx.baud_rate.bits = final; | 549 | self->qos_rx.baud_rate.bits = final; |
553 | } | 550 | } |
@@ -578,10 +575,10 @@ static int irlap_param_link_disconnect(void *instance, irda_param_t *param, | |||
578 | * Stations must agree on link disconnect/threshold | 575 | * Stations must agree on link disconnect/threshold |
579 | * time. | 576 | * time. |
580 | */ | 577 | */ |
581 | IRDA_DEBUG(2, "LINK_DISC: %02x\n", (__u8) param->pv.i); | 578 | pr_debug("LINK_DISC: %02x\n", (__u8)param->pv.i); |
582 | final = (__u8) param->pv.i & self->qos_rx.link_disc_time.bits; | 579 | final = (__u8) param->pv.i & self->qos_rx.link_disc_time.bits; |
583 | 580 | ||
584 | IRDA_DEBUG(2, "Final LINK_DISC: %02x\n", final); | 581 | pr_debug("Final LINK_DISC: %02x\n", final); |
585 | self->qos_tx.link_disc_time.bits = final; | 582 | self->qos_tx.link_disc_time.bits = final; |
586 | self->qos_rx.link_disc_time.bits = final; | 583 | self->qos_rx.link_disc_time.bits = final; |
587 | } | 584 | } |
@@ -710,8 +707,8 @@ __u32 irlap_max_line_capacity(__u32 speed, __u32 max_turn_time) | |||
710 | __u32 line_capacity; | 707 | __u32 line_capacity; |
711 | int i,j; | 708 | int i,j; |
712 | 709 | ||
713 | IRDA_DEBUG(2, "%s(), speed=%d, max_turn_time=%d\n", | 710 | pr_debug("%s(), speed=%d, max_turn_time=%d\n", |
714 | __func__, speed, max_turn_time); | 711 | __func__, speed, max_turn_time); |
715 | 712 | ||
716 | i = value_index(speed, baud_rates, 10); | 713 | i = value_index(speed, baud_rates, 10); |
717 | j = value_index(max_turn_time, max_turn_times, 4); | 714 | j = value_index(max_turn_time, max_turn_times, 4); |
@@ -721,8 +718,8 @@ __u32 irlap_max_line_capacity(__u32 speed, __u32 max_turn_time) | |||
721 | 718 | ||
722 | line_capacity = max_line_capacities[i][j]; | 719 | line_capacity = max_line_capacities[i][j]; |
723 | 720 | ||
724 | IRDA_DEBUG(2, "%s(), line capacity=%d bytes\n", | 721 | pr_debug("%s(), line capacity=%d bytes\n", |
725 | __func__, line_capacity); | 722 | __func__, line_capacity); |
726 | 723 | ||
727 | return line_capacity; | 724 | return line_capacity; |
728 | } | 725 | } |
@@ -737,8 +734,8 @@ static __u32 irlap_requested_line_capacity(struct qos_info *qos) | |||
737 | irlap_min_turn_time_in_bytes(qos->baud_rate.value, | 734 | irlap_min_turn_time_in_bytes(qos->baud_rate.value, |
738 | qos->min_turn_time.value); | 735 | qos->min_turn_time.value); |
739 | 736 | ||
740 | IRDA_DEBUG(2, "%s(), requested line capacity=%d\n", | 737 | pr_debug("%s(), requested line capacity=%d\n", |
741 | __func__, line_capacity); | 738 | __func__, line_capacity); |
742 | 739 | ||
743 | return line_capacity; | 740 | return line_capacity; |
744 | } | 741 | } |
diff --git a/net/irda/wrapper.c b/net/irda/wrapper.c index 9efffeb8d0f1..40a0f993bf13 100644 --- a/net/irda/wrapper.c +++ b/net/irda/wrapper.c | |||
@@ -106,17 +106,17 @@ int async_wrap_skb(struct sk_buff *skb, __u8 *tx_buff, int buffsize) | |||
106 | * Nothing to worry about, but we set the default number of | 106 | * Nothing to worry about, but we set the default number of |
107 | * BOF's | 107 | * BOF's |
108 | */ | 108 | */ |
109 | IRDA_DEBUG(1, "%s(), wrong magic in skb!\n", __func__); | 109 | pr_debug("%s(), wrong magic in skb!\n", __func__); |
110 | xbofs = 10; | 110 | xbofs = 10; |
111 | } else | 111 | } else |
112 | xbofs = cb->xbofs + cb->xbofs_delay; | 112 | xbofs = cb->xbofs + cb->xbofs_delay; |
113 | 113 | ||
114 | IRDA_DEBUG(4, "%s(), xbofs=%d\n", __func__, xbofs); | 114 | pr_debug("%s(), xbofs=%d\n", __func__, xbofs); |
115 | 115 | ||
116 | /* Check that we never use more than 115 + 48 xbofs */ | 116 | /* Check that we never use more than 115 + 48 xbofs */ |
117 | if (xbofs > 163) { | 117 | if (xbofs > 163) { |
118 | IRDA_DEBUG(0, "%s(), too many xbofs (%d)\n", __func__, | 118 | pr_debug("%s(), too many xbofs (%d)\n", __func__, |
119 | xbofs); | 119 | xbofs); |
120 | xbofs = 163; | 120 | xbofs = 163; |
121 | } | 121 | } |
122 | 122 | ||
@@ -286,8 +286,8 @@ async_unwrap_bof(struct net_device *dev, | |||
286 | case INSIDE_FRAME: | 286 | case INSIDE_FRAME: |
287 | /* Not supposed to happen, the previous frame is not | 287 | /* Not supposed to happen, the previous frame is not |
288 | * finished - Jean II */ | 288 | * finished - Jean II */ |
289 | IRDA_DEBUG(1, "%s(), Discarding incomplete frame\n", | 289 | pr_debug("%s(), Discarding incomplete frame\n", |
290 | __func__); | 290 | __func__); |
291 | stats->rx_errors++; | 291 | stats->rx_errors++; |
292 | stats->rx_missed_errors++; | 292 | stats->rx_missed_errors++; |
293 | irda_device_set_media_busy(dev, TRUE); | 293 | irda_device_set_media_busy(dev, TRUE); |
@@ -360,7 +360,7 @@ async_unwrap_eof(struct net_device *dev, | |||
360 | /* Wrong CRC, discard frame! */ | 360 | /* Wrong CRC, discard frame! */ |
361 | irda_device_set_media_busy(dev, TRUE); | 361 | irda_device_set_media_busy(dev, TRUE); |
362 | 362 | ||
363 | IRDA_DEBUG(1, "%s(), crc error\n", __func__); | 363 | pr_debug("%s(), crc error\n", __func__); |
364 | stats->rx_errors++; | 364 | stats->rx_errors++; |
365 | stats->rx_crc_errors++; | 365 | stats->rx_crc_errors++; |
366 | } | 366 | } |
@@ -420,8 +420,8 @@ async_unwrap_other(struct net_device *dev, | |||
420 | rx_buff->fcs = irda_fcs(rx_buff->fcs, byte); | 420 | rx_buff->fcs = irda_fcs(rx_buff->fcs, byte); |
421 | #endif | 421 | #endif |
422 | } else { | 422 | } else { |
423 | IRDA_DEBUG(1, "%s(), Rx buffer overflow, aborting\n", | 423 | pr_debug("%s(), Rx buffer overflow, aborting\n", |
424 | __func__); | 424 | __func__); |
425 | rx_buff->state = OUTSIDE_FRAME; | 425 | rx_buff->state = OUTSIDE_FRAME; |
426 | } | 426 | } |
427 | break; | 427 | break; |
@@ -439,8 +439,8 @@ async_unwrap_other(struct net_device *dev, | |||
439 | #endif | 439 | #endif |
440 | rx_buff->state = INSIDE_FRAME; | 440 | rx_buff->state = INSIDE_FRAME; |
441 | } else { | 441 | } else { |
442 | IRDA_DEBUG(1, "%s(), Rx buffer overflow, aborting\n", | 442 | pr_debug("%s(), Rx buffer overflow, aborting\n", |
443 | __func__); | 443 | __func__); |
444 | rx_buff->state = OUTSIDE_FRAME; | 444 | rx_buff->state = OUTSIDE_FRAME; |
445 | } | 445 | } |
446 | break; | 446 | break; |