aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-02-17 10:02:02 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-17 21:41:42 -0500
commitacbbf1f1fd63391eeba70fec991568e4334c80d4 (patch)
tree7ad4457a20efd90ea817f72eb31f8975df6e6b22
parentada1db5c6fac4d400ec284729af19b47488b332d (diff)
drivers/net/yellowfin.c: Use (pr|netdev)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt Remove #define PFX Use pr_<level> Use netdev_<level> Convert formats like %8.8 to %08 Remove periods from formats Coalesce long formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/yellowfin.c162
1 files changed, 78 insertions, 84 deletions
diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c
index 5c880240a642..e4aab4d5b553 100644
--- a/drivers/net/yellowfin.c
+++ b/drivers/net/yellowfin.c
@@ -23,12 +23,12 @@
23 23
24*/ 24*/
25 25
26#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
27
26#define DRV_NAME "yellowfin" 28#define DRV_NAME "yellowfin"
27#define DRV_VERSION "2.1" 29#define DRV_VERSION "2.1"
28#define DRV_RELDATE "Sep 11, 2006" 30#define DRV_RELDATE "Sep 11, 2006"
29 31
30#define PFX DRV_NAME ": "
31
32/* The user-configurable values. 32/* The user-configurable values.
33 These may be modified when a driver module is loaded.*/ 33 These may be modified when a driver module is loaded.*/
34 34
@@ -399,7 +399,7 @@ static int __devinit yellowfin_init_one(struct pci_dev *pdev,
399 399
400 dev = alloc_etherdev(sizeof(*np)); 400 dev = alloc_etherdev(sizeof(*np));
401 if (!dev) { 401 if (!dev) {
402 printk (KERN_ERR PFX "cannot allocate ethernet device\n"); 402 pr_err("cannot allocate ethernet device\n");
403 return -ENOMEM; 403 return -ENOMEM;
404 } 404 }
405 SET_NETDEV_DEV(dev, &pdev->dev); 405 SET_NETDEV_DEV(dev, &pdev->dev);
@@ -487,10 +487,10 @@ static int __devinit yellowfin_init_one(struct pci_dev *pdev,
487 if (i) 487 if (i)
488 goto err_out_unmap_status; 488 goto err_out_unmap_status;
489 489
490 printk(KERN_INFO "%s: %s type %8x at %p, %pM, IRQ %d.\n", 490 netdev_info(dev, "%s type %8x at %p, %pM, IRQ %d\n",
491 dev->name, pci_id_tbl[chip_idx].name, 491 pci_id_tbl[chip_idx].name,
492 ioread32(ioaddr + ChipRev), ioaddr, 492 ioread32(ioaddr + ChipRev), ioaddr,
493 dev->dev_addr, irq); 493 dev->dev_addr, irq);
494 494
495 if (np->drv_flags & HasMII) { 495 if (np->drv_flags & HasMII) {
496 int phy, phy_idx = 0; 496 int phy, phy_idx = 0;
@@ -499,9 +499,8 @@ static int __devinit yellowfin_init_one(struct pci_dev *pdev,
499 if (mii_status != 0xffff && mii_status != 0x0000) { 499 if (mii_status != 0xffff && mii_status != 0x0000) {
500 np->phys[phy_idx++] = phy; 500 np->phys[phy_idx++] = phy;
501 np->advertising = mdio_read(ioaddr, phy, 4); 501 np->advertising = mdio_read(ioaddr, phy, 4);
502 printk(KERN_INFO "%s: MII PHY found at address %d, status " 502 netdev_info(dev, "MII PHY found at address %d, status 0x%04x advertising %04x\n",
503 "0x%4.4x advertising %4.4x.\n", 503 phy, mii_status, np->advertising);
504 dev->name, phy, mii_status, np->advertising);
505 } 504 }
506 } 505 }
507 np->mii_cnt = phy_idx; 506 np->mii_cnt = phy_idx;
@@ -584,8 +583,8 @@ static int yellowfin_open(struct net_device *dev)
584 return ret; 583 return ret;
585 584
586 if (yellowfin_debug > 1) 585 if (yellowfin_debug > 1)
587 printk(KERN_DEBUG "%s: yellowfin_open() irq %d.\n", 586 netdev_printk(KERN_DEBUG, dev, "%s() irq %d\n",
588 dev->name, dev->irq); 587 __func__, dev->irq);
589 588
590 ret = yellowfin_init_ring(dev); 589 ret = yellowfin_init_ring(dev);
591 if (ret) { 590 if (ret) {
@@ -642,8 +641,7 @@ static int yellowfin_open(struct net_device *dev)
642 iowrite32(0x80008000, ioaddr + TxCtrl); 641 iowrite32(0x80008000, ioaddr + TxCtrl);
643 642
644 if (yellowfin_debug > 2) { 643 if (yellowfin_debug > 2) {
645 printk(KERN_DEBUG "%s: Done yellowfin_open().\n", 644 netdev_printk(KERN_DEBUG, dev, "Done %s()\n", __func__);
646 dev->name);
647 } 645 }
648 646
649 /* Set the timer to check for link beat. */ 647 /* Set the timer to check for link beat. */
@@ -664,8 +662,8 @@ static void yellowfin_timer(unsigned long data)
664 int next_tick = 60*HZ; 662 int next_tick = 60*HZ;
665 663
666 if (yellowfin_debug > 3) { 664 if (yellowfin_debug > 3) {
667 printk(KERN_DEBUG "%s: Yellowfin timer tick, status %8.8x.\n", 665 netdev_printk(KERN_DEBUG, dev, "Yellowfin timer tick, status %08x\n",
668 dev->name, ioread16(ioaddr + IntrStatus)); 666 ioread16(ioaddr + IntrStatus));
669 } 667 }
670 668
671 if (yp->mii_cnt) { 669 if (yp->mii_cnt) {
@@ -673,9 +671,8 @@ static void yellowfin_timer(unsigned long data)
673 int lpa = mdio_read(ioaddr, yp->phys[0], MII_LPA); 671 int lpa = mdio_read(ioaddr, yp->phys[0], MII_LPA);
674 int negotiated = lpa & yp->advertising; 672 int negotiated = lpa & yp->advertising;
675 if (yellowfin_debug > 1) 673 if (yellowfin_debug > 1)
676 printk(KERN_DEBUG "%s: MII #%d status register is %4.4x, " 674 netdev_printk(KERN_DEBUG, dev, "MII #%d status register is %04x, link partner capability %04x\n",
677 "link partner capability %4.4x.\n", 675 yp->phys[0], bmsr, lpa);
678 dev->name, yp->phys[0], bmsr, lpa);
679 676
680 yp->full_duplex = mii_duplex(yp->duplex_lock, negotiated); 677 yp->full_duplex = mii_duplex(yp->duplex_lock, negotiated);
681 678
@@ -696,25 +693,24 @@ static void yellowfin_tx_timeout(struct net_device *dev)
696 struct yellowfin_private *yp = netdev_priv(dev); 693 struct yellowfin_private *yp = netdev_priv(dev);
697 void __iomem *ioaddr = yp->base; 694 void __iomem *ioaddr = yp->base;
698 695
699 printk(KERN_WARNING "%s: Yellowfin transmit timed out at %d/%d Tx " 696 netdev_warn(dev, "Yellowfin transmit timed out at %d/%d Tx status %04x, Rx status %04x, resetting...\n",
700 "status %4.4x, Rx status %4.4x, resetting...\n", 697 yp->cur_tx, yp->dirty_tx,
701 dev->name, yp->cur_tx, yp->dirty_tx, 698 ioread32(ioaddr + TxStatus),
702 ioread32(ioaddr + TxStatus), ioread32(ioaddr + RxStatus)); 699 ioread32(ioaddr + RxStatus));
703 700
704 /* Note: these should be KERN_DEBUG. */ 701 /* Note: these should be KERN_DEBUG. */
705 if (yellowfin_debug) { 702 if (yellowfin_debug) {
706 int i; 703 int i;
707 printk(KERN_WARNING " Rx ring %p: ", yp->rx_ring); 704 pr_warning(" Rx ring %p: ", yp->rx_ring);
708 for (i = 0; i < RX_RING_SIZE; i++) 705 for (i = 0; i < RX_RING_SIZE; i++)
709 printk(KERN_CONT " %8.8x", 706 pr_cont(" %08x", yp->rx_ring[i].result_status);
710 yp->rx_ring[i].result_status); 707 pr_cont("\n");
711 printk(KERN_CONT "\n"); 708 pr_warning(" Tx ring %p: ", yp->tx_ring);
712 printk(KERN_WARNING" Tx ring %p: ", yp->tx_ring);
713 for (i = 0; i < TX_RING_SIZE; i++) 709 for (i = 0; i < TX_RING_SIZE; i++)
714 printk(KERN_CONT " %4.4x /%8.8x", 710 pr_cont(" %04x /%08x",
715 yp->tx_status[i].tx_errs, 711 yp->tx_status[i].tx_errs,
716 yp->tx_ring[i].result_status); 712 yp->tx_ring[i].result_status);
717 printk(KERN_CONT "\n"); 713 pr_cont("\n");
718 } 714 }
719 715
720 /* If the hardware is found to hang regularly, we will update the code 716 /* If the hardware is found to hang regularly, we will update the code
@@ -891,8 +887,8 @@ static netdev_tx_t yellowfin_start_xmit(struct sk_buff *skb,
891 yp->tx_full = 1; 887 yp->tx_full = 1;
892 888
893 if (yellowfin_debug > 4) { 889 if (yellowfin_debug > 4) {
894 printk(KERN_DEBUG "%s: Yellowfin transmit frame #%d queued in slot %d.\n", 890 netdev_printk(KERN_DEBUG, dev, "Yellowfin transmit frame #%d queued in slot %d\n",
895 dev->name, yp->cur_tx, entry); 891 yp->cur_tx, entry);
896 } 892 }
897 return NETDEV_TX_OK; 893 return NETDEV_TX_OK;
898} 894}
@@ -916,8 +912,8 @@ static irqreturn_t yellowfin_interrupt(int irq, void *dev_instance)
916 u16 intr_status = ioread16(ioaddr + IntrClear); 912 u16 intr_status = ioread16(ioaddr + IntrClear);
917 913
918 if (yellowfin_debug > 4) 914 if (yellowfin_debug > 4)
919 printk(KERN_DEBUG "%s: Yellowfin interrupt, status %4.4x.\n", 915 netdev_printk(KERN_DEBUG, dev, "Yellowfin interrupt, status %04x\n",
920 dev->name, intr_status); 916 intr_status);
921 917
922 if (intr_status == 0) 918 if (intr_status == 0)
923 break; 919 break;
@@ -963,13 +959,12 @@ static irqreturn_t yellowfin_interrupt(int irq, void *dev_instance)
963 959
964#ifndef final_version 960#ifndef final_version
965 if (yellowfin_debug > 5) 961 if (yellowfin_debug > 5)
966 printk(KERN_DEBUG "%s: Tx queue %d check, Tx status " 962 netdev_printk(KERN_DEBUG, dev, "Tx queue %d check, Tx status %04x %04x %04x %04x\n",
967 "%4.4x %4.4x %4.4x %4.4x.\n", 963 entry,
968 dev->name, entry, 964 yp->tx_status[entry].tx_cnt,
969 yp->tx_status[entry].tx_cnt, 965 yp->tx_status[entry].tx_errs,
970 yp->tx_status[entry].tx_errs, 966 yp->tx_status[entry].total_tx_cnt,
971 yp->tx_status[entry].total_tx_cnt, 967 yp->tx_status[entry].paused);
972 yp->tx_status[entry].paused);
973#endif 968#endif
974 if (tx_errs == 0) 969 if (tx_errs == 0)
975 break; /* It still hasn't been Txed */ 970 break; /* It still hasn't been Txed */
@@ -978,8 +973,8 @@ static irqreturn_t yellowfin_interrupt(int irq, void *dev_instance)
978 /* There was an major error, log it. */ 973 /* There was an major error, log it. */
979#ifndef final_version 974#ifndef final_version
980 if (yellowfin_debug > 1) 975 if (yellowfin_debug > 1)
981 printk(KERN_DEBUG "%s: Transmit error, Tx status %4.4x.\n", 976 netdev_printk(KERN_DEBUG, dev, "Transmit error, Tx status %04x\n",
982 dev->name, tx_errs); 977 tx_errs);
983#endif 978#endif
984 dev->stats.tx_errors++; 979 dev->stats.tx_errors++;
985 if (tx_errs & 0xF800) dev->stats.tx_aborted_errors++; 980 if (tx_errs & 0xF800) dev->stats.tx_aborted_errors++;
@@ -989,8 +984,8 @@ static irqreturn_t yellowfin_interrupt(int irq, void *dev_instance)
989 } else { 984 } else {
990#ifndef final_version 985#ifndef final_version
991 if (yellowfin_debug > 4) 986 if (yellowfin_debug > 4)
992 printk(KERN_DEBUG "%s: Normal transmit, Tx status %4.4x.\n", 987 netdev_printk(KERN_DEBUG, dev, "Normal transmit, Tx status %04x\n",
993 dev->name, tx_errs); 988 tx_errs);
994#endif 989#endif
995 dev->stats.tx_bytes += skb->len; 990 dev->stats.tx_bytes += skb->len;
996 dev->stats.collisions += tx_errs & 15; 991 dev->stats.collisions += tx_errs & 15;
@@ -1008,8 +1003,8 @@ static irqreturn_t yellowfin_interrupt(int irq, void *dev_instance)
1008 1003
1009#ifndef final_version 1004#ifndef final_version
1010 if (yp->cur_tx - dirty_tx > TX_RING_SIZE) { 1005 if (yp->cur_tx - dirty_tx > TX_RING_SIZE) {
1011 printk(KERN_ERR "%s: Out-of-sync dirty pointer, %d vs. %d, full=%d.\n", 1006 netdev_err(dev, "Out-of-sync dirty pointer, %d vs. %d, full=%d\n",
1012 dev->name, dirty_tx, yp->cur_tx, yp->tx_full); 1007 dirty_tx, yp->cur_tx, yp->tx_full);
1013 dirty_tx += TX_RING_SIZE; 1008 dirty_tx += TX_RING_SIZE;
1014 } 1009 }
1015#endif 1010#endif
@@ -1031,16 +1026,15 @@ static irqreturn_t yellowfin_interrupt(int irq, void *dev_instance)
1031 yellowfin_error(dev, intr_status); 1026 yellowfin_error(dev, intr_status);
1032 1027
1033 if (--boguscnt < 0) { 1028 if (--boguscnt < 0) {
1034 printk(KERN_WARNING "%s: Too much work at interrupt, " 1029 netdev_warn(dev, "Too much work at interrupt, status=%#04x\n",
1035 "status=0x%4.4x.\n", 1030 intr_status);
1036 dev->name, intr_status);
1037 break; 1031 break;
1038 } 1032 }
1039 } while (1); 1033 } while (1);
1040 1034
1041 if (yellowfin_debug > 3) 1035 if (yellowfin_debug > 3)
1042 printk(KERN_DEBUG "%s: exiting interrupt, status=%#4.4x.\n", 1036 netdev_printk(KERN_DEBUG, dev, "exiting interrupt, status=%#04x\n",
1043 dev->name, ioread16(ioaddr + IntrStatus)); 1037 ioread16(ioaddr + IntrStatus));
1044 1038
1045 spin_unlock (&yp->lock); 1039 spin_unlock (&yp->lock);
1046 return IRQ_RETVAL(handled); 1040 return IRQ_RETVAL(handled);
@@ -1055,9 +1049,9 @@ static int yellowfin_rx(struct net_device *dev)
1055 int boguscnt = yp->dirty_rx + RX_RING_SIZE - yp->cur_rx; 1049 int boguscnt = yp->dirty_rx + RX_RING_SIZE - yp->cur_rx;
1056 1050
1057 if (yellowfin_debug > 4) { 1051 if (yellowfin_debug > 4) {
1058 printk(KERN_DEBUG " In yellowfin_rx(), entry %d status %8.8x.\n", 1052 printk(KERN_DEBUG " In yellowfin_rx(), entry %d status %08x\n",
1059 entry, yp->rx_ring[entry].result_status); 1053 entry, yp->rx_ring[entry].result_status);
1060 printk(KERN_DEBUG " #%d desc. %8.8x %8.8x %8.8x.\n", 1054 printk(KERN_DEBUG " #%d desc. %08x %08x %08x\n",
1061 entry, yp->rx_ring[entry].dbdma_cmd, yp->rx_ring[entry].addr, 1055 entry, yp->rx_ring[entry].dbdma_cmd, yp->rx_ring[entry].addr,
1062 yp->rx_ring[entry].result_status); 1056 yp->rx_ring[entry].result_status);
1063 } 1057 }
@@ -1081,20 +1075,20 @@ static int yellowfin_rx(struct net_device *dev)
1081 le32_to_cpu(desc->result_status)) & 0xffff; 1075 le32_to_cpu(desc->result_status)) & 0xffff;
1082 frame_status = get_unaligned_le16(&(buf_addr[data_size - 2])); 1076 frame_status = get_unaligned_le16(&(buf_addr[data_size - 2]));
1083 if (yellowfin_debug > 4) 1077 if (yellowfin_debug > 4)
1084 printk(KERN_DEBUG " yellowfin_rx() status was %4.4x.\n", 1078 printk(KERN_DEBUG " %s() status was %04x\n",
1085 frame_status); 1079 __func__, frame_status);
1086 if (--boguscnt < 0) 1080 if (--boguscnt < 0)
1087 break; 1081 break;
1088 if ( ! (desc_status & RX_EOP)) { 1082 if ( ! (desc_status & RX_EOP)) {
1089 if (data_size != 0) 1083 if (data_size != 0)
1090 printk(KERN_WARNING "%s: Oversized Ethernet frame spanned multiple buffers," 1084 netdev_warn(dev, "Oversized Ethernet frame spanned multiple buffers, status %04x, data_size %d!\n",
1091 " status %4.4x, data_size %d!\n", dev->name, desc_status, data_size); 1085 desc_status, data_size);
1092 dev->stats.rx_length_errors++; 1086 dev->stats.rx_length_errors++;
1093 } else if ((yp->drv_flags & IsGigabit) && (frame_status & 0x0038)) { 1087 } else if ((yp->drv_flags & IsGigabit) && (frame_status & 0x0038)) {
1094 /* There was a error. */ 1088 /* There was a error. */
1095 if (yellowfin_debug > 3) 1089 if (yellowfin_debug > 3)
1096 printk(KERN_DEBUG " yellowfin_rx() Rx error was %4.4x.\n", 1090 printk(KERN_DEBUG " %s() Rx error was %04x\n",
1097 frame_status); 1091 __func__, frame_status);
1098 dev->stats.rx_errors++; 1092 dev->stats.rx_errors++;
1099 if (frame_status & 0x0060) dev->stats.rx_length_errors++; 1093 if (frame_status & 0x0060) dev->stats.rx_length_errors++;
1100 if (frame_status & 0x0008) dev->stats.rx_frame_errors++; 1094 if (frame_status & 0x0008) dev->stats.rx_frame_errors++;
@@ -1118,8 +1112,8 @@ static int yellowfin_rx(struct net_device *dev)
1118 entry*sizeof(struct yellowfin_desc)), 1112 entry*sizeof(struct yellowfin_desc)),
1119 "\377\377\377\377\377\377", 6) != 0) { 1113 "\377\377\377\377\377\377", 6) != 0) {
1120 if (bogus_rx++ == 0) 1114 if (bogus_rx++ == 0)
1121 printk(KERN_WARNING "%s: Bad frame to %pM\n", 1115 netdev_warn(dev, "Bad frame to %pM\n",
1122 dev->name, buf_addr); 1116 buf_addr);
1123#endif 1117#endif
1124 } else { 1118 } else {
1125 struct sk_buff *skb; 1119 struct sk_buff *skb;
@@ -1129,9 +1123,8 @@ static int yellowfin_rx(struct net_device *dev)
1129 1123
1130#ifndef final_version 1124#ifndef final_version
1131 if (yellowfin_debug > 4) 1125 if (yellowfin_debug > 4)
1132 printk(KERN_DEBUG " yellowfin_rx() normal Rx pkt length %d" 1126 printk(KERN_DEBUG " %s() normal Rx pkt length %d of %d, bogus_cnt %d\n",
1133 " of %d, bogus_cnt %d.\n", 1127 __func__, pkt_len, data_size, boguscnt);
1134 pkt_len, data_size, boguscnt);
1135#endif 1128#endif
1136 /* Check if the packet is long enough to just pass up the skbuff 1129 /* Check if the packet is long enough to just pass up the skbuff
1137 without copying to a properly sized skbuff. */ 1130 without copying to a properly sized skbuff. */
@@ -1191,8 +1184,7 @@ static int yellowfin_rx(struct net_device *dev)
1191 1184
1192static void yellowfin_error(struct net_device *dev, int intr_status) 1185static void yellowfin_error(struct net_device *dev, int intr_status)
1193{ 1186{
1194 printk(KERN_ERR "%s: Something Wicked happened! %4.4x.\n", 1187 netdev_err(dev, "Something Wicked happened! %04x\n", intr_status);
1195 dev->name, intr_status);
1196 /* Hmmmmm, it's not clear what to do here. */ 1188 /* Hmmmmm, it's not clear what to do here. */
1197 if (intr_status & (IntrTxPCIErr | IntrTxPCIFault)) 1189 if (intr_status & (IntrTxPCIErr | IntrTxPCIFault))
1198 dev->stats.tx_errors++; 1190 dev->stats.tx_errors++;
@@ -1209,13 +1201,13 @@ static int yellowfin_close(struct net_device *dev)
1209 netif_stop_queue (dev); 1201 netif_stop_queue (dev);
1210 1202
1211 if (yellowfin_debug > 1) { 1203 if (yellowfin_debug > 1) {
1212 printk(KERN_DEBUG "%s: Shutting down ethercard, status was Tx %4.4x " 1204 netdev_printk(KERN_DEBUG, dev, "Shutting down ethercard, status was Tx %04x Rx %04x Int %02x\n",
1213 "Rx %4.4x Int %2.2x.\n", 1205 ioread16(ioaddr + TxStatus),
1214 dev->name, ioread16(ioaddr + TxStatus), 1206 ioread16(ioaddr + RxStatus),
1215 ioread16(ioaddr + RxStatus), 1207 ioread16(ioaddr + IntrStatus));
1216 ioread16(ioaddr + IntrStatus)); 1208 netdev_printk(KERN_DEBUG, dev, "Queue pointers were Tx %d / %d, Rx %d / %d\n",
1217 printk(KERN_DEBUG "%s: Queue pointers were Tx %d / %d, Rx %d / %d.\n", 1209 yp->cur_tx, yp->dirty_tx,
1218 dev->name, yp->cur_tx, yp->dirty_tx, yp->cur_rx, yp->dirty_rx); 1210 yp->cur_rx, yp->dirty_rx);
1219 } 1211 }
1220 1212
1221 /* Disable interrupts by clearing the interrupt mask. */ 1213 /* Disable interrupts by clearing the interrupt mask. */
@@ -1229,33 +1221,35 @@ static int yellowfin_close(struct net_device *dev)
1229 1221
1230#if defined(__i386__) 1222#if defined(__i386__)
1231 if (yellowfin_debug > 2) { 1223 if (yellowfin_debug > 2) {
1232 printk(KERN_DEBUG" Tx ring at %8.8llx:\n", 1224 printk(KERN_DEBUG " Tx ring at %08llx:\n",
1233 (unsigned long long)yp->tx_ring_dma); 1225 (unsigned long long)yp->tx_ring_dma);
1234 for (i = 0; i < TX_RING_SIZE*2; i++) 1226 for (i = 0; i < TX_RING_SIZE*2; i++)
1235 printk(KERN_DEBUG " %c #%d desc. %8.8x %8.8x %8.8x %8.8x.\n", 1227 printk(KERN_DEBUG " %c #%d desc. %08x %08x %08x %08x\n",
1236 ioread32(ioaddr + TxPtr) == (long)&yp->tx_ring[i] ? '>' : ' ', 1228 ioread32(ioaddr + TxPtr) == (long)&yp->tx_ring[i] ? '>' : ' ',
1237 i, yp->tx_ring[i].dbdma_cmd, yp->tx_ring[i].addr, 1229 i, yp->tx_ring[i].dbdma_cmd, yp->tx_ring[i].addr,
1238 yp->tx_ring[i].branch_addr, yp->tx_ring[i].result_status); 1230 yp->tx_ring[i].branch_addr, yp->tx_ring[i].result_status);
1239 printk(KERN_DEBUG " Tx status %p:\n", yp->tx_status); 1231 printk(KERN_DEBUG " Tx status %p:\n", yp->tx_status);
1240 for (i = 0; i < TX_RING_SIZE; i++) 1232 for (i = 0; i < TX_RING_SIZE; i++)
1241 printk(KERN_DEBUG " #%d status %4.4x %4.4x %4.4x %4.4x.\n", 1233 printk(KERN_DEBUG " #%d status %04x %04x %04x %04x\n",
1242 i, yp->tx_status[i].tx_cnt, yp->tx_status[i].tx_errs, 1234 i, yp->tx_status[i].tx_cnt, yp->tx_status[i].tx_errs,
1243 yp->tx_status[i].total_tx_cnt, yp->tx_status[i].paused); 1235 yp->tx_status[i].total_tx_cnt, yp->tx_status[i].paused);
1244 1236
1245 printk(KERN_DEBUG " Rx ring %8.8llx:\n", 1237 printk(KERN_DEBUG " Rx ring %08llx:\n",
1246 (unsigned long long)yp->rx_ring_dma); 1238 (unsigned long long)yp->rx_ring_dma);
1247 for (i = 0; i < RX_RING_SIZE; i++) { 1239 for (i = 0; i < RX_RING_SIZE; i++) {
1248 printk(KERN_DEBUG " %c #%d desc. %8.8x %8.8x %8.8x\n", 1240 printk(KERN_DEBUG " %c #%d desc. %08x %08x %08x\n",
1249 ioread32(ioaddr + RxPtr) == (long)&yp->rx_ring[i] ? '>' : ' ', 1241 ioread32(ioaddr + RxPtr) == (long)&yp->rx_ring[i] ? '>' : ' ',
1250 i, yp->rx_ring[i].dbdma_cmd, yp->rx_ring[i].addr, 1242 i, yp->rx_ring[i].dbdma_cmd, yp->rx_ring[i].addr,
1251 yp->rx_ring[i].result_status); 1243 yp->rx_ring[i].result_status);
1252 if (yellowfin_debug > 6) { 1244 if (yellowfin_debug > 6) {
1253 if (get_unaligned((u8*)yp->rx_ring[i].addr) != 0x69) { 1245 if (get_unaligned((u8*)yp->rx_ring[i].addr) != 0x69) {
1254 int j; 1246 int j;
1247
1248 printk(KERN_DEBUG);
1255 for (j = 0; j < 0x50; j++) 1249 for (j = 0; j < 0x50; j++)
1256 printk(" %4.4x", 1250 pr_cont(" %04x",
1257 get_unaligned(((u16*)yp->rx_ring[i].addr) + j)); 1251 get_unaligned(((u16*)yp->rx_ring[i].addr) + j));
1258 printk("\n"); 1252 pr_cont("\n");
1259 } 1253 }
1260 } 1254 }
1261 } 1255 }
@@ -1281,8 +1275,8 @@ static int yellowfin_close(struct net_device *dev)
1281 1275
1282#ifdef YF_PROTOTYPE /* Support for prototype hardware errata. */ 1276#ifdef YF_PROTOTYPE /* Support for prototype hardware errata. */
1283 if (yellowfin_debug > 0) { 1277 if (yellowfin_debug > 0) {
1284 printk(KERN_DEBUG "%s: Received %d frames that we should not have.\n", 1278 netdev_printk(KERN_DEBUG, dev, "Received %d frames that we should not have\n",
1285 dev->name, bogus_rx); 1279 bogus_rx);
1286 } 1280 }
1287#endif 1281#endif
1288 1282