aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/3c515.c
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-05-26 08:35:26 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-26 23:35:03 -0400
commit39738e161f7315bfa8f31a91d2262f93d818a7cd (patch)
tree97777f397e4b2ef76a44d8eb539b2c3e39718337 /drivers/net/3c515.c
parent646cdb32831eebe8c2f742c293d0d266326854d9 (diff)
3c5xx: convert printk() to pr_<foo>()
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/3c515.c')
-rw-r--r--drivers/net/3c515.c124
1 files changed, 60 insertions, 64 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)) {