diff options
-rw-r--r-- | drivers/net/3c515.c | 124 | ||||
-rw-r--r-- | drivers/net/3c523.c | 91 | ||||
-rw-r--r-- | drivers/net/3c527.c | 46 | ||||
-rw-r--r-- | drivers/net/3c59x.c | 214 |
4 files changed, 233 insertions, 242 deletions
diff --git a/drivers/net/3c515.c b/drivers/net/3c515.c index 167bf23066ea..7fd0ff743757 100644 --- a/drivers/net/3c515.c +++ b/drivers/net/3c515.c | |||
@@ -420,7 +420,7 @@ int init_module(void) | |||
420 | if (debug >= 0) | 420 | if (debug >= 0) |
421 | corkscrew_debug = debug; | 421 | corkscrew_debug = debug; |
422 | if (corkscrew_debug) | 422 | if (corkscrew_debug) |
423 | printk(version); | 423 | pr_debug("%s", version); |
424 | while (corkscrew_scan(-1)) | 424 | while (corkscrew_scan(-1)) |
425 | found++; | 425 | found++; |
426 | return found ? 0 : -ENODEV; | 426 | return found ? 0 : -ENODEV; |
@@ -437,7 +437,7 @@ struct net_device *tc515_probe(int unit) | |||
437 | 437 | ||
438 | if (corkscrew_debug > 0 && !printed) { | 438 | if (corkscrew_debug > 0 && !printed) { |
439 | printed = 1; | 439 | printed = 1; |
440 | printk(version); | 440 | pr_debug("%s", version); |
441 | } | 441 | } |
442 | 442 | ||
443 | return dev; | 443 | return dev; |
@@ -516,7 +516,7 @@ static struct net_device *corkscrew_scan(int unit) | |||
516 | if (pnp_device_attach(idev) < 0) | 516 | if (pnp_device_attach(idev) < 0) |
517 | continue; | 517 | continue; |
518 | if (pnp_activate_dev(idev) < 0) { | 518 | if (pnp_activate_dev(idev) < 0) { |
519 | printk("pnp activate failed (out of resources?)\n"); | 519 | pr_warning("pnp activate failed (out of resources?)\n"); |
520 | pnp_device_detach(idev); | 520 | pnp_device_detach(idev); |
521 | continue; | 521 | continue; |
522 | } | 522 | } |
@@ -531,9 +531,9 @@ static struct net_device *corkscrew_scan(int unit) | |||
531 | continue; | 531 | continue; |
532 | } | 532 | } |
533 | if(corkscrew_debug) | 533 | if(corkscrew_debug) |
534 | printk ("ISAPNP reports %s at i/o 0x%x, irq %d\n", | 534 | pr_debug("ISAPNP reports %s at i/o 0x%x, irq %d\n", |
535 | (char*) corkscrew_isapnp_adapters[i].driver_data, ioaddr, irq); | 535 | (char*) corkscrew_isapnp_adapters[i].driver_data, ioaddr, irq); |
536 | printk(KERN_INFO "3c515 Resource configuration register %#4.4x, DCR %4.4x.\n", | 536 | pr_info("3c515 Resource configuration register %#4.4x, DCR %4.4x.\n", |
537 | inl(ioaddr + 0x2002), inw(ioaddr + 0x2000)); | 537 | inl(ioaddr + 0x2002), inw(ioaddr + 0x2000)); |
538 | /* irq = inw(ioaddr + 0x2002) & 15; */ /* Use the irq from isapnp */ | 538 | /* irq = inw(ioaddr + 0x2002) & 15; */ /* Use the irq from isapnp */ |
539 | SET_NETDEV_DEV(dev, &idev->dev); | 539 | SET_NETDEV_DEV(dev, &idev->dev); |
@@ -552,7 +552,7 @@ no_pnp: | |||
552 | if (!check_device(ioaddr)) | 552 | if (!check_device(ioaddr)) |
553 | continue; | 553 | continue; |
554 | 554 | ||
555 | printk(KERN_INFO "3c515 Resource configuration register %#4.4x, DCR %4.4x.\n", | 555 | pr_info("3c515 Resource configuration register %#4.4x, DCR %4.4x.\n", |
556 | inl(ioaddr + 0x2002), inw(ioaddr + 0x2000)); | 556 | inl(ioaddr + 0x2002), inw(ioaddr + 0x2000)); |
557 | err = corkscrew_setup(dev, ioaddr, NULL, cards_found++); | 557 | err = corkscrew_setup(dev, ioaddr, NULL, cards_found++); |
558 | if (!err) | 558 | if (!err) |
@@ -625,7 +625,7 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr, | |||
625 | list_add(&vp->list, &root_corkscrew_dev); | 625 | list_add(&vp->list, &root_corkscrew_dev); |
626 | #endif | 626 | #endif |
627 | 627 | ||
628 | printk(KERN_INFO "%s: 3Com %s at %#3x,", dev->name, vp->product_name, ioaddr); | 628 | pr_info("%s: 3Com %s at %#3x,", dev->name, vp->product_name, ioaddr); |
629 | 629 | ||
630 | spin_lock_init(&vp->lock); | 630 | spin_lock_init(&vp->lock); |
631 | 631 | ||
@@ -648,19 +648,19 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr, | |||
648 | } | 648 | } |
649 | checksum = (checksum ^ (checksum >> 8)) & 0xff; | 649 | checksum = (checksum ^ (checksum >> 8)) & 0xff; |
650 | if (checksum != 0x00) | 650 | if (checksum != 0x00) |
651 | printk(" ***INVALID CHECKSUM %4.4x*** ", checksum); | 651 | pr_cont(" ***INVALID CHECKSUM %4.4x*** ", checksum); |
652 | printk(" %pM", dev->dev_addr); | 652 | pr_cont(" %pM", dev->dev_addr); |
653 | if (eeprom[16] == 0x11c7) { /* Corkscrew */ | 653 | if (eeprom[16] == 0x11c7) { /* Corkscrew */ |
654 | if (request_dma(dev->dma, "3c515")) { | 654 | if (request_dma(dev->dma, "3c515")) { |
655 | printk(", DMA %d allocation failed", dev->dma); | 655 | pr_cont(", DMA %d allocation failed", dev->dma); |
656 | dev->dma = 0; | 656 | dev->dma = 0; |
657 | } else | 657 | } else |
658 | printk(", DMA %d", dev->dma); | 658 | pr_cont(", DMA %d", dev->dma); |
659 | } | 659 | } |
660 | printk(", IRQ %d\n", dev->irq); | 660 | pr_cont(", IRQ %d\n", dev->irq); |
661 | /* Tell them about an invalid IRQ. */ | 661 | /* Tell them about an invalid IRQ. */ |
662 | if (corkscrew_debug && (dev->irq <= 0 || dev->irq > 15)) | 662 | if (corkscrew_debug && (dev->irq <= 0 || dev->irq > 15)) |
663 | printk(KERN_WARNING " *** Warning: this IRQ is unlikely to work! ***\n"); | 663 | pr_warning(" *** Warning: this IRQ is unlikely to work! ***\n"); |
664 | 664 | ||
665 | { | 665 | { |
666 | char *ram_split[] = { "5:3", "3:1", "1:1", "3:5" }; | 666 | char *ram_split[] = { "5:3", "3:1", "1:1", "3:5" }; |
@@ -669,9 +669,9 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr, | |||
669 | vp->available_media = inw(ioaddr + Wn3_Options); | 669 | vp->available_media = inw(ioaddr + Wn3_Options); |
670 | config = inl(ioaddr + Wn3_Config); | 670 | config = inl(ioaddr + Wn3_Config); |
671 | if (corkscrew_debug > 1) | 671 | if (corkscrew_debug > 1) |
672 | printk(KERN_INFO " Internal config register is %4.4x, transceivers %#x.\n", | 672 | pr_info(" Internal config register is %4.4x, transceivers %#x.\n", |
673 | config, inw(ioaddr + Wn3_Options)); | 673 | config, inw(ioaddr + Wn3_Options)); |
674 | printk(KERN_INFO " %dK %s-wide RAM %s Rx:Tx split, %s%s interface.\n", | 674 | pr_info(" %dK %s-wide RAM %s Rx:Tx split, %s%s interface.\n", |
675 | 8 << config & Ram_size, | 675 | 8 << config & Ram_size, |
676 | config & Ram_width ? "word" : "byte", | 676 | config & Ram_width ? "word" : "byte", |
677 | ram_split[(config & Ram_split) >> Ram_split_shift], | 677 | ram_split[(config & Ram_split) >> Ram_split_shift], |
@@ -682,7 +682,7 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr, | |||
682 | dev->if_port = vp->default_media; | 682 | dev->if_port = vp->default_media; |
683 | } | 683 | } |
684 | if (vp->media_override != 7) { | 684 | if (vp->media_override != 7) { |
685 | printk(KERN_INFO " Media override to transceiver type %d (%s).\n", | 685 | pr_info(" Media override to transceiver type %d (%s).\n", |
686 | vp->media_override, | 686 | vp->media_override, |
687 | media_tbl[vp->media_override].name); | 687 | media_tbl[vp->media_override].name); |
688 | dev->if_port = vp->media_override; | 688 | dev->if_port = vp->media_override; |
@@ -718,7 +718,7 @@ static int corkscrew_open(struct net_device *dev) | |||
718 | 718 | ||
719 | if (vp->media_override != 7) { | 719 | if (vp->media_override != 7) { |
720 | if (corkscrew_debug > 1) | 720 | if (corkscrew_debug > 1) |
721 | printk(KERN_INFO "%s: Media override to transceiver %d (%s).\n", | 721 | pr_info("%s: Media override to transceiver %d (%s).\n", |
722 | dev->name, vp->media_override, | 722 | dev->name, vp->media_override, |
723 | media_tbl[vp->media_override].name); | 723 | media_tbl[vp->media_override].name); |
724 | dev->if_port = vp->media_override; | 724 | dev->if_port = vp->media_override; |
@@ -729,7 +729,7 @@ static int corkscrew_open(struct net_device *dev) | |||
729 | dev->if_port = media_tbl[dev->if_port].next; | 729 | dev->if_port = media_tbl[dev->if_port].next; |
730 | 730 | ||
731 | if (corkscrew_debug > 1) | 731 | if (corkscrew_debug > 1) |
732 | printk("%s: Initial media type %s.\n", | 732 | pr_debug("%s: Initial media type %s.\n", |
733 | dev->name, media_tbl[dev->if_port].name); | 733 | dev->name, media_tbl[dev->if_port].name); |
734 | 734 | ||
735 | init_timer(&vp->timer); | 735 | init_timer(&vp->timer); |
@@ -744,7 +744,7 @@ static int corkscrew_open(struct net_device *dev) | |||
744 | outl(config, ioaddr + Wn3_Config); | 744 | outl(config, ioaddr + Wn3_Config); |
745 | 745 | ||
746 | if (corkscrew_debug > 1) { | 746 | if (corkscrew_debug > 1) { |
747 | printk("%s: corkscrew_open() InternalConfig %8.8x.\n", | 747 | pr_debug("%s: corkscrew_open() InternalConfig %8.8x.\n", |
748 | dev->name, config); | 748 | dev->name, config); |
749 | } | 749 | } |
750 | 750 | ||
@@ -777,7 +777,7 @@ static int corkscrew_open(struct net_device *dev) | |||
777 | 777 | ||
778 | if (corkscrew_debug > 1) { | 778 | if (corkscrew_debug > 1) { |
779 | EL3WINDOW(4); | 779 | EL3WINDOW(4); |
780 | printk("%s: corkscrew_open() irq %d media status %4.4x.\n", | 780 | pr_debug("%s: corkscrew_open() irq %d media status %4.4x.\n", |
781 | dev->name, dev->irq, inw(ioaddr + Wn4_Media)); | 781 | dev->name, dev->irq, inw(ioaddr + Wn4_Media)); |
782 | } | 782 | } |
783 | 783 | ||
@@ -814,8 +814,7 @@ static int corkscrew_open(struct net_device *dev) | |||
814 | if (vp->full_bus_master_rx) { /* Boomerang bus master. */ | 814 | if (vp->full_bus_master_rx) { /* Boomerang bus master. */ |
815 | vp->cur_rx = vp->dirty_rx = 0; | 815 | vp->cur_rx = vp->dirty_rx = 0; |
816 | if (corkscrew_debug > 2) | 816 | if (corkscrew_debug > 2) |
817 | printk("%s: Filling in the Rx ring.\n", | 817 | pr_debug("%s: Filling in the Rx ring.\n", dev->name); |
818 | dev->name); | ||
819 | for (i = 0; i < RX_RING_SIZE; i++) { | 818 | for (i = 0; i < RX_RING_SIZE; i++) { |
820 | struct sk_buff *skb; | 819 | struct sk_buff *skb; |
821 | if (i < (RX_RING_SIZE - 1)) | 820 | if (i < (RX_RING_SIZE - 1)) |
@@ -877,7 +876,7 @@ static void corkscrew_timer(unsigned long data) | |||
877 | int ok = 0; | 876 | int ok = 0; |
878 | 877 | ||
879 | if (corkscrew_debug > 1) | 878 | if (corkscrew_debug > 1) |
880 | printk("%s: Media selection timer tick happened, %s.\n", | 879 | pr_debug("%s: Media selection timer tick happened, %s.\n", |
881 | dev->name, media_tbl[dev->if_port].name); | 880 | dev->name, media_tbl[dev->if_port].name); |
882 | 881 | ||
883 | spin_lock_irqsave(&vp->lock, flags); | 882 | spin_lock_irqsave(&vp->lock, flags); |
@@ -894,12 +893,12 @@ static void corkscrew_timer(unsigned long data) | |||
894 | if (media_status & Media_LnkBeat) { | 893 | if (media_status & Media_LnkBeat) { |
895 | ok = 1; | 894 | ok = 1; |
896 | if (corkscrew_debug > 1) | 895 | if (corkscrew_debug > 1) |
897 | printk("%s: Media %s has link beat, %x.\n", | 896 | pr_debug("%s: Media %s has link beat, %x.\n", |
898 | dev->name, | 897 | dev->name, |
899 | media_tbl[dev->if_port].name, | 898 | media_tbl[dev->if_port].name, |
900 | media_status); | 899 | media_status); |
901 | } else if (corkscrew_debug > 1) | 900 | } else if (corkscrew_debug > 1) |
902 | printk("%s: Media %s is has no link beat, %x.\n", | 901 | pr_debug("%s: Media %s is has no link beat, %x.\n", |
903 | dev->name, | 902 | dev->name, |
904 | media_tbl[dev->if_port].name, | 903 | media_tbl[dev->if_port].name, |
905 | media_status); | 904 | media_status); |
@@ -907,7 +906,7 @@ static void corkscrew_timer(unsigned long data) | |||
907 | break; | 906 | break; |
908 | default: /* Other media types handled by Tx timeouts. */ | 907 | default: /* Other media types handled by Tx timeouts. */ |
909 | if (corkscrew_debug > 1) | 908 | if (corkscrew_debug > 1) |
910 | printk("%s: Media %s is has no indication, %x.\n", | 909 | pr_debug("%s: Media %s is has no indication, %x.\n", |
911 | dev->name, | 910 | dev->name, |
912 | media_tbl[dev->if_port].name, | 911 | media_tbl[dev->if_port].name, |
913 | media_status); | 912 | media_status); |
@@ -925,12 +924,12 @@ static void corkscrew_timer(unsigned long data) | |||
925 | if (dev->if_port == 8) { /* Go back to default. */ | 924 | if (dev->if_port == 8) { /* Go back to default. */ |
926 | dev->if_port = vp->default_media; | 925 | dev->if_port = vp->default_media; |
927 | if (corkscrew_debug > 1) | 926 | if (corkscrew_debug > 1) |
928 | printk("%s: Media selection failing, using default %s port.\n", | 927 | pr_debug("%s: Media selection failing, using default %s port.\n", |
929 | dev->name, | 928 | dev->name, |
930 | media_tbl[dev->if_port].name); | 929 | media_tbl[dev->if_port].name); |
931 | } else { | 930 | } else { |
932 | if (corkscrew_debug > 1) | 931 | if (corkscrew_debug > 1) |
933 | printk("%s: Media selection failed, now trying %s port.\n", | 932 | pr_debug("%s: Media selection failed, now trying %s port.\n", |
934 | dev->name, | 933 | dev->name, |
935 | media_tbl[dev->if_port].name); | 934 | media_tbl[dev->if_port].name); |
936 | vp->timer.expires = jiffies + media_tbl[dev->if_port].wait; | 935 | vp->timer.expires = jiffies + media_tbl[dev->if_port].wait; |
@@ -953,7 +952,7 @@ static void corkscrew_timer(unsigned long data) | |||
953 | 952 | ||
954 | spin_unlock_irqrestore(&vp->lock, flags); | 953 | spin_unlock_irqrestore(&vp->lock, flags); |
955 | if (corkscrew_debug > 1) | 954 | if (corkscrew_debug > 1) |
956 | printk("%s: Media selection timer finished, %s.\n", | 955 | pr_debug("%s: Media selection timer finished, %s.\n", |
957 | dev->name, media_tbl[dev->if_port].name); | 956 | dev->name, media_tbl[dev->if_port].name); |
958 | 957 | ||
959 | #endif /* AUTOMEDIA */ | 958 | #endif /* AUTOMEDIA */ |
@@ -966,23 +965,21 @@ static void corkscrew_timeout(struct net_device *dev) | |||
966 | struct corkscrew_private *vp = netdev_priv(dev); | 965 | struct corkscrew_private *vp = netdev_priv(dev); |
967 | int ioaddr = dev->base_addr; | 966 | int ioaddr = dev->base_addr; |
968 | 967 | ||
969 | printk(KERN_WARNING | 968 | pr_warning("%s: transmit timed out, tx_status %2.2x status %4.4x.\n", |
970 | "%s: transmit timed out, tx_status %2.2x status %4.4x.\n", | ||
971 | dev->name, inb(ioaddr + TxStatus), | 969 | dev->name, inb(ioaddr + TxStatus), |
972 | inw(ioaddr + EL3_STATUS)); | 970 | inw(ioaddr + EL3_STATUS)); |
973 | /* Slight code bloat to be user friendly. */ | 971 | /* Slight code bloat to be user friendly. */ |
974 | if ((inb(ioaddr + TxStatus) & 0x88) == 0x88) | 972 | if ((inb(ioaddr + TxStatus) & 0x88) == 0x88) |
975 | printk(KERN_WARNING | 973 | pr_warning("%s: Transmitter encountered 16 collisions --" |
976 | "%s: Transmitter encountered 16 collisions -- network" | ||
977 | " network cable problem?\n", dev->name); | 974 | " network cable problem?\n", dev->name); |
978 | #ifndef final_version | 975 | #ifndef final_version |
979 | printk(" Flags; bus-master %d, full %d; dirty %d current %d.\n", | 976 | pr_debug(" Flags; bus-master %d, full %d; dirty %d current %d.\n", |
980 | vp->full_bus_master_tx, vp->tx_full, vp->dirty_tx, | 977 | vp->full_bus_master_tx, vp->tx_full, vp->dirty_tx, |
981 | vp->cur_tx); | 978 | vp->cur_tx); |
982 | printk(" Down list %8.8x vs. %p.\n", inl(ioaddr + DownListPtr), | 979 | pr_debug(" Down list %8.8x vs. %p.\n", inl(ioaddr + DownListPtr), |
983 | &vp->tx_ring[0]); | 980 | &vp->tx_ring[0]); |
984 | for (i = 0; i < TX_RING_SIZE; i++) { | 981 | for (i = 0; i < TX_RING_SIZE; i++) { |
985 | printk(" %d: %p length %8.8x status %8.8x\n", i, | 982 | pr_debug(" %d: %p length %8.8x status %8.8x\n", i, |
986 | &vp->tx_ring[i], | 983 | &vp->tx_ring[i], |
987 | vp->tx_ring[i].length, vp->tx_ring[i].status); | 984 | vp->tx_ring[i].length, vp->tx_ring[i].status); |
988 | } | 985 | } |
@@ -1023,7 +1020,7 @@ static int corkscrew_start_xmit(struct sk_buff *skb, | |||
1023 | else | 1020 | else |
1024 | prev_entry = NULL; | 1021 | prev_entry = NULL; |
1025 | if (corkscrew_debug > 3) | 1022 | if (corkscrew_debug > 3) |
1026 | printk("%s: Trying to send a packet, Tx index %d.\n", | 1023 | pr_debug("%s: Trying to send a packet, Tx index %d.\n", |
1027 | dev->name, vp->cur_tx); | 1024 | dev->name, vp->cur_tx); |
1028 | /* vp->tx_full = 1; */ | 1025 | /* vp->tx_full = 1; */ |
1029 | vp->tx_skbuff[entry] = skb; | 1026 | vp->tx_skbuff[entry] = skb; |
@@ -1102,7 +1099,7 @@ static int corkscrew_start_xmit(struct sk_buff *skb, | |||
1102 | while (--i > 0 && (tx_status = inb(ioaddr + TxStatus)) > 0) { | 1099 | while (--i > 0 && (tx_status = inb(ioaddr + TxStatus)) > 0) { |
1103 | if (tx_status & 0x3C) { /* A Tx-disabling error occurred. */ | 1100 | if (tx_status & 0x3C) { /* A Tx-disabling error occurred. */ |
1104 | if (corkscrew_debug > 2) | 1101 | if (corkscrew_debug > 2) |
1105 | printk("%s: Tx error, status %2.2x.\n", | 1102 | pr_debug("%s: Tx error, status %2.2x.\n", |
1106 | dev->name, tx_status); | 1103 | dev->name, tx_status); |
1107 | if (tx_status & 0x04) | 1104 | if (tx_status & 0x04) |
1108 | dev->stats.tx_fifo_errors++; | 1105 | dev->stats.tx_fifo_errors++; |
@@ -1143,7 +1140,7 @@ static irqreturn_t corkscrew_interrupt(int irq, void *dev_id) | |||
1143 | status = inw(ioaddr + EL3_STATUS); | 1140 | status = inw(ioaddr + EL3_STATUS); |
1144 | 1141 | ||
1145 | if (corkscrew_debug > 4) | 1142 | if (corkscrew_debug > 4) |
1146 | printk("%s: interrupt, status %4.4x, timer %d.\n", | 1143 | pr_debug("%s: interrupt, status %4.4x, timer %d.\n", |
1147 | dev->name, status, latency); | 1144 | dev->name, status, latency); |
1148 | if ((status & 0xE000) != 0xE000) { | 1145 | if ((status & 0xE000) != 0xE000) { |
1149 | static int donedidthis; | 1146 | static int donedidthis; |
@@ -1151,7 +1148,7 @@ static irqreturn_t corkscrew_interrupt(int irq, void *dev_id) | |||
1151 | Ignore a single early interrupt, but don't hang the machine for | 1148 | Ignore a single early interrupt, but don't hang the machine for |
1152 | other interrupt problems. */ | 1149 | other interrupt problems. */ |
1153 | if (donedidthis++ > 100) { | 1150 | if (donedidthis++ > 100) { |
1154 | printk(KERN_ERR "%s: Bogus interrupt, bailing. Status %4.4x, start=%d.\n", | 1151 | pr_err("%s: Bogus interrupt, bailing. Status %4.4x, start=%d.\n", |
1155 | dev->name, status, netif_running(dev)); | 1152 | dev->name, status, netif_running(dev)); |
1156 | free_irq(dev->irq, dev); | 1153 | free_irq(dev->irq, dev); |
1157 | dev->irq = -1; | 1154 | dev->irq = -1; |
@@ -1160,14 +1157,14 @@ static irqreturn_t corkscrew_interrupt(int irq, void *dev_id) | |||
1160 | 1157 | ||
1161 | do { | 1158 | do { |
1162 | if (corkscrew_debug > 5) | 1159 | if (corkscrew_debug > 5) |
1163 | printk("%s: In interrupt loop, status %4.4x.\n", | 1160 | pr_debug("%s: In interrupt loop, status %4.4x.\n", |
1164 | dev->name, status); | 1161 | dev->name, status); |
1165 | if (status & RxComplete) | 1162 | if (status & RxComplete) |
1166 | corkscrew_rx(dev); | 1163 | corkscrew_rx(dev); |
1167 | 1164 | ||
1168 | if (status & TxAvailable) { | 1165 | if (status & TxAvailable) { |
1169 | if (corkscrew_debug > 5) | 1166 | if (corkscrew_debug > 5) |
1170 | printk(" TX room bit was handled.\n"); | 1167 | pr_debug(" TX room bit was handled.\n"); |
1171 | /* There's room in the FIFO for a full-sized packet. */ | 1168 | /* There's room in the FIFO for a full-sized packet. */ |
1172 | outw(AckIntr | TxAvailable, ioaddr + EL3_CMD); | 1169 | outw(AckIntr | TxAvailable, ioaddr + EL3_CMD); |
1173 | netif_wake_queue(dev); | 1170 | netif_wake_queue(dev); |
@@ -1212,19 +1209,20 @@ static irqreturn_t corkscrew_interrupt(int irq, void *dev_id) | |||
1212 | if (status & StatsFull) { /* Empty statistics. */ | 1209 | if (status & StatsFull) { /* Empty statistics. */ |
1213 | static int DoneDidThat; | 1210 | static int DoneDidThat; |
1214 | if (corkscrew_debug > 4) | 1211 | if (corkscrew_debug > 4) |
1215 | printk("%s: Updating stats.\n", dev->name); | 1212 | pr_debug("%s: Updating stats.\n", dev->name); |
1216 | update_stats(ioaddr, dev); | 1213 | update_stats(ioaddr, dev); |
1217 | /* DEBUG HACK: Disable statistics as an interrupt source. */ | 1214 | /* DEBUG HACK: Disable statistics as an interrupt source. */ |
1218 | /* This occurs when we have the wrong media type! */ | 1215 | /* This occurs when we have the wrong media type! */ |
1219 | if (DoneDidThat == 0 && inw(ioaddr + EL3_STATUS) & StatsFull) { | 1216 | if (DoneDidThat == 0 && inw(ioaddr + EL3_STATUS) & StatsFull) { |
1220 | int win, reg; | 1217 | int win, reg; |
1221 | printk("%s: Updating stats failed, disabling stats as an" | 1218 | pr_notice("%s: Updating stats failed, disabling stats as an interrupt source.\n", |
1222 | " interrupt source.\n", dev->name); | 1219 | dev->name); |
1223 | for (win = 0; win < 8; win++) { | 1220 | for (win = 0; win < 8; win++) { |
1224 | EL3WINDOW(win); | 1221 | EL3WINDOW(win); |
1225 | printk("\n Vortex window %d:", win); | 1222 | pr_notice("Vortex window %d:", win); |
1226 | for (reg = 0; reg < 16; reg++) | 1223 | for (reg = 0; reg < 16; reg++) |
1227 | printk(" %2.2x", inb(ioaddr + reg)); | 1224 | pr_cont(" %2.2x", inb(ioaddr + reg)); |
1225 | pr_cont("\n"); | ||
1228 | } | 1226 | } |
1229 | EL3WINDOW(7); | 1227 | EL3WINDOW(7); |
1230 | outw(SetIntrEnb | TxAvailable | | 1228 | outw(SetIntrEnb | TxAvailable | |
@@ -1246,9 +1244,8 @@ static irqreturn_t corkscrew_interrupt(int irq, void *dev_id) | |||
1246 | } | 1244 | } |
1247 | 1245 | ||
1248 | if (--i < 0) { | 1246 | if (--i < 0) { |
1249 | printk(KERN_ERR "%s: Too much work in interrupt, status %4.4x. " | 1247 | pr_err("%s: Too much work in interrupt, status %4.4x. Disabling functions (%4.4x).\n", |
1250 | "Disabling functions (%4.4x).\n", dev->name, | 1248 | dev->name, status, SetStatusEnb | ((~status) & 0x7FE)); |
1251 | status, SetStatusEnb | ((~status) & 0x7FE)); | ||
1252 | /* Disable all pending interrupts. */ | 1249 | /* Disable all pending interrupts. */ |
1253 | outw(SetStatusEnb | ((~status) & 0x7FE), ioaddr + EL3_CMD); | 1250 | outw(SetStatusEnb | ((~status) & 0x7FE), ioaddr + EL3_CMD); |
1254 | outw(AckIntr | 0x7FF, ioaddr + EL3_CMD); | 1251 | outw(AckIntr | 0x7FF, ioaddr + EL3_CMD); |
@@ -1262,7 +1259,7 @@ static irqreturn_t corkscrew_interrupt(int irq, void *dev_id) | |||
1262 | spin_unlock(&lp->lock); | 1259 | spin_unlock(&lp->lock); |
1263 | 1260 | ||
1264 | if (corkscrew_debug > 4) | 1261 | if (corkscrew_debug > 4) |
1265 | printk("%s: exiting interrupt, status %4.4x.\n", dev->name, status); | 1262 | pr_debug("%s: exiting interrupt, status %4.4x.\n", dev->name, status); |
1266 | return IRQ_HANDLED; | 1263 | return IRQ_HANDLED; |
1267 | } | 1264 | } |
1268 | 1265 | ||
@@ -1273,13 +1270,13 @@ static int corkscrew_rx(struct net_device *dev) | |||
1273 | short rx_status; | 1270 | short rx_status; |
1274 | 1271 | ||
1275 | if (corkscrew_debug > 5) | 1272 | if (corkscrew_debug > 5) |
1276 | printk(" In rx_packet(), status %4.4x, rx_status %4.4x.\n", | 1273 | pr_debug(" In rx_packet(), status %4.4x, rx_status %4.4x.\n", |
1277 | inw(ioaddr + EL3_STATUS), inw(ioaddr + RxStatus)); | 1274 | inw(ioaddr + EL3_STATUS), inw(ioaddr + RxStatus)); |
1278 | while ((rx_status = inw(ioaddr + RxStatus)) > 0) { | 1275 | while ((rx_status = inw(ioaddr + RxStatus)) > 0) { |
1279 | if (rx_status & 0x4000) { /* Error, update stats. */ | 1276 | if (rx_status & 0x4000) { /* Error, update stats. */ |
1280 | unsigned char rx_error = inb(ioaddr + RxErrors); | 1277 | unsigned char rx_error = inb(ioaddr + RxErrors); |
1281 | if (corkscrew_debug > 2) | 1278 | if (corkscrew_debug > 2) |
1282 | printk(" Rx error: status %2.2x.\n", | 1279 | pr_debug(" Rx error: status %2.2x.\n", |
1283 | rx_error); | 1280 | rx_error); |
1284 | dev->stats.rx_errors++; | 1281 | dev->stats.rx_errors++; |
1285 | if (rx_error & 0x01) | 1282 | if (rx_error & 0x01) |
@@ -1299,7 +1296,7 @@ static int corkscrew_rx(struct net_device *dev) | |||
1299 | 1296 | ||
1300 | skb = dev_alloc_skb(pkt_len + 5 + 2); | 1297 | skb = dev_alloc_skb(pkt_len + 5 + 2); |
1301 | if (corkscrew_debug > 4) | 1298 | if (corkscrew_debug > 4) |
1302 | printk("Receiving packet size %d status %4.4x.\n", | 1299 | pr_debug("Receiving packet size %d status %4.4x.\n", |
1303 | pkt_len, rx_status); | 1300 | pkt_len, rx_status); |
1304 | if (skb != NULL) { | 1301 | if (skb != NULL) { |
1305 | skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ | 1302 | skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ |
@@ -1318,7 +1315,7 @@ static int corkscrew_rx(struct net_device *dev) | |||
1318 | break; | 1315 | break; |
1319 | continue; | 1316 | continue; |
1320 | } else if (corkscrew_debug) | 1317 | } else if (corkscrew_debug) |
1321 | printk("%s: Couldn't allocate a sk_buff of size %d.\n", dev->name, pkt_len); | 1318 | pr_debug("%s: Couldn't allocate a sk_buff of size %d.\n", dev->name, pkt_len); |
1322 | } | 1319 | } |
1323 | outw(RxDiscard, ioaddr + EL3_CMD); | 1320 | outw(RxDiscard, ioaddr + EL3_CMD); |
1324 | dev->stats.rx_dropped++; | 1321 | dev->stats.rx_dropped++; |
@@ -1338,13 +1335,13 @@ static int boomerang_rx(struct net_device *dev) | |||
1338 | int rx_status; | 1335 | int rx_status; |
1339 | 1336 | ||
1340 | if (corkscrew_debug > 5) | 1337 | if (corkscrew_debug > 5) |
1341 | printk(" In boomerang_rx(), status %4.4x, rx_status %4.4x.\n", | 1338 | pr_debug(" In boomerang_rx(), status %4.4x, rx_status %4.4x.\n", |
1342 | inw(ioaddr + EL3_STATUS), inw(ioaddr + RxStatus)); | 1339 | inw(ioaddr + EL3_STATUS), inw(ioaddr + RxStatus)); |
1343 | while ((rx_status = vp->rx_ring[entry].status) & RxDComplete) { | 1340 | while ((rx_status = vp->rx_ring[entry].status) & RxDComplete) { |
1344 | if (rx_status & RxDError) { /* Error, update stats. */ | 1341 | if (rx_status & RxDError) { /* Error, update stats. */ |
1345 | unsigned char rx_error = rx_status >> 16; | 1342 | unsigned char rx_error = rx_status >> 16; |
1346 | if (corkscrew_debug > 2) | 1343 | if (corkscrew_debug > 2) |
1347 | printk(" Rx error: status %2.2x.\n", | 1344 | pr_debug(" Rx error: status %2.2x.\n", |
1348 | rx_error); | 1345 | rx_error); |
1349 | dev->stats.rx_errors++; | 1346 | dev->stats.rx_errors++; |
1350 | if (rx_error & 0x01) | 1347 | if (rx_error & 0x01) |
@@ -1364,7 +1361,7 @@ static int boomerang_rx(struct net_device *dev) | |||
1364 | 1361 | ||
1365 | dev->stats.rx_bytes += pkt_len; | 1362 | dev->stats.rx_bytes += pkt_len; |
1366 | if (corkscrew_debug > 4) | 1363 | if (corkscrew_debug > 4) |
1367 | printk("Receiving packet size %d status %4.4x.\n", | 1364 | pr_debug("Receiving packet size %d status %4.4x.\n", |
1368 | pkt_len, rx_status); | 1365 | pkt_len, rx_status); |
1369 | 1366 | ||
1370 | /* Check if the packet is long enough to just accept without | 1367 | /* Check if the packet is long enough to just accept without |
@@ -1385,7 +1382,7 @@ static int boomerang_rx(struct net_device *dev) | |||
1385 | temp = skb_put(skb, pkt_len); | 1382 | temp = skb_put(skb, pkt_len); |
1386 | /* Remove this checking code for final release. */ | 1383 | /* Remove this checking code for final release. */ |
1387 | if (isa_bus_to_virt(vp->rx_ring[entry].addr) != temp) | 1384 | if (isa_bus_to_virt(vp->rx_ring[entry].addr) != temp) |
1388 | printk("%s: Warning -- the skbuff addresses do not match" | 1385 | pr_warning("%s: Warning -- the skbuff addresses do not match" |
1389 | " in boomerang_rx: %p vs. %p / %p.\n", | 1386 | " in boomerang_rx: %p vs. %p / %p.\n", |
1390 | dev->name, | 1387 | dev->name, |
1391 | isa_bus_to_virt(vp-> | 1388 | isa_bus_to_virt(vp-> |
@@ -1427,12 +1424,11 @@ static int corkscrew_close(struct net_device *dev) | |||
1427 | netif_stop_queue(dev); | 1424 | netif_stop_queue(dev); |
1428 | 1425 | ||
1429 | if (corkscrew_debug > 1) { | 1426 | if (corkscrew_debug > 1) { |
1430 | printk("%s: corkscrew_close() status %4.4x, Tx status %2.2x.\n", | 1427 | pr_debug("%s: corkscrew_close() status %4.4x, Tx status %2.2x.\n", |
1431 | dev->name, inw(ioaddr + EL3_STATUS), | 1428 | dev->name, inw(ioaddr + EL3_STATUS), |
1432 | inb(ioaddr + TxStatus)); | 1429 | inb(ioaddr + TxStatus)); |
1433 | printk("%s: corkscrew close stats: rx_nocopy %d rx_copy %d" | 1430 | pr_debug("%s: corkscrew close stats: rx_nocopy %d rx_copy %d tx_queued %d.\n", |
1434 | " tx_queued %d.\n", dev->name, rx_nocopy, rx_copy, | 1431 | dev->name, rx_nocopy, rx_copy, queued_packet); |
1435 | queued_packet); | ||
1436 | } | 1432 | } |
1437 | 1433 | ||
1438 | del_timer(&vp->timer); | 1434 | del_timer(&vp->timer); |
@@ -1534,7 +1530,7 @@ static void set_rx_mode(struct net_device *dev) | |||
1534 | 1530 | ||
1535 | if (dev->flags & IFF_PROMISC) { | 1531 | if (dev->flags & IFF_PROMISC) { |
1536 | if (corkscrew_debug > 3) | 1532 | if (corkscrew_debug > 3) |
1537 | printk("%s: Setting promiscuous mode.\n", | 1533 | pr_debug("%s: Setting promiscuous mode.\n", |
1538 | dev->name); | 1534 | dev->name); |
1539 | new_mode = SetRxFilter | RxStation | RxMulticast | RxBroadcast | RxProm; | 1535 | new_mode = SetRxFilter | RxStation | RxMulticast | RxBroadcast | RxProm; |
1540 | } else if ((dev->mc_list) || (dev->flags & IFF_ALLMULTI)) { | 1536 | } else if ((dev->mc_list) || (dev->flags & IFF_ALLMULTI)) { |
diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c index 8f734d74b513..cdd955c4014c 100644 --- a/drivers/net/3c523.c +++ b/drivers/net/3c523.c | |||
@@ -176,7 +176,7 @@ sizeof(nop_cmd) = 8; | |||
176 | if(!p->scb->cmd) break; \ | 176 | if(!p->scb->cmd) break; \ |
177 | DELAY_16(); \ | 177 | DELAY_16(); \ |
178 | if(i == 1023) { \ | 178 | if(i == 1023) { \ |
179 | printk(KERN_WARNING "%s:%d: scb_cmd timed out .. resetting i82586\n",\ | 179 | pr_warning("%s:%d: scb_cmd timed out .. resetting i82586\n",\ |
180 | dev->name,__LINE__); \ | 180 | dev->name,__LINE__); \ |
181 | elmc_id_reset586(); } } } | 181 | elmc_id_reset586(); } } } |
182 | 182 | ||
@@ -291,7 +291,7 @@ static int elmc_open(struct net_device *dev) | |||
291 | ret = request_irq(dev->irq, &elmc_interrupt, IRQF_SHARED | IRQF_SAMPLE_RANDOM, | 291 | ret = request_irq(dev->irq, &elmc_interrupt, IRQF_SHARED | IRQF_SAMPLE_RANDOM, |
292 | dev->name, dev); | 292 | dev->name, dev); |
293 | if (ret) { | 293 | if (ret) { |
294 | printk(KERN_ERR "%s: couldn't get irq %d\n", dev->name, dev->irq); | 294 | pr_err("%s: couldn't get irq %d\n", dev->name, dev->irq); |
295 | elmc_id_reset586(); | 295 | elmc_id_reset586(); |
296 | return ret; | 296 | return ret; |
297 | } | 297 | } |
@@ -371,9 +371,9 @@ static void alloc586(struct net_device *dev) | |||
371 | 371 | ||
372 | DELAY(2); | 372 | DELAY(2); |
373 | 373 | ||
374 | if (p->iscp->busy) { | 374 | if (p->iscp->busy) |
375 | printk(KERN_ERR "%s: Init-Problems (alloc).\n", dev->name); | 375 | pr_err("%s: Init-Problems (alloc).\n", dev->name); |
376 | } | 376 | |
377 | memset((char *) p->scb, 0, sizeof(struct scb_struct)); | 377 | memset((char *) p->scb, 0, sizeof(struct scb_struct)); |
378 | } | 378 | } |
379 | 379 | ||
@@ -470,7 +470,7 @@ static int __init do_elmc_probe(struct net_device *dev) | |||
470 | mca_set_adapter_procfn(slot, (MCA_ProcFn) elmc_getinfo, dev); | 470 | mca_set_adapter_procfn(slot, (MCA_ProcFn) elmc_getinfo, dev); |
471 | 471 | ||
472 | /* if we get this far, adapter has been found - carry on */ | 472 | /* if we get this far, adapter has been found - carry on */ |
473 | printk(KERN_INFO "%s: 3c523 adapter found in slot %d\n", dev->name, slot + 1); | 473 | pr_info("%s: 3c523 adapter found in slot %d\n", dev->name, slot + 1); |
474 | 474 | ||
475 | /* Now we extract configuration info from the card. | 475 | /* Now we extract configuration info from the card. |
476 | The 3c523 provides information in two of the POS registers, but | 476 | The 3c523 provides information in two of the POS registers, but |
@@ -507,7 +507,7 @@ static int __init do_elmc_probe(struct net_device *dev) | |||
507 | memset(pr, 0, sizeof(struct priv)); | 507 | memset(pr, 0, sizeof(struct priv)); |
508 | pr->slot = slot; | 508 | pr->slot = slot; |
509 | 509 | ||
510 | printk(KERN_INFO "%s: 3Com 3c523 Rev 0x%x at %#lx\n", dev->name, (int) revision, | 510 | pr_info("%s: 3Com 3c523 Rev 0x%x at %#lx\n", dev->name, (int) revision, |
511 | dev->base_addr); | 511 | dev->base_addr); |
512 | 512 | ||
513 | /* Determine if we're using the on-board transceiver (i.e. coax) or | 513 | /* Determine if we're using the on-board transceiver (i.e. coax) or |
@@ -529,7 +529,7 @@ static int __init do_elmc_probe(struct net_device *dev) | |||
529 | 529 | ||
530 | size = 0x4000; /* check for 16K mem */ | 530 | size = 0x4000; /* check for 16K mem */ |
531 | if (!check586(dev, dev->mem_start, size)) { | 531 | if (!check586(dev, dev->mem_start, size)) { |
532 | printk(KERN_ERR "%s: memprobe, Can't find memory at 0x%lx!\n", dev->name, | 532 | pr_err("%s: memprobe, Can't find memory at 0x%lx!\n", dev->name, |
533 | dev->mem_start); | 533 | dev->mem_start); |
534 | retval = -ENODEV; | 534 | retval = -ENODEV; |
535 | goto err_out; | 535 | goto err_out; |
@@ -546,7 +546,7 @@ static int __init do_elmc_probe(struct net_device *dev) | |||
546 | pr->num_recv_buffs = NUM_RECV_BUFFS_16; | 546 | pr->num_recv_buffs = NUM_RECV_BUFFS_16; |
547 | 547 | ||
548 | /* dump all the assorted information */ | 548 | /* dump all the assorted information */ |
549 | printk(KERN_INFO "%s: IRQ %d, %sternal xcvr, memory %#lx-%#lx.\n", dev->name, | 549 | pr_info("%s: IRQ %d, %sternal xcvr, memory %#lx-%#lx.\n", dev->name, |
550 | dev->irq, dev->if_port ? "ex" : "in", | 550 | dev->irq, dev->if_port ? "ex" : "in", |
551 | dev->mem_start, dev->mem_end - 1); | 551 | dev->mem_start, dev->mem_end - 1); |
552 | 552 | ||
@@ -555,7 +555,7 @@ static int __init do_elmc_probe(struct net_device *dev) | |||
555 | for (i = 0; i < 6; i++) | 555 | for (i = 0; i < 6; i++) |
556 | dev->dev_addr[i] = inb(dev->base_addr + i); | 556 | dev->dev_addr[i] = inb(dev->base_addr + i); |
557 | 557 | ||
558 | printk(KERN_INFO "%s: hardware address %pM\n", | 558 | pr_info("%s: hardware address %pM\n", |
559 | dev->name, dev->dev_addr); | 559 | dev->name, dev->dev_addr); |
560 | 560 | ||
561 | dev->netdev_ops = &netdev_ops; | 561 | dev->netdev_ops = &netdev_ops; |
@@ -660,7 +660,7 @@ static int init586(struct net_device *dev) | |||
660 | } | 660 | } |
661 | 661 | ||
662 | if ((cfg_cmd->cmd_status & (STAT_OK | STAT_COMPL)) != (STAT_COMPL | STAT_OK)) { | 662 | if ((cfg_cmd->cmd_status & (STAT_OK | STAT_COMPL)) != (STAT_COMPL | STAT_OK)) { |
663 | printk(KERN_WARNING "%s (elmc): configure command failed: %x\n", dev->name, cfg_cmd->cmd_status); | 663 | pr_warning("%s (elmc): configure command failed: %x\n", dev->name, cfg_cmd->cmd_status); |
664 | return 1; | 664 | return 1; |
665 | } | 665 | } |
666 | /* | 666 | /* |
@@ -686,7 +686,8 @@ static int init586(struct net_device *dev) | |||
686 | } | 686 | } |
687 | 687 | ||
688 | if ((ias_cmd->cmd_status & (STAT_OK | STAT_COMPL)) != (STAT_OK | STAT_COMPL)) { | 688 | if ((ias_cmd->cmd_status & (STAT_OK | STAT_COMPL)) != (STAT_OK | STAT_COMPL)) { |
689 | printk(KERN_WARNING "%s (elmc): individual address setup command failed: %04x\n", dev->name, ias_cmd->cmd_status); | 689 | pr_warning("%s (elmc): individual address setup command failed: %04x\n", |
690 | dev->name, ias_cmd->cmd_status); | ||
690 | return 1; | 691 | return 1; |
691 | } | 692 | } |
692 | /* | 693 | /* |
@@ -707,7 +708,7 @@ static int init586(struct net_device *dev) | |||
707 | s = jiffies; | 708 | s = jiffies; |
708 | while (!(tdr_cmd->cmd_status & STAT_COMPL)) { | 709 | while (!(tdr_cmd->cmd_status & STAT_COMPL)) { |
709 | if (time_after(jiffies, s + 30*HZ/100)) { | 710 | if (time_after(jiffies, s + 30*HZ/100)) { |
710 | printk(KERN_WARNING "%s: %d Problems while running the TDR.\n", dev->name, __LINE__); | 711 | pr_warning("%s: %d Problems while running the TDR.\n", dev->name, __LINE__); |
711 | result = 1; | 712 | result = 1; |
712 | break; | 713 | break; |
713 | } | 714 | } |
@@ -723,14 +724,14 @@ static int init586(struct net_device *dev) | |||
723 | if (result & TDR_LNK_OK) { | 724 | if (result & TDR_LNK_OK) { |
724 | /* empty */ | 725 | /* empty */ |
725 | } else if (result & TDR_XCVR_PRB) { | 726 | } else if (result & TDR_XCVR_PRB) { |
726 | printk(KERN_WARNING "%s: TDR: Transceiver problem!\n", dev->name); | 727 | pr_warning("%s: TDR: Transceiver problem!\n", dev->name); |
727 | } else if (result & TDR_ET_OPN) { | 728 | } else if (result & TDR_ET_OPN) { |
728 | printk(KERN_WARNING "%s: TDR: No correct termination %d clocks away.\n", dev->name, result & TDR_TIMEMASK); | 729 | pr_warning("%s: TDR: No correct termination %d clocks away.\n", dev->name, result & TDR_TIMEMASK); |
729 | } else if (result & TDR_ET_SRT) { | 730 | } else if (result & TDR_ET_SRT) { |
730 | if (result & TDR_TIMEMASK) /* time == 0 -> strange :-) */ | 731 | if (result & TDR_TIMEMASK) /* time == 0 -> strange :-) */ |
731 | printk(KERN_WARNING "%s: TDR: Detected a short circuit %d clocks away.\n", dev->name, result & TDR_TIMEMASK); | 732 | pr_warning("%s: TDR: Detected a short circuit %d clocks away.\n", dev->name, result & TDR_TIMEMASK); |
732 | } else { | 733 | } else { |
733 | printk(KERN_WARNING "%s: TDR: Unknown status %04x\n", dev->name, result); | 734 | pr_warning("%s: TDR: Unknown status %04x\n", dev->name, result); |
734 | } | 735 | } |
735 | } | 736 | } |
736 | /* | 737 | /* |
@@ -774,11 +775,11 @@ static int init586(struct net_device *dev) | |||
774 | /* I don't understand this: do we really need memory after the init? */ | 775 | /* I don't understand this: do we really need memory after the init? */ |
775 | int len = ((char *) p->iscp - (char *) ptr - 8) / 6; | 776 | int len = ((char *) p->iscp - (char *) ptr - 8) / 6; |
776 | if (len <= 0) { | 777 | if (len <= 0) { |
777 | printk(KERN_ERR "%s: Ooooops, no memory for MC-Setup!\n", dev->name); | 778 | pr_err("%s: Ooooops, no memory for MC-Setup!\n", dev->name); |
778 | } else { | 779 | } else { |
779 | if (len < num_addrs) { | 780 | if (len < num_addrs) { |
780 | num_addrs = len; | 781 | num_addrs = len; |
781 | printk(KERN_WARNING "%s: Sorry, can only apply %d MC-Address(es).\n", | 782 | pr_warning("%s: Sorry, can only apply %d MC-Address(es).\n", |
782 | dev->name, num_addrs); | 783 | dev->name, num_addrs); |
783 | } | 784 | } |
784 | mc_cmd = (struct mcsetup_cmd_struct *) ptr; | 785 | mc_cmd = (struct mcsetup_cmd_struct *) ptr; |
@@ -799,7 +800,7 @@ static int init586(struct net_device *dev) | |||
799 | break; | 800 | break; |
800 | } | 801 | } |
801 | if (!(mc_cmd->cmd_status & STAT_COMPL)) { | 802 | if (!(mc_cmd->cmd_status & STAT_COMPL)) { |
802 | printk(KERN_WARNING "%s: Can't apply multicast-address-list.\n", dev->name); | 803 | pr_warning("%s: Can't apply multicast-address-list.\n", dev->name); |
803 | } | 804 | } |
804 | } | 805 | } |
805 | } | 806 | } |
@@ -812,7 +813,7 @@ static int init586(struct net_device *dev) | |||
812 | p->xmit_buffs[i] = (struct tbd_struct *) ptr; /* TBD */ | 813 | p->xmit_buffs[i] = (struct tbd_struct *) ptr; /* TBD */ |
813 | ptr = (char *) ptr + sizeof(struct tbd_struct); | 814 | ptr = (char *) ptr + sizeof(struct tbd_struct); |
814 | if ((void *) ptr > (void *) p->iscp) { | 815 | if ((void *) ptr > (void *) p->iscp) { |
815 | printk(KERN_ERR "%s: not enough shared-mem for your configuration!\n", dev->name); | 816 | pr_err("%s: not enough shared-mem for your configuration!\n", dev->name); |
816 | return 1; | 817 | return 1; |
817 | } | 818 | } |
818 | memset((char *) (p->xmit_cmds[i]), 0, sizeof(struct transmit_cmd_struct)); | 819 | memset((char *) (p->xmit_cmds[i]), 0, sizeof(struct transmit_cmd_struct)); |
@@ -936,7 +937,8 @@ elmc_interrupt(int irq, void *dev_id) | |||
936 | if (stat & STAT_CNA) { | 937 | if (stat & STAT_CNA) { |
937 | /* CU went 'not ready' */ | 938 | /* CU went 'not ready' */ |
938 | if (netif_running(dev)) { | 939 | if (netif_running(dev)) { |
939 | printk(KERN_WARNING "%s: oops! CU has left active state. stat: %04x/%04x.\n", dev->name, (int) stat, (int) p->scb->status); | 940 | pr_warning("%s: oops! CU has left active state. stat: %04x/%04x.\n", |
941 | dev->name, (int) stat, (int) p->scb->status); | ||
940 | } | 942 | } |
941 | } | 943 | } |
942 | #endif | 944 | #endif |
@@ -951,7 +953,8 @@ elmc_interrupt(int irq, void *dev_id) | |||
951 | p->scb->cmd = RUC_RESUME; | 953 | p->scb->cmd = RUC_RESUME; |
952 | elmc_attn586(); | 954 | elmc_attn586(); |
953 | } else { | 955 | } else { |
954 | printk(KERN_WARNING "%s: Receiver-Unit went 'NOT READY': %04x/%04x.\n", dev->name, (int) stat, (int) p->scb->status); | 956 | pr_warning("%s: Receiver-Unit went 'NOT READY': %04x/%04x.\n", |
957 | dev->name, (int) stat, (int) p->scb->status); | ||
955 | elmc_rnr_int(dev); | 958 | elmc_rnr_int(dev); |
956 | } | 959 | } |
957 | } | 960 | } |
@@ -995,11 +998,11 @@ static void elmc_rcv_int(struct net_device *dev) | |||
995 | dev->stats.rx_dropped++; | 998 | dev->stats.rx_dropped++; |
996 | } | 999 | } |
997 | } else { | 1000 | } else { |
998 | printk(KERN_WARNING "%s: received oversized frame.\n", dev->name); | 1001 | pr_warning("%s: received oversized frame.\n", dev->name); |
999 | dev->stats.rx_dropped++; | 1002 | dev->stats.rx_dropped++; |
1000 | } | 1003 | } |
1001 | } else { /* frame !(ok), only with 'save-bad-frames' */ | 1004 | } else { /* frame !(ok), only with 'save-bad-frames' */ |
1002 | printk(KERN_WARNING "%s: oops! rfd-error-status: %04x\n", dev->name, status); | 1005 | pr_warning("%s: oops! rfd-error-status: %04x\n", dev->name, status); |
1003 | dev->stats.rx_errors++; | 1006 | dev->stats.rx_errors++; |
1004 | } | 1007 | } |
1005 | p->rfd_top->status = 0; | 1008 | p->rfd_top->status = 0; |
@@ -1028,7 +1031,7 @@ static void elmc_rnr_int(struct net_device *dev) | |||
1028 | alloc_rfa(dev, (char *) p->rfd_first); | 1031 | alloc_rfa(dev, (char *) p->rfd_first); |
1029 | startrecv586(dev); /* restart RU */ | 1032 | startrecv586(dev); /* restart RU */ |
1030 | 1033 | ||
1031 | printk(KERN_WARNING "%s: Receive-Unit restarted. Status: %04x\n", dev->name, p->scb->status); | 1034 | pr_warning("%s: Receive-Unit restarted. Status: %04x\n", dev->name, p->scb->status); |
1032 | 1035 | ||
1033 | } | 1036 | } |
1034 | 1037 | ||
@@ -1043,7 +1046,7 @@ static void elmc_xmt_int(struct net_device *dev) | |||
1043 | 1046 | ||
1044 | status = p->xmit_cmds[p->xmit_last]->cmd_status; | 1047 | status = p->xmit_cmds[p->xmit_last]->cmd_status; |
1045 | if (!(status & STAT_COMPL)) { | 1048 | if (!(status & STAT_COMPL)) { |
1046 | printk(KERN_WARNING "%s: strange .. xmit-int without a 'COMPLETE'\n", dev->name); | 1049 | pr_warning("%s: strange .. xmit-int without a 'COMPLETE'\n", dev->name); |
1047 | } | 1050 | } |
1048 | if (status & STAT_OK) { | 1051 | if (status & STAT_OK) { |
1049 | dev->stats.tx_packets++; | 1052 | dev->stats.tx_packets++; |
@@ -1051,18 +1054,18 @@ static void elmc_xmt_int(struct net_device *dev) | |||
1051 | } else { | 1054 | } else { |
1052 | dev->stats.tx_errors++; | 1055 | dev->stats.tx_errors++; |
1053 | if (status & TCMD_LATECOLL) { | 1056 | if (status & TCMD_LATECOLL) { |
1054 | printk(KERN_WARNING "%s: late collision detected.\n", dev->name); | 1057 | pr_warning("%s: late collision detected.\n", dev->name); |
1055 | dev->stats.collisions++; | 1058 | dev->stats.collisions++; |
1056 | } else if (status & TCMD_NOCARRIER) { | 1059 | } else if (status & TCMD_NOCARRIER) { |
1057 | dev->stats.tx_carrier_errors++; | 1060 | dev->stats.tx_carrier_errors++; |
1058 | printk(KERN_WARNING "%s: no carrier detected.\n", dev->name); | 1061 | pr_warning("%s: no carrier detected.\n", dev->name); |
1059 | } else if (status & TCMD_LOSTCTS) { | 1062 | } else if (status & TCMD_LOSTCTS) { |
1060 | printk(KERN_WARNING "%s: loss of CTS detected.\n", dev->name); | 1063 | pr_warning("%s: loss of CTS detected.\n", dev->name); |
1061 | } else if (status & TCMD_UNDERRUN) { | 1064 | } else if (status & TCMD_UNDERRUN) { |
1062 | dev->stats.tx_fifo_errors++; | 1065 | dev->stats.tx_fifo_errors++; |
1063 | printk(KERN_WARNING "%s: DMA underrun detected.\n", dev->name); | 1066 | pr_warning("%s: DMA underrun detected.\n", dev->name); |
1064 | } else if (status & TCMD_MAXCOLL) { | 1067 | } else if (status & TCMD_MAXCOLL) { |
1065 | printk(KERN_WARNING "%s: Max. collisions exceeded.\n", dev->name); | 1068 | pr_warning("%s: Max. collisions exceeded.\n", dev->name); |
1066 | dev->stats.collisions += 16; | 1069 | dev->stats.collisions += 16; |
1067 | } | 1070 | } |
1068 | } | 1071 | } |
@@ -1099,10 +1102,11 @@ static void elmc_timeout(struct net_device *dev) | |||
1099 | struct priv *p = netdev_priv(dev); | 1102 | struct priv *p = netdev_priv(dev); |
1100 | /* COMMAND-UNIT active? */ | 1103 | /* COMMAND-UNIT active? */ |
1101 | if (p->scb->status & CU_ACTIVE) { | 1104 | if (p->scb->status & CU_ACTIVE) { |
1102 | #ifdef DEBUG | 1105 | pr_debug("%s: strange ... timeout with CU active?!?\n", dev->name); |
1103 | printk("%s: strange ... timeout with CU active?!?\n", dev->name); | 1106 | pr_debug("%s: X0: %04x N0: %04x N1: %04x %d\n", dev->name, |
1104 | printk("%s: X0: %04x N0: %04x N1: %04x %d\n", dev->name, (int) p->xmit_cmds[0]->cmd_status, (int) p->nop_cmds[0]->cmd_status, (int) p->nop_cmds[1]->cmd_status, (int) p->nop_point); | 1107 | (int)p->xmit_cmds[0]->cmd_status, |
1105 | #endif | 1108 | (int)p->nop_cmds[0]->cmd_status, |
1109 | (int)p->nop_cmds[1]->cmd_status, (int)p->nop_point); | ||
1106 | p->scb->cmd = CUC_ABORT; | 1110 | p->scb->cmd = CUC_ABORT; |
1107 | elmc_attn586(); | 1111 | elmc_attn586(); |
1108 | WAIT_4_SCB_CMD(); | 1112 | WAIT_4_SCB_CMD(); |
@@ -1112,10 +1116,10 @@ static void elmc_timeout(struct net_device *dev) | |||
1112 | WAIT_4_SCB_CMD(); | 1116 | WAIT_4_SCB_CMD(); |
1113 | netif_wake_queue(dev); | 1117 | netif_wake_queue(dev); |
1114 | } else { | 1118 | } else { |
1115 | #ifdef DEBUG | 1119 | pr_debug("%s: xmitter timed out, try to restart! stat: %04x\n", |
1116 | printk("%s: xmitter timed out, try to restart! stat: %04x\n", dev->name, p->scb->status); | 1120 | dev->name, p->scb->status); |
1117 | printk("%s: command-stats: %04x %04x\n", dev->name, p->xmit_cmds[0]->cmd_status, p->xmit_cmds[1]->cmd_status); | 1121 | pr_debug("%s: command-stats: %04x %04x\n", dev->name, |
1118 | #endif | 1122 | p->xmit_cmds[0]->cmd_status, p->xmit_cmds[1]->cmd_status); |
1119 | elmc_close(dev); | 1123 | elmc_close(dev); |
1120 | elmc_open(dev); | 1124 | elmc_open(dev); |
1121 | } | 1125 | } |
@@ -1162,7 +1166,7 @@ static int elmc_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
1162 | break; | 1166 | break; |
1163 | } | 1167 | } |
1164 | if (i == 15) { | 1168 | if (i == 15) { |
1165 | printk(KERN_WARNING "%s: Can't start transmit-command.\n", dev->name); | 1169 | pr_warning("%s: Can't start transmit-command.\n", dev->name); |
1166 | } | 1170 | } |
1167 | } | 1171 | } |
1168 | #else | 1172 | #else |
@@ -1287,11 +1291,12 @@ int __init init_module(void) | |||
1287 | free_netdev(dev); | 1291 | free_netdev(dev); |
1288 | if (io[this_dev]==0) | 1292 | if (io[this_dev]==0) |
1289 | break; | 1293 | break; |
1290 | printk(KERN_WARNING "3c523.c: No 3c523 card found at io=%#x\n",io[this_dev]); | 1294 | pr_warning("3c523.c: No 3c523 card found at io=%#x\n",io[this_dev]); |
1291 | } | 1295 | } |
1292 | 1296 | ||
1293 | if(found==0) { | 1297 | if(found==0) { |
1294 | if(io[0]==0) printk(KERN_NOTICE "3c523.c: No 3c523 cards found\n"); | 1298 | if (io[0]==0) |
1299 | pr_notice("3c523.c: No 3c523 cards found\n"); | ||
1295 | return -ENXIO; | 1300 | return -ENXIO; |
1296 | } else return 0; | 1301 | } else return 0; |
1297 | } | 1302 | } |
diff --git a/drivers/net/3c527.c b/drivers/net/3c527.c index b61073c42bf8..c10ca30458f6 100644 --- a/drivers/net/3c527.c +++ b/drivers/net/3c527.c | |||
@@ -125,8 +125,6 @@ static const char* cardname = DRV_NAME; | |||
125 | #define NET_DEBUG 2 | 125 | #define NET_DEBUG 2 |
126 | #endif | 126 | #endif |
127 | 127 | ||
128 | #undef DEBUG_IRQ | ||
129 | |||
130 | static unsigned int mc32_debug = NET_DEBUG; | 128 | static unsigned int mc32_debug = NET_DEBUG; |
131 | 129 | ||
132 | /* The number of low I/O ports used by the ethercard. */ | 130 | /* The number of low I/O ports used by the ethercard. */ |
@@ -351,15 +349,15 @@ static int __init mc32_probe1(struct net_device *dev, int slot) | |||
351 | /* Time to play MCA games */ | 349 | /* Time to play MCA games */ |
352 | 350 | ||
353 | if (mc32_debug && version_printed++ == 0) | 351 | if (mc32_debug && version_printed++ == 0) |
354 | printk(KERN_DEBUG "%s", version); | 352 | pr_debug("%s", version); |
355 | 353 | ||
356 | printk(KERN_INFO "%s: %s found in slot %d:", dev->name, cardname, slot); | 354 | pr_info("%s: %s found in slot %d: ", dev->name, cardname, slot); |
357 | 355 | ||
358 | POS = mca_read_stored_pos(slot, 2); | 356 | POS = mca_read_stored_pos(slot, 2); |
359 | 357 | ||
360 | if(!(POS&1)) | 358 | if(!(POS&1)) |
361 | { | 359 | { |
362 | printk(" disabled.\n"); | 360 | pr_cont("disabled.\n"); |
363 | return -ENODEV; | 361 | return -ENODEV; |
364 | } | 362 | } |
365 | 363 | ||
@@ -370,7 +368,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot) | |||
370 | POS = mca_read_stored_pos(slot, 4); | 368 | POS = mca_read_stored_pos(slot, 4); |
371 | if(!(POS&1)) | 369 | if(!(POS&1)) |
372 | { | 370 | { |
373 | printk("memory window disabled.\n"); | 371 | pr_cont("memory window disabled.\n"); |
374 | return -ENODEV; | 372 | return -ENODEV; |
375 | } | 373 | } |
376 | 374 | ||
@@ -379,7 +377,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot) | |||
379 | i=(POS>>4)&3; | 377 | i=(POS>>4)&3; |
380 | if(i==3) | 378 | if(i==3) |
381 | { | 379 | { |
382 | printk("invalid memory window.\n"); | 380 | pr_cont("invalid memory window.\n"); |
383 | return -ENODEV; | 381 | return -ENODEV; |
384 | } | 382 | } |
385 | 383 | ||
@@ -392,11 +390,11 @@ static int __init mc32_probe1(struct net_device *dev, int slot) | |||
392 | 390 | ||
393 | if(!request_region(dev->base_addr, MC32_IO_EXTENT, cardname)) | 391 | if(!request_region(dev->base_addr, MC32_IO_EXTENT, cardname)) |
394 | { | 392 | { |
395 | printk("io 0x%3lX, which is busy.\n", dev->base_addr); | 393 | pr_cont("io 0x%3lX, which is busy.\n", dev->base_addr); |
396 | return -EBUSY; | 394 | return -EBUSY; |
397 | } | 395 | } |
398 | 396 | ||
399 | printk("io 0x%3lX irq %d mem 0x%lX (%dK)\n", | 397 | pr_cont("io 0x%3lX irq %d mem 0x%lX (%dK)\n", |
400 | dev->base_addr, dev->irq, dev->mem_start, i/1024); | 398 | dev->base_addr, dev->irq, dev->mem_start, i/1024); |
401 | 399 | ||
402 | 400 | ||
@@ -416,7 +414,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot) | |||
416 | dev->dev_addr[i] = mca_read_pos(slot,3); | 414 | dev->dev_addr[i] = mca_read_pos(slot,3); |
417 | } | 415 | } |
418 | 416 | ||
419 | printk("%s: Address %pM", dev->name, dev->dev_addr); | 417 | pr_info("%s: Address %pM ", dev->name, dev->dev_addr); |
420 | 418 | ||
421 | mca_write_pos(slot, 6, 0); | 419 | mca_write_pos(slot, 6, 0); |
422 | mca_write_pos(slot, 7, 0); | 420 | mca_write_pos(slot, 7, 0); |
@@ -424,9 +422,9 @@ static int __init mc32_probe1(struct net_device *dev, int slot) | |||
424 | POS = mca_read_stored_pos(slot, 4); | 422 | POS = mca_read_stored_pos(slot, 4); |
425 | 423 | ||
426 | if(POS&2) | 424 | if(POS&2) |
427 | printk(" : BNC port selected.\n"); | 425 | pr_cont(": BNC port selected.\n"); |
428 | else | 426 | else |
429 | printk(" : AUI port selected.\n"); | 427 | pr_cont(": AUI port selected.\n"); |
430 | 428 | ||
431 | POS=inb(dev->base_addr+HOST_CTRL); | 429 | POS=inb(dev->base_addr+HOST_CTRL); |
432 | POS|=HOST_CTRL_ATTN|HOST_CTRL_RESET; | 430 | POS|=HOST_CTRL_ATTN|HOST_CTRL_RESET; |
@@ -447,7 +445,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot) | |||
447 | err = request_irq(dev->irq, &mc32_interrupt, IRQF_SHARED | IRQF_SAMPLE_RANDOM, DRV_NAME, dev); | 445 | err = request_irq(dev->irq, &mc32_interrupt, IRQF_SHARED | IRQF_SAMPLE_RANDOM, DRV_NAME, dev); |
448 | if (err) { | 446 | if (err) { |
449 | release_region(dev->base_addr, MC32_IO_EXTENT); | 447 | release_region(dev->base_addr, MC32_IO_EXTENT); |
450 | printk(KERN_ERR "%s: unable to get IRQ %d.\n", DRV_NAME, dev->irq); | 448 | pr_err("%s: unable to get IRQ %d.\n", DRV_NAME, dev->irq); |
451 | goto err_exit_ports; | 449 | goto err_exit_ports; |
452 | } | 450 | } |
453 | 451 | ||
@@ -463,7 +461,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot) | |||
463 | i++; | 461 | i++; |
464 | if(i == 1000) | 462 | if(i == 1000) |
465 | { | 463 | { |
466 | printk(KERN_ERR "%s: failed to boot adapter.\n", dev->name); | 464 | pr_err("%s: failed to boot adapter.\n", dev->name); |
467 | err = -ENODEV; | 465 | err = -ENODEV; |
468 | goto err_exit_irq; | 466 | goto err_exit_irq; |
469 | } | 467 | } |
@@ -475,10 +473,10 @@ static int __init mc32_probe1(struct net_device *dev, int slot) | |||
475 | if(base>0) | 473 | if(base>0) |
476 | { | 474 | { |
477 | if(base < 0x0C) | 475 | if(base < 0x0C) |
478 | printk(KERN_ERR "%s: %s%s.\n", dev->name, failures[base-1], | 476 | pr_err("%s: %s%s.\n", dev->name, failures[base-1], |
479 | base<0x0A?" test failure":""); | 477 | base<0x0A?" test failure":""); |
480 | else | 478 | else |
481 | printk(KERN_ERR "%s: unknown failure %d.\n", dev->name, base); | 479 | pr_err("%s: unknown failure %d.\n", dev->name, base); |
482 | err = -ENODEV; | 480 | err = -ENODEV; |
483 | goto err_exit_irq; | 481 | goto err_exit_irq; |
484 | } | 482 | } |
@@ -494,7 +492,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot) | |||
494 | udelay(50); | 492 | udelay(50); |
495 | if(n>100) | 493 | if(n>100) |
496 | { | 494 | { |
497 | printk(KERN_ERR "%s: mailbox read fail (%d).\n", dev->name, i); | 495 | pr_err("%s: mailbox read fail (%d).\n", dev->name, i); |
498 | err = -ENODEV; | 496 | err = -ENODEV; |
499 | goto err_exit_irq; | 497 | goto err_exit_irq; |
500 | } | 498 | } |
@@ -527,7 +525,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot) | |||
527 | init_completion(&lp->execution_cmd); | 525 | init_completion(&lp->execution_cmd); |
528 | init_completion(&lp->xceiver_cmd); | 526 | init_completion(&lp->xceiver_cmd); |
529 | 527 | ||
530 | printk("%s: Firmware Rev %d. %d RX buffers, %d TX buffers. Base of 0x%08X.\n", | 528 | pr_info("%s: Firmware Rev %d. %d RX buffers, %d TX buffers. Base of 0x%08X.\n", |
531 | dev->name, lp->exec_box->data[12], lp->rx_len, lp->tx_len, lp->base); | 529 | dev->name, lp->exec_box->data[12], lp->rx_len, lp->tx_len, lp->base); |
532 | 530 | ||
533 | dev->netdev_ops = &netdev_ops; | 531 | dev->netdev_ops = &netdev_ops; |
@@ -939,7 +937,7 @@ static int mc32_open(struct net_device *dev) | |||
939 | */ | 937 | */ |
940 | 938 | ||
941 | if(mc32_command(dev, 8, descnumbuffs, 4)) { | 939 | if(mc32_command(dev, 8, descnumbuffs, 4)) { |
942 | printk("%s: %s rejected our buffer configuration!\n", | 940 | pr_info("%s: %s rejected our buffer configuration!\n", |
943 | dev->name, cardname); | 941 | dev->name, cardname); |
944 | mc32_close(dev); | 942 | mc32_close(dev); |
945 | return -ENOBUFS; | 943 | return -ENOBUFS; |
@@ -995,7 +993,7 @@ static int mc32_open(struct net_device *dev) | |||
995 | 993 | ||
996 | static void mc32_timeout(struct net_device *dev) | 994 | static void mc32_timeout(struct net_device *dev) |
997 | { | 995 | { |
998 | printk(KERN_WARNING "%s: transmit timed out?\n", dev->name); | 996 | pr_warning("%s: transmit timed out?\n", dev->name); |
999 | /* Try to restart the adaptor. */ | 997 | /* Try to restart the adaptor. */ |
1000 | netif_wake_queue(dev); | 998 | netif_wake_queue(dev); |
1001 | } | 999 | } |
@@ -1335,11 +1333,9 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id) | |||
1335 | { | 1333 | { |
1336 | status=inb(ioaddr+HOST_CMD); | 1334 | status=inb(ioaddr+HOST_CMD); |
1337 | 1335 | ||
1338 | #ifdef DEBUG_IRQ | 1336 | pr_debug("Status TX%d RX%d EX%d OV%d BC%d\n", |
1339 | printk("Status TX%d RX%d EX%d OV%d BC%d\n", | ||
1340 | (status&7), (status>>3)&7, (status>>6)&1, | 1337 | (status&7), (status>>3)&7, (status>>6)&1, |
1341 | (status>>7)&1, boguscount); | 1338 | (status>>7)&1, boguscount); |
1342 | #endif | ||
1343 | 1339 | ||
1344 | switch(status&7) | 1340 | switch(status&7) |
1345 | { | 1341 | { |
@@ -1354,7 +1350,7 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id) | |||
1354 | complete(&lp->xceiver_cmd); | 1350 | complete(&lp->xceiver_cmd); |
1355 | break; | 1351 | break; |
1356 | default: | 1352 | default: |
1357 | printk("%s: strange tx ack %d\n", dev->name, status&7); | 1353 | pr_notice("%s: strange tx ack %d\n", dev->name, status&7); |
1358 | } | 1354 | } |
1359 | status>>=3; | 1355 | status>>=3; |
1360 | switch(status&7) | 1356 | switch(status&7) |
@@ -1376,7 +1372,7 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id) | |||
1376 | mc32_start_transceiver(dev); | 1372 | mc32_start_transceiver(dev); |
1377 | break; | 1373 | break; |
1378 | default: | 1374 | default: |
1379 | printk("%s: strange rx ack %d\n", | 1375 | pr_notice("%s: strange rx ack %d\n", |
1380 | dev->name, status&7); | 1376 | dev->name, status&7); |
1381 | } | 1377 | } |
1382 | status>>=3; | 1378 | status>>=3; |
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index c56698402420..a6e8a2da3bcd 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
@@ -828,14 +828,14 @@ static int vortex_resume(struct pci_dev *pdev) | |||
828 | pci_restore_state(pdev); | 828 | pci_restore_state(pdev); |
829 | err = pci_enable_device(pdev); | 829 | err = pci_enable_device(pdev); |
830 | if (err) { | 830 | if (err) { |
831 | printk(KERN_WARNING "%s: Could not enable device \n", | 831 | pr_warning("%s: Could not enable device\n", |
832 | dev->name); | 832 | dev->name); |
833 | return err; | 833 | return err; |
834 | } | 834 | } |
835 | pci_set_master(pdev); | 835 | pci_set_master(pdev); |
836 | if (request_irq(dev->irq, vp->full_bus_master_rx ? | 836 | if (request_irq(dev->irq, vp->full_bus_master_rx ? |
837 | &boomerang_interrupt : &vortex_interrupt, IRQF_SHARED, dev->name, dev)) { | 837 | &boomerang_interrupt : &vortex_interrupt, IRQF_SHARED, dev->name, dev)) { |
838 | printk(KERN_WARNING "%s: Could not reserve IRQ %d\n", dev->name, dev->irq); | 838 | pr_warning("%s: Could not reserve IRQ %d\n", dev->name, dev->irq); |
839 | pci_disable_device(pdev); | 839 | pci_disable_device(pdev); |
840 | return -EBUSY; | 840 | return -EBUSY; |
841 | } | 841 | } |
@@ -894,7 +894,7 @@ static int __devexit vortex_eisa_remove(struct device *device) | |||
894 | dev = eisa_get_drvdata(edev); | 894 | dev = eisa_get_drvdata(edev); |
895 | 895 | ||
896 | if (!dev) { | 896 | if (!dev) { |
897 | printk("vortex_eisa_remove called for Compaq device!\n"); | 897 | pr_err("vortex_eisa_remove called for Compaq device!\n"); |
898 | BUG(); | 898 | BUG(); |
899 | } | 899 | } |
900 | 900 | ||
@@ -1051,7 +1051,7 @@ static int __devinit vortex_probe1(struct device *gendev, | |||
1051 | struct eisa_device *edev = NULL; | 1051 | struct eisa_device *edev = NULL; |
1052 | 1052 | ||
1053 | if (!printed_version) { | 1053 | if (!printed_version) { |
1054 | printk (version); | 1054 | pr_info("%s", version); |
1055 | printed_version = 1; | 1055 | printed_version = 1; |
1056 | } | 1056 | } |
1057 | 1057 | ||
@@ -1068,7 +1068,7 @@ static int __devinit vortex_probe1(struct device *gendev, | |||
1068 | dev = alloc_etherdev(sizeof(*vp)); | 1068 | dev = alloc_etherdev(sizeof(*vp)); |
1069 | retval = -ENOMEM; | 1069 | retval = -ENOMEM; |
1070 | if (!dev) { | 1070 | if (!dev) { |
1071 | printk (KERN_ERR PFX "unable to allocate etherdev, aborting\n"); | 1071 | pr_err(PFX "unable to allocate etherdev, aborting\n"); |
1072 | goto out; | 1072 | goto out; |
1073 | } | 1073 | } |
1074 | SET_NETDEV_DEV(dev, gendev); | 1074 | SET_NETDEV_DEV(dev, gendev); |
@@ -1100,9 +1100,9 @@ static int __devinit vortex_probe1(struct device *gendev, | |||
1100 | 1100 | ||
1101 | print_info = (vortex_debug > 1); | 1101 | print_info = (vortex_debug > 1); |
1102 | if (print_info) | 1102 | if (print_info) |
1103 | printk (KERN_INFO "See Documentation/networking/vortex.txt\n"); | 1103 | pr_info("See Documentation/networking/vortex.txt\n"); |
1104 | 1104 | ||
1105 | printk(KERN_INFO "%s: 3Com %s %s at %p.\n", | 1105 | pr_info("%s: 3Com %s %s at %p.\n", |
1106 | print_name, | 1106 | print_name, |
1107 | pdev ? "PCI" : "EISA", | 1107 | pdev ? "PCI" : "EISA", |
1108 | vci->name, | 1108 | vci->name, |
@@ -1144,10 +1144,9 @@ static int __devinit vortex_probe1(struct device *gendev, | |||
1144 | chip only. */ | 1144 | chip only. */ |
1145 | pci_read_config_byte(pdev, PCI_LATENCY_TIMER, &pci_latency); | 1145 | pci_read_config_byte(pdev, PCI_LATENCY_TIMER, &pci_latency); |
1146 | if (pci_latency < new_latency) { | 1146 | if (pci_latency < new_latency) { |
1147 | printk(KERN_INFO "%s: Overriding PCI latency" | 1147 | pr_info("%s: Overriding PCI latency timer (CFLT) setting of %d, new value is %d.\n", |
1148 | " timer (CFLT) setting of %d, new value is %d.\n", | ||
1149 | print_name, pci_latency, new_latency); | 1148 | print_name, pci_latency, new_latency); |
1150 | pci_write_config_byte(pdev, PCI_LATENCY_TIMER, new_latency); | 1149 | pci_write_config_byte(pdev, PCI_LATENCY_TIMER, new_latency); |
1151 | } | 1150 | } |
1152 | } | 1151 | } |
1153 | } | 1152 | } |
@@ -1236,17 +1235,17 @@ static int __devinit vortex_probe1(struct device *gendev, | |||
1236 | checksum = (checksum ^ (checksum >> 8)) & 0xff; | 1235 | checksum = (checksum ^ (checksum >> 8)) & 0xff; |
1237 | } | 1236 | } |
1238 | if ((checksum != 0x00) && !(vci->drv_flags & IS_TORNADO)) | 1237 | if ((checksum != 0x00) && !(vci->drv_flags & IS_TORNADO)) |
1239 | printk(" ***INVALID CHECKSUM %4.4x*** ", checksum); | 1238 | pr_cont(" ***INVALID CHECKSUM %4.4x*** ", checksum); |
1240 | for (i = 0; i < 3; i++) | 1239 | for (i = 0; i < 3; i++) |
1241 | ((__be16 *)dev->dev_addr)[i] = htons(eeprom[i + 10]); | 1240 | ((__be16 *)dev->dev_addr)[i] = htons(eeprom[i + 10]); |
1242 | memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); | 1241 | memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); |
1243 | if (print_info) | 1242 | if (print_info) |
1244 | printk(" %pM", dev->dev_addr); | 1243 | pr_cont(" %pM", dev->dev_addr); |
1245 | /* Unfortunately an all zero eeprom passes the checksum and this | 1244 | /* Unfortunately an all zero eeprom passes the checksum and this |
1246 | gets found in the wild in failure cases. Crypto is hard 8) */ | 1245 | gets found in the wild in failure cases. Crypto is hard 8) */ |
1247 | if (!is_valid_ether_addr(dev->dev_addr)) { | 1246 | if (!is_valid_ether_addr(dev->dev_addr)) { |
1248 | retval = -EINVAL; | 1247 | retval = -EINVAL; |
1249 | printk(KERN_ERR "*** EEPROM MAC address is invalid.\n"); | 1248 | pr_err("*** EEPROM MAC address is invalid.\n"); |
1250 | goto free_ring; /* With every pack */ | 1249 | goto free_ring; /* With every pack */ |
1251 | } | 1250 | } |
1252 | EL3WINDOW(2); | 1251 | EL3WINDOW(2); |
@@ -1254,17 +1253,17 @@ static int __devinit vortex_probe1(struct device *gendev, | |||
1254 | iowrite8(dev->dev_addr[i], ioaddr + i); | 1253 | iowrite8(dev->dev_addr[i], ioaddr + i); |
1255 | 1254 | ||
1256 | if (print_info) | 1255 | if (print_info) |
1257 | printk(", IRQ %d\n", dev->irq); | 1256 | pr_cont(", IRQ %d\n", dev->irq); |
1258 | /* Tell them about an invalid IRQ. */ | 1257 | /* Tell them about an invalid IRQ. */ |
1259 | if (dev->irq <= 0 || dev->irq >= nr_irqs) | 1258 | if (dev->irq <= 0 || dev->irq >= nr_irqs) |
1260 | printk(KERN_WARNING " *** Warning: IRQ %d is unlikely to work! ***\n", | 1259 | pr_warning(" *** Warning: IRQ %d is unlikely to work! ***\n", |
1261 | dev->irq); | 1260 | dev->irq); |
1262 | 1261 | ||
1263 | EL3WINDOW(4); | 1262 | EL3WINDOW(4); |
1264 | step = (ioread8(ioaddr + Wn4_NetDiag) & 0x1e) >> 1; | 1263 | step = (ioread8(ioaddr + Wn4_NetDiag) & 0x1e) >> 1; |
1265 | if (print_info) { | 1264 | if (print_info) { |
1266 | printk(KERN_INFO " product code %02x%02x rev %02x.%d date %02d-" | 1265 | pr_info(" product code %02x%02x rev %02x.%d date %02d-%02d-%02d\n", |
1267 | "%02d-%02d\n", eeprom[6]&0xff, eeprom[6]>>8, eeprom[0x14], | 1266 | eeprom[6]&0xff, eeprom[6]>>8, eeprom[0x14], |
1268 | step, (eeprom[4]>>5) & 15, eeprom[4] & 31, eeprom[4]>>9); | 1267 | step, (eeprom[4]>>5) & 15, eeprom[4] & 31, eeprom[4]>>9); |
1269 | } | 1268 | } |
1270 | 1269 | ||
@@ -1279,8 +1278,7 @@ static int __devinit vortex_probe1(struct device *gendev, | |||
1279 | } | 1278 | } |
1280 | 1279 | ||
1281 | if (print_info) { | 1280 | if (print_info) { |
1282 | printk(KERN_INFO "%s: CardBus functions mapped " | 1281 | pr_info("%s: CardBus functions mapped %16.16llx->%p\n", |
1283 | "%16.16llx->%p\n", | ||
1284 | print_name, | 1282 | print_name, |
1285 | (unsigned long long)pci_resource_start(pdev, 2), | 1283 | (unsigned long long)pci_resource_start(pdev, 2), |
1286 | vp->cb_fn_base); | 1284 | vp->cb_fn_base); |
@@ -1307,7 +1305,7 @@ static int __devinit vortex_probe1(struct device *gendev, | |||
1307 | if (vp->info1 & 0x8000) { | 1305 | if (vp->info1 & 0x8000) { |
1308 | vp->full_duplex = 1; | 1306 | vp->full_duplex = 1; |
1309 | if (print_info) | 1307 | if (print_info) |
1310 | printk(KERN_INFO "Full duplex capable\n"); | 1308 | pr_info("Full duplex capable\n"); |
1311 | } | 1309 | } |
1312 | 1310 | ||
1313 | { | 1311 | { |
@@ -1319,9 +1317,9 @@ static int __devinit vortex_probe1(struct device *gendev, | |||
1319 | vp->available_media = 0x40; | 1317 | vp->available_media = 0x40; |
1320 | config = ioread32(ioaddr + Wn3_Config); | 1318 | config = ioread32(ioaddr + Wn3_Config); |
1321 | if (print_info) { | 1319 | if (print_info) { |
1322 | printk(KERN_DEBUG " Internal config register is %4.4x, " | 1320 | pr_debug(" Internal config register is %4.4x, transceivers %#x.\n", |
1323 | "transceivers %#x.\n", config, ioread16(ioaddr + Wn3_Options)); | 1321 | config, ioread16(ioaddr + Wn3_Options)); |
1324 | printk(KERN_INFO " %dK %s-wide RAM %s Rx:Tx split, %s%s interface.\n", | 1322 | pr_info(" %dK %s-wide RAM %s Rx:Tx split, %s%s interface.\n", |
1325 | 8 << RAM_SIZE(config), | 1323 | 8 << RAM_SIZE(config), |
1326 | RAM_WIDTH(config) ? "word" : "byte", | 1324 | RAM_WIDTH(config) ? "word" : "byte", |
1327 | ram_split[RAM_SPLIT(config)], | 1325 | ram_split[RAM_SPLIT(config)], |
@@ -1336,7 +1334,7 @@ static int __devinit vortex_probe1(struct device *gendev, | |||
1336 | } | 1334 | } |
1337 | 1335 | ||
1338 | if (vp->media_override != 7) { | 1336 | if (vp->media_override != 7) { |
1339 | printk(KERN_INFO "%s: Media override to transceiver type %d (%s).\n", | 1337 | pr_info("%s: Media override to transceiver type %d (%s).\n", |
1340 | print_name, vp->media_override, | 1338 | print_name, vp->media_override, |
1341 | media_tbl[vp->media_override].name); | 1339 | media_tbl[vp->media_override].name); |
1342 | dev->if_port = vp->media_override; | 1340 | dev->if_port = vp->media_override; |
@@ -1369,8 +1367,8 @@ static int __devinit vortex_probe1(struct device *gendev, | |||
1369 | if (mii_status && mii_status != 0xffff) { | 1367 | if (mii_status && mii_status != 0xffff) { |
1370 | vp->phys[phy_idx++] = phyx; | 1368 | vp->phys[phy_idx++] = phyx; |
1371 | if (print_info) { | 1369 | if (print_info) { |
1372 | printk(KERN_INFO " MII transceiver found at address %d," | 1370 | pr_info(" MII transceiver found at address %d, status %4x.\n", |
1373 | " status %4x.\n", phyx, mii_status); | 1371 | phyx, mii_status); |
1374 | } | 1372 | } |
1375 | if ((mii_status & 0x0040) == 0) | 1373 | if ((mii_status & 0x0040) == 0) |
1376 | mii_preamble_required++; | 1374 | mii_preamble_required++; |
@@ -1378,7 +1376,7 @@ static int __devinit vortex_probe1(struct device *gendev, | |||
1378 | } | 1376 | } |
1379 | mii_preamble_required--; | 1377 | mii_preamble_required--; |
1380 | if (phy_idx == 0) { | 1378 | if (phy_idx == 0) { |
1381 | printk(KERN_WARNING" ***WARNING*** No MII transceivers found!\n"); | 1379 | pr_warning(" ***WARNING*** No MII transceivers found!\n"); |
1382 | vp->phys[0] = 24; | 1380 | vp->phys[0] = 24; |
1383 | } else { | 1381 | } else { |
1384 | vp->advertising = mdio_read(dev, vp->phys[0], MII_ADVERTISE); | 1382 | vp->advertising = mdio_read(dev, vp->phys[0], MII_ADVERTISE); |
@@ -1394,7 +1392,7 @@ static int __devinit vortex_probe1(struct device *gendev, | |||
1394 | if (vp->capabilities & CapBusMaster) { | 1392 | if (vp->capabilities & CapBusMaster) { |
1395 | vp->full_bus_master_tx = 1; | 1393 | vp->full_bus_master_tx = 1; |
1396 | if (print_info) { | 1394 | if (print_info) { |
1397 | printk(KERN_INFO " Enabling bus-master transmits and %s receives.\n", | 1395 | pr_info(" Enabling bus-master transmits and %s receives.\n", |
1398 | (vp->info2 & 1) ? "early" : "whole-frame" ); | 1396 | (vp->info2 & 1) ? "early" : "whole-frame" ); |
1399 | } | 1397 | } |
1400 | vp->full_bus_master_rx = (vp->info2 & 1) ? 1 : 2; | 1398 | vp->full_bus_master_rx = (vp->info2 & 1) ? 1 : 2; |
@@ -1414,7 +1412,7 @@ static int __devinit vortex_probe1(struct device *gendev, | |||
1414 | dev->netdev_ops = &vortex_netdev_ops; | 1412 | dev->netdev_ops = &vortex_netdev_ops; |
1415 | 1413 | ||
1416 | if (print_info) { | 1414 | if (print_info) { |
1417 | printk(KERN_INFO "%s: scatter/gather %sabled. h/w checksums %sabled\n", | 1415 | pr_info("%s: scatter/gather %sabled. h/w checksums %sabled\n", |
1418 | print_name, | 1416 | print_name, |
1419 | (dev->features & NETIF_F_SG) ? "en":"dis", | 1417 | (dev->features & NETIF_F_SG) ? "en":"dis", |
1420 | (dev->features & NETIF_F_IP_CSUM) ? "en":"dis"); | 1418 | (dev->features & NETIF_F_IP_CSUM) ? "en":"dis"); |
@@ -1442,7 +1440,7 @@ free_region: | |||
1442 | if (vp->must_free_region) | 1440 | if (vp->must_free_region) |
1443 | release_region(dev->base_addr, vci->io_size); | 1441 | release_region(dev->base_addr, vci->io_size); |
1444 | free_netdev(dev); | 1442 | free_netdev(dev); |
1445 | printk(KERN_ERR PFX "vortex_probe1 fails. Returns %d\n", retval); | 1443 | pr_err(PFX "vortex_probe1 fails. Returns %d\n", retval); |
1446 | out: | 1444 | out: |
1447 | return retval; | 1445 | return retval; |
1448 | } | 1446 | } |
@@ -1464,13 +1462,13 @@ issue_and_wait(struct net_device *dev, int cmd) | |||
1464 | for (i = 0; i < 100000; i++) { | 1462 | for (i = 0; i < 100000; i++) { |
1465 | if (!(ioread16(ioaddr + EL3_STATUS) & CmdInProgress)) { | 1463 | if (!(ioread16(ioaddr + EL3_STATUS) & CmdInProgress)) { |
1466 | if (vortex_debug > 1) | 1464 | if (vortex_debug > 1) |
1467 | printk(KERN_INFO "%s: command 0x%04x took %d usecs\n", | 1465 | pr_info("%s: command 0x%04x took %d usecs\n", |
1468 | dev->name, cmd, i * 10); | 1466 | dev->name, cmd, i * 10); |
1469 | return; | 1467 | return; |
1470 | } | 1468 | } |
1471 | udelay(10); | 1469 | udelay(10); |
1472 | } | 1470 | } |
1473 | printk(KERN_ERR "%s: command 0x%04x did not complete! Status=0x%x\n", | 1471 | pr_err("%s: command 0x%04x did not complete! Status=0x%x\n", |
1474 | dev->name, cmd, ioread16(ioaddr + EL3_STATUS)); | 1472 | dev->name, cmd, ioread16(ioaddr + EL3_STATUS)); |
1475 | } | 1473 | } |
1476 | 1474 | ||
@@ -1480,7 +1478,7 @@ vortex_set_duplex(struct net_device *dev) | |||
1480 | struct vortex_private *vp = netdev_priv(dev); | 1478 | struct vortex_private *vp = netdev_priv(dev); |
1481 | void __iomem *ioaddr = vp->ioaddr; | 1479 | void __iomem *ioaddr = vp->ioaddr; |
1482 | 1480 | ||
1483 | printk(KERN_INFO "%s: setting %s-duplex.\n", | 1481 | pr_info("%s: setting %s-duplex.\n", |
1484 | dev->name, (vp->full_duplex) ? "full" : "half"); | 1482 | dev->name, (vp->full_duplex) ? "full" : "half"); |
1485 | 1483 | ||
1486 | EL3WINDOW(3); | 1484 | EL3WINDOW(3); |
@@ -1522,7 +1520,7 @@ vortex_up(struct net_device *dev) | |||
1522 | pci_restore_state(VORTEX_PCI(vp)); | 1520 | pci_restore_state(VORTEX_PCI(vp)); |
1523 | err = pci_enable_device(VORTEX_PCI(vp)); | 1521 | err = pci_enable_device(VORTEX_PCI(vp)); |
1524 | if (err) { | 1522 | if (err) { |
1525 | printk(KERN_WARNING "%s: Could not enable device \n", | 1523 | pr_warning("%s: Could not enable device\n", |
1526 | dev->name); | 1524 | dev->name); |
1527 | goto err_out; | 1525 | goto err_out; |
1528 | } | 1526 | } |
@@ -1533,14 +1531,14 @@ vortex_up(struct net_device *dev) | |||
1533 | config = ioread32(ioaddr + Wn3_Config); | 1531 | config = ioread32(ioaddr + Wn3_Config); |
1534 | 1532 | ||
1535 | if (vp->media_override != 7) { | 1533 | if (vp->media_override != 7) { |
1536 | printk(KERN_INFO "%s: Media override to transceiver %d (%s).\n", | 1534 | pr_info("%s: Media override to transceiver %d (%s).\n", |
1537 | dev->name, vp->media_override, | 1535 | dev->name, vp->media_override, |
1538 | media_tbl[vp->media_override].name); | 1536 | media_tbl[vp->media_override].name); |
1539 | dev->if_port = vp->media_override; | 1537 | dev->if_port = vp->media_override; |
1540 | } else if (vp->autoselect) { | 1538 | } else if (vp->autoselect) { |
1541 | if (vp->has_nway) { | 1539 | if (vp->has_nway) { |
1542 | if (vortex_debug > 1) | 1540 | if (vortex_debug > 1) |
1543 | printk(KERN_INFO "%s: using NWAY device table, not %d\n", | 1541 | pr_info("%s: using NWAY device table, not %d\n", |
1544 | dev->name, dev->if_port); | 1542 | dev->name, dev->if_port); |
1545 | dev->if_port = XCVR_NWAY; | 1543 | dev->if_port = XCVR_NWAY; |
1546 | } else { | 1544 | } else { |
@@ -1549,13 +1547,13 @@ vortex_up(struct net_device *dev) | |||
1549 | while (! (vp->available_media & media_tbl[dev->if_port].mask)) | 1547 | while (! (vp->available_media & media_tbl[dev->if_port].mask)) |
1550 | dev->if_port = media_tbl[dev->if_port].next; | 1548 | dev->if_port = media_tbl[dev->if_port].next; |
1551 | if (vortex_debug > 1) | 1549 | if (vortex_debug > 1) |
1552 | printk(KERN_INFO "%s: first available media type: %s\n", | 1550 | pr_info("%s: first available media type: %s\n", |
1553 | dev->name, media_tbl[dev->if_port].name); | 1551 | dev->name, media_tbl[dev->if_port].name); |
1554 | } | 1552 | } |
1555 | } else { | 1553 | } else { |
1556 | dev->if_port = vp->default_media; | 1554 | dev->if_port = vp->default_media; |
1557 | if (vortex_debug > 1) | 1555 | if (vortex_debug > 1) |
1558 | printk(KERN_INFO "%s: using default media %s\n", | 1556 | pr_info("%s: using default media %s\n", |
1559 | dev->name, media_tbl[dev->if_port].name); | 1557 | dev->name, media_tbl[dev->if_port].name); |
1560 | } | 1558 | } |
1561 | 1559 | ||
@@ -1570,13 +1568,13 @@ vortex_up(struct net_device *dev) | |||
1570 | vp->rx_oom_timer.function = rx_oom_timer; | 1568 | vp->rx_oom_timer.function = rx_oom_timer; |
1571 | 1569 | ||
1572 | if (vortex_debug > 1) | 1570 | if (vortex_debug > 1) |
1573 | printk(KERN_DEBUG "%s: Initial media type %s.\n", | 1571 | pr_debug("%s: Initial media type %s.\n", |
1574 | dev->name, media_tbl[dev->if_port].name); | 1572 | dev->name, media_tbl[dev->if_port].name); |
1575 | 1573 | ||
1576 | vp->full_duplex = vp->mii.force_media; | 1574 | vp->full_duplex = vp->mii.force_media; |
1577 | config = BFINS(config, dev->if_port, 20, 4); | 1575 | config = BFINS(config, dev->if_port, 20, 4); |
1578 | if (vortex_debug > 6) | 1576 | if (vortex_debug > 6) |
1579 | printk(KERN_DEBUG "vortex_up(): writing 0x%x to InternalConfig\n", config); | 1577 | pr_debug("vortex_up(): writing 0x%x to InternalConfig\n", config); |
1580 | iowrite32(config, ioaddr + Wn3_Config); | 1578 | iowrite32(config, ioaddr + Wn3_Config); |
1581 | 1579 | ||
1582 | if (dev->if_port == XCVR_MII || dev->if_port == XCVR_NWAY) { | 1580 | if (dev->if_port == XCVR_MII || dev->if_port == XCVR_NWAY) { |
@@ -1602,7 +1600,7 @@ vortex_up(struct net_device *dev) | |||
1602 | 1600 | ||
1603 | if (vortex_debug > 1) { | 1601 | if (vortex_debug > 1) { |
1604 | EL3WINDOW(4); | 1602 | EL3WINDOW(4); |
1605 | printk(KERN_DEBUG "%s: vortex_up() irq %d media status %4.4x.\n", | 1603 | pr_debug("%s: vortex_up() irq %d media status %4.4x.\n", |
1606 | dev->name, dev->irq, ioread16(ioaddr + Wn4_Media)); | 1604 | dev->name, dev->irq, ioread16(ioaddr + Wn4_Media)); |
1607 | } | 1605 | } |
1608 | 1606 | ||
@@ -1704,13 +1702,13 @@ vortex_open(struct net_device *dev) | |||
1704 | /* Use the now-standard shared IRQ implementation. */ | 1702 | /* Use the now-standard shared IRQ implementation. */ |
1705 | if ((retval = request_irq(dev->irq, vp->full_bus_master_rx ? | 1703 | if ((retval = request_irq(dev->irq, vp->full_bus_master_rx ? |
1706 | &boomerang_interrupt : &vortex_interrupt, IRQF_SHARED, dev->name, dev))) { | 1704 | &boomerang_interrupt : &vortex_interrupt, IRQF_SHARED, dev->name, dev))) { |
1707 | printk(KERN_ERR "%s: Could not reserve IRQ %d\n", dev->name, dev->irq); | 1705 | pr_err("%s: Could not reserve IRQ %d\n", dev->name, dev->irq); |
1708 | goto err; | 1706 | goto err; |
1709 | } | 1707 | } |
1710 | 1708 | ||
1711 | if (vp->full_bus_master_rx) { /* Boomerang bus master. */ | 1709 | if (vp->full_bus_master_rx) { /* Boomerang bus master. */ |
1712 | if (vortex_debug > 2) | 1710 | if (vortex_debug > 2) |
1713 | printk(KERN_DEBUG "%s: Filling in the Rx ring.\n", dev->name); | 1711 | pr_debug("%s: Filling in the Rx ring.\n", dev->name); |
1714 | for (i = 0; i < RX_RING_SIZE; i++) { | 1712 | for (i = 0; i < RX_RING_SIZE; i++) { |
1715 | struct sk_buff *skb; | 1713 | struct sk_buff *skb; |
1716 | vp->rx_ring[i].next = cpu_to_le32(vp->rx_ring_dma + sizeof(struct boom_rx_desc) * (i+1)); | 1714 | vp->rx_ring[i].next = cpu_to_le32(vp->rx_ring_dma + sizeof(struct boom_rx_desc) * (i+1)); |
@@ -1728,7 +1726,7 @@ vortex_open(struct net_device *dev) | |||
1728 | } | 1726 | } |
1729 | if (i != RX_RING_SIZE) { | 1727 | if (i != RX_RING_SIZE) { |
1730 | int j; | 1728 | int j; |
1731 | printk(KERN_EMERG "%s: no memory for rx ring\n", dev->name); | 1729 | pr_emerg("%s: no memory for rx ring\n", dev->name); |
1732 | for (j = 0; j < i; j++) { | 1730 | for (j = 0; j < i; j++) { |
1733 | if (vp->rx_skbuff[j]) { | 1731 | if (vp->rx_skbuff[j]) { |
1734 | dev_kfree_skb(vp->rx_skbuff[j]); | 1732 | dev_kfree_skb(vp->rx_skbuff[j]); |
@@ -1750,7 +1748,7 @@ err_free_irq: | |||
1750 | free_irq(dev->irq, dev); | 1748 | free_irq(dev->irq, dev); |
1751 | err: | 1749 | err: |
1752 | if (vortex_debug > 1) | 1750 | if (vortex_debug > 1) |
1753 | printk(KERN_ERR "%s: vortex_open() fails: returning %d\n", dev->name, retval); | 1751 | pr_err("%s: vortex_open() fails: returning %d\n", dev->name, retval); |
1754 | out: | 1752 | out: |
1755 | return retval; | 1753 | return retval; |
1756 | } | 1754 | } |
@@ -1766,9 +1764,9 @@ vortex_timer(unsigned long data) | |||
1766 | int media_status, old_window; | 1764 | int media_status, old_window; |
1767 | 1765 | ||
1768 | if (vortex_debug > 2) { | 1766 | if (vortex_debug > 2) { |
1769 | printk(KERN_DEBUG "%s: Media selection timer tick happened, %s.\n", | 1767 | pr_debug("%s: Media selection timer tick happened, %s.\n", |
1770 | dev->name, media_tbl[dev->if_port].name); | 1768 | dev->name, media_tbl[dev->if_port].name); |
1771 | printk(KERN_DEBUG "dev->watchdog_timeo=%d\n", dev->watchdog_timeo); | 1769 | pr_debug("dev->watchdog_timeo=%d\n", dev->watchdog_timeo); |
1772 | } | 1770 | } |
1773 | 1771 | ||
1774 | disable_irq_lockdep(dev->irq); | 1772 | disable_irq_lockdep(dev->irq); |
@@ -1781,12 +1779,12 @@ vortex_timer(unsigned long data) | |||
1781 | netif_carrier_on(dev); | 1779 | netif_carrier_on(dev); |
1782 | ok = 1; | 1780 | ok = 1; |
1783 | if (vortex_debug > 1) | 1781 | if (vortex_debug > 1) |
1784 | printk(KERN_DEBUG "%s: Media %s has link beat, %x.\n", | 1782 | pr_debug("%s: Media %s has link beat, %x.\n", |
1785 | dev->name, media_tbl[dev->if_port].name, media_status); | 1783 | dev->name, media_tbl[dev->if_port].name, media_status); |
1786 | } else { | 1784 | } else { |
1787 | netif_carrier_off(dev); | 1785 | netif_carrier_off(dev); |
1788 | if (vortex_debug > 1) { | 1786 | if (vortex_debug > 1) { |
1789 | printk(KERN_DEBUG "%s: Media %s has no link beat, %x.\n", | 1787 | pr_debug("%s: Media %s has no link beat, %x.\n", |
1790 | dev->name, media_tbl[dev->if_port].name, media_status); | 1788 | dev->name, media_tbl[dev->if_port].name, media_status); |
1791 | } | 1789 | } |
1792 | } | 1790 | } |
@@ -1802,7 +1800,7 @@ vortex_timer(unsigned long data) | |||
1802 | break; | 1800 | break; |
1803 | default: /* Other media types handled by Tx timeouts. */ | 1801 | default: /* Other media types handled by Tx timeouts. */ |
1804 | if (vortex_debug > 1) | 1802 | if (vortex_debug > 1) |
1805 | printk(KERN_DEBUG "%s: Media %s has no indication, %x.\n", | 1803 | pr_debug("%s: Media %s has no indication, %x.\n", |
1806 | dev->name, media_tbl[dev->if_port].name, media_status); | 1804 | dev->name, media_tbl[dev->if_port].name, media_status); |
1807 | ok = 1; | 1805 | ok = 1; |
1808 | } | 1806 | } |
@@ -1822,13 +1820,11 @@ vortex_timer(unsigned long data) | |||
1822 | if (dev->if_port == XCVR_Default) { /* Go back to default. */ | 1820 | if (dev->if_port == XCVR_Default) { /* Go back to default. */ |
1823 | dev->if_port = vp->default_media; | 1821 | dev->if_port = vp->default_media; |
1824 | if (vortex_debug > 1) | 1822 | if (vortex_debug > 1) |
1825 | printk(KERN_DEBUG "%s: Media selection failing, using default " | 1823 | pr_debug("%s: Media selection failing, using default %s port.\n", |
1826 | "%s port.\n", | ||
1827 | dev->name, media_tbl[dev->if_port].name); | 1824 | dev->name, media_tbl[dev->if_port].name); |
1828 | } else { | 1825 | } else { |
1829 | if (vortex_debug > 1) | 1826 | if (vortex_debug > 1) |
1830 | printk(KERN_DEBUG "%s: Media selection failed, now trying " | 1827 | pr_debug("%s: Media selection failed, now trying %s port.\n", |
1831 | "%s port.\n", | ||
1832 | dev->name, media_tbl[dev->if_port].name); | 1828 | dev->name, media_tbl[dev->if_port].name); |
1833 | next_tick = media_tbl[dev->if_port].wait; | 1829 | next_tick = media_tbl[dev->if_port].wait; |
1834 | } | 1830 | } |
@@ -1843,13 +1839,13 @@ vortex_timer(unsigned long data) | |||
1843 | iowrite16(dev->if_port == XCVR_10base2 ? StartCoax : StopCoax, | 1839 | iowrite16(dev->if_port == XCVR_10base2 ? StartCoax : StopCoax, |
1844 | ioaddr + EL3_CMD); | 1840 | ioaddr + EL3_CMD); |
1845 | if (vortex_debug > 1) | 1841 | if (vortex_debug > 1) |
1846 | printk(KERN_DEBUG "wrote 0x%08x to Wn3_Config\n", config); | 1842 | pr_debug("wrote 0x%08x to Wn3_Config\n", config); |
1847 | /* AKPM: FIXME: Should reset Rx & Tx here. P60 of 3c90xc.pdf */ | 1843 | /* AKPM: FIXME: Should reset Rx & Tx here. P60 of 3c90xc.pdf */ |
1848 | } | 1844 | } |
1849 | 1845 | ||
1850 | leave_media_alone: | 1846 | leave_media_alone: |
1851 | if (vortex_debug > 2) | 1847 | if (vortex_debug > 2) |
1852 | printk(KERN_DEBUG "%s: Media selection timer finished, %s.\n", | 1848 | pr_debug("%s: Media selection timer finished, %s.\n", |
1853 | dev->name, media_tbl[dev->if_port].name); | 1849 | dev->name, media_tbl[dev->if_port].name); |
1854 | 1850 | ||
1855 | EL3WINDOW(old_window); | 1851 | EL3WINDOW(old_window); |
@@ -1865,21 +1861,21 @@ static void vortex_tx_timeout(struct net_device *dev) | |||
1865 | struct vortex_private *vp = netdev_priv(dev); | 1861 | struct vortex_private *vp = netdev_priv(dev); |
1866 | void __iomem *ioaddr = vp->ioaddr; | 1862 | void __iomem *ioaddr = vp->ioaddr; |
1867 | 1863 | ||
1868 | printk(KERN_ERR "%s: transmit timed out, tx_status %2.2x status %4.4x.\n", | 1864 | pr_err("%s: transmit timed out, tx_status %2.2x status %4.4x.\n", |
1869 | dev->name, ioread8(ioaddr + TxStatus), | 1865 | dev->name, ioread8(ioaddr + TxStatus), |
1870 | ioread16(ioaddr + EL3_STATUS)); | 1866 | ioread16(ioaddr + EL3_STATUS)); |
1871 | EL3WINDOW(4); | 1867 | EL3WINDOW(4); |
1872 | printk(KERN_ERR " diagnostics: net %04x media %04x dma %08x fifo %04x\n", | 1868 | pr_err(" diagnostics: net %04x media %04x dma %08x fifo %04x\n", |
1873 | ioread16(ioaddr + Wn4_NetDiag), | 1869 | ioread16(ioaddr + Wn4_NetDiag), |
1874 | ioread16(ioaddr + Wn4_Media), | 1870 | ioread16(ioaddr + Wn4_Media), |
1875 | ioread32(ioaddr + PktStatus), | 1871 | ioread32(ioaddr + PktStatus), |
1876 | ioread16(ioaddr + Wn4_FIFODiag)); | 1872 | ioread16(ioaddr + Wn4_FIFODiag)); |
1877 | /* Slight code bloat to be user friendly. */ | 1873 | /* Slight code bloat to be user friendly. */ |
1878 | if ((ioread8(ioaddr + TxStatus) & 0x88) == 0x88) | 1874 | if ((ioread8(ioaddr + TxStatus) & 0x88) == 0x88) |
1879 | printk(KERN_ERR "%s: Transmitter encountered 16 collisions --" | 1875 | pr_err("%s: Transmitter encountered 16 collisions --" |
1880 | " network cable problem?\n", dev->name); | 1876 | " network cable problem?\n", dev->name); |
1881 | if (ioread16(ioaddr + EL3_STATUS) & IntLatch) { | 1877 | if (ioread16(ioaddr + EL3_STATUS) & IntLatch) { |
1882 | printk(KERN_ERR "%s: Interrupt posted but not delivered --" | 1878 | pr_err("%s: Interrupt posted but not delivered --" |
1883 | " IRQ blocked by another device?\n", dev->name); | 1879 | " IRQ blocked by another device?\n", dev->name); |
1884 | /* Bad idea here.. but we might as well handle a few events. */ | 1880 | /* Bad idea here.. but we might as well handle a few events. */ |
1885 | { | 1881 | { |
@@ -1903,7 +1899,7 @@ static void vortex_tx_timeout(struct net_device *dev) | |||
1903 | 1899 | ||
1904 | dev->stats.tx_errors++; | 1900 | dev->stats.tx_errors++; |
1905 | if (vp->full_bus_master_tx) { | 1901 | if (vp->full_bus_master_tx) { |
1906 | printk(KERN_DEBUG "%s: Resetting the Tx ring pointer.\n", dev->name); | 1902 | pr_debug("%s: Resetting the Tx ring pointer.\n", dev->name); |
1907 | if (vp->cur_tx - vp->dirty_tx > 0 && ioread32(ioaddr + DownListPtr) == 0) | 1903 | if (vp->cur_tx - vp->dirty_tx > 0 && ioread32(ioaddr + DownListPtr) == 0) |
1908 | iowrite32(vp->tx_ring_dma + (vp->dirty_tx % TX_RING_SIZE) * sizeof(struct boom_tx_desc), | 1904 | iowrite32(vp->tx_ring_dma + (vp->dirty_tx % TX_RING_SIZE) * sizeof(struct boom_tx_desc), |
1909 | ioaddr + DownListPtr); | 1905 | ioaddr + DownListPtr); |
@@ -1938,7 +1934,7 @@ vortex_error(struct net_device *dev, int status) | |||
1938 | unsigned char tx_status = 0; | 1934 | unsigned char tx_status = 0; |
1939 | 1935 | ||
1940 | if (vortex_debug > 2) { | 1936 | if (vortex_debug > 2) { |
1941 | printk(KERN_ERR "%s: vortex_error(), status=0x%x\n", dev->name, status); | 1937 | pr_err("%s: vortex_error(), status=0x%x\n", dev->name, status); |
1942 | } | 1938 | } |
1943 | 1939 | ||
1944 | if (status & TxComplete) { /* Really "TxError" for us. */ | 1940 | if (status & TxComplete) { /* Really "TxError" for us. */ |
@@ -1946,10 +1942,10 @@ vortex_error(struct net_device *dev, int status) | |||
1946 | /* Presumably a tx-timeout. We must merely re-enable. */ | 1942 | /* Presumably a tx-timeout. We must merely re-enable. */ |
1947 | if (vortex_debug > 2 | 1943 | if (vortex_debug > 2 |
1948 | || (tx_status != 0x88 && vortex_debug > 0)) { | 1944 | || (tx_status != 0x88 && vortex_debug > 0)) { |
1949 | printk(KERN_ERR "%s: Transmit error, Tx status register %2.2x.\n", | 1945 | pr_err("%s: Transmit error, Tx status register %2.2x.\n", |
1950 | dev->name, tx_status); | 1946 | dev->name, tx_status); |
1951 | if (tx_status == 0x82) { | 1947 | if (tx_status == 0x82) { |
1952 | printk(KERN_ERR "Probably a duplex mismatch. See " | 1948 | pr_err("Probably a duplex mismatch. See " |
1953 | "Documentation/networking/vortex.txt\n"); | 1949 | "Documentation/networking/vortex.txt\n"); |
1954 | } | 1950 | } |
1955 | dump_tx_ring(dev); | 1951 | dump_tx_ring(dev); |
@@ -1975,13 +1971,13 @@ vortex_error(struct net_device *dev, int status) | |||
1975 | if (status & StatsFull) { /* Empty statistics. */ | 1971 | if (status & StatsFull) { /* Empty statistics. */ |
1976 | static int DoneDidThat; | 1972 | static int DoneDidThat; |
1977 | if (vortex_debug > 4) | 1973 | if (vortex_debug > 4) |
1978 | printk(KERN_DEBUG "%s: Updating stats.\n", dev->name); | 1974 | pr_debug("%s: Updating stats.\n", dev->name); |
1979 | update_stats(ioaddr, dev); | 1975 | update_stats(ioaddr, dev); |
1980 | /* HACK: Disable statistics as an interrupt source. */ | 1976 | /* HACK: Disable statistics as an interrupt source. */ |
1981 | /* This occurs when we have the wrong media type! */ | 1977 | /* This occurs when we have the wrong media type! */ |
1982 | if (DoneDidThat == 0 && | 1978 | if (DoneDidThat == 0 && |
1983 | ioread16(ioaddr + EL3_STATUS) & StatsFull) { | 1979 | ioread16(ioaddr + EL3_STATUS) & StatsFull) { |
1984 | printk(KERN_WARNING "%s: Updating statistics failed, disabling " | 1980 | pr_warning("%s: Updating statistics failed, disabling " |
1985 | "stats as an interrupt source.\n", dev->name); | 1981 | "stats as an interrupt source.\n", dev->name); |
1986 | EL3WINDOW(5); | 1982 | EL3WINDOW(5); |
1987 | iowrite16(SetIntrEnb | (ioread16(ioaddr + 10) & ~StatsFull), ioaddr + EL3_CMD); | 1983 | iowrite16(SetIntrEnb | (ioread16(ioaddr + 10) & ~StatsFull), ioaddr + EL3_CMD); |
@@ -1998,7 +1994,7 @@ vortex_error(struct net_device *dev, int status) | |||
1998 | u16 fifo_diag; | 1994 | u16 fifo_diag; |
1999 | EL3WINDOW(4); | 1995 | EL3WINDOW(4); |
2000 | fifo_diag = ioread16(ioaddr + Wn4_FIFODiag); | 1996 | fifo_diag = ioread16(ioaddr + Wn4_FIFODiag); |
2001 | printk(KERN_ERR "%s: Host error, FIFO diagnostic register %4.4x.\n", | 1997 | pr_err("%s: Host error, FIFO diagnostic register %4.4x.\n", |
2002 | dev->name, fifo_diag); | 1998 | dev->name, fifo_diag); |
2003 | /* Adapter failure requires Tx/Rx reset and reinit. */ | 1999 | /* Adapter failure requires Tx/Rx reset and reinit. */ |
2004 | if (vp->full_bus_master_tx) { | 2000 | if (vp->full_bus_master_tx) { |
@@ -2006,7 +2002,7 @@ vortex_error(struct net_device *dev, int status) | |||
2006 | /* 0x80000000 PCI master abort. */ | 2002 | /* 0x80000000 PCI master abort. */ |
2007 | /* 0x40000000 PCI target abort. */ | 2003 | /* 0x40000000 PCI target abort. */ |
2008 | if (vortex_debug) | 2004 | if (vortex_debug) |
2009 | printk(KERN_ERR "%s: PCI bus error, bus status %8.8x\n", dev->name, bus_status); | 2005 | pr_err("%s: PCI bus error, bus status %8.8x\n", dev->name, bus_status); |
2010 | 2006 | ||
2011 | /* In this case, blow the card away */ | 2007 | /* In this case, blow the card away */ |
2012 | /* Must not enter D3 or we can't legally issue the reset! */ | 2008 | /* Must not enter D3 or we can't legally issue the reset! */ |
@@ -2075,7 +2071,7 @@ vortex_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2075 | while (--i > 0 && (tx_status = ioread8(ioaddr + TxStatus)) > 0) { | 2071 | while (--i > 0 && (tx_status = ioread8(ioaddr + TxStatus)) > 0) { |
2076 | if (tx_status & 0x3C) { /* A Tx-disabling error occurred. */ | 2072 | if (tx_status & 0x3C) { /* A Tx-disabling error occurred. */ |
2077 | if (vortex_debug > 2) | 2073 | if (vortex_debug > 2) |
2078 | printk(KERN_DEBUG "%s: Tx error, status %2.2x.\n", | 2074 | pr_debug("%s: Tx error, status %2.2x.\n", |
2079 | dev->name, tx_status); | 2075 | dev->name, tx_status); |
2080 | if (tx_status & 0x04) dev->stats.tx_fifo_errors++; | 2076 | if (tx_status & 0x04) dev->stats.tx_fifo_errors++; |
2081 | if (tx_status & 0x38) dev->stats.tx_aborted_errors++; | 2077 | if (tx_status & 0x38) dev->stats.tx_aborted_errors++; |
@@ -2101,14 +2097,14 @@ boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2101 | unsigned long flags; | 2097 | unsigned long flags; |
2102 | 2098 | ||
2103 | if (vortex_debug > 6) { | 2099 | if (vortex_debug > 6) { |
2104 | printk(KERN_DEBUG "boomerang_start_xmit()\n"); | 2100 | pr_debug("boomerang_start_xmit()\n"); |
2105 | printk(KERN_DEBUG "%s: Trying to send a packet, Tx index %d.\n", | 2101 | pr_debug("%s: Trying to send a packet, Tx index %d.\n", |
2106 | dev->name, vp->cur_tx); | 2102 | dev->name, vp->cur_tx); |
2107 | } | 2103 | } |
2108 | 2104 | ||
2109 | if (vp->cur_tx - vp->dirty_tx >= TX_RING_SIZE) { | 2105 | if (vp->cur_tx - vp->dirty_tx >= TX_RING_SIZE) { |
2110 | if (vortex_debug > 0) | 2106 | if (vortex_debug > 0) |
2111 | printk(KERN_WARNING "%s: BUG! Tx Ring full, refusing to send buffer.\n", | 2107 | pr_warning("%s: BUG! Tx Ring full, refusing to send buffer.\n", |
2112 | dev->name); | 2108 | dev->name); |
2113 | netif_stop_queue(dev); | 2109 | netif_stop_queue(dev); |
2114 | return 1; | 2110 | return 1; |
@@ -2204,7 +2200,7 @@ vortex_interrupt(int irq, void *dev_id) | |||
2204 | status = ioread16(ioaddr + EL3_STATUS); | 2200 | status = ioread16(ioaddr + EL3_STATUS); |
2205 | 2201 | ||
2206 | if (vortex_debug > 6) | 2202 | if (vortex_debug > 6) |
2207 | printk("vortex_interrupt(). status=0x%4x\n", status); | 2203 | pr_debug("vortex_interrupt(). status=0x%4x\n", status); |
2208 | 2204 | ||
2209 | if ((status & IntLatch) == 0) | 2205 | if ((status & IntLatch) == 0) |
2210 | goto handler_exit; /* No interrupt: shared IRQs cause this */ | 2206 | goto handler_exit; /* No interrupt: shared IRQs cause this */ |
@@ -2219,19 +2215,19 @@ vortex_interrupt(int irq, void *dev_id) | |||
2219 | goto handler_exit; | 2215 | goto handler_exit; |
2220 | 2216 | ||
2221 | if (vortex_debug > 4) | 2217 | if (vortex_debug > 4) |
2222 | printk(KERN_DEBUG "%s: interrupt, status %4.4x, latency %d ticks.\n", | 2218 | pr_debug("%s: interrupt, status %4.4x, latency %d ticks.\n", |
2223 | dev->name, status, ioread8(ioaddr + Timer)); | 2219 | dev->name, status, ioread8(ioaddr + Timer)); |
2224 | 2220 | ||
2225 | do { | 2221 | do { |
2226 | if (vortex_debug > 5) | 2222 | if (vortex_debug > 5) |
2227 | printk(KERN_DEBUG "%s: In interrupt loop, status %4.4x.\n", | 2223 | pr_debug("%s: In interrupt loop, status %4.4x.\n", |
2228 | dev->name, status); | 2224 | dev->name, status); |
2229 | if (status & RxComplete) | 2225 | if (status & RxComplete) |
2230 | vortex_rx(dev); | 2226 | vortex_rx(dev); |
2231 | 2227 | ||
2232 | if (status & TxAvailable) { | 2228 | if (status & TxAvailable) { |
2233 | if (vortex_debug > 5) | 2229 | if (vortex_debug > 5) |
2234 | printk(KERN_DEBUG " TX room bit was handled.\n"); | 2230 | pr_debug(" TX room bit was handled.\n"); |
2235 | /* There's room in the FIFO for a full-sized packet. */ | 2231 | /* There's room in the FIFO for a full-sized packet. */ |
2236 | iowrite16(AckIntr | TxAvailable, ioaddr + EL3_CMD); | 2232 | iowrite16(AckIntr | TxAvailable, ioaddr + EL3_CMD); |
2237 | netif_wake_queue (dev); | 2233 | netif_wake_queue (dev); |
@@ -2263,8 +2259,8 @@ vortex_interrupt(int irq, void *dev_id) | |||
2263 | } | 2259 | } |
2264 | 2260 | ||
2265 | if (--work_done < 0) { | 2261 | if (--work_done < 0) { |
2266 | printk(KERN_WARNING "%s: Too much work in interrupt, status " | 2262 | pr_warning("%s: Too much work in interrupt, status %4.4x.\n", |
2267 | "%4.4x.\n", dev->name, status); | 2263 | dev->name, status); |
2268 | /* Disable all pending interrupts. */ | 2264 | /* Disable all pending interrupts. */ |
2269 | do { | 2265 | do { |
2270 | vp->deferred |= status; | 2266 | vp->deferred |= status; |
@@ -2281,7 +2277,7 @@ vortex_interrupt(int irq, void *dev_id) | |||
2281 | } while ((status = ioread16(ioaddr + EL3_STATUS)) & (IntLatch | RxComplete)); | 2277 | } while ((status = ioread16(ioaddr + EL3_STATUS)) & (IntLatch | RxComplete)); |
2282 | 2278 | ||
2283 | if (vortex_debug > 4) | 2279 | if (vortex_debug > 4) |
2284 | printk(KERN_DEBUG "%s: exiting interrupt, status %4.4x.\n", | 2280 | pr_debug("%s: exiting interrupt, status %4.4x.\n", |
2285 | dev->name, status); | 2281 | dev->name, status); |
2286 | handler_exit: | 2282 | handler_exit: |
2287 | spin_unlock(&vp->lock); | 2283 | spin_unlock(&vp->lock); |
@@ -2313,14 +2309,14 @@ boomerang_interrupt(int irq, void *dev_id) | |||
2313 | status = ioread16(ioaddr + EL3_STATUS); | 2309 | status = ioread16(ioaddr + EL3_STATUS); |
2314 | 2310 | ||
2315 | if (vortex_debug > 6) | 2311 | if (vortex_debug > 6) |
2316 | printk(KERN_DEBUG "boomerang_interrupt. status=0x%4x\n", status); | 2312 | pr_debug("boomerang_interrupt. status=0x%4x\n", status); |
2317 | 2313 | ||
2318 | if ((status & IntLatch) == 0) | 2314 | if ((status & IntLatch) == 0) |
2319 | goto handler_exit; /* No interrupt: shared IRQs can cause this */ | 2315 | goto handler_exit; /* No interrupt: shared IRQs can cause this */ |
2320 | 2316 | ||
2321 | if (status == 0xffff) { /* h/w no longer present (hotplug)? */ | 2317 | if (status == 0xffff) { /* h/w no longer present (hotplug)? */ |
2322 | if (vortex_debug > 1) | 2318 | if (vortex_debug > 1) |
2323 | printk(KERN_DEBUG "boomerang_interrupt(1): status = 0xffff\n"); | 2319 | pr_debug("boomerang_interrupt(1): status = 0xffff\n"); |
2324 | goto handler_exit; | 2320 | goto handler_exit; |
2325 | } | 2321 | } |
2326 | 2322 | ||
@@ -2330,16 +2326,16 @@ boomerang_interrupt(int irq, void *dev_id) | |||
2330 | } | 2326 | } |
2331 | 2327 | ||
2332 | if (vortex_debug > 4) | 2328 | if (vortex_debug > 4) |
2333 | printk(KERN_DEBUG "%s: interrupt, status %4.4x, latency %d ticks.\n", | 2329 | pr_debug("%s: interrupt, status %4.4x, latency %d ticks.\n", |
2334 | dev->name, status, ioread8(ioaddr + Timer)); | 2330 | dev->name, status, ioread8(ioaddr + Timer)); |
2335 | do { | 2331 | do { |
2336 | if (vortex_debug > 5) | 2332 | if (vortex_debug > 5) |
2337 | printk(KERN_DEBUG "%s: In interrupt loop, status %4.4x.\n", | 2333 | pr_debug("%s: In interrupt loop, status %4.4x.\n", |
2338 | dev->name, status); | 2334 | dev->name, status); |
2339 | if (status & UpComplete) { | 2335 | if (status & UpComplete) { |
2340 | iowrite16(AckIntr | UpComplete, ioaddr + EL3_CMD); | 2336 | iowrite16(AckIntr | UpComplete, ioaddr + EL3_CMD); |
2341 | if (vortex_debug > 5) | 2337 | if (vortex_debug > 5) |
2342 | printk(KERN_DEBUG "boomerang_interrupt->boomerang_rx\n"); | 2338 | pr_debug("boomerang_interrupt->boomerang_rx\n"); |
2343 | boomerang_rx(dev); | 2339 | boomerang_rx(dev); |
2344 | } | 2340 | } |
2345 | 2341 | ||
@@ -2374,7 +2370,7 @@ boomerang_interrupt(int irq, void *dev_id) | |||
2374 | dev_kfree_skb_irq(skb); | 2370 | dev_kfree_skb_irq(skb); |
2375 | vp->tx_skbuff[entry] = NULL; | 2371 | vp->tx_skbuff[entry] = NULL; |
2376 | } else { | 2372 | } else { |
2377 | printk(KERN_DEBUG "boomerang_interrupt: no skb!\n"); | 2373 | pr_debug("boomerang_interrupt: no skb!\n"); |
2378 | } | 2374 | } |
2379 | /* dev->stats.tx_packets++; Counted below. */ | 2375 | /* dev->stats.tx_packets++; Counted below. */ |
2380 | dirty_tx++; | 2376 | dirty_tx++; |
@@ -2382,7 +2378,7 @@ boomerang_interrupt(int irq, void *dev_id) | |||
2382 | vp->dirty_tx = dirty_tx; | 2378 | vp->dirty_tx = dirty_tx; |
2383 | if (vp->cur_tx - dirty_tx <= TX_RING_SIZE - 1) { | 2379 | if (vp->cur_tx - dirty_tx <= TX_RING_SIZE - 1) { |
2384 | if (vortex_debug > 6) | 2380 | if (vortex_debug > 6) |
2385 | printk(KERN_DEBUG "boomerang_interrupt: wake queue\n"); | 2381 | pr_debug("boomerang_interrupt: wake queue\n"); |
2386 | netif_wake_queue (dev); | 2382 | netif_wake_queue (dev); |
2387 | } | 2383 | } |
2388 | } | 2384 | } |
@@ -2392,8 +2388,8 @@ boomerang_interrupt(int irq, void *dev_id) | |||
2392 | vortex_error(dev, status); | 2388 | vortex_error(dev, status); |
2393 | 2389 | ||
2394 | if (--work_done < 0) { | 2390 | if (--work_done < 0) { |
2395 | printk(KERN_WARNING "%s: Too much work in interrupt, status " | 2391 | pr_warning("%s: Too much work in interrupt, status %4.4x.\n", |
2396 | "%4.4x.\n", dev->name, status); | 2392 | dev->name, status); |
2397 | /* Disable all pending interrupts. */ | 2393 | /* Disable all pending interrupts. */ |
2398 | do { | 2394 | do { |
2399 | vp->deferred |= status; | 2395 | vp->deferred |= status; |
@@ -2413,7 +2409,7 @@ boomerang_interrupt(int irq, void *dev_id) | |||
2413 | } while ((status = ioread16(ioaddr + EL3_STATUS)) & IntLatch); | 2409 | } while ((status = ioread16(ioaddr + EL3_STATUS)) & IntLatch); |
2414 | 2410 | ||
2415 | if (vortex_debug > 4) | 2411 | if (vortex_debug > 4) |
2416 | printk(KERN_DEBUG "%s: exiting interrupt, status %4.4x.\n", | 2412 | pr_debug("%s: exiting interrupt, status %4.4x.\n", |
2417 | dev->name, status); | 2413 | dev->name, status); |
2418 | handler_exit: | 2414 | handler_exit: |
2419 | spin_unlock(&vp->lock); | 2415 | spin_unlock(&vp->lock); |
@@ -2428,13 +2424,13 @@ static int vortex_rx(struct net_device *dev) | |||
2428 | short rx_status; | 2424 | short rx_status; |
2429 | 2425 | ||
2430 | if (vortex_debug > 5) | 2426 | if (vortex_debug > 5) |
2431 | printk(KERN_DEBUG "vortex_rx(): status %4.4x, rx_status %4.4x.\n", | 2427 | pr_debug("vortex_rx(): status %4.4x, rx_status %4.4x.\n", |
2432 | ioread16(ioaddr+EL3_STATUS), ioread16(ioaddr+RxStatus)); | 2428 | ioread16(ioaddr+EL3_STATUS), ioread16(ioaddr+RxStatus)); |
2433 | while ((rx_status = ioread16(ioaddr + RxStatus)) > 0) { | 2429 | while ((rx_status = ioread16(ioaddr + RxStatus)) > 0) { |
2434 | if (rx_status & 0x4000) { /* Error, update stats. */ | 2430 | if (rx_status & 0x4000) { /* Error, update stats. */ |
2435 | unsigned char rx_error = ioread8(ioaddr + RxErrors); | 2431 | unsigned char rx_error = ioread8(ioaddr + RxErrors); |
2436 | if (vortex_debug > 2) | 2432 | if (vortex_debug > 2) |
2437 | printk(KERN_DEBUG " Rx error: status %2.2x.\n", rx_error); | 2433 | pr_debug(" Rx error: status %2.2x.\n", rx_error); |
2438 | dev->stats.rx_errors++; | 2434 | dev->stats.rx_errors++; |
2439 | if (rx_error & 0x01) dev->stats.rx_over_errors++; | 2435 | if (rx_error & 0x01) dev->stats.rx_over_errors++; |
2440 | if (rx_error & 0x02) dev->stats.rx_length_errors++; | 2436 | if (rx_error & 0x02) dev->stats.rx_length_errors++; |
@@ -2448,7 +2444,7 @@ static int vortex_rx(struct net_device *dev) | |||
2448 | 2444 | ||
2449 | skb = dev_alloc_skb(pkt_len + 5); | 2445 | skb = dev_alloc_skb(pkt_len + 5); |
2450 | if (vortex_debug > 4) | 2446 | if (vortex_debug > 4) |
2451 | printk(KERN_DEBUG "Receiving packet size %d status %4.4x.\n", | 2447 | pr_debug("Receiving packet size %d status %4.4x.\n", |
2452 | pkt_len, rx_status); | 2448 | pkt_len, rx_status); |
2453 | if (skb != NULL) { | 2449 | if (skb != NULL) { |
2454 | skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ | 2450 | skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ |
@@ -2478,8 +2474,8 @@ static int vortex_rx(struct net_device *dev) | |||
2478 | break; | 2474 | break; |
2479 | continue; | 2475 | continue; |
2480 | } else if (vortex_debug > 0) | 2476 | } else if (vortex_debug > 0) |
2481 | printk(KERN_NOTICE "%s: No memory to allocate a sk_buff of " | 2477 | pr_notice("%s: No memory to allocate a sk_buff of size %d.\n", |
2482 | "size %d.\n", dev->name, pkt_len); | 2478 | dev->name, pkt_len); |
2483 | dev->stats.rx_dropped++; | 2479 | dev->stats.rx_dropped++; |
2484 | } | 2480 | } |
2485 | issue_and_wait(dev, RxDiscard); | 2481 | issue_and_wait(dev, RxDiscard); |
@@ -2498,7 +2494,7 @@ boomerang_rx(struct net_device *dev) | |||
2498 | int rx_work_limit = vp->dirty_rx + RX_RING_SIZE - vp->cur_rx; | 2494 | int rx_work_limit = vp->dirty_rx + RX_RING_SIZE - vp->cur_rx; |
2499 | 2495 | ||
2500 | if (vortex_debug > 5) | 2496 | if (vortex_debug > 5) |
2501 | printk(KERN_DEBUG "boomerang_rx(): status %4.4x\n", ioread16(ioaddr+EL3_STATUS)); | 2497 | pr_debug("boomerang_rx(): status %4.4x\n", ioread16(ioaddr+EL3_STATUS)); |
2502 | 2498 | ||
2503 | while ((rx_status = le32_to_cpu(vp->rx_ring[entry].status)) & RxDComplete){ | 2499 | while ((rx_status = le32_to_cpu(vp->rx_ring[entry].status)) & RxDComplete){ |
2504 | if (--rx_work_limit < 0) | 2500 | if (--rx_work_limit < 0) |
@@ -2506,7 +2502,7 @@ boomerang_rx(struct net_device *dev) | |||
2506 | if (rx_status & RxDError) { /* Error, update stats. */ | 2502 | if (rx_status & RxDError) { /* Error, update stats. */ |
2507 | unsigned char rx_error = rx_status >> 16; | 2503 | unsigned char rx_error = rx_status >> 16; |
2508 | if (vortex_debug > 2) | 2504 | if (vortex_debug > 2) |
2509 | printk(KERN_DEBUG " Rx error: status %2.2x.\n", rx_error); | 2505 | pr_debug(" Rx error: status %2.2x.\n", rx_error); |
2510 | dev->stats.rx_errors++; | 2506 | dev->stats.rx_errors++; |
2511 | if (rx_error & 0x01) dev->stats.rx_over_errors++; | 2507 | if (rx_error & 0x01) dev->stats.rx_over_errors++; |
2512 | if (rx_error & 0x02) dev->stats.rx_length_errors++; | 2508 | if (rx_error & 0x02) dev->stats.rx_length_errors++; |
@@ -2520,7 +2516,7 @@ boomerang_rx(struct net_device *dev) | |||
2520 | dma_addr_t dma = le32_to_cpu(vp->rx_ring[entry].addr); | 2516 | dma_addr_t dma = le32_to_cpu(vp->rx_ring[entry].addr); |
2521 | 2517 | ||
2522 | if (vortex_debug > 4) | 2518 | if (vortex_debug > 4) |
2523 | printk(KERN_DEBUG "Receiving packet size %d status %4.4x.\n", | 2519 | pr_debug("Receiving packet size %d status %4.4x.\n", |
2524 | pkt_len, rx_status); | 2520 | pkt_len, rx_status); |
2525 | 2521 | ||
2526 | /* Check if the packet is long enough to just accept without | 2522 | /* Check if the packet is long enough to just accept without |
@@ -2566,7 +2562,7 @@ boomerang_rx(struct net_device *dev) | |||
2566 | if (skb == NULL) { | 2562 | if (skb == NULL) { |
2567 | static unsigned long last_jif; | 2563 | static unsigned long last_jif; |
2568 | if (time_after(jiffies, last_jif + 10 * HZ)) { | 2564 | if (time_after(jiffies, last_jif + 10 * HZ)) { |
2569 | printk(KERN_WARNING "%s: memory shortage\n", dev->name); | 2565 | pr_warning("%s: memory shortage\n", dev->name); |
2570 | last_jif = jiffies; | 2566 | last_jif = jiffies; |
2571 | } | 2567 | } |
2572 | if ((vp->cur_rx - vp->dirty_rx) == RX_RING_SIZE) | 2568 | if ((vp->cur_rx - vp->dirty_rx) == RX_RING_SIZE) |
@@ -2598,7 +2594,7 @@ rx_oom_timer(unsigned long arg) | |||
2598 | if ((vp->cur_rx - vp->dirty_rx) == RX_RING_SIZE) /* This test is redundant, but makes me feel good */ | 2594 | if ((vp->cur_rx - vp->dirty_rx) == RX_RING_SIZE) /* This test is redundant, but makes me feel good */ |
2599 | boomerang_rx(dev); | 2595 | boomerang_rx(dev); |
2600 | if (vortex_debug > 1) { | 2596 | if (vortex_debug > 1) { |
2601 | printk(KERN_DEBUG "%s: rx_oom_timer %s\n", dev->name, | 2597 | pr_debug("%s: rx_oom_timer %s\n", dev->name, |
2602 | ((vp->cur_rx - vp->dirty_rx) != RX_RING_SIZE) ? "succeeded" : "retrying"); | 2598 | ((vp->cur_rx - vp->dirty_rx) != RX_RING_SIZE) ? "succeeded" : "retrying"); |
2603 | } | 2599 | } |
2604 | spin_unlock_irq(&vp->lock); | 2600 | spin_unlock_irq(&vp->lock); |
@@ -2655,9 +2651,9 @@ vortex_close(struct net_device *dev) | |||
2655 | vortex_down(dev, 1); | 2651 | vortex_down(dev, 1); |
2656 | 2652 | ||
2657 | if (vortex_debug > 1) { | 2653 | if (vortex_debug > 1) { |
2658 | printk(KERN_DEBUG"%s: vortex_close() status %4.4x, Tx status %2.2x.\n", | 2654 | pr_debug("%s: vortex_close() status %4.4x, Tx status %2.2x.\n", |
2659 | dev->name, ioread16(ioaddr + EL3_STATUS), ioread8(ioaddr + TxStatus)); | 2655 | dev->name, ioread16(ioaddr + EL3_STATUS), ioread8(ioaddr + TxStatus)); |
2660 | printk(KERN_DEBUG "%s: vortex close stats: rx_nocopy %d rx_copy %d" | 2656 | pr_debug("%s: vortex close stats: rx_nocopy %d rx_copy %d" |
2661 | " tx_queued %d Rx pre-checksummed %d.\n", | 2657 | " tx_queued %d Rx pre-checksummed %d.\n", |
2662 | dev->name, vp->rx_nocopy, vp->rx_copy, vp->queued_packet, vp->rx_csumhits); | 2658 | dev->name, vp->rx_nocopy, vp->rx_copy, vp->queued_packet, vp->rx_csumhits); |
2663 | } | 2659 | } |
@@ -2666,8 +2662,7 @@ vortex_close(struct net_device *dev) | |||
2666 | if (vp->rx_csumhits && | 2662 | if (vp->rx_csumhits && |
2667 | (vp->drv_flags & HAS_HWCKSM) == 0 && | 2663 | (vp->drv_flags & HAS_HWCKSM) == 0 && |
2668 | (vp->card_idx >= MAX_UNITS || hw_checksums[vp->card_idx] == -1)) { | 2664 | (vp->card_idx >= MAX_UNITS || hw_checksums[vp->card_idx] == -1)) { |
2669 | printk(KERN_WARNING "%s supports hardware checksums, and we're " | 2665 | pr_warning("%s supports hardware checksums, and we're not using them!\n", dev->name); |
2670 | "not using them!\n", dev->name); | ||
2671 | } | 2666 | } |
2672 | #endif | 2667 | #endif |
2673 | 2668 | ||
@@ -2717,16 +2712,16 @@ dump_tx_ring(struct net_device *dev) | |||
2717 | int i; | 2712 | int i; |
2718 | int stalled = ioread32(ioaddr + PktStatus) & 0x04; /* Possible racy. But it's only debug stuff */ | 2713 | int stalled = ioread32(ioaddr + PktStatus) & 0x04; /* Possible racy. But it's only debug stuff */ |
2719 | 2714 | ||
2720 | printk(KERN_ERR " Flags; bus-master %d, dirty %d(%d) current %d(%d)\n", | 2715 | pr_err(" Flags; bus-master %d, dirty %d(%d) current %d(%d)\n", |
2721 | vp->full_bus_master_tx, | 2716 | vp->full_bus_master_tx, |
2722 | vp->dirty_tx, vp->dirty_tx % TX_RING_SIZE, | 2717 | vp->dirty_tx, vp->dirty_tx % TX_RING_SIZE, |
2723 | vp->cur_tx, vp->cur_tx % TX_RING_SIZE); | 2718 | vp->cur_tx, vp->cur_tx % TX_RING_SIZE); |
2724 | printk(KERN_ERR " Transmit list %8.8x vs. %p.\n", | 2719 | pr_err(" Transmit list %8.8x vs. %p.\n", |
2725 | ioread32(ioaddr + DownListPtr), | 2720 | ioread32(ioaddr + DownListPtr), |
2726 | &vp->tx_ring[vp->dirty_tx % TX_RING_SIZE]); | 2721 | &vp->tx_ring[vp->dirty_tx % TX_RING_SIZE]); |
2727 | issue_and_wait(dev, DownStall); | 2722 | issue_and_wait(dev, DownStall); |
2728 | for (i = 0; i < TX_RING_SIZE; i++) { | 2723 | for (i = 0; i < TX_RING_SIZE; i++) { |
2729 | printk(KERN_ERR " %d: @%p length %8.8x status %8.8x\n", i, | 2724 | pr_err(" %d: @%p length %8.8x status %8.8x\n", i, |
2730 | &vp->tx_ring[i], | 2725 | &vp->tx_ring[i], |
2731 | #if DO_ZEROCOPY | 2726 | #if DO_ZEROCOPY |
2732 | le32_to_cpu(vp->tx_ring[i].frag[0].length), | 2727 | le32_to_cpu(vp->tx_ring[i].frag[0].length), |
@@ -2970,7 +2965,7 @@ static void set_rx_mode(struct net_device *dev) | |||
2970 | 2965 | ||
2971 | if (dev->flags & IFF_PROMISC) { | 2966 | if (dev->flags & IFF_PROMISC) { |
2972 | if (vortex_debug > 3) | 2967 | if (vortex_debug > 3) |
2973 | printk(KERN_NOTICE "%s: Setting promiscuous mode.\n", dev->name); | 2968 | pr_notice("%s: Setting promiscuous mode.\n", dev->name); |
2974 | new_mode = SetRxFilter|RxStation|RxMulticast|RxBroadcast|RxProm; | 2969 | new_mode = SetRxFilter|RxStation|RxMulticast|RxBroadcast|RxProm; |
2975 | } else if ((dev->mc_list) || (dev->flags & IFF_ALLMULTI)) { | 2970 | } else if ((dev->mc_list) || (dev->flags & IFF_ALLMULTI)) { |
2976 | new_mode = SetRxFilter|RxStation|RxMulticast|RxBroadcast; | 2971 | new_mode = SetRxFilter|RxStation|RxMulticast|RxBroadcast; |
@@ -3145,8 +3140,7 @@ static void acpi_set_WOL(struct net_device *dev) | |||
3145 | iowrite16(RxEnable, ioaddr + EL3_CMD); | 3140 | iowrite16(RxEnable, ioaddr + EL3_CMD); |
3146 | 3141 | ||
3147 | if (pci_enable_wake(VORTEX_PCI(vp), PCI_D3hot, 1)) { | 3142 | if (pci_enable_wake(VORTEX_PCI(vp), PCI_D3hot, 1)) { |
3148 | printk(KERN_INFO "%s: WOL not supported.\n", | 3143 | pr_info("%s: WOL not supported.\n", pci_name(VORTEX_PCI(vp))); |
3149 | pci_name(VORTEX_PCI(vp))); | ||
3150 | 3144 | ||
3151 | vp->enable_wol = 0; | 3145 | vp->enable_wol = 0; |
3152 | return; | 3146 | return; |
@@ -3164,7 +3158,7 @@ static void __devexit vortex_remove_one(struct pci_dev *pdev) | |||
3164 | struct vortex_private *vp; | 3158 | struct vortex_private *vp; |
3165 | 3159 | ||
3166 | if (!dev) { | 3160 | if (!dev) { |
3167 | printk("vortex_remove_one called for Compaq device!\n"); | 3161 | pr_err("vortex_remove_one called for Compaq device!\n"); |
3168 | BUG(); | 3162 | BUG(); |
3169 | } | 3163 | } |
3170 | 3164 | ||