diff options
author | Joe Perches <joe@perches.com> | 2010-08-12 08:22:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-18 17:26:30 -0400 |
commit | 636b8116d4e116eca1ac978f546b16fadfc15a6c (patch) | |
tree | 287364907b68208a473472e9f6314b64ced16d3d /drivers/net/pcmcia/axnet_cs.c | |
parent | 00093fab980d0a8950a64bdf9e346d0497b9a7e4 (diff) |
drivers/net/pcmcia: Use pr_<level> and netdev_<level>
On Mon, 2010-08-09 at 17:34 +0200, Dominik Brodowski wrote:
> look good from a PCMCIA point of view, therefore:
> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
If PCMCIA is still being looked after, then here's
another for you, maybe for 2.6.37.
Use the more descriptive logging message styles.
There are whitespace/indentation errors in the original
sources that these changes do not modify, so checkpatch
errors were cheerfully ignored.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/pcmcia/axnet_cs.c')
-rw-r--r-- | drivers/net/pcmcia/axnet_cs.c | 164 |
1 files changed, 88 insertions, 76 deletions
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index a6e37b29e3bf..e97f1519a15f 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -24,6 +24,8 @@ | |||
24 | 24 | ||
25 | ======================================================================*/ | 25 | ======================================================================*/ |
26 | 26 | ||
27 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
28 | |||
27 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
28 | #include <linux/module.h> | 30 | #include <linux/module.h> |
29 | #include <linux/init.h> | 31 | #include <linux/init.h> |
@@ -344,8 +346,8 @@ static int axnet_config(struct pcmcia_device *link) | |||
344 | dev->base_addr = link->resource[0]->start; | 346 | dev->base_addr = link->resource[0]->start; |
345 | 347 | ||
346 | if (!get_prom(link)) { | 348 | if (!get_prom(link)) { |
347 | printk(KERN_NOTICE "axnet_cs: this is not an AX88190 card!\n"); | 349 | pr_notice("this is not an AX88190 card!\n"); |
348 | printk(KERN_NOTICE "axnet_cs: use pcnet_cs instead.\n"); | 350 | pr_notice("use pcnet_cs instead.\n"); |
349 | goto failed; | 351 | goto failed; |
350 | } | 352 | } |
351 | 353 | ||
@@ -390,19 +392,18 @@ static int axnet_config(struct pcmcia_device *link) | |||
390 | SET_NETDEV_DEV(dev, &link->dev); | 392 | SET_NETDEV_DEV(dev, &link->dev); |
391 | 393 | ||
392 | if (register_netdev(dev) != 0) { | 394 | if (register_netdev(dev) != 0) { |
393 | printk(KERN_NOTICE "axnet_cs: register_netdev() failed\n"); | 395 | pr_notice("register_netdev() failed\n"); |
394 | goto failed; | 396 | goto failed; |
395 | } | 397 | } |
396 | 398 | ||
397 | printk(KERN_INFO "%s: Asix AX88%d90: io %#3lx, irq %d, " | 399 | netdev_info(dev, "Asix AX88%d90: io %#3lx, irq %d, hw_addr %pM\n", |
398 | "hw_addr %pM\n", | 400 | ((info->flags & IS_AX88790) ? 7 : 1), |
399 | dev->name, ((info->flags & IS_AX88790) ? 7 : 1), | 401 | dev->base_addr, dev->irq, dev->dev_addr); |
400 | dev->base_addr, dev->irq, | ||
401 | dev->dev_addr); | ||
402 | if (info->phy_id != -1) { | 402 | if (info->phy_id != -1) { |
403 | dev_dbg(&link->dev, " MII transceiver at index %d, status %x.\n", info->phy_id, j); | 403 | netdev_dbg(dev, " MII transceiver at index %d, status %x\n", |
404 | info->phy_id, j); | ||
404 | } else { | 405 | } else { |
405 | printk(KERN_NOTICE " No MII transceivers found!\n"); | 406 | netdev_notice(dev, " No MII transceivers found!\n"); |
406 | } | 407 | } |
407 | return 0; | 408 | return 0; |
408 | 409 | ||
@@ -582,8 +583,7 @@ static void axnet_reset_8390(struct net_device *dev) | |||
582 | outb_p(ENISR_RESET, nic_base + EN0_ISR); /* Ack intr. */ | 583 | outb_p(ENISR_RESET, nic_base + EN0_ISR); /* Ack intr. */ |
583 | 584 | ||
584 | if (i == 100) | 585 | if (i == 100) |
585 | printk(KERN_ERR "%s: axnet_reset_8390() did not complete.\n", | 586 | netdev_err(dev, "axnet_reset_8390() did not complete\n"); |
586 | dev->name); | ||
587 | 587 | ||
588 | } /* axnet_reset_8390 */ | 588 | } /* axnet_reset_8390 */ |
589 | 589 | ||
@@ -610,7 +610,7 @@ static void ei_watchdog(u_long arg) | |||
610 | this, we can limp along even if the interrupt is blocked */ | 610 | this, we can limp along even if the interrupt is blocked */ |
611 | if (info->stale++ && (inb_p(nic_base + EN0_ISR) & ENISR_ALL)) { | 611 | if (info->stale++ && (inb_p(nic_base + EN0_ISR) & ENISR_ALL)) { |
612 | if (!info->fast_poll) | 612 | if (!info->fast_poll) |
613 | printk(KERN_INFO "%s: interrupt(s) dropped!\n", dev->name); | 613 | netdev_info(dev, "interrupt(s) dropped!\n"); |
614 | ei_irq_wrapper(dev->irq, dev); | 614 | ei_irq_wrapper(dev->irq, dev); |
615 | info->fast_poll = HZ; | 615 | info->fast_poll = HZ; |
616 | } | 616 | } |
@@ -625,7 +625,7 @@ static void ei_watchdog(u_long arg) | |||
625 | goto reschedule; | 625 | goto reschedule; |
626 | link = mdio_read(mii_addr, info->phy_id, 1); | 626 | link = mdio_read(mii_addr, info->phy_id, 1); |
627 | if (!link || (link == 0xffff)) { | 627 | if (!link || (link == 0xffff)) { |
628 | printk(KERN_INFO "%s: MII is missing!\n", dev->name); | 628 | netdev_info(dev, "MII is missing!\n"); |
629 | info->phy_id = -1; | 629 | info->phy_id = -1; |
630 | goto reschedule; | 630 | goto reschedule; |
631 | } | 631 | } |
@@ -633,18 +633,14 @@ static void ei_watchdog(u_long arg) | |||
633 | link &= 0x0004; | 633 | link &= 0x0004; |
634 | if (link != info->link_status) { | 634 | if (link != info->link_status) { |
635 | u_short p = mdio_read(mii_addr, info->phy_id, 5); | 635 | u_short p = mdio_read(mii_addr, info->phy_id, 5); |
636 | printk(KERN_INFO "%s: %s link beat\n", dev->name, | 636 | netdev_info(dev, "%s link beat\n", link ? "found" : "lost"); |
637 | (link) ? "found" : "lost"); | ||
638 | if (link) { | 637 | if (link) { |
639 | info->duplex_flag = (p & 0x0140) ? 0x80 : 0x00; | 638 | info->duplex_flag = (p & 0x0140) ? 0x80 : 0x00; |
640 | if (p) | 639 | if (p) |
641 | printk(KERN_INFO "%s: autonegotiation complete: " | 640 | netdev_info(dev, "autonegotiation complete: %dbaseT-%cD selected\n", |
642 | "%sbaseT-%cD selected\n", dev->name, | 641 | (p & 0x0180) ? 100 : 10, (p & 0x0140) ? 'F' : 'H'); |
643 | ((p & 0x0180) ? "100" : "10"), | ||
644 | ((p & 0x0140) ? 'F' : 'H')); | ||
645 | else | 642 | else |
646 | printk(KERN_INFO "%s: link partner did not autonegotiate\n", | 643 | netdev_info(dev, "link partner did not autonegotiate\n"); |
647 | dev->name); | ||
648 | AX88190_init(dev, 1); | 644 | AX88190_init(dev, 1); |
649 | } | 645 | } |
650 | info->link_status = link; | 646 | info->link_status = link; |
@@ -842,9 +838,6 @@ module_exit(exit_axnet_cs); | |||
842 | 838 | ||
843 | */ | 839 | */ |
844 | 840 | ||
845 | static const char version_8390[] = KERN_INFO \ | ||
846 | "8390.c:v1.10cvs 9/23/94 Donald Becker (becker@scyld.com)\n"; | ||
847 | |||
848 | #include <linux/bitops.h> | 841 | #include <linux/bitops.h> |
849 | #include <asm/irq.h> | 842 | #include <asm/irq.h> |
850 | #include <linux/fcntl.h> | 843 | #include <linux/fcntl.h> |
@@ -991,9 +984,11 @@ static void axnet_tx_timeout(struct net_device *dev) | |||
991 | isr = inb(e8390_base+EN0_ISR); | 984 | isr = inb(e8390_base+EN0_ISR); |
992 | spin_unlock_irqrestore(&ei_local->page_lock, flags); | 985 | spin_unlock_irqrestore(&ei_local->page_lock, flags); |
993 | 986 | ||
994 | printk(KERN_DEBUG "%s: Tx timed out, %s TSR=%#2x, ISR=%#2x, t=%d.\n", | 987 | netdev_printk(KERN_DEBUG, dev, |
995 | dev->name, (txsr & ENTSR_ABT) ? "excess collisions." : | 988 | "Tx timed out, %s TSR=%#2x, ISR=%#2x, t=%d.\n", |
996 | (isr) ? "lost interrupt?" : "cable problem?", txsr, isr, tickssofar); | 989 | (txsr & ENTSR_ABT) ? "excess collisions." : |
990 | (isr) ? "lost interrupt?" : "cable problem?", | ||
991 | txsr, isr, tickssofar); | ||
997 | 992 | ||
998 | if (!isr && !dev->stats.tx_packets) | 993 | if (!isr && !dev->stats.tx_packets) |
999 | { | 994 | { |
@@ -1063,22 +1058,28 @@ static netdev_tx_t axnet_start_xmit(struct sk_buff *skb, | |||
1063 | output_page = ei_local->tx_start_page; | 1058 | output_page = ei_local->tx_start_page; |
1064 | ei_local->tx1 = send_length; | 1059 | ei_local->tx1 = send_length; |
1065 | if (ei_debug && ei_local->tx2 > 0) | 1060 | if (ei_debug && ei_local->tx2 > 0) |
1066 | printk(KERN_DEBUG "%s: idle transmitter tx2=%d, lasttx=%d, txing=%d.\n", | 1061 | netdev_printk(KERN_DEBUG, dev, |
1067 | dev->name, ei_local->tx2, ei_local->lasttx, ei_local->txing); | 1062 | "idle transmitter tx2=%d, lasttx=%d, txing=%d\n", |
1063 | ei_local->tx2, ei_local->lasttx, | ||
1064 | ei_local->txing); | ||
1068 | } | 1065 | } |
1069 | else if (ei_local->tx2 == 0) | 1066 | else if (ei_local->tx2 == 0) |
1070 | { | 1067 | { |
1071 | output_page = ei_local->tx_start_page + TX_PAGES/2; | 1068 | output_page = ei_local->tx_start_page + TX_PAGES/2; |
1072 | ei_local->tx2 = send_length; | 1069 | ei_local->tx2 = send_length; |
1073 | if (ei_debug && ei_local->tx1 > 0) | 1070 | if (ei_debug && ei_local->tx1 > 0) |
1074 | printk(KERN_DEBUG "%s: idle transmitter, tx1=%d, lasttx=%d, txing=%d.\n", | 1071 | netdev_printk(KERN_DEBUG, dev, |
1075 | dev->name, ei_local->tx1, ei_local->lasttx, ei_local->txing); | 1072 | "idle transmitter, tx1=%d, lasttx=%d, txing=%d\n", |
1073 | ei_local->tx1, ei_local->lasttx, | ||
1074 | ei_local->txing); | ||
1076 | } | 1075 | } |
1077 | else | 1076 | else |
1078 | { /* We should never get here. */ | 1077 | { /* We should never get here. */ |
1079 | if (ei_debug) | 1078 | if (ei_debug) |
1080 | printk(KERN_DEBUG "%s: No Tx buffers free! tx1=%d tx2=%d last=%d\n", | 1079 | netdev_printk(KERN_DEBUG, dev, |
1081 | dev->name, ei_local->tx1, ei_local->tx2, ei_local->lasttx); | 1080 | "No Tx buffers free! tx1=%d tx2=%d last=%d\n", |
1081 | ei_local->tx1, ei_local->tx2, | ||
1082 | ei_local->lasttx); | ||
1082 | ei_local->irqlock = 0; | 1083 | ei_local->irqlock = 0; |
1083 | netif_stop_queue(dev); | 1084 | netif_stop_queue(dev); |
1084 | outb_p(ENISR_ALL, e8390_base + EN0_IMR); | 1085 | outb_p(ENISR_ALL, e8390_base + EN0_IMR); |
@@ -1166,23 +1167,26 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id) | |||
1166 | 1167 | ||
1167 | spin_lock_irqsave(&ei_local->page_lock, flags); | 1168 | spin_lock_irqsave(&ei_local->page_lock, flags); |
1168 | 1169 | ||
1169 | if (ei_local->irqlock) | 1170 | if (ei_local->irqlock) { |
1170 | { | ||
1171 | #if 1 /* This might just be an interrupt for a PCI device sharing this line */ | 1171 | #if 1 /* This might just be an interrupt for a PCI device sharing this line */ |
1172 | const char *msg; | ||
1172 | /* The "irqlock" check is only for testing. */ | 1173 | /* The "irqlock" check is only for testing. */ |
1173 | printk(ei_local->irqlock | 1174 | if (ei_local->irqlock) |
1174 | ? "%s: Interrupted while interrupts are masked! isr=%#2x imr=%#2x.\n" | 1175 | msg = "Interrupted while interrupts are masked!"; |
1175 | : "%s: Reentering the interrupt handler! isr=%#2x imr=%#2x.\n", | 1176 | else |
1176 | dev->name, inb_p(e8390_base + EN0_ISR), | 1177 | msg = "Reentering the interrupt handler!"; |
1177 | inb_p(e8390_base + EN0_IMR)); | 1178 | netdev_info(dev, "%s, isr=%#2x imr=%#2x\n", |
1179 | msg, | ||
1180 | inb_p(e8390_base + EN0_ISR), | ||
1181 | inb_p(e8390_base + EN0_IMR)); | ||
1178 | #endif | 1182 | #endif |
1179 | spin_unlock_irqrestore(&ei_local->page_lock, flags); | 1183 | spin_unlock_irqrestore(&ei_local->page_lock, flags); |
1180 | return IRQ_NONE; | 1184 | return IRQ_NONE; |
1181 | } | 1185 | } |
1182 | 1186 | ||
1183 | if (ei_debug > 3) | 1187 | if (ei_debug > 3) |
1184 | printk(KERN_DEBUG "%s: interrupt(isr=%#2.2x).\n", dev->name, | 1188 | netdev_printk(KERN_DEBUG, dev, "interrupt(isr=%#2.2x)\n", |
1185 | inb_p(e8390_base + EN0_ISR)); | 1189 | inb_p(e8390_base + EN0_ISR)); |
1186 | 1190 | ||
1187 | outb_p(0x00, e8390_base + EN0_ISR); | 1191 | outb_p(0x00, e8390_base + EN0_ISR); |
1188 | ei_local->irqlock = 1; | 1192 | ei_local->irqlock = 1; |
@@ -1193,7 +1197,8 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id) | |||
1193 | { | 1197 | { |
1194 | if (!netif_running(dev) || (interrupts == 0xff)) { | 1198 | if (!netif_running(dev) || (interrupts == 0xff)) { |
1195 | if (ei_debug > 1) | 1199 | if (ei_debug > 1) |
1196 | printk(KERN_WARNING "%s: interrupt from stopped card\n", dev->name); | 1200 | netdev_warn(dev, |
1201 | "interrupt from stopped card\n"); | ||
1197 | outb_p(interrupts, e8390_base + EN0_ISR); | 1202 | outb_p(interrupts, e8390_base + EN0_ISR); |
1198 | interrupts = 0; | 1203 | interrupts = 0; |
1199 | break; | 1204 | break; |
@@ -1236,11 +1241,12 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id) | |||
1236 | { | 1241 | { |
1237 | /* 0xFF is valid for a card removal */ | 1242 | /* 0xFF is valid for a card removal */ |
1238 | if(interrupts!=0xFF) | 1243 | if(interrupts!=0xFF) |
1239 | printk(KERN_WARNING "%s: Too much work at interrupt, status %#2.2x\n", | 1244 | netdev_warn(dev, "Too much work at interrupt, status %#2.2x\n", |
1240 | dev->name, interrupts); | 1245 | interrupts); |
1241 | outb_p(ENISR_ALL, e8390_base + EN0_ISR); /* Ack. most intrs. */ | 1246 | outb_p(ENISR_ALL, e8390_base + EN0_ISR); /* Ack. most intrs. */ |
1242 | } else { | 1247 | } else { |
1243 | printk(KERN_WARNING "%s: unknown interrupt %#2x\n", dev->name, interrupts); | 1248 | netdev_warn(dev, "unknown interrupt %#2x\n", |
1249 | interrupts); | ||
1244 | outb_p(0xff, e8390_base + EN0_ISR); /* Ack. all intrs. */ | 1250 | outb_p(0xff, e8390_base + EN0_ISR); /* Ack. all intrs. */ |
1245 | } | 1251 | } |
1246 | } | 1252 | } |
@@ -1274,18 +1280,19 @@ static void ei_tx_err(struct net_device *dev) | |||
1274 | unsigned char tx_was_aborted = txsr & (ENTSR_ABT+ENTSR_FU); | 1280 | unsigned char tx_was_aborted = txsr & (ENTSR_ABT+ENTSR_FU); |
1275 | 1281 | ||
1276 | #ifdef VERBOSE_ERROR_DUMP | 1282 | #ifdef VERBOSE_ERROR_DUMP |
1277 | printk(KERN_DEBUG "%s: transmitter error (%#2x): ", dev->name, txsr); | 1283 | netdev_printk(KERN_DEBUG, dev, |
1284 | "transmitter error (%#2x):", txsr); | ||
1278 | if (txsr & ENTSR_ABT) | 1285 | if (txsr & ENTSR_ABT) |
1279 | printk("excess-collisions "); | 1286 | pr_cont(" excess-collisions"); |
1280 | if (txsr & ENTSR_ND) | 1287 | if (txsr & ENTSR_ND) |
1281 | printk("non-deferral "); | 1288 | pr_cont(" non-deferral"); |
1282 | if (txsr & ENTSR_CRS) | 1289 | if (txsr & ENTSR_CRS) |
1283 | printk("lost-carrier "); | 1290 | pr_cont(" lost-carrier"); |
1284 | if (txsr & ENTSR_FU) | 1291 | if (txsr & ENTSR_FU) |
1285 | printk("FIFO-underrun "); | 1292 | pr_cont(" FIFO-underrun"); |
1286 | if (txsr & ENTSR_CDH) | 1293 | if (txsr & ENTSR_CDH) |
1287 | printk("lost-heartbeat "); | 1294 | pr_cont(" lost-heartbeat"); |
1288 | printk("\n"); | 1295 | pr_cont("\n"); |
1289 | #endif | 1296 | #endif |
1290 | 1297 | ||
1291 | if (tx_was_aborted) | 1298 | if (tx_was_aborted) |
@@ -1322,8 +1329,9 @@ static void ei_tx_intr(struct net_device *dev) | |||
1322 | if (ei_local->tx1 < 0) | 1329 | if (ei_local->tx1 < 0) |
1323 | { | 1330 | { |
1324 | if (ei_local->lasttx != 1 && ei_local->lasttx != -1) | 1331 | if (ei_local->lasttx != 1 && ei_local->lasttx != -1) |
1325 | printk(KERN_ERR "%s: bogus last_tx_buffer %d, tx1=%d.\n", | 1332 | netdev_err(dev, "%s: bogus last_tx_buffer %d, tx1=%d\n", |
1326 | ei_local->name, ei_local->lasttx, ei_local->tx1); | 1333 | ei_local->name, ei_local->lasttx, |
1334 | ei_local->tx1); | ||
1327 | ei_local->tx1 = 0; | 1335 | ei_local->tx1 = 0; |
1328 | if (ei_local->tx2 > 0) | 1336 | if (ei_local->tx2 > 0) |
1329 | { | 1337 | { |
@@ -1338,8 +1346,9 @@ static void ei_tx_intr(struct net_device *dev) | |||
1338 | else if (ei_local->tx2 < 0) | 1346 | else if (ei_local->tx2 < 0) |
1339 | { | 1347 | { |
1340 | if (ei_local->lasttx != 2 && ei_local->lasttx != -2) | 1348 | if (ei_local->lasttx != 2 && ei_local->lasttx != -2) |
1341 | printk("%s: bogus last_tx_buffer %d, tx2=%d.\n", | 1349 | netdev_info(dev, "%s: bogus last_tx_buffer %d, tx2=%d\n", |
1342 | ei_local->name, ei_local->lasttx, ei_local->tx2); | 1350 | ei_local->name, ei_local->lasttx, |
1351 | ei_local->tx2); | ||
1343 | ei_local->tx2 = 0; | 1352 | ei_local->tx2 = 0; |
1344 | if (ei_local->tx1 > 0) | 1353 | if (ei_local->tx1 > 0) |
1345 | { | 1354 | { |
@@ -1352,8 +1361,9 @@ static void ei_tx_intr(struct net_device *dev) | |||
1352 | else | 1361 | else |
1353 | ei_local->lasttx = 10, ei_local->txing = 0; | 1362 | ei_local->lasttx = 10, ei_local->txing = 0; |
1354 | } | 1363 | } |
1355 | // else printk(KERN_WARNING "%s: unexpected TX-done interrupt, lasttx=%d.\n", | 1364 | // else |
1356 | // dev->name, ei_local->lasttx); | 1365 | // netdev_warn(dev, "unexpected TX-done interrupt, lasttx=%d\n", |
1366 | // ei_local->lasttx); | ||
1357 | 1367 | ||
1358 | /* Minimize Tx latency: update the statistics after we restart TXing. */ | 1368 | /* Minimize Tx latency: update the statistics after we restart TXing. */ |
1359 | if (status & ENTSR_COL) | 1369 | if (status & ENTSR_COL) |
@@ -1416,8 +1426,8 @@ static void ei_receive(struct net_device *dev) | |||
1416 | is that some clones crash in roughly the same way. | 1426 | is that some clones crash in roughly the same way. |
1417 | */ | 1427 | */ |
1418 | if (ei_debug > 0 && this_frame != ei_local->current_page && (this_frame!=0x0 || rxing_page!=0xFF)) | 1428 | if (ei_debug > 0 && this_frame != ei_local->current_page && (this_frame!=0x0 || rxing_page!=0xFF)) |
1419 | printk(KERN_ERR "%s: mismatched read page pointers %2x vs %2x.\n", | 1429 | netdev_err(dev, "mismatched read page pointers %2x vs %2x\n", |
1420 | dev->name, this_frame, ei_local->current_page); | 1430 | this_frame, ei_local->current_page); |
1421 | 1431 | ||
1422 | if (this_frame == rxing_page) /* Read all the frames? */ | 1432 | if (this_frame == rxing_page) /* Read all the frames? */ |
1423 | break; /* Done for now */ | 1433 | break; /* Done for now */ |
@@ -1433,9 +1443,10 @@ static void ei_receive(struct net_device *dev) | |||
1433 | if (pkt_len < 60 || pkt_len > 1518) | 1443 | if (pkt_len < 60 || pkt_len > 1518) |
1434 | { | 1444 | { |
1435 | if (ei_debug) | 1445 | if (ei_debug) |
1436 | printk(KERN_DEBUG "%s: bogus packet size: %d, status=%#2x nxpg=%#2x.\n", | 1446 | netdev_printk(KERN_DEBUG, dev, |
1437 | dev->name, rx_frame.count, rx_frame.status, | 1447 | "bogus packet size: %d, status=%#2x nxpg=%#2x\n", |
1438 | rx_frame.next); | 1448 | rx_frame.count, rx_frame.status, |
1449 | rx_frame.next); | ||
1439 | dev->stats.rx_errors++; | 1450 | dev->stats.rx_errors++; |
1440 | dev->stats.rx_length_errors++; | 1451 | dev->stats.rx_length_errors++; |
1441 | } | 1452 | } |
@@ -1447,8 +1458,9 @@ static void ei_receive(struct net_device *dev) | |||
1447 | if (skb == NULL) | 1458 | if (skb == NULL) |
1448 | { | 1459 | { |
1449 | if (ei_debug > 1) | 1460 | if (ei_debug > 1) |
1450 | printk(KERN_DEBUG "%s: Couldn't allocate a sk_buff of size %d.\n", | 1461 | netdev_printk(KERN_DEBUG, dev, |
1451 | dev->name, pkt_len); | 1462 | "Couldn't allocate a sk_buff of size %d\n", |
1463 | pkt_len); | ||
1452 | dev->stats.rx_dropped++; | 1464 | dev->stats.rx_dropped++; |
1453 | break; | 1465 | break; |
1454 | } | 1466 | } |
@@ -1468,9 +1480,10 @@ static void ei_receive(struct net_device *dev) | |||
1468 | else | 1480 | else |
1469 | { | 1481 | { |
1470 | if (ei_debug) | 1482 | if (ei_debug) |
1471 | printk(KERN_DEBUG "%s: bogus packet: status=%#2x nxpg=%#2x size=%d\n", | 1483 | netdev_printk(KERN_DEBUG, dev, |
1472 | dev->name, rx_frame.status, rx_frame.next, | 1484 | "bogus packet: status=%#2x nxpg=%#2x size=%d\n", |
1473 | rx_frame.count); | 1485 | rx_frame.status, rx_frame.next, |
1486 | rx_frame.count); | ||
1474 | dev->stats.rx_errors++; | 1487 | dev->stats.rx_errors++; |
1475 | /* NB: The NIC counts CRC, frame and missed errors. */ | 1488 | /* NB: The NIC counts CRC, frame and missed errors. */ |
1476 | if (pkt_stat & ENRSR_FO) | 1489 | if (pkt_stat & ENRSR_FO) |
@@ -1480,8 +1493,8 @@ static void ei_receive(struct net_device *dev) | |||
1480 | 1493 | ||
1481 | /* This _should_ never happen: it's here for avoiding bad clones. */ | 1494 | /* This _should_ never happen: it's here for avoiding bad clones. */ |
1482 | if (next_frame >= ei_local->stop_page) { | 1495 | if (next_frame >= ei_local->stop_page) { |
1483 | printk("%s: next frame inconsistency, %#2x\n", dev->name, | 1496 | netdev_info(dev, "next frame inconsistency, %#2x\n", |
1484 | next_frame); | 1497 | next_frame); |
1485 | next_frame = ei_local->rx_start_page; | 1498 | next_frame = ei_local->rx_start_page; |
1486 | } | 1499 | } |
1487 | ei_local->current_page = next_frame; | 1500 | ei_local->current_page = next_frame; |
@@ -1516,7 +1529,7 @@ static void ei_rx_overrun(struct net_device *dev) | |||
1516 | outb_p(E8390_NODMA+E8390_PAGE0+E8390_STOP, e8390_base+E8390_CMD); | 1529 | outb_p(E8390_NODMA+E8390_PAGE0+E8390_STOP, e8390_base+E8390_CMD); |
1517 | 1530 | ||
1518 | if (ei_debug > 1) | 1531 | if (ei_debug > 1) |
1519 | printk(KERN_DEBUG "%s: Receiver overrun.\n", dev->name); | 1532 | netdev_printk(KERN_DEBUG, dev, "Receiver overrun\n"); |
1520 | dev->stats.rx_over_errors++; | 1533 | dev->stats.rx_over_errors++; |
1521 | 1534 | ||
1522 | /* | 1535 | /* |
@@ -1713,7 +1726,7 @@ static void AX88190_init(struct net_device *dev, int startp) | |||
1713 | { | 1726 | { |
1714 | outb_p(dev->dev_addr[i], e8390_base + EN1_PHYS_SHIFT(i)); | 1727 | outb_p(dev->dev_addr[i], e8390_base + EN1_PHYS_SHIFT(i)); |
1715 | if(inb_p(e8390_base + EN1_PHYS_SHIFT(i))!=dev->dev_addr[i]) | 1728 | if(inb_p(e8390_base + EN1_PHYS_SHIFT(i))!=dev->dev_addr[i]) |
1716 | printk(KERN_ERR "Hw. address read/write mismap %d\n",i); | 1729 | netdev_err(dev, "Hw. address read/write mismap %d\n", i); |
1717 | } | 1730 | } |
1718 | 1731 | ||
1719 | outb_p(ei_local->rx_start_page, e8390_base + EN1_CURPAG); | 1732 | outb_p(ei_local->rx_start_page, e8390_base + EN1_CURPAG); |
@@ -1750,8 +1763,7 @@ static void NS8390_trigger_send(struct net_device *dev, unsigned int length, | |||
1750 | 1763 | ||
1751 | if (inb_p(e8390_base) & E8390_TRANS) | 1764 | if (inb_p(e8390_base) & E8390_TRANS) |
1752 | { | 1765 | { |
1753 | printk(KERN_WARNING "%s: trigger_send() called with the transmitter busy.\n", | 1766 | netdev_warn(dev, "trigger_send() called with the transmitter busy\n"); |
1754 | dev->name); | ||
1755 | return; | 1767 | return; |
1756 | } | 1768 | } |
1757 | outb_p(length & 0xff, e8390_base + EN0_TCNTLO); | 1769 | outb_p(length & 0xff, e8390_base + EN0_TCNTLO); |