diff options
Diffstat (limited to 'drivers/net/irda/ali-ircc.c')
-rw-r--r-- | drivers/net/irda/ali-ircc.c | 246 |
1 files changed, 123 insertions, 123 deletions
diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c index 083b0dd70fef..2ff181861d2d 100644 --- a/drivers/net/irda/ali-ircc.c +++ b/drivers/net/irda/ali-ircc.c | |||
@@ -152,7 +152,7 @@ static int __init ali_ircc_init(void) | |||
152 | int reg, revision; | 152 | int reg, revision; |
153 | int i = 0; | 153 | int i = 0; |
154 | 154 | ||
155 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__); | 155 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__); |
156 | 156 | ||
157 | ret = platform_driver_register(&ali_ircc_driver); | 157 | ret = platform_driver_register(&ali_ircc_driver); |
158 | if (ret) { | 158 | if (ret) { |
@@ -166,7 +166,7 @@ static int __init ali_ircc_init(void) | |||
166 | /* Probe for all the ALi chipsets we know about */ | 166 | /* Probe for all the ALi chipsets we know about */ |
167 | for (chip= chips; chip->name; chip++, i++) | 167 | for (chip= chips; chip->name; chip++, i++) |
168 | { | 168 | { |
169 | IRDA_DEBUG(2, "%s(), Probing for %s ...\n", __FUNCTION__, chip->name); | 169 | IRDA_DEBUG(2, "%s(), Probing for %s ...\n", __func__, chip->name); |
170 | 170 | ||
171 | /* Try all config registers for this chip */ | 171 | /* Try all config registers for this chip */ |
172 | for (cfg=0; cfg<2; cfg++) | 172 | for (cfg=0; cfg<2; cfg++) |
@@ -196,11 +196,11 @@ static int __init ali_ircc_init(void) | |||
196 | 196 | ||
197 | if (reg == chip->cid_value) | 197 | if (reg == chip->cid_value) |
198 | { | 198 | { |
199 | IRDA_DEBUG(2, "%s(), Chip found at 0x%03x\n", __FUNCTION__, cfg_base); | 199 | IRDA_DEBUG(2, "%s(), Chip found at 0x%03x\n", __func__, cfg_base); |
200 | 200 | ||
201 | outb(0x1F, cfg_base); | 201 | outb(0x1F, cfg_base); |
202 | revision = inb(cfg_base+1); | 202 | revision = inb(cfg_base+1); |
203 | IRDA_DEBUG(2, "%s(), Found %s chip, revision=%d\n", __FUNCTION__, | 203 | IRDA_DEBUG(2, "%s(), Found %s chip, revision=%d\n", __func__, |
204 | chip->name, revision); | 204 | chip->name, revision); |
205 | 205 | ||
206 | /* | 206 | /* |
@@ -223,14 +223,14 @@ static int __init ali_ircc_init(void) | |||
223 | } | 223 | } |
224 | else | 224 | else |
225 | { | 225 | { |
226 | IRDA_DEBUG(2, "%s(), No %s chip at 0x%03x\n", __FUNCTION__, chip->name, cfg_base); | 226 | IRDA_DEBUG(2, "%s(), No %s chip at 0x%03x\n", __func__, chip->name, cfg_base); |
227 | } | 227 | } |
228 | /* Exit configuration */ | 228 | /* Exit configuration */ |
229 | outb(0xbb, cfg_base); | 229 | outb(0xbb, cfg_base); |
230 | } | 230 | } |
231 | } | 231 | } |
232 | 232 | ||
233 | IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __FUNCTION__); | 233 | IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __func__); |
234 | 234 | ||
235 | if (ret) | 235 | if (ret) |
236 | platform_driver_unregister(&ali_ircc_driver); | 236 | platform_driver_unregister(&ali_ircc_driver); |
@@ -248,7 +248,7 @@ static void __exit ali_ircc_cleanup(void) | |||
248 | { | 248 | { |
249 | int i; | 249 | int i; |
250 | 250 | ||
251 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__); | 251 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__); |
252 | 252 | ||
253 | for (i=0; i < ARRAY_SIZE(dev_self); i++) { | 253 | for (i=0; i < ARRAY_SIZE(dev_self); i++) { |
254 | if (dev_self[i]) | 254 | if (dev_self[i]) |
@@ -257,7 +257,7 @@ static void __exit ali_ircc_cleanup(void) | |||
257 | 257 | ||
258 | platform_driver_unregister(&ali_ircc_driver); | 258 | platform_driver_unregister(&ali_ircc_driver); |
259 | 259 | ||
260 | IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __FUNCTION__); | 260 | IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __func__); |
261 | } | 261 | } |
262 | 262 | ||
263 | /* | 263 | /* |
@@ -273,11 +273,11 @@ static int ali_ircc_open(int i, chipio_t *info) | |||
273 | int dongle_id; | 273 | int dongle_id; |
274 | int err; | 274 | int err; |
275 | 275 | ||
276 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__); | 276 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__); |
277 | 277 | ||
278 | if (i >= ARRAY_SIZE(dev_self)) { | 278 | if (i >= ARRAY_SIZE(dev_self)) { |
279 | IRDA_ERROR("%s(), maximum number of supported chips reached!\n", | 279 | IRDA_ERROR("%s(), maximum number of supported chips reached!\n", |
280 | __FUNCTION__); | 280 | __func__); |
281 | return -ENOMEM; | 281 | return -ENOMEM; |
282 | } | 282 | } |
283 | 283 | ||
@@ -288,7 +288,7 @@ static int ali_ircc_open(int i, chipio_t *info) | |||
288 | dev = alloc_irdadev(sizeof(*self)); | 288 | dev = alloc_irdadev(sizeof(*self)); |
289 | if (dev == NULL) { | 289 | if (dev == NULL) { |
290 | IRDA_ERROR("%s(), can't allocate memory for control block!\n", | 290 | IRDA_ERROR("%s(), can't allocate memory for control block!\n", |
291 | __FUNCTION__); | 291 | __func__); |
292 | return -ENOMEM; | 292 | return -ENOMEM; |
293 | } | 293 | } |
294 | 294 | ||
@@ -312,7 +312,7 @@ static int ali_ircc_open(int i, chipio_t *info) | |||
312 | /* Reserve the ioports that we need */ | 312 | /* Reserve the ioports that we need */ |
313 | if (!request_region(self->io.fir_base, self->io.fir_ext, | 313 | if (!request_region(self->io.fir_base, self->io.fir_ext, |
314 | ALI_IRCC_DRIVER_NAME)) { | 314 | ALI_IRCC_DRIVER_NAME)) { |
315 | IRDA_WARNING("%s(), can't get iobase of 0x%03x\n", __FUNCTION__, | 315 | IRDA_WARNING("%s(), can't get iobase of 0x%03x\n", __func__, |
316 | self->io.fir_base); | 316 | self->io.fir_base); |
317 | err = -ENODEV; | 317 | err = -ENODEV; |
318 | goto err_out1; | 318 | goto err_out1; |
@@ -370,19 +370,19 @@ static int ali_ircc_open(int i, chipio_t *info) | |||
370 | 370 | ||
371 | err = register_netdev(dev); | 371 | err = register_netdev(dev); |
372 | if (err) { | 372 | if (err) { |
373 | IRDA_ERROR("%s(), register_netdev() failed!\n", __FUNCTION__); | 373 | IRDA_ERROR("%s(), register_netdev() failed!\n", __func__); |
374 | goto err_out4; | 374 | goto err_out4; |
375 | } | 375 | } |
376 | IRDA_MESSAGE("IrDA: Registered device %s\n", dev->name); | 376 | IRDA_MESSAGE("IrDA: Registered device %s\n", dev->name); |
377 | 377 | ||
378 | /* Check dongle id */ | 378 | /* Check dongle id */ |
379 | dongle_id = ali_ircc_read_dongle_id(i, info); | 379 | dongle_id = ali_ircc_read_dongle_id(i, info); |
380 | IRDA_MESSAGE("%s(), %s, Found dongle: %s\n", __FUNCTION__, | 380 | IRDA_MESSAGE("%s(), %s, Found dongle: %s\n", __func__, |
381 | ALI_IRCC_DRIVER_NAME, dongle_types[dongle_id]); | 381 | ALI_IRCC_DRIVER_NAME, dongle_types[dongle_id]); |
382 | 382 | ||
383 | self->io.dongle_id = dongle_id; | 383 | self->io.dongle_id = dongle_id; |
384 | 384 | ||
385 | IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __FUNCTION__); | 385 | IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __func__); |
386 | 386 | ||
387 | return 0; | 387 | return 0; |
388 | 388 | ||
@@ -411,7 +411,7 @@ static int __exit ali_ircc_close(struct ali_ircc_cb *self) | |||
411 | { | 411 | { |
412 | int iobase; | 412 | int iobase; |
413 | 413 | ||
414 | IRDA_DEBUG(4, "%s(), ---------------- Start ----------------\n", __FUNCTION__); | 414 | IRDA_DEBUG(4, "%s(), ---------------- Start ----------------\n", __func__); |
415 | 415 | ||
416 | IRDA_ASSERT(self != NULL, return -1;); | 416 | IRDA_ASSERT(self != NULL, return -1;); |
417 | 417 | ||
@@ -421,7 +421,7 @@ static int __exit ali_ircc_close(struct ali_ircc_cb *self) | |||
421 | unregister_netdev(self->netdev); | 421 | unregister_netdev(self->netdev); |
422 | 422 | ||
423 | /* Release the PORT that this driver is using */ | 423 | /* Release the PORT that this driver is using */ |
424 | IRDA_DEBUG(4, "%s(), Releasing Region %03x\n", __FUNCTION__, self->io.fir_base); | 424 | IRDA_DEBUG(4, "%s(), Releasing Region %03x\n", __func__, self->io.fir_base); |
425 | release_region(self->io.fir_base, self->io.fir_ext); | 425 | release_region(self->io.fir_base, self->io.fir_ext); |
426 | 426 | ||
427 | if (self->tx_buff.head) | 427 | if (self->tx_buff.head) |
@@ -435,7 +435,7 @@ static int __exit ali_ircc_close(struct ali_ircc_cb *self) | |||
435 | dev_self[self->index] = NULL; | 435 | dev_self[self->index] = NULL; |
436 | free_netdev(self->netdev); | 436 | free_netdev(self->netdev); |
437 | 437 | ||
438 | IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __FUNCTION__); | 438 | IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __func__); |
439 | 439 | ||
440 | return 0; | 440 | return 0; |
441 | } | 441 | } |
@@ -478,7 +478,7 @@ static int ali_ircc_probe_53(ali_chip_t *chip, chipio_t *info) | |||
478 | int cfg_base = info->cfg_base; | 478 | int cfg_base = info->cfg_base; |
479 | int hi, low, reg; | 479 | int hi, low, reg; |
480 | 480 | ||
481 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__); | 481 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__); |
482 | 482 | ||
483 | /* Enter Configuration */ | 483 | /* Enter Configuration */ |
484 | outb(chip->entr1, cfg_base); | 484 | outb(chip->entr1, cfg_base); |
@@ -497,13 +497,13 @@ static int ali_ircc_probe_53(ali_chip_t *chip, chipio_t *info) | |||
497 | 497 | ||
498 | info->sir_base = info->fir_base; | 498 | info->sir_base = info->fir_base; |
499 | 499 | ||
500 | IRDA_DEBUG(2, "%s(), probing fir_base=0x%03x\n", __FUNCTION__, info->fir_base); | 500 | IRDA_DEBUG(2, "%s(), probing fir_base=0x%03x\n", __func__, info->fir_base); |
501 | 501 | ||
502 | /* Read IRQ control register */ | 502 | /* Read IRQ control register */ |
503 | outb(0x70, cfg_base); | 503 | outb(0x70, cfg_base); |
504 | reg = inb(cfg_base+1); | 504 | reg = inb(cfg_base+1); |
505 | info->irq = reg & 0x0f; | 505 | info->irq = reg & 0x0f; |
506 | IRDA_DEBUG(2, "%s(), probing irq=%d\n", __FUNCTION__, info->irq); | 506 | IRDA_DEBUG(2, "%s(), probing irq=%d\n", __func__, info->irq); |
507 | 507 | ||
508 | /* Read DMA channel */ | 508 | /* Read DMA channel */ |
509 | outb(0x74, cfg_base); | 509 | outb(0x74, cfg_base); |
@@ -511,26 +511,26 @@ static int ali_ircc_probe_53(ali_chip_t *chip, chipio_t *info) | |||
511 | info->dma = reg & 0x07; | 511 | info->dma = reg & 0x07; |
512 | 512 | ||
513 | if(info->dma == 0x04) | 513 | if(info->dma == 0x04) |
514 | IRDA_WARNING("%s(), No DMA channel assigned !\n", __FUNCTION__); | 514 | IRDA_WARNING("%s(), No DMA channel assigned !\n", __func__); |
515 | else | 515 | else |
516 | IRDA_DEBUG(2, "%s(), probing dma=%d\n", __FUNCTION__, info->dma); | 516 | IRDA_DEBUG(2, "%s(), probing dma=%d\n", __func__, info->dma); |
517 | 517 | ||
518 | /* Read Enabled Status */ | 518 | /* Read Enabled Status */ |
519 | outb(0x30, cfg_base); | 519 | outb(0x30, cfg_base); |
520 | reg = inb(cfg_base+1); | 520 | reg = inb(cfg_base+1); |
521 | info->enabled = (reg & 0x80) && (reg & 0x01); | 521 | info->enabled = (reg & 0x80) && (reg & 0x01); |
522 | IRDA_DEBUG(2, "%s(), probing enabled=%d\n", __FUNCTION__, info->enabled); | 522 | IRDA_DEBUG(2, "%s(), probing enabled=%d\n", __func__, info->enabled); |
523 | 523 | ||
524 | /* Read Power Status */ | 524 | /* Read Power Status */ |
525 | outb(0x22, cfg_base); | 525 | outb(0x22, cfg_base); |
526 | reg = inb(cfg_base+1); | 526 | reg = inb(cfg_base+1); |
527 | info->suspended = (reg & 0x20); | 527 | info->suspended = (reg & 0x20); |
528 | IRDA_DEBUG(2, "%s(), probing suspended=%d\n", __FUNCTION__, info->suspended); | 528 | IRDA_DEBUG(2, "%s(), probing suspended=%d\n", __func__, info->suspended); |
529 | 529 | ||
530 | /* Exit configuration */ | 530 | /* Exit configuration */ |
531 | outb(0xbb, cfg_base); | 531 | outb(0xbb, cfg_base); |
532 | 532 | ||
533 | IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __FUNCTION__); | 533 | IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __func__); |
534 | 534 | ||
535 | return 0; | 535 | return 0; |
536 | } | 536 | } |
@@ -548,7 +548,7 @@ static int ali_ircc_setup(chipio_t *info) | |||
548 | int version; | 548 | int version; |
549 | int iobase = info->fir_base; | 549 | int iobase = info->fir_base; |
550 | 550 | ||
551 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__); | 551 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__); |
552 | 552 | ||
553 | /* Locking comments : | 553 | /* Locking comments : |
554 | * Most operations here need to be protected. We are called before | 554 | * Most operations here need to be protected. We are called before |
@@ -609,7 +609,7 @@ static int ali_ircc_setup(chipio_t *info) | |||
609 | // outb(UART_IER_RDI, iobase+UART_IER); //benjamin 2000/11/23 01:25PM | 609 | // outb(UART_IER_RDI, iobase+UART_IER); //benjamin 2000/11/23 01:25PM |
610 | // Turn on the interrupts in ali_ircc_net_open | 610 | // Turn on the interrupts in ali_ircc_net_open |
611 | 611 | ||
612 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__); | 612 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__); |
613 | 613 | ||
614 | return 0; | 614 | return 0; |
615 | } | 615 | } |
@@ -626,7 +626,7 @@ static int ali_ircc_read_dongle_id (int i, chipio_t *info) | |||
626 | int dongle_id, reg; | 626 | int dongle_id, reg; |
627 | int cfg_base = info->cfg_base; | 627 | int cfg_base = info->cfg_base; |
628 | 628 | ||
629 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__); | 629 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__); |
630 | 630 | ||
631 | /* Enter Configuration */ | 631 | /* Enter Configuration */ |
632 | outb(chips[i].entr1, cfg_base); | 632 | outb(chips[i].entr1, cfg_base); |
@@ -640,13 +640,13 @@ static int ali_ircc_read_dongle_id (int i, chipio_t *info) | |||
640 | outb(0xf0, cfg_base); | 640 | outb(0xf0, cfg_base); |
641 | reg = inb(cfg_base+1); | 641 | reg = inb(cfg_base+1); |
642 | dongle_id = ((reg>>6)&0x02) | ((reg>>5)&0x01); | 642 | dongle_id = ((reg>>6)&0x02) | ((reg>>5)&0x01); |
643 | IRDA_DEBUG(2, "%s(), probing dongle_id=%d, dongle_types=%s\n", __FUNCTION__, | 643 | IRDA_DEBUG(2, "%s(), probing dongle_id=%d, dongle_types=%s\n", __func__, |
644 | dongle_id, dongle_types[dongle_id]); | 644 | dongle_id, dongle_types[dongle_id]); |
645 | 645 | ||
646 | /* Exit configuration */ | 646 | /* Exit configuration */ |
647 | outb(0xbb, cfg_base); | 647 | outb(0xbb, cfg_base); |
648 | 648 | ||
649 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__); | 649 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__); |
650 | 650 | ||
651 | return dongle_id; | 651 | return dongle_id; |
652 | } | 652 | } |
@@ -663,7 +663,7 @@ static irqreturn_t ali_ircc_interrupt(int irq, void *dev_id) | |||
663 | struct ali_ircc_cb *self; | 663 | struct ali_ircc_cb *self; |
664 | int ret; | 664 | int ret; |
665 | 665 | ||
666 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__); | 666 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__); |
667 | 667 | ||
668 | self = dev->priv; | 668 | self = dev->priv; |
669 | 669 | ||
@@ -677,7 +677,7 @@ static irqreturn_t ali_ircc_interrupt(int irq, void *dev_id) | |||
677 | 677 | ||
678 | spin_unlock(&self->lock); | 678 | spin_unlock(&self->lock); |
679 | 679 | ||
680 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__); | 680 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__); |
681 | return ret; | 681 | return ret; |
682 | } | 682 | } |
683 | /* | 683 | /* |
@@ -691,7 +691,7 @@ static irqreturn_t ali_ircc_fir_interrupt(struct ali_ircc_cb *self) | |||
691 | __u8 eir, OldMessageCount; | 691 | __u8 eir, OldMessageCount; |
692 | int iobase, tmp; | 692 | int iobase, tmp; |
693 | 693 | ||
694 | IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __FUNCTION__); | 694 | IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __func__); |
695 | 695 | ||
696 | iobase = self->io.fir_base; | 696 | iobase = self->io.fir_base; |
697 | 697 | ||
@@ -704,10 +704,10 @@ static irqreturn_t ali_ircc_fir_interrupt(struct ali_ircc_cb *self) | |||
704 | //self->ier = inb(iobase+FIR_IER); 2000/12/1 04:32PM | 704 | //self->ier = inb(iobase+FIR_IER); 2000/12/1 04:32PM |
705 | eir = self->InterruptID & self->ier; /* Mask out the interesting ones */ | 705 | eir = self->InterruptID & self->ier; /* Mask out the interesting ones */ |
706 | 706 | ||
707 | IRDA_DEBUG(1, "%s(), self->InterruptID = %x\n", __FUNCTION__,self->InterruptID); | 707 | IRDA_DEBUG(1, "%s(), self->InterruptID = %x\n", __func__,self->InterruptID); |
708 | IRDA_DEBUG(1, "%s(), self->LineStatus = %x\n", __FUNCTION__,self->LineStatus); | 708 | IRDA_DEBUG(1, "%s(), self->LineStatus = %x\n", __func__,self->LineStatus); |
709 | IRDA_DEBUG(1, "%s(), self->ier = %x\n", __FUNCTION__,self->ier); | 709 | IRDA_DEBUG(1, "%s(), self->ier = %x\n", __func__,self->ier); |
710 | IRDA_DEBUG(1, "%s(), eir = %x\n", __FUNCTION__,eir); | 710 | IRDA_DEBUG(1, "%s(), eir = %x\n", __func__,eir); |
711 | 711 | ||
712 | /* Disable interrupts */ | 712 | /* Disable interrupts */ |
713 | SetCOMInterrupts(self, FALSE); | 713 | SetCOMInterrupts(self, FALSE); |
@@ -718,7 +718,7 @@ static irqreturn_t ali_ircc_fir_interrupt(struct ali_ircc_cb *self) | |||
718 | { | 718 | { |
719 | if (self->io.direction == IO_XMIT) /* TX */ | 719 | if (self->io.direction == IO_XMIT) /* TX */ |
720 | { | 720 | { |
721 | IRDA_DEBUG(1, "%s(), ******* IIR_EOM (Tx) *******\n", __FUNCTION__); | 721 | IRDA_DEBUG(1, "%s(), ******* IIR_EOM (Tx) *******\n", __func__); |
722 | 722 | ||
723 | if(ali_ircc_dma_xmit_complete(self)) | 723 | if(ali_ircc_dma_xmit_complete(self)) |
724 | { | 724 | { |
@@ -737,23 +737,23 @@ static irqreturn_t ali_ircc_fir_interrupt(struct ali_ircc_cb *self) | |||
737 | } | 737 | } |
738 | else /* RX */ | 738 | else /* RX */ |
739 | { | 739 | { |
740 | IRDA_DEBUG(1, "%s(), ******* IIR_EOM (Rx) *******\n", __FUNCTION__); | 740 | IRDA_DEBUG(1, "%s(), ******* IIR_EOM (Rx) *******\n", __func__); |
741 | 741 | ||
742 | if(OldMessageCount > ((self->LineStatus+1) & 0x07)) | 742 | if(OldMessageCount > ((self->LineStatus+1) & 0x07)) |
743 | { | 743 | { |
744 | self->rcvFramesOverflow = TRUE; | 744 | self->rcvFramesOverflow = TRUE; |
745 | IRDA_DEBUG(1, "%s(), ******* self->rcvFramesOverflow = TRUE ******** \n", __FUNCTION__); | 745 | IRDA_DEBUG(1, "%s(), ******* self->rcvFramesOverflow = TRUE ******** \n", __func__); |
746 | } | 746 | } |
747 | 747 | ||
748 | if (ali_ircc_dma_receive_complete(self)) | 748 | if (ali_ircc_dma_receive_complete(self)) |
749 | { | 749 | { |
750 | IRDA_DEBUG(1, "%s(), ******* receive complete ******** \n", __FUNCTION__); | 750 | IRDA_DEBUG(1, "%s(), ******* receive complete ******** \n", __func__); |
751 | 751 | ||
752 | self->ier = IER_EOM; | 752 | self->ier = IER_EOM; |
753 | } | 753 | } |
754 | else | 754 | else |
755 | { | 755 | { |
756 | IRDA_DEBUG(1, "%s(), ******* Not receive complete ******** \n", __FUNCTION__); | 756 | IRDA_DEBUG(1, "%s(), ******* Not receive complete ******** \n", __func__); |
757 | 757 | ||
758 | self->ier = IER_EOM | IER_TIMER; | 758 | self->ier = IER_EOM | IER_TIMER; |
759 | } | 759 | } |
@@ -766,7 +766,7 @@ static irqreturn_t ali_ircc_fir_interrupt(struct ali_ircc_cb *self) | |||
766 | if(OldMessageCount > ((self->LineStatus+1) & 0x07)) | 766 | if(OldMessageCount > ((self->LineStatus+1) & 0x07)) |
767 | { | 767 | { |
768 | self->rcvFramesOverflow = TRUE; | 768 | self->rcvFramesOverflow = TRUE; |
769 | IRDA_DEBUG(1, "%s(), ******* self->rcvFramesOverflow = TRUE ******* \n", __FUNCTION__); | 769 | IRDA_DEBUG(1, "%s(), ******* self->rcvFramesOverflow = TRUE ******* \n", __func__); |
770 | } | 770 | } |
771 | /* Disable Timer */ | 771 | /* Disable Timer */ |
772 | switch_bank(iobase, BANK1); | 772 | switch_bank(iobase, BANK1); |
@@ -798,7 +798,7 @@ static irqreturn_t ali_ircc_fir_interrupt(struct ali_ircc_cb *self) | |||
798 | /* Restore Interrupt */ | 798 | /* Restore Interrupt */ |
799 | SetCOMInterrupts(self, TRUE); | 799 | SetCOMInterrupts(self, TRUE); |
800 | 800 | ||
801 | IRDA_DEBUG(1, "%s(), ----------------- End ---------------\n", __FUNCTION__); | 801 | IRDA_DEBUG(1, "%s(), ----------------- End ---------------\n", __func__); |
802 | return IRQ_RETVAL(eir); | 802 | return IRQ_RETVAL(eir); |
803 | } | 803 | } |
804 | 804 | ||
@@ -813,7 +813,7 @@ static irqreturn_t ali_ircc_sir_interrupt(struct ali_ircc_cb *self) | |||
813 | int iobase; | 813 | int iobase; |
814 | int iir, lsr; | 814 | int iir, lsr; |
815 | 815 | ||
816 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__); | 816 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__); |
817 | 817 | ||
818 | iobase = self->io.sir_base; | 818 | iobase = self->io.sir_base; |
819 | 819 | ||
@@ -822,13 +822,13 @@ static irqreturn_t ali_ircc_sir_interrupt(struct ali_ircc_cb *self) | |||
822 | /* Clear interrupt */ | 822 | /* Clear interrupt */ |
823 | lsr = inb(iobase+UART_LSR); | 823 | lsr = inb(iobase+UART_LSR); |
824 | 824 | ||
825 | IRDA_DEBUG(4, "%s(), iir=%02x, lsr=%02x, iobase=%#x\n", __FUNCTION__, | 825 | IRDA_DEBUG(4, "%s(), iir=%02x, lsr=%02x, iobase=%#x\n", __func__, |
826 | iir, lsr, iobase); | 826 | iir, lsr, iobase); |
827 | 827 | ||
828 | switch (iir) | 828 | switch (iir) |
829 | { | 829 | { |
830 | case UART_IIR_RLSI: | 830 | case UART_IIR_RLSI: |
831 | IRDA_DEBUG(2, "%s(), RLSI\n", __FUNCTION__); | 831 | IRDA_DEBUG(2, "%s(), RLSI\n", __func__); |
832 | break; | 832 | break; |
833 | case UART_IIR_RDI: | 833 | case UART_IIR_RDI: |
834 | /* Receive interrupt */ | 834 | /* Receive interrupt */ |
@@ -842,14 +842,14 @@ static irqreturn_t ali_ircc_sir_interrupt(struct ali_ircc_cb *self) | |||
842 | } | 842 | } |
843 | break; | 843 | break; |
844 | default: | 844 | default: |
845 | IRDA_DEBUG(0, "%s(), unhandled IIR=%#x\n", __FUNCTION__, iir); | 845 | IRDA_DEBUG(0, "%s(), unhandled IIR=%#x\n", __func__, iir); |
846 | break; | 846 | break; |
847 | } | 847 | } |
848 | 848 | ||
849 | } | 849 | } |
850 | 850 | ||
851 | 851 | ||
852 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__); | 852 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__); |
853 | 853 | ||
854 | return IRQ_RETVAL(iir); | 854 | return IRQ_RETVAL(iir); |
855 | } | 855 | } |
@@ -866,7 +866,7 @@ static void ali_ircc_sir_receive(struct ali_ircc_cb *self) | |||
866 | int boguscount = 0; | 866 | int boguscount = 0; |
867 | int iobase; | 867 | int iobase; |
868 | 868 | ||
869 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__); | 869 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__); |
870 | IRDA_ASSERT(self != NULL, return;); | 870 | IRDA_ASSERT(self != NULL, return;); |
871 | 871 | ||
872 | iobase = self->io.sir_base; | 872 | iobase = self->io.sir_base; |
@@ -881,12 +881,12 @@ static void ali_ircc_sir_receive(struct ali_ircc_cb *self) | |||
881 | 881 | ||
882 | /* Make sure we don't stay here too long */ | 882 | /* Make sure we don't stay here too long */ |
883 | if (boguscount++ > 32) { | 883 | if (boguscount++ > 32) { |
884 | IRDA_DEBUG(2,"%s(), breaking!\n", __FUNCTION__); | 884 | IRDA_DEBUG(2,"%s(), breaking!\n", __func__); |
885 | break; | 885 | break; |
886 | } | 886 | } |
887 | } while (inb(iobase+UART_LSR) & UART_LSR_DR); | 887 | } while (inb(iobase+UART_LSR) & UART_LSR_DR); |
888 | 888 | ||
889 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 889 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ ); |
890 | } | 890 | } |
891 | 891 | ||
892 | /* | 892 | /* |
@@ -903,7 +903,7 @@ static void ali_ircc_sir_write_wakeup(struct ali_ircc_cb *self) | |||
903 | 903 | ||
904 | IRDA_ASSERT(self != NULL, return;); | 904 | IRDA_ASSERT(self != NULL, return;); |
905 | 905 | ||
906 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); | 906 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__ ); |
907 | 907 | ||
908 | iobase = self->io.sir_base; | 908 | iobase = self->io.sir_base; |
909 | 909 | ||
@@ -922,16 +922,16 @@ static void ali_ircc_sir_write_wakeup(struct ali_ircc_cb *self) | |||
922 | { | 922 | { |
923 | /* We must wait until all data are gone */ | 923 | /* We must wait until all data are gone */ |
924 | while(!(inb(iobase+UART_LSR) & UART_LSR_TEMT)) | 924 | while(!(inb(iobase+UART_LSR) & UART_LSR_TEMT)) |
925 | IRDA_DEBUG(1, "%s(), UART_LSR_THRE\n", __FUNCTION__ ); | 925 | IRDA_DEBUG(1, "%s(), UART_LSR_THRE\n", __func__ ); |
926 | 926 | ||
927 | IRDA_DEBUG(1, "%s(), Changing speed! self->new_speed = %d\n", __FUNCTION__ , self->new_speed); | 927 | IRDA_DEBUG(1, "%s(), Changing speed! self->new_speed = %d\n", __func__ , self->new_speed); |
928 | ali_ircc_change_speed(self, self->new_speed); | 928 | ali_ircc_change_speed(self, self->new_speed); |
929 | self->new_speed = 0; | 929 | self->new_speed = 0; |
930 | 930 | ||
931 | // benjamin 2000/11/10 06:32PM | 931 | // benjamin 2000/11/10 06:32PM |
932 | if (self->io.speed > 115200) | 932 | if (self->io.speed > 115200) |
933 | { | 933 | { |
934 | IRDA_DEBUG(2, "%s(), ali_ircc_change_speed from UART_LSR_TEMT \n", __FUNCTION__ ); | 934 | IRDA_DEBUG(2, "%s(), ali_ircc_change_speed from UART_LSR_TEMT \n", __func__ ); |
935 | 935 | ||
936 | self->ier = IER_EOM; | 936 | self->ier = IER_EOM; |
937 | // SetCOMInterrupts(self, TRUE); | 937 | // SetCOMInterrupts(self, TRUE); |
@@ -949,7 +949,7 @@ static void ali_ircc_sir_write_wakeup(struct ali_ircc_cb *self) | |||
949 | outb(UART_IER_RDI, iobase+UART_IER); | 949 | outb(UART_IER_RDI, iobase+UART_IER); |
950 | } | 950 | } |
951 | 951 | ||
952 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 952 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ ); |
953 | } | 953 | } |
954 | 954 | ||
955 | static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud) | 955 | static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud) |
@@ -957,9 +957,9 @@ static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud) | |||
957 | struct net_device *dev = self->netdev; | 957 | struct net_device *dev = self->netdev; |
958 | int iobase; | 958 | int iobase; |
959 | 959 | ||
960 | IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); | 960 | IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __func__ ); |
961 | 961 | ||
962 | IRDA_DEBUG(2, "%s(), setting speed = %d \n", __FUNCTION__ , baud); | 962 | IRDA_DEBUG(2, "%s(), setting speed = %d \n", __func__ , baud); |
963 | 963 | ||
964 | /* This function *must* be called with irq off and spin-lock. | 964 | /* This function *must* be called with irq off and spin-lock. |
965 | * - Jean II */ | 965 | * - Jean II */ |
@@ -998,7 +998,7 @@ static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud) | |||
998 | 998 | ||
999 | netif_wake_queue(self->netdev); | 999 | netif_wake_queue(self->netdev); |
1000 | 1000 | ||
1001 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 1001 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ ); |
1002 | } | 1002 | } |
1003 | 1003 | ||
1004 | static void ali_ircc_fir_change_speed(struct ali_ircc_cb *priv, __u32 baud) | 1004 | static void ali_ircc_fir_change_speed(struct ali_ircc_cb *priv, __u32 baud) |
@@ -1008,14 +1008,14 @@ static void ali_ircc_fir_change_speed(struct ali_ircc_cb *priv, __u32 baud) | |||
1008 | struct ali_ircc_cb *self = (struct ali_ircc_cb *) priv; | 1008 | struct ali_ircc_cb *self = (struct ali_ircc_cb *) priv; |
1009 | struct net_device *dev; | 1009 | struct net_device *dev; |
1010 | 1010 | ||
1011 | IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); | 1011 | IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __func__ ); |
1012 | 1012 | ||
1013 | IRDA_ASSERT(self != NULL, return;); | 1013 | IRDA_ASSERT(self != NULL, return;); |
1014 | 1014 | ||
1015 | dev = self->netdev; | 1015 | dev = self->netdev; |
1016 | iobase = self->io.fir_base; | 1016 | iobase = self->io.fir_base; |
1017 | 1017 | ||
1018 | IRDA_DEBUG(1, "%s(), self->io.speed = %d, change to speed = %d\n", __FUNCTION__ ,self->io.speed,baud); | 1018 | IRDA_DEBUG(1, "%s(), self->io.speed = %d, change to speed = %d\n", __func__ ,self->io.speed,baud); |
1019 | 1019 | ||
1020 | /* Come from SIR speed */ | 1020 | /* Come from SIR speed */ |
1021 | if(self->io.speed <=115200) | 1021 | if(self->io.speed <=115200) |
@@ -1029,7 +1029,7 @@ static void ali_ircc_fir_change_speed(struct ali_ircc_cb *priv, __u32 baud) | |||
1029 | // Set Dongle Speed mode | 1029 | // Set Dongle Speed mode |
1030 | ali_ircc_change_dongle_speed(self, baud); | 1030 | ali_ircc_change_dongle_speed(self, baud); |
1031 | 1031 | ||
1032 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 1032 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ ); |
1033 | } | 1033 | } |
1034 | 1034 | ||
1035 | /* | 1035 | /* |
@@ -1047,9 +1047,9 @@ static void ali_ircc_sir_change_speed(struct ali_ircc_cb *priv, __u32 speed) | |||
1047 | int lcr; /* Line control reg */ | 1047 | int lcr; /* Line control reg */ |
1048 | int divisor; | 1048 | int divisor; |
1049 | 1049 | ||
1050 | IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); | 1050 | IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __func__ ); |
1051 | 1051 | ||
1052 | IRDA_DEBUG(1, "%s(), Setting speed to: %d\n", __FUNCTION__ , speed); | 1052 | IRDA_DEBUG(1, "%s(), Setting speed to: %d\n", __func__ , speed); |
1053 | 1053 | ||
1054 | IRDA_ASSERT(self != NULL, return;); | 1054 | IRDA_ASSERT(self != NULL, return;); |
1055 | 1055 | ||
@@ -1103,7 +1103,7 @@ static void ali_ircc_sir_change_speed(struct ali_ircc_cb *priv, __u32 speed) | |||
1103 | 1103 | ||
1104 | spin_unlock_irqrestore(&self->lock, flags); | 1104 | spin_unlock_irqrestore(&self->lock, flags); |
1105 | 1105 | ||
1106 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 1106 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ ); |
1107 | } | 1107 | } |
1108 | 1108 | ||
1109 | static void ali_ircc_change_dongle_speed(struct ali_ircc_cb *priv, int speed) | 1109 | static void ali_ircc_change_dongle_speed(struct ali_ircc_cb *priv, int speed) |
@@ -1113,14 +1113,14 @@ static void ali_ircc_change_dongle_speed(struct ali_ircc_cb *priv, int speed) | |||
1113 | int iobase,dongle_id; | 1113 | int iobase,dongle_id; |
1114 | int tmp = 0; | 1114 | int tmp = 0; |
1115 | 1115 | ||
1116 | IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); | 1116 | IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __func__ ); |
1117 | 1117 | ||
1118 | iobase = self->io.fir_base; /* or iobase = self->io.sir_base; */ | 1118 | iobase = self->io.fir_base; /* or iobase = self->io.sir_base; */ |
1119 | dongle_id = self->io.dongle_id; | 1119 | dongle_id = self->io.dongle_id; |
1120 | 1120 | ||
1121 | /* We are already locked, no need to do it again */ | 1121 | /* We are already locked, no need to do it again */ |
1122 | 1122 | ||
1123 | IRDA_DEBUG(1, "%s(), Set Speed for %s , Speed = %d\n", __FUNCTION__ , dongle_types[dongle_id], speed); | 1123 | IRDA_DEBUG(1, "%s(), Set Speed for %s , Speed = %d\n", __func__ , dongle_types[dongle_id], speed); |
1124 | 1124 | ||
1125 | switch_bank(iobase, BANK2); | 1125 | switch_bank(iobase, BANK2); |
1126 | tmp = inb(iobase+FIR_IRDA_CR); | 1126 | tmp = inb(iobase+FIR_IRDA_CR); |
@@ -1284,7 +1284,7 @@ static void ali_ircc_change_dongle_speed(struct ali_ircc_cb *priv, int speed) | |||
1284 | 1284 | ||
1285 | switch_bank(iobase, BANK0); | 1285 | switch_bank(iobase, BANK0); |
1286 | 1286 | ||
1287 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 1287 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ ); |
1288 | } | 1288 | } |
1289 | 1289 | ||
1290 | /* | 1290 | /* |
@@ -1297,11 +1297,11 @@ static int ali_ircc_sir_write(int iobase, int fifo_size, __u8 *buf, int len) | |||
1297 | { | 1297 | { |
1298 | int actual = 0; | 1298 | int actual = 0; |
1299 | 1299 | ||
1300 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); | 1300 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__ ); |
1301 | 1301 | ||
1302 | /* Tx FIFO should be empty! */ | 1302 | /* Tx FIFO should be empty! */ |
1303 | if (!(inb(iobase+UART_LSR) & UART_LSR_THRE)) { | 1303 | if (!(inb(iobase+UART_LSR) & UART_LSR_THRE)) { |
1304 | IRDA_DEBUG(0, "%s(), failed, fifo not empty!\n", __FUNCTION__ ); | 1304 | IRDA_DEBUG(0, "%s(), failed, fifo not empty!\n", __func__ ); |
1305 | return 0; | 1305 | return 0; |
1306 | } | 1306 | } |
1307 | 1307 | ||
@@ -1313,7 +1313,7 @@ static int ali_ircc_sir_write(int iobase, int fifo_size, __u8 *buf, int len) | |||
1313 | actual++; | 1313 | actual++; |
1314 | } | 1314 | } |
1315 | 1315 | ||
1316 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 1316 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ ); |
1317 | return actual; | 1317 | return actual; |
1318 | } | 1318 | } |
1319 | 1319 | ||
@@ -1329,7 +1329,7 @@ static int ali_ircc_net_open(struct net_device *dev) | |||
1329 | int iobase; | 1329 | int iobase; |
1330 | char hwname[32]; | 1330 | char hwname[32]; |
1331 | 1331 | ||
1332 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); | 1332 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__ ); |
1333 | 1333 | ||
1334 | IRDA_ASSERT(dev != NULL, return -1;); | 1334 | IRDA_ASSERT(dev != NULL, return -1;); |
1335 | 1335 | ||
@@ -1375,7 +1375,7 @@ static int ali_ircc_net_open(struct net_device *dev) | |||
1375 | */ | 1375 | */ |
1376 | self->irlap = irlap_open(dev, &self->qos, hwname); | 1376 | self->irlap = irlap_open(dev, &self->qos, hwname); |
1377 | 1377 | ||
1378 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 1378 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ ); |
1379 | 1379 | ||
1380 | return 0; | 1380 | return 0; |
1381 | } | 1381 | } |
@@ -1392,7 +1392,7 @@ static int ali_ircc_net_close(struct net_device *dev) | |||
1392 | struct ali_ircc_cb *self; | 1392 | struct ali_ircc_cb *self; |
1393 | //int iobase; | 1393 | //int iobase; |
1394 | 1394 | ||
1395 | IRDA_DEBUG(4, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); | 1395 | IRDA_DEBUG(4, "%s(), ---------------- Start ----------------\n", __func__ ); |
1396 | 1396 | ||
1397 | IRDA_ASSERT(dev != NULL, return -1;); | 1397 | IRDA_ASSERT(dev != NULL, return -1;); |
1398 | 1398 | ||
@@ -1415,7 +1415,7 @@ static int ali_ircc_net_close(struct net_device *dev) | |||
1415 | free_irq(self->io.irq, dev); | 1415 | free_irq(self->io.irq, dev); |
1416 | free_dma(self->io.dma); | 1416 | free_dma(self->io.dma); |
1417 | 1417 | ||
1418 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 1418 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ ); |
1419 | 1419 | ||
1420 | return 0; | 1420 | return 0; |
1421 | } | 1421 | } |
@@ -1434,7 +1434,7 @@ static int ali_ircc_fir_hard_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1434 | __u32 speed; | 1434 | __u32 speed; |
1435 | int mtt, diff; | 1435 | int mtt, diff; |
1436 | 1436 | ||
1437 | IRDA_DEBUG(1, "%s(), ---------------- Start -----------------\n", __FUNCTION__ ); | 1437 | IRDA_DEBUG(1, "%s(), ---------------- Start -----------------\n", __func__ ); |
1438 | 1438 | ||
1439 | self = (struct ali_ircc_cb *) dev->priv; | 1439 | self = (struct ali_ircc_cb *) dev->priv; |
1440 | iobase = self->io.fir_base; | 1440 | iobase = self->io.fir_base; |
@@ -1488,7 +1488,7 @@ static int ali_ircc_fir_hard_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1488 | diff = self->now.tv_usec - self->stamp.tv_usec; | 1488 | diff = self->now.tv_usec - self->stamp.tv_usec; |
1489 | /* self->stamp is set from ali_ircc_dma_receive_complete() */ | 1489 | /* self->stamp is set from ali_ircc_dma_receive_complete() */ |
1490 | 1490 | ||
1491 | IRDA_DEBUG(1, "%s(), ******* diff = %d ******* \n", __FUNCTION__ , diff); | 1491 | IRDA_DEBUG(1, "%s(), ******* diff = %d ******* \n", __func__ , diff); |
1492 | 1492 | ||
1493 | if (diff < 0) | 1493 | if (diff < 0) |
1494 | diff += 1000000; | 1494 | diff += 1000000; |
@@ -1510,7 +1510,7 @@ static int ali_ircc_fir_hard_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1510 | /* Adjust for timer resolution */ | 1510 | /* Adjust for timer resolution */ |
1511 | mtt = (mtt+250) / 500; /* 4 discard, 5 get advanced, Let's round off */ | 1511 | mtt = (mtt+250) / 500; /* 4 discard, 5 get advanced, Let's round off */ |
1512 | 1512 | ||
1513 | IRDA_DEBUG(1, "%s(), ************** mtt = %d ***********\n", __FUNCTION__ , mtt); | 1513 | IRDA_DEBUG(1, "%s(), ************** mtt = %d ***********\n", __func__ , mtt); |
1514 | 1514 | ||
1515 | /* Setup timer */ | 1515 | /* Setup timer */ |
1516 | if (mtt == 1) /* 500 us */ | 1516 | if (mtt == 1) /* 500 us */ |
@@ -1567,7 +1567,7 @@ static int ali_ircc_fir_hard_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1567 | spin_unlock_irqrestore(&self->lock, flags); | 1567 | spin_unlock_irqrestore(&self->lock, flags); |
1568 | dev_kfree_skb(skb); | 1568 | dev_kfree_skb(skb); |
1569 | 1569 | ||
1570 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 1570 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ ); |
1571 | return 0; | 1571 | return 0; |
1572 | } | 1572 | } |
1573 | 1573 | ||
@@ -1578,7 +1578,7 @@ static void ali_ircc_dma_xmit(struct ali_ircc_cb *self) | |||
1578 | unsigned char FIFO_OPTI, Hi, Lo; | 1578 | unsigned char FIFO_OPTI, Hi, Lo; |
1579 | 1579 | ||
1580 | 1580 | ||
1581 | IRDA_DEBUG(1, "%s(), ---------------- Start -----------------\n", __FUNCTION__ ); | 1581 | IRDA_DEBUG(1, "%s(), ---------------- Start -----------------\n", __func__ ); |
1582 | 1582 | ||
1583 | iobase = self->io.fir_base; | 1583 | iobase = self->io.fir_base; |
1584 | 1584 | ||
@@ -1629,7 +1629,7 @@ static void ali_ircc_dma_xmit(struct ali_ircc_cb *self) | |||
1629 | tmp = inb(iobase+FIR_LCR_B); | 1629 | tmp = inb(iobase+FIR_LCR_B); |
1630 | tmp &= ~0x20; // Disable SIP | 1630 | tmp &= ~0x20; // Disable SIP |
1631 | outb(((unsigned char)(tmp & 0x3f) | LCR_B_TX_MODE) & ~LCR_B_BW, iobase+FIR_LCR_B); | 1631 | outb(((unsigned char)(tmp & 0x3f) | LCR_B_TX_MODE) & ~LCR_B_BW, iobase+FIR_LCR_B); |
1632 | IRDA_DEBUG(1, "%s(), ******* Change to TX mode: FIR_LCR_B = 0x%x ******* \n", __FUNCTION__ , inb(iobase+FIR_LCR_B)); | 1632 | IRDA_DEBUG(1, "%s(), ******* Change to TX mode: FIR_LCR_B = 0x%x ******* \n", __func__ , inb(iobase+FIR_LCR_B)); |
1633 | 1633 | ||
1634 | outb(0, iobase+FIR_LSR); | 1634 | outb(0, iobase+FIR_LSR); |
1635 | 1635 | ||
@@ -1639,7 +1639,7 @@ static void ali_ircc_dma_xmit(struct ali_ircc_cb *self) | |||
1639 | 1639 | ||
1640 | switch_bank(iobase, BANK0); | 1640 | switch_bank(iobase, BANK0); |
1641 | 1641 | ||
1642 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 1642 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ ); |
1643 | } | 1643 | } |
1644 | 1644 | ||
1645 | static int ali_ircc_dma_xmit_complete(struct ali_ircc_cb *self) | 1645 | static int ali_ircc_dma_xmit_complete(struct ali_ircc_cb *self) |
@@ -1647,7 +1647,7 @@ static int ali_ircc_dma_xmit_complete(struct ali_ircc_cb *self) | |||
1647 | int iobase; | 1647 | int iobase; |
1648 | int ret = TRUE; | 1648 | int ret = TRUE; |
1649 | 1649 | ||
1650 | IRDA_DEBUG(1, "%s(), ---------------- Start -----------------\n", __FUNCTION__ ); | 1650 | IRDA_DEBUG(1, "%s(), ---------------- Start -----------------\n", __func__ ); |
1651 | 1651 | ||
1652 | iobase = self->io.fir_base; | 1652 | iobase = self->io.fir_base; |
1653 | 1653 | ||
@@ -1660,7 +1660,7 @@ static int ali_ircc_dma_xmit_complete(struct ali_ircc_cb *self) | |||
1660 | if((inb(iobase+FIR_LSR) & LSR_FRAME_ABORT) == LSR_FRAME_ABORT) | 1660 | if((inb(iobase+FIR_LSR) & LSR_FRAME_ABORT) == LSR_FRAME_ABORT) |
1661 | 1661 | ||
1662 | { | 1662 | { |
1663 | IRDA_ERROR("%s(), ********* LSR_FRAME_ABORT *********\n", __FUNCTION__); | 1663 | IRDA_ERROR("%s(), ********* LSR_FRAME_ABORT *********\n", __func__); |
1664 | self->stats.tx_errors++; | 1664 | self->stats.tx_errors++; |
1665 | self->stats.tx_fifo_errors++; | 1665 | self->stats.tx_fifo_errors++; |
1666 | } | 1666 | } |
@@ -1703,7 +1703,7 @@ static int ali_ircc_dma_xmit_complete(struct ali_ircc_cb *self) | |||
1703 | 1703 | ||
1704 | switch_bank(iobase, BANK0); | 1704 | switch_bank(iobase, BANK0); |
1705 | 1705 | ||
1706 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 1706 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ ); |
1707 | return ret; | 1707 | return ret; |
1708 | } | 1708 | } |
1709 | 1709 | ||
@@ -1718,7 +1718,7 @@ static int ali_ircc_dma_receive(struct ali_ircc_cb *self) | |||
1718 | { | 1718 | { |
1719 | int iobase, tmp; | 1719 | int iobase, tmp; |
1720 | 1720 | ||
1721 | IRDA_DEBUG(1, "%s(), ---------------- Start -----------------\n", __FUNCTION__ ); | 1721 | IRDA_DEBUG(1, "%s(), ---------------- Start -----------------\n", __func__ ); |
1722 | 1722 | ||
1723 | iobase = self->io.fir_base; | 1723 | iobase = self->io.fir_base; |
1724 | 1724 | ||
@@ -1756,7 +1756,7 @@ static int ali_ircc_dma_receive(struct ali_ircc_cb *self) | |||
1756 | //switch_bank(iobase, BANK0); | 1756 | //switch_bank(iobase, BANK0); |
1757 | tmp = inb(iobase+FIR_LCR_B); | 1757 | tmp = inb(iobase+FIR_LCR_B); |
1758 | outb((unsigned char)(tmp &0x3f) | LCR_B_RX_MODE | LCR_B_BW , iobase + FIR_LCR_B); // 2000/12/1 05:16PM | 1758 | outb((unsigned char)(tmp &0x3f) | LCR_B_RX_MODE | LCR_B_BW , iobase + FIR_LCR_B); // 2000/12/1 05:16PM |
1759 | IRDA_DEBUG(1, "%s(), *** Change To RX mode: FIR_LCR_B = 0x%x *** \n", __FUNCTION__ , inb(iobase+FIR_LCR_B)); | 1759 | IRDA_DEBUG(1, "%s(), *** Change To RX mode: FIR_LCR_B = 0x%x *** \n", __func__ , inb(iobase+FIR_LCR_B)); |
1760 | 1760 | ||
1761 | /* Set Rx Threshold */ | 1761 | /* Set Rx Threshold */ |
1762 | switch_bank(iobase, BANK1); | 1762 | switch_bank(iobase, BANK1); |
@@ -1768,7 +1768,7 @@ static int ali_ircc_dma_receive(struct ali_ircc_cb *self) | |||
1768 | outb(CR_DMA_EN | CR_DMA_BURST, iobase+FIR_CR); | 1768 | outb(CR_DMA_EN | CR_DMA_BURST, iobase+FIR_CR); |
1769 | 1769 | ||
1770 | switch_bank(iobase, BANK0); | 1770 | switch_bank(iobase, BANK0); |
1771 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 1771 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ ); |
1772 | return 0; | 1772 | return 0; |
1773 | } | 1773 | } |
1774 | 1774 | ||
@@ -1779,7 +1779,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self) | |||
1779 | __u8 status, MessageCount; | 1779 | __u8 status, MessageCount; |
1780 | int len, i, iobase, val; | 1780 | int len, i, iobase, val; |
1781 | 1781 | ||
1782 | IRDA_DEBUG(1, "%s(), ---------------- Start -----------------\n", __FUNCTION__ ); | 1782 | IRDA_DEBUG(1, "%s(), ---------------- Start -----------------\n", __func__ ); |
1783 | 1783 | ||
1784 | st_fifo = &self->st_fifo; | 1784 | st_fifo = &self->st_fifo; |
1785 | iobase = self->io.fir_base; | 1785 | iobase = self->io.fir_base; |
@@ -1788,7 +1788,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self) | |||
1788 | MessageCount = inb(iobase+ FIR_LSR)&0x07; | 1788 | MessageCount = inb(iobase+ FIR_LSR)&0x07; |
1789 | 1789 | ||
1790 | if (MessageCount > 0) | 1790 | if (MessageCount > 0) |
1791 | IRDA_DEBUG(0, "%s(), Messsage count = %d,\n", __FUNCTION__ , MessageCount); | 1791 | IRDA_DEBUG(0, "%s(), Messsage count = %d,\n", __func__ , MessageCount); |
1792 | 1792 | ||
1793 | for (i=0; i<=MessageCount; i++) | 1793 | for (i=0; i<=MessageCount; i++) |
1794 | { | 1794 | { |
@@ -1801,11 +1801,11 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self) | |||
1801 | len = len << 8; | 1801 | len = len << 8; |
1802 | len |= inb(iobase+FIR_RX_DSR_LO); | 1802 | len |= inb(iobase+FIR_RX_DSR_LO); |
1803 | 1803 | ||
1804 | IRDA_DEBUG(1, "%s(), RX Length = 0x%.2x,\n", __FUNCTION__ , len); | 1804 | IRDA_DEBUG(1, "%s(), RX Length = 0x%.2x,\n", __func__ , len); |
1805 | IRDA_DEBUG(1, "%s(), RX Status = 0x%.2x,\n", __FUNCTION__ , status); | 1805 | IRDA_DEBUG(1, "%s(), RX Status = 0x%.2x,\n", __func__ , status); |
1806 | 1806 | ||
1807 | if (st_fifo->tail >= MAX_RX_WINDOW) { | 1807 | if (st_fifo->tail >= MAX_RX_WINDOW) { |
1808 | IRDA_DEBUG(0, "%s(), window is full!\n", __FUNCTION__ ); | 1808 | IRDA_DEBUG(0, "%s(), window is full!\n", __func__ ); |
1809 | continue; | 1809 | continue; |
1810 | } | 1810 | } |
1811 | 1811 | ||
@@ -1828,7 +1828,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self) | |||
1828 | /* Check for errors */ | 1828 | /* Check for errors */ |
1829 | if ((status & 0xd8) || self->rcvFramesOverflow || (len==0)) | 1829 | if ((status & 0xd8) || self->rcvFramesOverflow || (len==0)) |
1830 | { | 1830 | { |
1831 | IRDA_DEBUG(0,"%s(), ************* RX Errors ************ \n", __FUNCTION__ ); | 1831 | IRDA_DEBUG(0,"%s(), ************* RX Errors ************ \n", __func__ ); |
1832 | 1832 | ||
1833 | /* Skip frame */ | 1833 | /* Skip frame */ |
1834 | self->stats.rx_errors++; | 1834 | self->stats.rx_errors++; |
@@ -1838,29 +1838,29 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self) | |||
1838 | if (status & LSR_FIFO_UR) | 1838 | if (status & LSR_FIFO_UR) |
1839 | { | 1839 | { |
1840 | self->stats.rx_frame_errors++; | 1840 | self->stats.rx_frame_errors++; |
1841 | IRDA_DEBUG(0,"%s(), ************* FIFO Errors ************ \n", __FUNCTION__ ); | 1841 | IRDA_DEBUG(0,"%s(), ************* FIFO Errors ************ \n", __func__ ); |
1842 | } | 1842 | } |
1843 | if (status & LSR_FRAME_ERROR) | 1843 | if (status & LSR_FRAME_ERROR) |
1844 | { | 1844 | { |
1845 | self->stats.rx_frame_errors++; | 1845 | self->stats.rx_frame_errors++; |
1846 | IRDA_DEBUG(0,"%s(), ************* FRAME Errors ************ \n", __FUNCTION__ ); | 1846 | IRDA_DEBUG(0,"%s(), ************* FRAME Errors ************ \n", __func__ ); |
1847 | } | 1847 | } |
1848 | 1848 | ||
1849 | if (status & LSR_CRC_ERROR) | 1849 | if (status & LSR_CRC_ERROR) |
1850 | { | 1850 | { |
1851 | self->stats.rx_crc_errors++; | 1851 | self->stats.rx_crc_errors++; |
1852 | IRDA_DEBUG(0,"%s(), ************* CRC Errors ************ \n", __FUNCTION__ ); | 1852 | IRDA_DEBUG(0,"%s(), ************* CRC Errors ************ \n", __func__ ); |
1853 | } | 1853 | } |
1854 | 1854 | ||
1855 | if(self->rcvFramesOverflow) | 1855 | if(self->rcvFramesOverflow) |
1856 | { | 1856 | { |
1857 | self->stats.rx_frame_errors++; | 1857 | self->stats.rx_frame_errors++; |
1858 | IRDA_DEBUG(0,"%s(), ************* Overran DMA buffer ************ \n", __FUNCTION__ ); | 1858 | IRDA_DEBUG(0,"%s(), ************* Overran DMA buffer ************ \n", __func__ ); |
1859 | } | 1859 | } |
1860 | if(len == 0) | 1860 | if(len == 0) |
1861 | { | 1861 | { |
1862 | self->stats.rx_frame_errors++; | 1862 | self->stats.rx_frame_errors++; |
1863 | IRDA_DEBUG(0,"%s(), ********** Receive Frame Size = 0 ********* \n", __FUNCTION__ ); | 1863 | IRDA_DEBUG(0,"%s(), ********** Receive Frame Size = 0 ********* \n", __func__ ); |
1864 | } | 1864 | } |
1865 | } | 1865 | } |
1866 | else | 1866 | else |
@@ -1872,7 +1872,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self) | |||
1872 | val = inb(iobase+FIR_BSR); | 1872 | val = inb(iobase+FIR_BSR); |
1873 | if ((val& BSR_FIFO_NOT_EMPTY)== 0x80) | 1873 | if ((val& BSR_FIFO_NOT_EMPTY)== 0x80) |
1874 | { | 1874 | { |
1875 | IRDA_DEBUG(0, "%s(), ************* BSR_FIFO_NOT_EMPTY ************ \n", __FUNCTION__ ); | 1875 | IRDA_DEBUG(0, "%s(), ************* BSR_FIFO_NOT_EMPTY ************ \n", __func__ ); |
1876 | 1876 | ||
1877 | /* Put this entry back in fifo */ | 1877 | /* Put this entry back in fifo */ |
1878 | st_fifo->head--; | 1878 | st_fifo->head--; |
@@ -1909,7 +1909,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self) | |||
1909 | { | 1909 | { |
1910 | IRDA_WARNING("%s(), memory squeeze, " | 1910 | IRDA_WARNING("%s(), memory squeeze, " |
1911 | "dropping frame.\n", | 1911 | "dropping frame.\n", |
1912 | __FUNCTION__); | 1912 | __func__); |
1913 | self->stats.rx_dropped++; | 1913 | self->stats.rx_dropped++; |
1914 | 1914 | ||
1915 | return FALSE; | 1915 | return FALSE; |
@@ -1937,7 +1937,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self) | |||
1937 | 1937 | ||
1938 | switch_bank(iobase, BANK0); | 1938 | switch_bank(iobase, BANK0); |
1939 | 1939 | ||
1940 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 1940 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ ); |
1941 | return TRUE; | 1941 | return TRUE; |
1942 | } | 1942 | } |
1943 | 1943 | ||
@@ -1956,7 +1956,7 @@ static int ali_ircc_sir_hard_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1956 | int iobase; | 1956 | int iobase; |
1957 | __u32 speed; | 1957 | __u32 speed; |
1958 | 1958 | ||
1959 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); | 1959 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__ ); |
1960 | 1960 | ||
1961 | IRDA_ASSERT(dev != NULL, return 0;); | 1961 | IRDA_ASSERT(dev != NULL, return 0;); |
1962 | 1962 | ||
@@ -2005,7 +2005,7 @@ static int ali_ircc_sir_hard_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2005 | 2005 | ||
2006 | dev_kfree_skb(skb); | 2006 | dev_kfree_skb(skb); |
2007 | 2007 | ||
2008 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 2008 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ ); |
2009 | 2009 | ||
2010 | return 0; | 2010 | return 0; |
2011 | } | 2011 | } |
@@ -2024,7 +2024,7 @@ static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
2024 | unsigned long flags; | 2024 | unsigned long flags; |
2025 | int ret = 0; | 2025 | int ret = 0; |
2026 | 2026 | ||
2027 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); | 2027 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__ ); |
2028 | 2028 | ||
2029 | IRDA_ASSERT(dev != NULL, return -1;); | 2029 | IRDA_ASSERT(dev != NULL, return -1;); |
2030 | 2030 | ||
@@ -2032,11 +2032,11 @@ static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
2032 | 2032 | ||
2033 | IRDA_ASSERT(self != NULL, return -1;); | 2033 | IRDA_ASSERT(self != NULL, return -1;); |
2034 | 2034 | ||
2035 | IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __FUNCTION__ , dev->name, cmd); | 2035 | IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __func__ , dev->name, cmd); |
2036 | 2036 | ||
2037 | switch (cmd) { | 2037 | switch (cmd) { |
2038 | case SIOCSBANDWIDTH: /* Set bandwidth */ | 2038 | case SIOCSBANDWIDTH: /* Set bandwidth */ |
2039 | IRDA_DEBUG(1, "%s(), SIOCSBANDWIDTH\n", __FUNCTION__ ); | 2039 | IRDA_DEBUG(1, "%s(), SIOCSBANDWIDTH\n", __func__ ); |
2040 | /* | 2040 | /* |
2041 | * This function will also be used by IrLAP to change the | 2041 | * This function will also be used by IrLAP to change the |
2042 | * speed, so we still must allow for speed change within | 2042 | * speed, so we still must allow for speed change within |
@@ -2050,13 +2050,13 @@ static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
2050 | spin_unlock_irqrestore(&self->lock, flags); | 2050 | spin_unlock_irqrestore(&self->lock, flags); |
2051 | break; | 2051 | break; |
2052 | case SIOCSMEDIABUSY: /* Set media busy */ | 2052 | case SIOCSMEDIABUSY: /* Set media busy */ |
2053 | IRDA_DEBUG(1, "%s(), SIOCSMEDIABUSY\n", __FUNCTION__ ); | 2053 | IRDA_DEBUG(1, "%s(), SIOCSMEDIABUSY\n", __func__ ); |
2054 | if (!capable(CAP_NET_ADMIN)) | 2054 | if (!capable(CAP_NET_ADMIN)) |
2055 | return -EPERM; | 2055 | return -EPERM; |
2056 | irda_device_set_media_busy(self->netdev, TRUE); | 2056 | irda_device_set_media_busy(self->netdev, TRUE); |
2057 | break; | 2057 | break; |
2058 | case SIOCGRECEIVING: /* Check if we are receiving right now */ | 2058 | case SIOCGRECEIVING: /* Check if we are receiving right now */ |
2059 | IRDA_DEBUG(2, "%s(), SIOCGRECEIVING\n", __FUNCTION__ ); | 2059 | IRDA_DEBUG(2, "%s(), SIOCGRECEIVING\n", __func__ ); |
2060 | /* This is protected */ | 2060 | /* This is protected */ |
2061 | irq->ifr_receiving = ali_ircc_is_receiving(self); | 2061 | irq->ifr_receiving = ali_ircc_is_receiving(self); |
2062 | break; | 2062 | break; |
@@ -2064,7 +2064,7 @@ static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
2064 | ret = -EOPNOTSUPP; | 2064 | ret = -EOPNOTSUPP; |
2065 | } | 2065 | } |
2066 | 2066 | ||
2067 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 2067 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ ); |
2068 | 2068 | ||
2069 | return ret; | 2069 | return ret; |
2070 | } | 2070 | } |
@@ -2081,7 +2081,7 @@ static int ali_ircc_is_receiving(struct ali_ircc_cb *self) | |||
2081 | int status = FALSE; | 2081 | int status = FALSE; |
2082 | int iobase; | 2082 | int iobase; |
2083 | 2083 | ||
2084 | IRDA_DEBUG(2, "%s(), ---------------- Start -----------------\n", __FUNCTION__ ); | 2084 | IRDA_DEBUG(2, "%s(), ---------------- Start -----------------\n", __func__ ); |
2085 | 2085 | ||
2086 | IRDA_ASSERT(self != NULL, return FALSE;); | 2086 | IRDA_ASSERT(self != NULL, return FALSE;); |
2087 | 2087 | ||
@@ -2095,7 +2095,7 @@ static int ali_ircc_is_receiving(struct ali_ircc_cb *self) | |||
2095 | if((inb(iobase+FIR_FIFO_FR) & 0x3f) != 0) | 2095 | if((inb(iobase+FIR_FIFO_FR) & 0x3f) != 0) |
2096 | { | 2096 | { |
2097 | /* We are receiving something */ | 2097 | /* We are receiving something */ |
2098 | IRDA_DEBUG(1, "%s(), We are receiving something\n", __FUNCTION__ ); | 2098 | IRDA_DEBUG(1, "%s(), We are receiving something\n", __func__ ); |
2099 | status = TRUE; | 2099 | status = TRUE; |
2100 | } | 2100 | } |
2101 | switch_bank(iobase, BANK0); | 2101 | switch_bank(iobase, BANK0); |
@@ -2107,7 +2107,7 @@ static int ali_ircc_is_receiving(struct ali_ircc_cb *self) | |||
2107 | 2107 | ||
2108 | spin_unlock_irqrestore(&self->lock, flags); | 2108 | spin_unlock_irqrestore(&self->lock, flags); |
2109 | 2109 | ||
2110 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 2110 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ ); |
2111 | 2111 | ||
2112 | return status; | 2112 | return status; |
2113 | } | 2113 | } |
@@ -2116,9 +2116,9 @@ static struct net_device_stats *ali_ircc_net_get_stats(struct net_device *dev) | |||
2116 | { | 2116 | { |
2117 | struct ali_ircc_cb *self = (struct ali_ircc_cb *) dev->priv; | 2117 | struct ali_ircc_cb *self = (struct ali_ircc_cb *) dev->priv; |
2118 | 2118 | ||
2119 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); | 2119 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __func__ ); |
2120 | 2120 | ||
2121 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 2121 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ ); |
2122 | 2122 | ||
2123 | return &self->stats; | 2123 | return &self->stats; |
2124 | } | 2124 | } |
@@ -2164,7 +2164,7 @@ static void SetCOMInterrupts(struct ali_ircc_cb *self , unsigned char enable) | |||
2164 | 2164 | ||
2165 | int iobase = self->io.fir_base; /* or sir_base */ | 2165 | int iobase = self->io.fir_base; /* or sir_base */ |
2166 | 2166 | ||
2167 | IRDA_DEBUG(2, "%s(), -------- Start -------- ( Enable = %d )\n", __FUNCTION__ , enable); | 2167 | IRDA_DEBUG(2, "%s(), -------- Start -------- ( Enable = %d )\n", __func__ , enable); |
2168 | 2168 | ||
2169 | /* Enable the interrupt which we wish to */ | 2169 | /* Enable the interrupt which we wish to */ |
2170 | if (enable){ | 2170 | if (enable){ |
@@ -2205,14 +2205,14 @@ static void SetCOMInterrupts(struct ali_ircc_cb *self , unsigned char enable) | |||
2205 | else | 2205 | else |
2206 | outb(newMask, iobase+UART_IER); | 2206 | outb(newMask, iobase+UART_IER); |
2207 | 2207 | ||
2208 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 2208 | IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __func__ ); |
2209 | } | 2209 | } |
2210 | 2210 | ||
2211 | static void SIR2FIR(int iobase) | 2211 | static void SIR2FIR(int iobase) |
2212 | { | 2212 | { |
2213 | //unsigned char tmp; | 2213 | //unsigned char tmp; |
2214 | 2214 | ||
2215 | IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); | 2215 | IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __func__ ); |
2216 | 2216 | ||
2217 | /* Already protected (change_speed() or setup()), no need to lock. | 2217 | /* Already protected (change_speed() or setup()), no need to lock. |
2218 | * Jean II */ | 2218 | * Jean II */ |
@@ -2228,14 +2228,14 @@ static void SIR2FIR(int iobase) | |||
2228 | //tmp |= 0x20; | 2228 | //tmp |= 0x20; |
2229 | //outb(tmp, iobase+FIR_LCR_B); | 2229 | //outb(tmp, iobase+FIR_LCR_B); |
2230 | 2230 | ||
2231 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 2231 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ ); |
2232 | } | 2232 | } |
2233 | 2233 | ||
2234 | static void FIR2SIR(int iobase) | 2234 | static void FIR2SIR(int iobase) |
2235 | { | 2235 | { |
2236 | unsigned char val; | 2236 | unsigned char val; |
2237 | 2237 | ||
2238 | IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); | 2238 | IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __func__ ); |
2239 | 2239 | ||
2240 | /* Already protected (change_speed() or setup()), no need to lock. | 2240 | /* Already protected (change_speed() or setup()), no need to lock. |
2241 | * Jean II */ | 2241 | * Jean II */ |
@@ -2251,7 +2251,7 @@ static void FIR2SIR(int iobase) | |||
2251 | val = inb(iobase+UART_LSR); | 2251 | val = inb(iobase+UART_LSR); |
2252 | val = inb(iobase+UART_MSR); | 2252 | val = inb(iobase+UART_MSR); |
2253 | 2253 | ||
2254 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); | 2254 | IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __func__ ); |
2255 | } | 2255 | } |
2256 | 2256 | ||
2257 | MODULE_AUTHOR("Benjamin Kong <benjamin_kong@ali.com.tw>"); | 2257 | MODULE_AUTHOR("Benjamin Kong <benjamin_kong@ali.com.tw>"); |