diff options
author | Joe Perches <joe@perches.com> | 2011-05-09 05:45:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-09 15:51:14 -0400 |
commit | 54668b84bd2ee808e6b43ed9bd7aa3338fa95857 (patch) | |
tree | d9ee33efba238f53199a2cc02538233e23e892ad | |
parent | 4a9e25d8de3e1435a0b5155e0195de20744894fe (diff) |
tulip: xircom_cb: Convert #ifdef DEBUG blocks and enter/leave uses
Change the blocks that are guarded by #if DEBUG to
be #if defined DEBUG && DEBUG > 1 so that pr_debug
can be used later.
Remove enter/leave macros and uses.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/tulip/xircom_cb.c | 134 |
1 files changed, 13 insertions, 121 deletions
diff --git a/drivers/net/tulip/xircom_cb.c b/drivers/net/tulip/xircom_cb.c index 5a73752be2ca..d0d0cbe3dc17 100644 --- a/drivers/net/tulip/xircom_cb.c +++ b/drivers/net/tulip/xircom_cb.c | |||
@@ -37,15 +37,6 @@ | |||
37 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #ifdef DEBUG | ||
41 | #define enter(x) printk("Enter: %s, %s line %i\n",x,__FILE__,__LINE__) | ||
42 | #define leave(x) printk("Leave: %s, %s line %i\n",x,__FILE__,__LINE__) | ||
43 | #else | ||
44 | #define enter(x) do {} while (0) | ||
45 | #define leave(x) do {} while (0) | ||
46 | #endif | ||
47 | |||
48 | |||
49 | MODULE_DESCRIPTION("Xircom Cardbus ethernet driver"); | 40 | MODULE_DESCRIPTION("Xircom Cardbus ethernet driver"); |
50 | MODULE_AUTHOR("Arjan van de Ven <arjanv@redhat.com>"); | 41 | MODULE_AUTHOR("Arjan van de Ven <arjanv@redhat.com>"); |
51 | MODULE_LICENSE("GPL"); | 42 | MODULE_LICENSE("GPL"); |
@@ -161,7 +152,7 @@ static struct pci_driver xircom_ops = { | |||
161 | }; | 152 | }; |
162 | 153 | ||
163 | 154 | ||
164 | #ifdef DEBUG | 155 | #if defined DEBUG && DEBUG > 1 |
165 | static void print_binary(unsigned int number) | 156 | static void print_binary(unsigned int number) |
166 | { | 157 | { |
167 | int i,i2; | 158 | int i,i2; |
@@ -176,7 +167,7 @@ static void print_binary(unsigned int number) | |||
176 | if ((i&3)==0) | 167 | if ((i&3)==0) |
177 | buffer[i2++]=' '; | 168 | buffer[i2++]=' '; |
178 | } | 169 | } |
179 | printk("%s\n",buffer); | 170 | pr_debug("%s\n",buffer); |
180 | } | 171 | } |
181 | #endif | 172 | #endif |
182 | 173 | ||
@@ -205,7 +196,6 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_ | |||
205 | struct xircom_private *private; | 196 | struct xircom_private *private; |
206 | unsigned long flags; | 197 | unsigned long flags; |
207 | unsigned short tmp16; | 198 | unsigned short tmp16; |
208 | enter("xircom_probe"); | ||
209 | 199 | ||
210 | /* First do the PCI initialisation */ | 200 | /* First do the PCI initialisation */ |
211 | 201 | ||
@@ -285,7 +275,6 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_ | |||
285 | 275 | ||
286 | trigger_receive(private); | 276 | trigger_receive(private); |
287 | 277 | ||
288 | leave("xircom_probe"); | ||
289 | return 0; | 278 | return 0; |
290 | 279 | ||
291 | reg_fail: | 280 | reg_fail: |
@@ -310,7 +299,6 @@ static void __devexit xircom_remove(struct pci_dev *pdev) | |||
310 | struct net_device *dev = pci_get_drvdata(pdev); | 299 | struct net_device *dev = pci_get_drvdata(pdev); |
311 | struct xircom_private *card = netdev_priv(dev); | 300 | struct xircom_private *card = netdev_priv(dev); |
312 | 301 | ||
313 | enter("xircom_remove"); | ||
314 | pci_free_consistent(pdev,8192,card->rx_buffer,card->rx_dma_handle); | 302 | pci_free_consistent(pdev,8192,card->rx_buffer,card->rx_dma_handle); |
315 | pci_free_consistent(pdev,8192,card->tx_buffer,card->tx_dma_handle); | 303 | pci_free_consistent(pdev,8192,card->tx_buffer,card->tx_dma_handle); |
316 | 304 | ||
@@ -318,7 +306,6 @@ static void __devexit xircom_remove(struct pci_dev *pdev) | |||
318 | unregister_netdev(dev); | 306 | unregister_netdev(dev); |
319 | free_netdev(dev); | 307 | free_netdev(dev); |
320 | pci_set_drvdata(pdev, NULL); | 308 | pci_set_drvdata(pdev, NULL); |
321 | leave("xircom_remove"); | ||
322 | } | 309 | } |
323 | 310 | ||
324 | static irqreturn_t xircom_interrupt(int irq, void *dev_instance) | 311 | static irqreturn_t xircom_interrupt(int irq, void *dev_instance) |
@@ -328,17 +315,15 @@ static irqreturn_t xircom_interrupt(int irq, void *dev_instance) | |||
328 | unsigned int status; | 315 | unsigned int status; |
329 | int i; | 316 | int i; |
330 | 317 | ||
331 | enter("xircom_interrupt\n"); | ||
332 | |||
333 | spin_lock(&card->lock); | 318 | spin_lock(&card->lock); |
334 | status = inl(card->io_port+CSR5); | 319 | status = inl(card->io_port+CSR5); |
335 | 320 | ||
336 | #ifdef DEBUG | 321 | #if defined DEBUG && DEBUG > 1 |
337 | print_binary(status); | 322 | print_binary(status); |
338 | printk("tx status 0x%08x 0x%08x\n", | 323 | pr_debug("tx status 0x%08x 0x%08x\n", |
339 | card->tx_buffer[0], card->tx_buffer[4]); | 324 | card->tx_buffer[0], card->tx_buffer[4]); |
340 | printk("rx status 0x%08x 0x%08x\n", | 325 | pr_debug("rx status 0x%08x 0x%08x\n", |
341 | card->rx_buffer[0], card->rx_buffer[4]); | 326 | card->rx_buffer[0], card->rx_buffer[4]); |
342 | #endif | 327 | #endif |
343 | /* Handle shared irq and hotplug */ | 328 | /* Handle shared irq and hotplug */ |
344 | if (status == 0 || status == 0xffffffff) { | 329 | if (status == 0 || status == 0xffffffff) { |
@@ -369,9 +354,7 @@ static irqreturn_t xircom_interrupt(int irq, void *dev_instance) | |||
369 | for (i=0;i<NUMDESCRIPTORS;i++) | 354 | for (i=0;i<NUMDESCRIPTORS;i++) |
370 | investigate_read_descriptor(dev,card,i,bufferoffsets[i]); | 355 | investigate_read_descriptor(dev,card,i,bufferoffsets[i]); |
371 | 356 | ||
372 | |||
373 | spin_unlock(&card->lock); | 357 | spin_unlock(&card->lock); |
374 | leave("xircom_interrupt"); | ||
375 | return IRQ_HANDLED; | 358 | return IRQ_HANDLED; |
376 | } | 359 | } |
377 | 360 | ||
@@ -382,7 +365,6 @@ static netdev_tx_t xircom_start_xmit(struct sk_buff *skb, | |||
382 | unsigned long flags; | 365 | unsigned long flags; |
383 | int nextdescriptor; | 366 | int nextdescriptor; |
384 | int desc; | 367 | int desc; |
385 | enter("xircom_start_xmit"); | ||
386 | 368 | ||
387 | card = netdev_priv(dev); | 369 | card = netdev_priv(dev); |
388 | spin_lock_irqsave(&card->lock,flags); | 370 | spin_lock_irqsave(&card->lock,flags); |
@@ -424,13 +406,10 @@ static netdev_tx_t xircom_start_xmit(struct sk_buff *skb, | |||
424 | netif_stop_queue(dev); | 406 | netif_stop_queue(dev); |
425 | } | 407 | } |
426 | card->transmit_used = nextdescriptor; | 408 | card->transmit_used = nextdescriptor; |
427 | leave("xircom-start_xmit - sent"); | ||
428 | spin_unlock_irqrestore(&card->lock,flags); | 409 | spin_unlock_irqrestore(&card->lock,flags); |
429 | return NETDEV_TX_OK; | 410 | return NETDEV_TX_OK; |
430 | } | 411 | } |
431 | 412 | ||
432 | |||
433 | |||
434 | /* Uh oh... no free descriptor... drop the packet */ | 413 | /* Uh oh... no free descriptor... drop the packet */ |
435 | netif_stop_queue(dev); | 414 | netif_stop_queue(dev); |
436 | spin_unlock_irqrestore(&card->lock,flags); | 415 | spin_unlock_irqrestore(&card->lock,flags); |
@@ -446,18 +425,16 @@ static int xircom_open(struct net_device *dev) | |||
446 | { | 425 | { |
447 | struct xircom_private *xp = netdev_priv(dev); | 426 | struct xircom_private *xp = netdev_priv(dev); |
448 | int retval; | 427 | int retval; |
449 | enter("xircom_open"); | 428 | |
450 | pr_info("xircom cardbus adaptor found, registering as %s, using irq %i\n", | 429 | pr_info("xircom cardbus adaptor found, registering as %s, using irq %i\n", |
451 | dev->name, dev->irq); | 430 | dev->name, dev->irq); |
452 | retval = request_irq(dev->irq, xircom_interrupt, IRQF_SHARED, dev->name, dev); | 431 | retval = request_irq(dev->irq, xircom_interrupt, IRQF_SHARED, dev->name, dev); |
453 | if (retval) { | 432 | if (retval) |
454 | leave("xircom_open - No IRQ"); | ||
455 | return retval; | 433 | return retval; |
456 | } | ||
457 | 434 | ||
458 | xircom_up(xp); | 435 | xircom_up(xp); |
459 | xp->open = 1; | 436 | xp->open = 1; |
460 | leave("xircom_open"); | 437 | |
461 | return 0; | 438 | return 0; |
462 | } | 439 | } |
463 | 440 | ||
@@ -466,7 +443,6 @@ static int xircom_close(struct net_device *dev) | |||
466 | struct xircom_private *card; | 443 | struct xircom_private *card; |
467 | unsigned long flags; | 444 | unsigned long flags; |
468 | 445 | ||
469 | enter("xircom_close"); | ||
470 | card = netdev_priv(dev); | 446 | card = netdev_priv(dev); |
471 | netif_stop_queue(dev); /* we don't want new packets */ | 447 | netif_stop_queue(dev); /* we don't want new packets */ |
472 | 448 | ||
@@ -486,8 +462,6 @@ static int xircom_close(struct net_device *dev) | |||
486 | card->open = 0; | 462 | card->open = 0; |
487 | free_irq(dev->irq,dev); | 463 | free_irq(dev->irq,dev); |
488 | 464 | ||
489 | leave("xircom_close"); | ||
490 | |||
491 | return 0; | 465 | return 0; |
492 | 466 | ||
493 | } | 467 | } |
@@ -507,8 +481,6 @@ static void initialize_card(struct xircom_private *card) | |||
507 | { | 481 | { |
508 | unsigned int val; | 482 | unsigned int val; |
509 | unsigned long flags; | 483 | unsigned long flags; |
510 | enter("initialize_card"); | ||
511 | |||
512 | 484 | ||
513 | spin_lock_irqsave(&card->lock, flags); | 485 | spin_lock_irqsave(&card->lock, flags); |
514 | 486 | ||
@@ -534,8 +506,6 @@ static void initialize_card(struct xircom_private *card) | |||
534 | deactivate_transmitter(card); | 506 | deactivate_transmitter(card); |
535 | 507 | ||
536 | spin_unlock_irqrestore(&card->lock, flags); | 508 | spin_unlock_irqrestore(&card->lock, flags); |
537 | |||
538 | leave("initialize_card"); | ||
539 | } | 509 | } |
540 | 510 | ||
541 | /* | 511 | /* |
@@ -547,12 +517,9 @@ ignored; I chose zero. | |||
547 | static void trigger_transmit(struct xircom_private *card) | 517 | static void trigger_transmit(struct xircom_private *card) |
548 | { | 518 | { |
549 | unsigned int val; | 519 | unsigned int val; |
550 | enter("trigger_transmit"); | ||
551 | 520 | ||
552 | val = 0; | 521 | val = 0; |
553 | outl(val, card->io_port + CSR1); | 522 | outl(val, card->io_port + CSR1); |
554 | |||
555 | leave("trigger_transmit"); | ||
556 | } | 523 | } |
557 | 524 | ||
558 | /* | 525 | /* |
@@ -565,12 +532,9 @@ ignored; I chose zero. | |||
565 | static void trigger_receive(struct xircom_private *card) | 532 | static void trigger_receive(struct xircom_private *card) |
566 | { | 533 | { |
567 | unsigned int val; | 534 | unsigned int val; |
568 | enter("trigger_receive"); | ||
569 | 535 | ||
570 | val = 0; | 536 | val = 0; |
571 | outl(val, card->io_port + CSR2); | 537 | outl(val, card->io_port + CSR2); |
572 | |||
573 | leave("trigger_receive"); | ||
574 | } | 538 | } |
575 | 539 | ||
576 | /* | 540 | /* |
@@ -581,8 +545,6 @@ static void setup_descriptors(struct xircom_private *card) | |||
581 | { | 545 | { |
582 | u32 address; | 546 | u32 address; |
583 | int i; | 547 | int i; |
584 | enter("setup_descriptors"); | ||
585 | |||
586 | 548 | ||
587 | BUG_ON(card->rx_buffer == NULL); | 549 | BUG_ON(card->rx_buffer == NULL); |
588 | BUG_ON(card->tx_buffer == NULL); | 550 | BUG_ON(card->tx_buffer == NULL); |
@@ -636,8 +598,6 @@ static void setup_descriptors(struct xircom_private *card) | |||
636 | /* wite the transmit descriptor ring to the card */ | 598 | /* wite the transmit descriptor ring to the card */ |
637 | address = card->tx_dma_handle; | 599 | address = card->tx_dma_handle; |
638 | outl(address, card->io_port + CSR4); /* xmit descr list address */ | 600 | outl(address, card->io_port + CSR4); /* xmit descr list address */ |
639 | |||
640 | leave("setup_descriptors"); | ||
641 | } | 601 | } |
642 | 602 | ||
643 | /* | 603 | /* |
@@ -647,13 +607,10 @@ valid by setting the address in the card to 0x00. | |||
647 | static void remove_descriptors(struct xircom_private *card) | 607 | static void remove_descriptors(struct xircom_private *card) |
648 | { | 608 | { |
649 | unsigned int val; | 609 | unsigned int val; |
650 | enter("remove_descriptors"); | ||
651 | 610 | ||
652 | val = 0; | 611 | val = 0; |
653 | outl(val, card->io_port + CSR3); /* Receive descriptor address */ | 612 | outl(val, card->io_port + CSR3); /* Receive descriptor address */ |
654 | outl(val, card->io_port + CSR4); /* Send descriptor address */ | 613 | outl(val, card->io_port + CSR4); /* Send descriptor address */ |
655 | |||
656 | leave("remove_descriptors"); | ||
657 | } | 614 | } |
658 | 615 | ||
659 | /* | 616 | /* |
@@ -665,21 +622,17 @@ This function also clears the status-bit. | |||
665 | static int link_status_changed(struct xircom_private *card) | 622 | static int link_status_changed(struct xircom_private *card) |
666 | { | 623 | { |
667 | unsigned int val; | 624 | unsigned int val; |
668 | enter("link_status_changed"); | ||
669 | 625 | ||
670 | val = inl(card->io_port + CSR5); /* Status register */ | 626 | val = inl(card->io_port + CSR5); /* Status register */ |
671 | 627 | ||
672 | if ((val & (1 << 27)) == 0) { /* no change */ | 628 | if ((val & (1 << 27)) == 0) /* no change */ |
673 | leave("link_status_changed - nochange"); | ||
674 | return 0; | 629 | return 0; |
675 | } | ||
676 | 630 | ||
677 | /* clear the event by writing a 1 to the bit in the | 631 | /* clear the event by writing a 1 to the bit in the |
678 | status register. */ | 632 | status register. */ |
679 | val = (1 << 27); | 633 | val = (1 << 27); |
680 | outl(val, card->io_port + CSR5); | 634 | outl(val, card->io_port + CSR5); |
681 | 635 | ||
682 | leave("link_status_changed - changed"); | ||
683 | return 1; | 636 | return 1; |
684 | } | 637 | } |
685 | 638 | ||
@@ -691,16 +644,12 @@ in a non-stopped state. | |||
691 | static int transmit_active(struct xircom_private *card) | 644 | static int transmit_active(struct xircom_private *card) |
692 | { | 645 | { |
693 | unsigned int val; | 646 | unsigned int val; |
694 | enter("transmit_active"); | ||
695 | 647 | ||
696 | val = inl(card->io_port + CSR5); /* Status register */ | 648 | val = inl(card->io_port + CSR5); /* Status register */ |
697 | 649 | ||
698 | if ((val & (7 << 20)) == 0) { /* transmitter disabled */ | 650 | if ((val & (7 << 20)) == 0) /* transmitter disabled */ |
699 | leave("transmit_active - inactive"); | ||
700 | return 0; | 651 | return 0; |
701 | } | ||
702 | 652 | ||
703 | leave("transmit_active - active"); | ||
704 | return 1; | 653 | return 1; |
705 | } | 654 | } |
706 | 655 | ||
@@ -711,17 +660,12 @@ in a non-stopped state. | |||
711 | static int receive_active(struct xircom_private *card) | 660 | static int receive_active(struct xircom_private *card) |
712 | { | 661 | { |
713 | unsigned int val; | 662 | unsigned int val; |
714 | enter("receive_active"); | ||
715 | |||
716 | 663 | ||
717 | val = inl(card->io_port + CSR5); /* Status register */ | 664 | val = inl(card->io_port + CSR5); /* Status register */ |
718 | 665 | ||
719 | if ((val & (7 << 17)) == 0) { /* receiver disabled */ | 666 | if ((val & (7 << 17)) == 0) /* receiver disabled */ |
720 | leave("receive_active - inactive"); | ||
721 | return 0; | 667 | return 0; |
722 | } | ||
723 | 668 | ||
724 | leave("receive_active - active"); | ||
725 | return 1; | 669 | return 1; |
726 | } | 670 | } |
727 | 671 | ||
@@ -739,8 +683,6 @@ static void activate_receiver(struct xircom_private *card) | |||
739 | { | 683 | { |
740 | unsigned int val; | 684 | unsigned int val; |
741 | int counter; | 685 | int counter; |
742 | enter("activate_receiver"); | ||
743 | |||
744 | 686 | ||
745 | val = inl(card->io_port + CSR6); /* Operation mode */ | 687 | val = inl(card->io_port + CSR6); /* Operation mode */ |
746 | 688 | ||
@@ -780,8 +722,6 @@ static void activate_receiver(struct xircom_private *card) | |||
780 | if (counter <= 0) | 722 | if (counter <= 0) |
781 | pr_err("Receiver failed to re-activate\n"); | 723 | pr_err("Receiver failed to re-activate\n"); |
782 | } | 724 | } |
783 | |||
784 | leave("activate_receiver"); | ||
785 | } | 725 | } |
786 | 726 | ||
787 | /* | 727 | /* |
@@ -795,7 +735,6 @@ static void deactivate_receiver(struct xircom_private *card) | |||
795 | { | 735 | { |
796 | unsigned int val; | 736 | unsigned int val; |
797 | int counter; | 737 | int counter; |
798 | enter("deactivate_receiver"); | ||
799 | 738 | ||
800 | val = inl(card->io_port + CSR6); /* Operation mode */ | 739 | val = inl(card->io_port + CSR6); /* Operation mode */ |
801 | val = val & ~2; /* disable the receiver */ | 740 | val = val & ~2; /* disable the receiver */ |
@@ -811,9 +750,6 @@ static void deactivate_receiver(struct xircom_private *card) | |||
811 | if (counter <= 0) | 750 | if (counter <= 0) |
812 | pr_err("Receiver failed to deactivate\n"); | 751 | pr_err("Receiver failed to deactivate\n"); |
813 | } | 752 | } |
814 | |||
815 | |||
816 | leave("deactivate_receiver"); | ||
817 | } | 753 | } |
818 | 754 | ||
819 | 755 | ||
@@ -831,8 +767,6 @@ static void activate_transmitter(struct xircom_private *card) | |||
831 | { | 767 | { |
832 | unsigned int val; | 768 | unsigned int val; |
833 | int counter; | 769 | int counter; |
834 | enter("activate_transmitter"); | ||
835 | |||
836 | 770 | ||
837 | val = inl(card->io_port + CSR6); /* Operation mode */ | 771 | val = inl(card->io_port + CSR6); /* Operation mode */ |
838 | 772 | ||
@@ -871,8 +805,6 @@ static void activate_transmitter(struct xircom_private *card) | |||
871 | if (counter <= 0) | 805 | if (counter <= 0) |
872 | pr_err("Transmitter failed to re-activate\n"); | 806 | pr_err("Transmitter failed to re-activate\n"); |
873 | } | 807 | } |
874 | |||
875 | leave("activate_transmitter"); | ||
876 | } | 808 | } |
877 | 809 | ||
878 | /* | 810 | /* |
@@ -886,7 +818,6 @@ static void deactivate_transmitter(struct xircom_private *card) | |||
886 | { | 818 | { |
887 | unsigned int val; | 819 | unsigned int val; |
888 | int counter; | 820 | int counter; |
889 | enter("deactivate_transmitter"); | ||
890 | 821 | ||
891 | val = inl(card->io_port + CSR6); /* Operation mode */ | 822 | val = inl(card->io_port + CSR6); /* Operation mode */ |
892 | val = val & ~2; /* disable the transmitter */ | 823 | val = val & ~2; /* disable the transmitter */ |
@@ -902,9 +833,6 @@ static void deactivate_transmitter(struct xircom_private *card) | |||
902 | if (counter <= 0) | 833 | if (counter <= 0) |
903 | pr_err("Transmitter failed to deactivate\n"); | 834 | pr_err("Transmitter failed to deactivate\n"); |
904 | } | 835 | } |
905 | |||
906 | |||
907 | leave("deactivate_transmitter"); | ||
908 | } | 836 | } |
909 | 837 | ||
910 | 838 | ||
@@ -916,13 +844,10 @@ must be called with the lock held and interrupts disabled. | |||
916 | static void enable_transmit_interrupt(struct xircom_private *card) | 844 | static void enable_transmit_interrupt(struct xircom_private *card) |
917 | { | 845 | { |
918 | unsigned int val; | 846 | unsigned int val; |
919 | enter("enable_transmit_interrupt"); | ||
920 | 847 | ||
921 | val = inl(card->io_port + CSR7); /* Interrupt enable register */ | 848 | val = inl(card->io_port + CSR7); /* Interrupt enable register */ |
922 | val |= 1; /* enable the transmit interrupt */ | 849 | val |= 1; /* enable the transmit interrupt */ |
923 | outl(val, card->io_port + CSR7); | 850 | outl(val, card->io_port + CSR7); |
924 | |||
925 | leave("enable_transmit_interrupt"); | ||
926 | } | 851 | } |
927 | 852 | ||
928 | 853 | ||
@@ -934,13 +859,10 @@ must be called with the lock held and interrupts disabled. | |||
934 | static void enable_receive_interrupt(struct xircom_private *card) | 859 | static void enable_receive_interrupt(struct xircom_private *card) |
935 | { | 860 | { |
936 | unsigned int val; | 861 | unsigned int val; |
937 | enter("enable_receive_interrupt"); | ||
938 | 862 | ||
939 | val = inl(card->io_port + CSR7); /* Interrupt enable register */ | 863 | val = inl(card->io_port + CSR7); /* Interrupt enable register */ |
940 | val = val | (1 << 6); /* enable the receive interrupt */ | 864 | val = val | (1 << 6); /* enable the receive interrupt */ |
941 | outl(val, card->io_port + CSR7); | 865 | outl(val, card->io_port + CSR7); |
942 | |||
943 | leave("enable_receive_interrupt"); | ||
944 | } | 866 | } |
945 | 867 | ||
946 | /* | 868 | /* |
@@ -951,13 +873,10 @@ must be called with the lock held and interrupts disabled. | |||
951 | static void enable_link_interrupt(struct xircom_private *card) | 873 | static void enable_link_interrupt(struct xircom_private *card) |
952 | { | 874 | { |
953 | unsigned int val; | 875 | unsigned int val; |
954 | enter("enable_link_interrupt"); | ||
955 | 876 | ||
956 | val = inl(card->io_port + CSR7); /* Interrupt enable register */ | 877 | val = inl(card->io_port + CSR7); /* Interrupt enable register */ |
957 | val = val | (1 << 27); /* enable the link status chage interrupt */ | 878 | val = val | (1 << 27); /* enable the link status chage interrupt */ |
958 | outl(val, card->io_port + CSR7); | 879 | outl(val, card->io_port + CSR7); |
959 | |||
960 | leave("enable_link_interrupt"); | ||
961 | } | 880 | } |
962 | 881 | ||
963 | 882 | ||
@@ -970,12 +889,9 @@ must be called with the lock held and interrupts disabled. | |||
970 | static void disable_all_interrupts(struct xircom_private *card) | 889 | static void disable_all_interrupts(struct xircom_private *card) |
971 | { | 890 | { |
972 | unsigned int val; | 891 | unsigned int val; |
973 | enter("enable_all_interrupts"); | ||
974 | 892 | ||
975 | val = 0; /* disable all interrupts */ | 893 | val = 0; /* disable all interrupts */ |
976 | outl(val, card->io_port + CSR7); | 894 | outl(val, card->io_port + CSR7); |
977 | |||
978 | leave("disable_all_interrupts"); | ||
979 | } | 895 | } |
980 | 896 | ||
981 | /* | 897 | /* |
@@ -986,7 +902,6 @@ must be called with the lock held and interrupts disabled. | |||
986 | static void enable_common_interrupts(struct xircom_private *card) | 902 | static void enable_common_interrupts(struct xircom_private *card) |
987 | { | 903 | { |
988 | unsigned int val; | 904 | unsigned int val; |
989 | enter("enable_link_interrupt"); | ||
990 | 905 | ||
991 | val = inl(card->io_port + CSR7); /* Interrupt enable register */ | 906 | val = inl(card->io_port + CSR7); /* Interrupt enable register */ |
992 | val |= (1<<16); /* Normal Interrupt Summary */ | 907 | val |= (1<<16); /* Normal Interrupt Summary */ |
@@ -998,8 +913,6 @@ static void enable_common_interrupts(struct xircom_private *card) | |||
998 | val |= (1<<2); /* Transmit Buffer Unavailable */ | 913 | val |= (1<<2); /* Transmit Buffer Unavailable */ |
999 | val |= (1<<1); /* Transmit Process Stopped */ | 914 | val |= (1<<1); /* Transmit Process Stopped */ |
1000 | outl(val, card->io_port + CSR7); | 915 | outl(val, card->io_port + CSR7); |
1001 | |||
1002 | leave("enable_link_interrupt"); | ||
1003 | } | 916 | } |
1004 | 917 | ||
1005 | /* | 918 | /* |
@@ -1010,13 +923,11 @@ must be called with the lock held and interrupts disabled. | |||
1010 | static int enable_promisc(struct xircom_private *card) | 923 | static int enable_promisc(struct xircom_private *card) |
1011 | { | 924 | { |
1012 | unsigned int val; | 925 | unsigned int val; |
1013 | enter("enable_promisc"); | ||
1014 | 926 | ||
1015 | val = inl(card->io_port + CSR6); | 927 | val = inl(card->io_port + CSR6); |
1016 | val = val | (1 << 6); | 928 | val = val | (1 << 6); |
1017 | outl(val, card->io_port + CSR6); | 929 | outl(val, card->io_port + CSR6); |
1018 | 930 | ||
1019 | leave("enable_promisc"); | ||
1020 | return 1; | 931 | return 1; |
1021 | } | 932 | } |
1022 | 933 | ||
@@ -1031,7 +942,6 @@ Must be called in locked state with interrupts disabled | |||
1031 | static int link_status(struct xircom_private *card) | 942 | static int link_status(struct xircom_private *card) |
1032 | { | 943 | { |
1033 | unsigned int val; | 944 | unsigned int val; |
1034 | enter("link_status"); | ||
1035 | 945 | ||
1036 | val = inb(card->io_port + CSR12); | 946 | val = inb(card->io_port + CSR12); |
1037 | 947 | ||
@@ -1042,7 +952,6 @@ static int link_status(struct xircom_private *card) | |||
1042 | 952 | ||
1043 | /* If we get here -> no link at all */ | 953 | /* If we get here -> no link at all */ |
1044 | 954 | ||
1045 | leave("link_status"); | ||
1046 | return 0; | 955 | return 0; |
1047 | } | 956 | } |
1048 | 957 | ||
@@ -1061,8 +970,6 @@ static void read_mac_address(struct xircom_private *card) | |||
1061 | unsigned long flags; | 970 | unsigned long flags; |
1062 | int i; | 971 | int i; |
1063 | 972 | ||
1064 | enter("read_mac_address"); | ||
1065 | |||
1066 | spin_lock_irqsave(&card->lock, flags); | 973 | spin_lock_irqsave(&card->lock, flags); |
1067 | 974 | ||
1068 | outl(1 << 12, card->io_port + CSR9); /* enable boot rom access */ | 975 | outl(1 << 12, card->io_port + CSR9); /* enable boot rom access */ |
@@ -1090,7 +997,6 @@ static void read_mac_address(struct xircom_private *card) | |||
1090 | } | 997 | } |
1091 | spin_unlock_irqrestore(&card->lock, flags); | 998 | spin_unlock_irqrestore(&card->lock, flags); |
1092 | pr_debug(" %pM\n", card->dev->dev_addr); | 999 | pr_debug(" %pM\n", card->dev->dev_addr); |
1093 | leave("read_mac_address"); | ||
1094 | } | 1000 | } |
1095 | 1001 | ||
1096 | 1002 | ||
@@ -1103,8 +1009,6 @@ static void transceiver_voodoo(struct xircom_private *card) | |||
1103 | { | 1009 | { |
1104 | unsigned long flags; | 1010 | unsigned long flags; |
1105 | 1011 | ||
1106 | enter("transceiver_voodoo"); | ||
1107 | |||
1108 | /* disable all powermanagement */ | 1012 | /* disable all powermanagement */ |
1109 | pci_write_config_dword(card->pdev, PCI_POWERMGMT, 0x0000); | 1013 | pci_write_config_dword(card->pdev, PCI_POWERMGMT, 0x0000); |
1110 | 1014 | ||
@@ -1122,7 +1026,6 @@ static void transceiver_voodoo(struct xircom_private *card) | |||
1122 | spin_unlock_irqrestore(&card->lock, flags); | 1026 | spin_unlock_irqrestore(&card->lock, flags); |
1123 | 1027 | ||
1124 | netif_start_queue(card->dev); | 1028 | netif_start_queue(card->dev); |
1125 | leave("transceiver_voodoo"); | ||
1126 | } | 1029 | } |
1127 | 1030 | ||
1128 | 1031 | ||
@@ -1131,8 +1034,6 @@ static void xircom_up(struct xircom_private *card) | |||
1131 | unsigned long flags; | 1034 | unsigned long flags; |
1132 | int i; | 1035 | int i; |
1133 | 1036 | ||
1134 | enter("xircom_up"); | ||
1135 | |||
1136 | /* disable all powermanagement */ | 1037 | /* disable all powermanagement */ |
1137 | pci_write_config_dword(card->pdev, PCI_POWERMGMT, 0x0000); | 1038 | pci_write_config_dword(card->pdev, PCI_POWERMGMT, 0x0000); |
1138 | 1039 | ||
@@ -1156,7 +1057,6 @@ static void xircom_up(struct xircom_private *card) | |||
1156 | trigger_receive(card); | 1057 | trigger_receive(card); |
1157 | trigger_transmit(card); | 1058 | trigger_transmit(card); |
1158 | netif_start_queue(card->dev); | 1059 | netif_start_queue(card->dev); |
1159 | leave("xircom_up"); | ||
1160 | } | 1060 | } |
1161 | 1061 | ||
1162 | /* Bufferoffset is in BYTES */ | 1062 | /* Bufferoffset is in BYTES */ |
@@ -1164,7 +1064,6 @@ static void investigate_read_descriptor(struct net_device *dev,struct xircom_pri | |||
1164 | { | 1064 | { |
1165 | int status; | 1065 | int status; |
1166 | 1066 | ||
1167 | enter("investigate_read_descriptor"); | ||
1168 | status = le32_to_cpu(card->rx_buffer[4*descnr]); | 1067 | status = le32_to_cpu(card->rx_buffer[4*descnr]); |
1169 | 1068 | ||
1170 | if ((status > 0)) { /* packet received */ | 1069 | if ((status > 0)) { /* packet received */ |
@@ -1197,9 +1096,6 @@ static void investigate_read_descriptor(struct net_device *dev,struct xircom_pri | |||
1197 | card->rx_buffer[4*descnr] = cpu_to_le32(0x80000000); | 1096 | card->rx_buffer[4*descnr] = cpu_to_le32(0x80000000); |
1198 | trigger_receive(card); | 1097 | trigger_receive(card); |
1199 | } | 1098 | } |
1200 | |||
1201 | leave("investigate_read_descriptor"); | ||
1202 | |||
1203 | } | 1099 | } |
1204 | 1100 | ||
1205 | 1101 | ||
@@ -1208,8 +1104,6 @@ static void investigate_write_descriptor(struct net_device *dev, struct xircom_p | |||
1208 | { | 1104 | { |
1209 | int status; | 1105 | int status; |
1210 | 1106 | ||
1211 | enter("investigate_write_descriptor"); | ||
1212 | |||
1213 | status = le32_to_cpu(card->tx_buffer[4*descnr]); | 1107 | status = le32_to_cpu(card->tx_buffer[4*descnr]); |
1214 | #if 0 | 1108 | #if 0 |
1215 | if (status & 0x8000) { /* Major error */ | 1109 | if (status & 0x8000) { /* Major error */ |
@@ -1232,8 +1126,6 @@ static void investigate_write_descriptor(struct net_device *dev, struct xircom_p | |||
1232 | dev->stats.tx_packets++; | 1126 | dev->stats.tx_packets++; |
1233 | } | 1127 | } |
1234 | 1128 | ||
1235 | leave("investigate_write_descriptor"); | ||
1236 | |||
1237 | } | 1129 | } |
1238 | 1130 | ||
1239 | 1131 | ||