diff options
author | Joe Perches <joe@perches.com> | 2011-05-09 05:45:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-09 15:51:15 -0400 |
commit | 726b65ad444dd142e34d0087fcbba03d16b34ca6 (patch) | |
tree | ee4e56b9d7aea7dbb10ce0fe57706232f42d6b74 /drivers/net/tulip/winbond-840.c | |
parent | 163ef0b5922b14751e93218bdf2c9fe8f74b9c9d (diff) |
tulip: Convert uses of KERN_DEBUG
Convert logging messages to more current styles.
Added -DDEBUG to Makefile to maintain current message logging.
This could be converted to a specific CONFIG_TULIP_DEBUG option.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tulip/winbond-840.c')
-rw-r--r-- | drivers/net/tulip/winbond-840.c | 73 |
1 files changed, 34 insertions, 39 deletions
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c index 939c96e2438a..64e3f01e9980 100644 --- a/drivers/net/tulip/winbond-840.c +++ b/drivers/net/tulip/winbond-840.c | |||
@@ -645,8 +645,7 @@ static int netdev_open(struct net_device *dev) | |||
645 | goto out_err; | 645 | goto out_err; |
646 | 646 | ||
647 | if (debug > 1) | 647 | if (debug > 1) |
648 | printk(KERN_DEBUG "%s: w89c840_open() irq %d\n", | 648 | netdev_dbg(dev, "w89c840_open() irq %d\n", dev->irq); |
649 | dev->name, dev->irq); | ||
650 | 649 | ||
651 | if((i=alloc_ringdesc(dev))) | 650 | if((i=alloc_ringdesc(dev))) |
652 | goto out_err; | 651 | goto out_err; |
@@ -658,7 +657,7 @@ static int netdev_open(struct net_device *dev) | |||
658 | 657 | ||
659 | netif_start_queue(dev); | 658 | netif_start_queue(dev); |
660 | if (debug > 2) | 659 | if (debug > 2) |
661 | printk(KERN_DEBUG "%s: Done netdev_open()\n", dev->name); | 660 | netdev_dbg(dev, "Done netdev_open()\n"); |
662 | 661 | ||
663 | /* Set the timer to check for link beat. */ | 662 | /* Set the timer to check for link beat. */ |
664 | init_timer(&np->timer); | 663 | init_timer(&np->timer); |
@@ -787,9 +786,9 @@ static void netdev_timer(unsigned long data) | |||
787 | void __iomem *ioaddr = np->base_addr; | 786 | void __iomem *ioaddr = np->base_addr; |
788 | 787 | ||
789 | if (debug > 2) | 788 | if (debug > 2) |
790 | printk(KERN_DEBUG "%s: Media selection timer tick, status %08x config %08x\n", | 789 | netdev_dbg(dev, "Media selection timer tick, status %08x config %08x\n", |
791 | dev->name, ioread32(ioaddr + IntrStatus), | 790 | ioread32(ioaddr + IntrStatus), |
792 | ioread32(ioaddr + NetworkConfig)); | 791 | ioread32(ioaddr + NetworkConfig)); |
793 | spin_lock_irq(&np->lock); | 792 | spin_lock_irq(&np->lock); |
794 | update_csr6(dev, update_link(dev)); | 793 | update_csr6(dev, update_link(dev)); |
795 | spin_unlock_irq(&np->lock); | 794 | spin_unlock_irq(&np->lock); |
@@ -1056,8 +1055,8 @@ static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev) | |||
1056 | spin_unlock_irq(&np->lock); | 1055 | spin_unlock_irq(&np->lock); |
1057 | 1056 | ||
1058 | if (debug > 4) { | 1057 | if (debug > 4) { |
1059 | printk(KERN_DEBUG "%s: Transmit frame #%d queued in slot %d\n", | 1058 | netdev_dbg(dev, "Transmit frame #%d queued in slot %d\n", |
1060 | dev->name, np->cur_tx, entry); | 1059 | np->cur_tx, entry); |
1061 | } | 1060 | } |
1062 | return NETDEV_TX_OK; | 1061 | return NETDEV_TX_OK; |
1063 | } | 1062 | } |
@@ -1074,8 +1073,8 @@ static void netdev_tx_done(struct net_device *dev) | |||
1074 | if (tx_status & 0x8000) { /* There was an error, log it. */ | 1073 | if (tx_status & 0x8000) { /* There was an error, log it. */ |
1075 | #ifndef final_version | 1074 | #ifndef final_version |
1076 | if (debug > 1) | 1075 | if (debug > 1) |
1077 | printk(KERN_DEBUG "%s: Transmit error, Tx status %08x\n", | 1076 | netdev_dbg(dev, "Transmit error, Tx status %08x\n", |
1078 | dev->name, tx_status); | 1077 | tx_status); |
1079 | #endif | 1078 | #endif |
1080 | np->stats.tx_errors++; | 1079 | np->stats.tx_errors++; |
1081 | if (tx_status & 0x0104) np->stats.tx_aborted_errors++; | 1080 | if (tx_status & 0x0104) np->stats.tx_aborted_errors++; |
@@ -1087,8 +1086,8 @@ static void netdev_tx_done(struct net_device *dev) | |||
1087 | } else { | 1086 | } else { |
1088 | #ifndef final_version | 1087 | #ifndef final_version |
1089 | if (debug > 3) | 1088 | if (debug > 3) |
1090 | printk(KERN_DEBUG "%s: Transmit slot %d ok, Tx status %08x\n", | 1089 | netdev_dbg(dev, "Transmit slot %d ok, Tx status %08x\n", |
1091 | dev->name, entry, tx_status); | 1090 | entry, tx_status); |
1092 | #endif | 1091 | #endif |
1093 | np->stats.tx_bytes += np->tx_skbuff[entry]->len; | 1092 | np->stats.tx_bytes += np->tx_skbuff[entry]->len; |
1094 | np->stats.collisions += (tx_status >> 3) & 15; | 1093 | np->stats.collisions += (tx_status >> 3) & 15; |
@@ -1131,8 +1130,7 @@ static irqreturn_t intr_handler(int irq, void *dev_instance) | |||
1131 | iowrite32(intr_status & 0x001ffff, ioaddr + IntrStatus); | 1130 | iowrite32(intr_status & 0x001ffff, ioaddr + IntrStatus); |
1132 | 1131 | ||
1133 | if (debug > 4) | 1132 | if (debug > 4) |
1134 | printk(KERN_DEBUG "%s: Interrupt, status %04x\n", | 1133 | netdev_dbg(dev, "Interrupt, status %04x\n", intr_status); |
1135 | dev->name, intr_status); | ||
1136 | 1134 | ||
1137 | if ((intr_status & (NormalIntr|AbnormalIntr)) == 0) | 1135 | if ((intr_status & (NormalIntr|AbnormalIntr)) == 0) |
1138 | break; | 1136 | break; |
@@ -1173,8 +1171,8 @@ static irqreturn_t intr_handler(int irq, void *dev_instance) | |||
1173 | } while (1); | 1171 | } while (1); |
1174 | 1172 | ||
1175 | if (debug > 3) | 1173 | if (debug > 3) |
1176 | printk(KERN_DEBUG "%s: exiting interrupt, status=%#4.4x\n", | 1174 | netdev_dbg(dev, "exiting interrupt, status=%#4.4x\n", |
1177 | dev->name, ioread32(ioaddr + IntrStatus)); | 1175 | ioread32(ioaddr + IntrStatus)); |
1178 | return IRQ_RETVAL(handled); | 1176 | return IRQ_RETVAL(handled); |
1179 | } | 1177 | } |
1180 | 1178 | ||
@@ -1187,8 +1185,8 @@ static int netdev_rx(struct net_device *dev) | |||
1187 | int work_limit = np->dirty_rx + RX_RING_SIZE - np->cur_rx; | 1185 | int work_limit = np->dirty_rx + RX_RING_SIZE - np->cur_rx; |
1188 | 1186 | ||
1189 | if (debug > 4) { | 1187 | if (debug > 4) { |
1190 | printk(KERN_DEBUG " In netdev_rx(), entry %d status %04x\n", | 1188 | netdev_dbg(dev, " In netdev_rx(), entry %d status %04x\n", |
1191 | entry, np->rx_ring[entry].status); | 1189 | entry, np->rx_ring[entry].status); |
1192 | } | 1190 | } |
1193 | 1191 | ||
1194 | /* If EOP is set on the next entry, it's a new packet. Send it up. */ | 1192 | /* If EOP is set on the next entry, it's a new packet. Send it up. */ |
@@ -1197,8 +1195,8 @@ static int netdev_rx(struct net_device *dev) | |||
1197 | s32 status = desc->status; | 1195 | s32 status = desc->status; |
1198 | 1196 | ||
1199 | if (debug > 4) | 1197 | if (debug > 4) |
1200 | printk(KERN_DEBUG " netdev_rx() status was %08x\n", | 1198 | netdev_dbg(dev, " netdev_rx() status was %08x\n", |
1201 | status); | 1199 | status); |
1202 | if (status < 0) | 1200 | if (status < 0) |
1203 | break; | 1201 | break; |
1204 | if ((status & 0x38008300) != 0x0300) { | 1202 | if ((status & 0x38008300) != 0x0300) { |
@@ -1213,8 +1211,8 @@ static int netdev_rx(struct net_device *dev) | |||
1213 | } else if (status & 0x8000) { | 1211 | } else if (status & 0x8000) { |
1214 | /* There was a fatal error. */ | 1212 | /* There was a fatal error. */ |
1215 | if (debug > 2) | 1213 | if (debug > 2) |
1216 | printk(KERN_DEBUG "%s: Receive error, Rx status %08x\n", | 1214 | netdev_dbg(dev, "Receive error, Rx status %08x\n", |
1217 | dev->name, status); | 1215 | status); |
1218 | np->stats.rx_errors++; /* end of a packet.*/ | 1216 | np->stats.rx_errors++; /* end of a packet.*/ |
1219 | if (status & 0x0890) np->stats.rx_length_errors++; | 1217 | if (status & 0x0890) np->stats.rx_length_errors++; |
1220 | if (status & 0x004C) np->stats.rx_frame_errors++; | 1218 | if (status & 0x004C) np->stats.rx_frame_errors++; |
@@ -1227,8 +1225,8 @@ static int netdev_rx(struct net_device *dev) | |||
1227 | 1225 | ||
1228 | #ifndef final_version | 1226 | #ifndef final_version |
1229 | if (debug > 4) | 1227 | if (debug > 4) |
1230 | printk(KERN_DEBUG " netdev_rx() normal Rx pkt length %d status %x\n", | 1228 | netdev_dbg(dev, " netdev_rx() normal Rx pkt length %d status %x\n", |
1231 | pkt_len, status); | 1229 | pkt_len, status); |
1232 | #endif | 1230 | #endif |
1233 | /* Check if the packet is long enough to accept without copying | 1231 | /* Check if the packet is long enough to accept without copying |
1234 | to a minimally-sized skbuff. */ | 1232 | to a minimally-sized skbuff. */ |
@@ -1253,10 +1251,10 @@ static int netdev_rx(struct net_device *dev) | |||
1253 | #ifndef final_version /* Remove after testing. */ | 1251 | #ifndef final_version /* Remove after testing. */ |
1254 | /* You will want this info for the initial debug. */ | 1252 | /* You will want this info for the initial debug. */ |
1255 | if (debug > 5) | 1253 | if (debug > 5) |
1256 | printk(KERN_DEBUG " Rx data %pM %pM %02x%02x %pI4\n", | 1254 | netdev_dbg(dev, " Rx data %pM %pM %02x%02x %pI4\n", |
1257 | &skb->data[0], &skb->data[6], | 1255 | &skb->data[0], &skb->data[6], |
1258 | skb->data[12], skb->data[13], | 1256 | skb->data[12], skb->data[13], |
1259 | &skb->data[14]); | 1257 | &skb->data[14]); |
1260 | #endif | 1258 | #endif |
1261 | skb->protocol = eth_type_trans(skb, dev); | 1259 | skb->protocol = eth_type_trans(skb, dev); |
1262 | netif_rx(skb); | 1260 | netif_rx(skb); |
@@ -1294,8 +1292,7 @@ static void netdev_error(struct net_device *dev, int intr_status) | |||
1294 | void __iomem *ioaddr = np->base_addr; | 1292 | void __iomem *ioaddr = np->base_addr; |
1295 | 1293 | ||
1296 | if (debug > 2) | 1294 | if (debug > 2) |
1297 | printk(KERN_DEBUG "%s: Abnormal event, %08x\n", | 1295 | netdev_dbg(dev, "Abnormal event, %08x\n", intr_status); |
1298 | dev->name, intr_status); | ||
1299 | if (intr_status == 0xffffffff) | 1296 | if (intr_status == 0xffffffff) |
1300 | return; | 1297 | return; |
1301 | spin_lock(&np->lock); | 1298 | spin_lock(&np->lock); |
@@ -1315,8 +1312,7 @@ static void netdev_error(struct net_device *dev, int intr_status) | |||
1315 | new = 127; /* load full packet before starting */ | 1312 | new = 127; /* load full packet before starting */ |
1316 | new = (np->csr6 & ~(0x7F << 14)) | (new<<14); | 1313 | new = (np->csr6 & ~(0x7F << 14)) | (new<<14); |
1317 | #endif | 1314 | #endif |
1318 | printk(KERN_DEBUG "%s: Tx underflow, new csr6 %08x\n", | 1315 | netdev_dbg(dev, "Tx underflow, new csr6 %08x\n", new); |
1319 | dev->name, new); | ||
1320 | update_csr6(dev, new); | 1316 | update_csr6(dev, new); |
1321 | } | 1317 | } |
1322 | if (intr_status & RxDied) { /* Missed a Rx frame. */ | 1318 | if (intr_status & RxDied) { /* Missed a Rx frame. */ |
@@ -1489,13 +1485,12 @@ static int netdev_close(struct net_device *dev) | |||
1489 | netif_stop_queue(dev); | 1485 | netif_stop_queue(dev); |
1490 | 1486 | ||
1491 | if (debug > 1) { | 1487 | if (debug > 1) { |
1492 | printk(KERN_DEBUG "%s: Shutting down ethercard, status was %08x Config %08x\n", | 1488 | netdev_dbg(dev, "Shutting down ethercard, status was %08x Config %08x\n", |
1493 | dev->name, ioread32(ioaddr + IntrStatus), | 1489 | ioread32(ioaddr + IntrStatus), |
1494 | ioread32(ioaddr + NetworkConfig)); | 1490 | ioread32(ioaddr + NetworkConfig)); |
1495 | printk(KERN_DEBUG "%s: Queue pointers were Tx %d / %d, Rx %d / %d\n", | 1491 | netdev_dbg(dev, "Queue pointers were Tx %d / %d, Rx %d / %d\n", |
1496 | dev->name, | 1492 | np->cur_tx, np->dirty_tx, |
1497 | np->cur_tx, np->dirty_tx, | 1493 | np->cur_rx, np->dirty_rx); |
1498 | np->cur_rx, np->dirty_rx); | ||
1499 | } | 1494 | } |
1500 | 1495 | ||
1501 | /* Stop the chip's Tx and Rx processes. */ | 1496 | /* Stop the chip's Tx and Rx processes. */ |