diff options
author | Joe Perches <joe@perches.com> | 2010-01-28 15:59:28 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-01 02:26:57 -0500 |
commit | a1e37bc5e2d0ff8d025221e27c2bfff762072311 (patch) | |
tree | ecff101c98d17d9eecaf7dffebb333fd518112ce /drivers/net/tulip | |
parent | e02fb7aa0714ca9357571bb15ef0fe278a150cc7 (diff) |
tulip/winbond-840.c: Use dev_<level> and pr_<level>
Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx
Convert %d.%d.%d.%d to %pI4
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tulip')
-rw-r--r-- | drivers/net/tulip/winbond-840.c | 177 |
1 files changed, 90 insertions, 87 deletions
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c index 23395e1ff238..9fb89afccf7c 100644 --- a/drivers/net/tulip/winbond-840.c +++ b/drivers/net/tulip/winbond-840.c | |||
@@ -376,8 +376,8 @@ static int __devinit w840_probe1 (struct pci_dev *pdev, | |||
376 | irq = pdev->irq; | 376 | irq = pdev->irq; |
377 | 377 | ||
378 | if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { | 378 | if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { |
379 | printk(KERN_WARNING "Winbond-840: Device %s disabled due to DMA limitations.\n", | 379 | pr_warning("Winbond-840: Device %s disabled due to DMA limitations\n", |
380 | pci_name(pdev)); | 380 | pci_name(pdev)); |
381 | return -EIO; | 381 | return -EIO; |
382 | } | 382 | } |
383 | dev = alloc_etherdev(sizeof(*np)); | 383 | dev = alloc_etherdev(sizeof(*np)); |
@@ -422,8 +422,9 @@ static int __devinit w840_probe1 (struct pci_dev *pdev, | |||
422 | if (option & 0x200) | 422 | if (option & 0x200) |
423 | np->mii_if.full_duplex = 1; | 423 | np->mii_if.full_duplex = 1; |
424 | if (option & 15) | 424 | if (option & 15) |
425 | printk(KERN_INFO "%s: ignoring user supplied media type %d", | 425 | dev_info(&dev->dev, |
426 | dev->name, option & 15); | 426 | "ignoring user supplied media type %d", |
427 | option & 15); | ||
427 | } | 428 | } |
428 | if (find_cnt < MAX_UNITS && full_duplex[find_cnt] > 0) | 429 | if (find_cnt < MAX_UNITS && full_duplex[find_cnt] > 0) |
429 | np->mii_if.full_duplex = 1; | 430 | np->mii_if.full_duplex = 1; |
@@ -440,9 +441,8 @@ static int __devinit w840_probe1 (struct pci_dev *pdev, | |||
440 | if (i) | 441 | if (i) |
441 | goto err_out_cleardev; | 442 | goto err_out_cleardev; |
442 | 443 | ||
443 | printk(KERN_INFO "%s: %s at %p, %pM, IRQ %d.\n", | 444 | dev_info(&dev->dev, "%s at %p, %pM, IRQ %d\n", |
444 | dev->name, pci_id_tbl[chip_idx].name, ioaddr, | 445 | pci_id_tbl[chip_idx].name, ioaddr, dev->dev_addr, irq); |
445 | dev->dev_addr, irq); | ||
446 | 446 | ||
447 | if (np->drv_flags & CanHaveMII) { | 447 | if (np->drv_flags & CanHaveMII) { |
448 | int phy, phy_idx = 0; | 448 | int phy, phy_idx = 0; |
@@ -453,16 +453,17 @@ static int __devinit w840_probe1 (struct pci_dev *pdev, | |||
453 | np->mii_if.advertising = mdio_read(dev, phy, MII_ADVERTISE); | 453 | np->mii_if.advertising = mdio_read(dev, phy, MII_ADVERTISE); |
454 | np->mii = (mdio_read(dev, phy, MII_PHYSID1) << 16)+ | 454 | np->mii = (mdio_read(dev, phy, MII_PHYSID1) << 16)+ |
455 | mdio_read(dev, phy, MII_PHYSID2); | 455 | mdio_read(dev, phy, MII_PHYSID2); |
456 | printk(KERN_INFO "%s: MII PHY %8.8xh found at address %d, status " | 456 | dev_info(&dev->dev, |
457 | "0x%4.4x advertising %4.4x.\n", | 457 | "MII PHY %08xh found at address %d, status 0x%04x advertising %04x\n", |
458 | dev->name, np->mii, phy, mii_status, np->mii_if.advertising); | 458 | np->mii, phy, mii_status, |
459 | np->mii_if.advertising); | ||
459 | } | 460 | } |
460 | } | 461 | } |
461 | np->mii_cnt = phy_idx; | 462 | np->mii_cnt = phy_idx; |
462 | np->mii_if.phy_id = np->phys[0]; | 463 | np->mii_if.phy_id = np->phys[0]; |
463 | if (phy_idx == 0) { | 464 | if (phy_idx == 0) { |
464 | printk(KERN_WARNING "%s: MII PHY not found -- this device may " | 465 | dev_warn(&dev->dev, |
465 | "not operate correctly.\n", dev->name); | 466 | "MII PHY not found -- this device may not operate correctly\n"); |
466 | } | 467 | } |
467 | } | 468 | } |
468 | 469 | ||
@@ -644,8 +645,8 @@ static int netdev_open(struct net_device *dev) | |||
644 | goto out_err; | 645 | goto out_err; |
645 | 646 | ||
646 | if (debug > 1) | 647 | if (debug > 1) |
647 | printk(KERN_DEBUG "%s: w89c840_open() irq %d.\n", | 648 | printk(KERN_DEBUG "%s: w89c840_open() irq %d\n", |
648 | dev->name, dev->irq); | 649 | dev->name, dev->irq); |
649 | 650 | ||
650 | if((i=alloc_ringdesc(dev))) | 651 | if((i=alloc_ringdesc(dev))) |
651 | goto out_err; | 652 | goto out_err; |
@@ -657,7 +658,7 @@ static int netdev_open(struct net_device *dev) | |||
657 | 658 | ||
658 | netif_start_queue(dev); | 659 | netif_start_queue(dev); |
659 | if (debug > 2) | 660 | if (debug > 2) |
660 | printk(KERN_DEBUG "%s: Done netdev_open().\n", dev->name); | 661 | printk(KERN_DEBUG "%s: Done netdev_open()\n", dev->name); |
661 | 662 | ||
662 | /* Set the timer to check for link beat. */ | 663 | /* Set the timer to check for link beat. */ |
663 | init_timer(&np->timer); | 664 | init_timer(&np->timer); |
@@ -688,16 +689,18 @@ static int update_link(struct net_device *dev) | |||
688 | if (!(mii_reg & 0x4)) { | 689 | if (!(mii_reg & 0x4)) { |
689 | if (netif_carrier_ok(dev)) { | 690 | if (netif_carrier_ok(dev)) { |
690 | if (debug) | 691 | if (debug) |
691 | printk(KERN_INFO "%s: MII #%d reports no link. Disabling watchdog.\n", | 692 | dev_info(&dev->dev, |
692 | dev->name, np->phys[0]); | 693 | "MII #%d reports no link. Disabling watchdog\n", |
694 | np->phys[0]); | ||
693 | netif_carrier_off(dev); | 695 | netif_carrier_off(dev); |
694 | } | 696 | } |
695 | return np->csr6; | 697 | return np->csr6; |
696 | } | 698 | } |
697 | if (!netif_carrier_ok(dev)) { | 699 | if (!netif_carrier_ok(dev)) { |
698 | if (debug) | 700 | if (debug) |
699 | printk(KERN_INFO "%s: MII #%d link is back. Enabling watchdog.\n", | 701 | dev_info(&dev->dev, |
700 | dev->name, np->phys[0]); | 702 | "MII #%d link is back. Enabling watchdog\n", |
703 | np->phys[0]); | ||
701 | netif_carrier_on(dev); | 704 | netif_carrier_on(dev); |
702 | } | 705 | } |
703 | 706 | ||
@@ -729,9 +732,10 @@ static int update_link(struct net_device *dev) | |||
729 | if (fasteth) | 732 | if (fasteth) |
730 | result |= 0x20000000; | 733 | result |= 0x20000000; |
731 | if (result != np->csr6 && debug) | 734 | if (result != np->csr6 && debug) |
732 | printk(KERN_INFO "%s: Setting %dMBit-%s-duplex based on MII#%d\n", | 735 | dev_info(&dev->dev, |
733 | dev->name, fasteth ? 100 : 10, | 736 | "Setting %dMBit-%s-duplex based on MII#%d\n", |
734 | duplex ? "full" : "half", np->phys[0]); | 737 | fasteth ? 100 : 10, duplex ? "full" : "half", |
738 | np->phys[0]); | ||
735 | return result; | 739 | return result; |
736 | } | 740 | } |
737 | 741 | ||
@@ -763,8 +767,8 @@ static inline void update_csr6(struct net_device *dev, int new) | |||
763 | 767 | ||
764 | limit--; | 768 | limit--; |
765 | if(!limit) { | 769 | if(!limit) { |
766 | printk(KERN_INFO "%s: couldn't stop rxtx, IntrStatus %xh.\n", | 770 | dev_info(&dev->dev, |
767 | dev->name, csr5); | 771 | "couldn't stop rxtx, IntrStatus %xh\n", csr5); |
768 | break; | 772 | break; |
769 | } | 773 | } |
770 | udelay(1); | 774 | udelay(1); |
@@ -783,10 +787,9 @@ static void netdev_timer(unsigned long data) | |||
783 | void __iomem *ioaddr = np->base_addr; | 787 | void __iomem *ioaddr = np->base_addr; |
784 | 788 | ||
785 | if (debug > 2) | 789 | if (debug > 2) |
786 | printk(KERN_DEBUG "%s: Media selection timer tick, status %8.8x " | 790 | printk(KERN_DEBUG "%s: Media selection timer tick, status %08x config %08x\n", |
787 | "config %8.8x.\n", | 791 | dev->name, ioread32(ioaddr + IntrStatus), |
788 | dev->name, ioread32(ioaddr + IntrStatus), | 792 | ioread32(ioaddr + NetworkConfig)); |
789 | ioread32(ioaddr + NetworkConfig)); | ||
790 | spin_lock_irq(&np->lock); | 793 | spin_lock_irq(&np->lock); |
791 | update_csr6(dev, update_link(dev)); | 794 | update_csr6(dev, update_link(dev)); |
792 | spin_unlock_irq(&np->lock); | 795 | spin_unlock_irq(&np->lock); |
@@ -899,8 +902,8 @@ static void init_registers(struct net_device *dev) | |||
899 | /* When not a module we can work around broken '486 PCI boards. */ | 902 | /* When not a module we can work around broken '486 PCI boards. */ |
900 | if (boot_cpu_data.x86 <= 4) { | 903 | if (boot_cpu_data.x86 <= 4) { |
901 | i |= 0x4800; | 904 | i |= 0x4800; |
902 | printk(KERN_INFO "%s: This is a 386/486 PCI system, setting cache " | 905 | dev_info(&dev->dev, |
903 | "alignment to 8 longwords.\n", dev->name); | 906 | "This is a 386/486 PCI system, setting cache alignment to 8 longwords\n"); |
904 | } else { | 907 | } else { |
905 | i |= 0xE000; | 908 | i |= 0xE000; |
906 | } | 909 | } |
@@ -931,22 +934,23 @@ static void tx_timeout(struct net_device *dev) | |||
931 | struct netdev_private *np = netdev_priv(dev); | 934 | struct netdev_private *np = netdev_priv(dev); |
932 | void __iomem *ioaddr = np->base_addr; | 935 | void __iomem *ioaddr = np->base_addr; |
933 | 936 | ||
934 | printk(KERN_WARNING "%s: Transmit timed out, status %8.8x," | 937 | dev_warn(&dev->dev, "Transmit timed out, status %08x, resetting...\n", |
935 | " resetting...\n", dev->name, ioread32(ioaddr + IntrStatus)); | 938 | ioread32(ioaddr + IntrStatus)); |
936 | 939 | ||
937 | { | 940 | { |
938 | int i; | 941 | int i; |
939 | printk(KERN_DEBUG " Rx ring %p: ", np->rx_ring); | 942 | printk(KERN_DEBUG " Rx ring %p: ", np->rx_ring); |
940 | for (i = 0; i < RX_RING_SIZE; i++) | 943 | for (i = 0; i < RX_RING_SIZE; i++) |
941 | printk(" %8.8x", (unsigned int)np->rx_ring[i].status); | 944 | printk(KERN_CONT " %08x", (unsigned int)np->rx_ring[i].status); |
942 | printk(KERN_DEBUG" Tx ring %p: ", np->tx_ring); | 945 | printk(KERN_CONT "\n"); |
946 | printk(KERN_DEBUG " Tx ring %p: ", np->tx_ring); | ||
943 | for (i = 0; i < TX_RING_SIZE; i++) | 947 | for (i = 0; i < TX_RING_SIZE; i++) |
944 | printk(" %8.8x", np->tx_ring[i].status); | 948 | printk(KERN_CONT " %08x", np->tx_ring[i].status); |
945 | printk("\n"); | 949 | printk(KERN_CONT "\n"); |
946 | } | 950 | } |
947 | printk(KERN_DEBUG "Tx cur %d Tx dirty %d Tx Full %d, q bytes %d.\n", | 951 | printk(KERN_DEBUG "Tx cur %d Tx dirty %d Tx Full %d, q bytes %d\n", |
948 | np->cur_tx, np->dirty_tx, np->tx_full, np->tx_q_bytes); | 952 | np->cur_tx, np->dirty_tx, np->tx_full, np->tx_q_bytes); |
949 | printk(KERN_DEBUG "Tx Descriptor addr %xh.\n",ioread32(ioaddr+0x4C)); | 953 | printk(KERN_DEBUG "Tx Descriptor addr %xh\n", ioread32(ioaddr+0x4C)); |
950 | 954 | ||
951 | disable_irq(dev->irq); | 955 | disable_irq(dev->irq); |
952 | spin_lock_irq(&np->lock); | 956 | spin_lock_irq(&np->lock); |
@@ -1055,8 +1059,8 @@ static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev) | |||
1055 | dev->trans_start = jiffies; | 1059 | dev->trans_start = jiffies; |
1056 | 1060 | ||
1057 | if (debug > 4) { | 1061 | if (debug > 4) { |
1058 | printk(KERN_DEBUG "%s: Transmit frame #%d queued in slot %d.\n", | 1062 | printk(KERN_DEBUG "%s: Transmit frame #%d queued in slot %d\n", |
1059 | dev->name, np->cur_tx, entry); | 1063 | dev->name, np->cur_tx, entry); |
1060 | } | 1064 | } |
1061 | return NETDEV_TX_OK; | 1065 | return NETDEV_TX_OK; |
1062 | } | 1066 | } |
@@ -1073,8 +1077,8 @@ static void netdev_tx_done(struct net_device *dev) | |||
1073 | if (tx_status & 0x8000) { /* There was an error, log it. */ | 1077 | if (tx_status & 0x8000) { /* There was an error, log it. */ |
1074 | #ifndef final_version | 1078 | #ifndef final_version |
1075 | if (debug > 1) | 1079 | if (debug > 1) |
1076 | printk(KERN_DEBUG "%s: Transmit error, Tx status %8.8x.\n", | 1080 | printk(KERN_DEBUG "%s: Transmit error, Tx status %08x\n", |
1077 | dev->name, tx_status); | 1081 | dev->name, tx_status); |
1078 | #endif | 1082 | #endif |
1079 | np->stats.tx_errors++; | 1083 | np->stats.tx_errors++; |
1080 | if (tx_status & 0x0104) np->stats.tx_aborted_errors++; | 1084 | if (tx_status & 0x0104) np->stats.tx_aborted_errors++; |
@@ -1086,8 +1090,8 @@ static void netdev_tx_done(struct net_device *dev) | |||
1086 | } else { | 1090 | } else { |
1087 | #ifndef final_version | 1091 | #ifndef final_version |
1088 | if (debug > 3) | 1092 | if (debug > 3) |
1089 | printk(KERN_DEBUG "%s: Transmit slot %d ok, Tx status %8.8x.\n", | 1093 | printk(KERN_DEBUG "%s: Transmit slot %d ok, Tx status %08x\n", |
1090 | dev->name, entry, tx_status); | 1094 | dev->name, entry, tx_status); |
1091 | #endif | 1095 | #endif |
1092 | np->stats.tx_bytes += np->tx_skbuff[entry]->len; | 1096 | np->stats.tx_bytes += np->tx_skbuff[entry]->len; |
1093 | np->stats.collisions += (tx_status >> 3) & 15; | 1097 | np->stats.collisions += (tx_status >> 3) & 15; |
@@ -1130,8 +1134,8 @@ static irqreturn_t intr_handler(int irq, void *dev_instance) | |||
1130 | iowrite32(intr_status & 0x001ffff, ioaddr + IntrStatus); | 1134 | iowrite32(intr_status & 0x001ffff, ioaddr + IntrStatus); |
1131 | 1135 | ||
1132 | if (debug > 4) | 1136 | if (debug > 4) |
1133 | printk(KERN_DEBUG "%s: Interrupt, status %4.4x.\n", | 1137 | printk(KERN_DEBUG "%s: Interrupt, status %04x\n", |
1134 | dev->name, intr_status); | 1138 | dev->name, intr_status); |
1135 | 1139 | ||
1136 | if ((intr_status & (NormalIntr|AbnormalIntr)) == 0) | 1140 | if ((intr_status & (NormalIntr|AbnormalIntr)) == 0) |
1137 | break; | 1141 | break; |
@@ -1156,8 +1160,9 @@ static irqreturn_t intr_handler(int irq, void *dev_instance) | |||
1156 | netdev_error(dev, intr_status); | 1160 | netdev_error(dev, intr_status); |
1157 | 1161 | ||
1158 | if (--work_limit < 0) { | 1162 | if (--work_limit < 0) { |
1159 | printk(KERN_WARNING "%s: Too much work at interrupt, " | 1163 | dev_warn(&dev->dev, |
1160 | "status=0x%4.4x.\n", dev->name, intr_status); | 1164 | "Too much work at interrupt, status=0x%04x\n", |
1165 | intr_status); | ||
1161 | /* Set the timer to re-enable the other interrupts after | 1166 | /* Set the timer to re-enable the other interrupts after |
1162 | 10*82usec ticks. */ | 1167 | 10*82usec ticks. */ |
1163 | spin_lock(&np->lock); | 1168 | spin_lock(&np->lock); |
@@ -1171,8 +1176,8 @@ static irqreturn_t intr_handler(int irq, void *dev_instance) | |||
1171 | } while (1); | 1176 | } while (1); |
1172 | 1177 | ||
1173 | if (debug > 3) | 1178 | if (debug > 3) |
1174 | printk(KERN_DEBUG "%s: exiting interrupt, status=%#4.4x.\n", | 1179 | printk(KERN_DEBUG "%s: exiting interrupt, status=%#4.4x\n", |
1175 | dev->name, ioread32(ioaddr + IntrStatus)); | 1180 | dev->name, ioread32(ioaddr + IntrStatus)); |
1176 | return IRQ_RETVAL(handled); | 1181 | return IRQ_RETVAL(handled); |
1177 | } | 1182 | } |
1178 | 1183 | ||
@@ -1185,8 +1190,8 @@ static int netdev_rx(struct net_device *dev) | |||
1185 | int work_limit = np->dirty_rx + RX_RING_SIZE - np->cur_rx; | 1190 | int work_limit = np->dirty_rx + RX_RING_SIZE - np->cur_rx; |
1186 | 1191 | ||
1187 | if (debug > 4) { | 1192 | if (debug > 4) { |
1188 | printk(KERN_DEBUG " In netdev_rx(), entry %d status %4.4x.\n", | 1193 | printk(KERN_DEBUG " In netdev_rx(), entry %d status %04x\n", |
1189 | entry, np->rx_ring[entry].status); | 1194 | entry, np->rx_ring[entry].status); |
1190 | } | 1195 | } |
1191 | 1196 | ||
1192 | /* If EOP is set on the next entry, it's a new packet. Send it up. */ | 1197 | /* If EOP is set on the next entry, it's a new packet. Send it up. */ |
@@ -1195,24 +1200,24 @@ static int netdev_rx(struct net_device *dev) | |||
1195 | s32 status = desc->status; | 1200 | s32 status = desc->status; |
1196 | 1201 | ||
1197 | if (debug > 4) | 1202 | if (debug > 4) |
1198 | printk(KERN_DEBUG " netdev_rx() status was %8.8x.\n", | 1203 | printk(KERN_DEBUG " netdev_rx() status was %08x\n", |
1199 | status); | 1204 | status); |
1200 | if (status < 0) | 1205 | if (status < 0) |
1201 | break; | 1206 | break; |
1202 | if ((status & 0x38008300) != 0x0300) { | 1207 | if ((status & 0x38008300) != 0x0300) { |
1203 | if ((status & 0x38000300) != 0x0300) { | 1208 | if ((status & 0x38000300) != 0x0300) { |
1204 | /* Ingore earlier buffers. */ | 1209 | /* Ingore earlier buffers. */ |
1205 | if ((status & 0xffff) != 0x7fff) { | 1210 | if ((status & 0xffff) != 0x7fff) { |
1206 | printk(KERN_WARNING "%s: Oversized Ethernet frame spanned " | 1211 | dev_warn(&dev->dev, |
1207 | "multiple buffers, entry %#x status %4.4x!\n", | 1212 | "Oversized Ethernet frame spanned multiple buffers, entry %#x status %04x!\n", |
1208 | dev->name, np->cur_rx, status); | 1213 | np->cur_rx, status); |
1209 | np->stats.rx_length_errors++; | 1214 | np->stats.rx_length_errors++; |
1210 | } | 1215 | } |
1211 | } else if (status & 0x8000) { | 1216 | } else if (status & 0x8000) { |
1212 | /* There was a fatal error. */ | 1217 | /* There was a fatal error. */ |
1213 | if (debug > 2) | 1218 | if (debug > 2) |
1214 | printk(KERN_DEBUG "%s: Receive error, Rx status %8.8x.\n", | 1219 | printk(KERN_DEBUG "%s: Receive error, Rx status %08x\n", |
1215 | dev->name, status); | 1220 | dev->name, status); |
1216 | np->stats.rx_errors++; /* end of a packet.*/ | 1221 | np->stats.rx_errors++; /* end of a packet.*/ |
1217 | if (status & 0x0890) np->stats.rx_length_errors++; | 1222 | if (status & 0x0890) np->stats.rx_length_errors++; |
1218 | if (status & 0x004C) np->stats.rx_frame_errors++; | 1223 | if (status & 0x004C) np->stats.rx_frame_errors++; |
@@ -1225,8 +1230,8 @@ static int netdev_rx(struct net_device *dev) | |||
1225 | 1230 | ||
1226 | #ifndef final_version | 1231 | #ifndef final_version |
1227 | if (debug > 4) | 1232 | if (debug > 4) |
1228 | printk(KERN_DEBUG " netdev_rx() normal Rx pkt length %d" | 1233 | printk(KERN_DEBUG " netdev_rx() normal Rx pkt length %d status %x\n", |
1229 | " status %x.\n", pkt_len, status); | 1234 | pkt_len, status); |
1230 | #endif | 1235 | #endif |
1231 | /* Check if the packet is long enough to accept without copying | 1236 | /* Check if the packet is long enough to accept without copying |
1232 | to a minimally-sized skbuff. */ | 1237 | to a minimally-sized skbuff. */ |
@@ -1251,11 +1256,10 @@ static int netdev_rx(struct net_device *dev) | |||
1251 | #ifndef final_version /* Remove after testing. */ | 1256 | #ifndef final_version /* Remove after testing. */ |
1252 | /* You will want this info for the initial debug. */ | 1257 | /* You will want this info for the initial debug. */ |
1253 | if (debug > 5) | 1258 | if (debug > 5) |
1254 | printk(KERN_DEBUG " Rx data %pM %pM" | 1259 | printk(KERN_DEBUG " Rx data %pM %pM %02x%02x %pI4\n", |
1255 | " %2.2x%2.2x %d.%d.%d.%d.\n", | ||
1256 | &skb->data[0], &skb->data[6], | 1260 | &skb->data[0], &skb->data[6], |
1257 | skb->data[12], skb->data[13], | 1261 | skb->data[12], skb->data[13], |
1258 | skb->data[14], skb->data[15], skb->data[16], skb->data[17]); | 1262 | &skb->data[14]); |
1259 | #endif | 1263 | #endif |
1260 | skb->protocol = eth_type_trans(skb, dev); | 1264 | skb->protocol = eth_type_trans(skb, dev); |
1261 | netif_rx(skb); | 1265 | netif_rx(skb); |
@@ -1293,8 +1297,8 @@ static void netdev_error(struct net_device *dev, int intr_status) | |||
1293 | void __iomem *ioaddr = np->base_addr; | 1297 | void __iomem *ioaddr = np->base_addr; |
1294 | 1298 | ||
1295 | if (debug > 2) | 1299 | if (debug > 2) |
1296 | printk(KERN_DEBUG "%s: Abnormal event, %8.8x.\n", | 1300 | printk(KERN_DEBUG "%s: Abnormal event, %08x\n", |
1297 | dev->name, intr_status); | 1301 | dev->name, intr_status); |
1298 | if (intr_status == 0xffffffff) | 1302 | if (intr_status == 0xffffffff) |
1299 | return; | 1303 | return; |
1300 | spin_lock(&np->lock); | 1304 | spin_lock(&np->lock); |
@@ -1314,8 +1318,8 @@ static void netdev_error(struct net_device *dev, int intr_status) | |||
1314 | new = 127; /* load full packet before starting */ | 1318 | new = 127; /* load full packet before starting */ |
1315 | new = (np->csr6 & ~(0x7F << 14)) | (new<<14); | 1319 | new = (np->csr6 & ~(0x7F << 14)) | (new<<14); |
1316 | #endif | 1320 | #endif |
1317 | printk(KERN_DEBUG "%s: Tx underflow, new csr6 %8.8x.\n", | 1321 | printk(KERN_DEBUG "%s: Tx underflow, new csr6 %08x\n", |
1318 | dev->name, new); | 1322 | dev->name, new); |
1319 | update_csr6(dev, new); | 1323 | update_csr6(dev, new); |
1320 | } | 1324 | } |
1321 | if (intr_status & RxDied) { /* Missed a Rx frame. */ | 1325 | if (intr_status & RxDied) { /* Missed a Rx frame. */ |
@@ -1487,11 +1491,13 @@ static int netdev_close(struct net_device *dev) | |||
1487 | netif_stop_queue(dev); | 1491 | netif_stop_queue(dev); |
1488 | 1492 | ||
1489 | if (debug > 1) { | 1493 | if (debug > 1) { |
1490 | printk(KERN_DEBUG "%s: Shutting down ethercard, status was %8.8x " | 1494 | printk(KERN_DEBUG "%s: Shutting down ethercard, status was %08x Config %08x\n", |
1491 | "Config %8.8x.\n", dev->name, ioread32(ioaddr + IntrStatus), | 1495 | dev->name, ioread32(ioaddr + IntrStatus), |
1492 | ioread32(ioaddr + NetworkConfig)); | 1496 | ioread32(ioaddr + NetworkConfig)); |
1493 | printk(KERN_DEBUG "%s: Queue pointers were Tx %d / %d, Rx %d / %d.\n", | 1497 | printk(KERN_DEBUG "%s: Queue pointers were Tx %d / %d, Rx %d / %d\n", |
1494 | dev->name, np->cur_tx, np->dirty_tx, np->cur_rx, np->dirty_rx); | 1498 | dev->name, |
1499 | np->cur_tx, np->dirty_tx, | ||
1500 | np->cur_rx, np->dirty_rx); | ||
1495 | } | 1501 | } |
1496 | 1502 | ||
1497 | /* Stop the chip's Tx and Rx processes. */ | 1503 | /* Stop the chip's Tx and Rx processes. */ |
@@ -1512,18 +1518,16 @@ static int netdev_close(struct net_device *dev) | |||
1512 | if (debug > 2) { | 1518 | if (debug > 2) { |
1513 | int i; | 1519 | int i; |
1514 | 1520 | ||
1515 | printk(KERN_DEBUG" Tx ring at %8.8x:\n", | 1521 | printk(KERN_DEBUG" Tx ring at %08x:\n", (int)np->tx_ring); |
1516 | (int)np->tx_ring); | ||
1517 | for (i = 0; i < TX_RING_SIZE; i++) | 1522 | for (i = 0; i < TX_RING_SIZE; i++) |
1518 | printk(KERN_DEBUG " #%d desc. %4.4x %4.4x %8.8x.\n", | 1523 | printk(KERN_DEBUG " #%d desc. %04x %04x %08x\n", |
1519 | i, np->tx_ring[i].length, | 1524 | i, np->tx_ring[i].length, |
1520 | np->tx_ring[i].status, np->tx_ring[i].buffer1); | 1525 | np->tx_ring[i].status, np->tx_ring[i].buffer1); |
1521 | printk(KERN_DEBUG " Rx ring %8.8x:\n", | 1526 | printk(KERN_DEBUG " Rx ring %08x:\n", (int)np->rx_ring); |
1522 | (int)np->rx_ring); | ||
1523 | for (i = 0; i < RX_RING_SIZE; i++) { | 1527 | for (i = 0; i < RX_RING_SIZE; i++) { |
1524 | printk(KERN_DEBUG " #%d desc. %4.4x %4.4x %8.8x\n", | 1528 | printk(KERN_DEBUG " #%d desc. %04x %04x %08x\n", |
1525 | i, np->rx_ring[i].length, | 1529 | i, np->rx_ring[i].length, |
1526 | np->rx_ring[i].status, np->rx_ring[i].buffer1); | 1530 | np->rx_ring[i].status, np->rx_ring[i].buffer1); |
1527 | } | 1531 | } |
1528 | } | 1532 | } |
1529 | #endif /* __i386__ debugging only */ | 1533 | #endif /* __i386__ debugging only */ |
@@ -1622,9 +1626,8 @@ static int w840_resume (struct pci_dev *pdev) | |||
1622 | goto out; /* device not suspended */ | 1626 | goto out; /* device not suspended */ |
1623 | if (netif_running(dev)) { | 1627 | if (netif_running(dev)) { |
1624 | if ((retval = pci_enable_device(pdev))) { | 1628 | if ((retval = pci_enable_device(pdev))) { |
1625 | printk (KERN_ERR | 1629 | dev_err(&dev->dev, |
1626 | "%s: pci_enable_device failed in resume\n", | 1630 | "pci_enable_device failed in resume\n"); |
1627 | dev->name); | ||
1628 | goto out; | 1631 | goto out; |
1629 | } | 1632 | } |
1630 | spin_lock_irq(&np->lock); | 1633 | spin_lock_irq(&np->lock); |