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 | |
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')
-rw-r--r-- | drivers/net/pcmcia/3c574_cs.c | 73 | ||||
-rw-r--r-- | drivers/net/pcmcia/3c589_cs.c | 13 | ||||
-rw-r--r-- | drivers/net/pcmcia/axnet_cs.c | 164 | ||||
-rw-r--r-- | drivers/net/pcmcia/com20020_cs.c | 32 | ||||
-rw-r--r-- | drivers/net/pcmcia/fmvj18x_cs.c | 60 | ||||
-rw-r--r-- | drivers/net/pcmcia/ibmtr_cs.c | 13 | ||||
-rw-r--r-- | drivers/net/pcmcia/nmclan_cs.c | 54 | ||||
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 99 | ||||
-rw-r--r-- | drivers/net/pcmcia/xirc2ps_cs.c | 104 |
9 files changed, 298 insertions, 314 deletions
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c index 9a1840b67e78..9b319be7f1d2 100644 --- a/drivers/net/pcmcia/3c574_cs.c +++ b/drivers/net/pcmcia/3c574_cs.c | |||
@@ -69,6 +69,8 @@ earlier 3Com products. | |||
69 | 69 | ||
70 | */ | 70 | */ |
71 | 71 | ||
72 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
73 | |||
72 | #include <linux/module.h> | 74 | #include <linux/module.h> |
73 | #include <linux/kernel.h> | 75 | #include <linux/kernel.h> |
74 | #include <linux/init.h> | 76 | #include <linux/init.h> |
@@ -373,8 +375,8 @@ static int tc574_config(struct pcmcia_device *link) | |||
373 | for (i = 0; i < 3; i++) | 375 | for (i = 0; i < 3; i++) |
374 | phys_addr[i] = htons(read_eeprom(ioaddr, i + 10)); | 376 | phys_addr[i] = htons(read_eeprom(ioaddr, i + 10)); |
375 | if (phys_addr[0] == htons(0x6060)) { | 377 | if (phys_addr[0] == htons(0x6060)) { |
376 | printk(KERN_NOTICE "3c574_cs: IO port conflict at 0x%03lx" | 378 | pr_notice("IO port conflict at 0x%03lx-0x%03lx\n", |
377 | "-0x%03lx\n", dev->base_addr, dev->base_addr+15); | 379 | dev->base_addr, dev->base_addr+15); |
378 | goto failed; | 380 | goto failed; |
379 | } | 381 | } |
380 | } | 382 | } |
@@ -388,7 +390,7 @@ static int tc574_config(struct pcmcia_device *link) | |||
388 | outw(2<<11, ioaddr + RunnerRdCtrl); | 390 | outw(2<<11, ioaddr + RunnerRdCtrl); |
389 | mcr = inb(ioaddr + 2); | 391 | mcr = inb(ioaddr + 2); |
390 | outw(0<<11, ioaddr + RunnerRdCtrl); | 392 | outw(0<<11, ioaddr + RunnerRdCtrl); |
391 | printk(KERN_INFO " ASIC rev %d,", mcr>>3); | 393 | pr_info(" ASIC rev %d,", mcr>>3); |
392 | EL3WINDOW(3); | 394 | EL3WINDOW(3); |
393 | config = inl(ioaddr + Wn3_Config); | 395 | config = inl(ioaddr + Wn3_Config); |
394 | lp->default_media = (config & Xcvr) >> Xcvr_shift; | 396 | lp->default_media = (config & Xcvr) >> Xcvr_shift; |
@@ -425,7 +427,7 @@ static int tc574_config(struct pcmcia_device *link) | |||
425 | } | 427 | } |
426 | } | 428 | } |
427 | if (phy > 32) { | 429 | if (phy > 32) { |
428 | printk(KERN_NOTICE " No MII transceivers found!\n"); | 430 | pr_notice(" No MII transceivers found!\n"); |
429 | goto failed; | 431 | goto failed; |
430 | } | 432 | } |
431 | i = mdio_read(ioaddr, lp->phys, 16) | 0x40; | 433 | i = mdio_read(ioaddr, lp->phys, 16) | 0x40; |
@@ -441,18 +443,16 @@ static int tc574_config(struct pcmcia_device *link) | |||
441 | SET_NETDEV_DEV(dev, &link->dev); | 443 | SET_NETDEV_DEV(dev, &link->dev); |
442 | 444 | ||
443 | if (register_netdev(dev) != 0) { | 445 | if (register_netdev(dev) != 0) { |
444 | printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n"); | 446 | pr_notice("register_netdev() failed\n"); |
445 | goto failed; | 447 | goto failed; |
446 | } | 448 | } |
447 | 449 | ||
448 | printk(KERN_INFO "%s: %s at io %#3lx, irq %d, " | 450 | netdev_info(dev, "%s at io %#3lx, irq %d, hw_addr %pM\n", |
449 | "hw_addr %pM.\n", | 451 | cardname, dev->base_addr, dev->irq, dev->dev_addr); |
450 | dev->name, cardname, dev->base_addr, dev->irq, | 452 | netdev_info(dev, " %dK FIFO split %s Rx:Tx, %sMII interface.\n", |
451 | dev->dev_addr); | 453 | 8 << config & Ram_size, |
452 | printk(" %dK FIFO split %s Rx:Tx, %sMII interface.\n", | 454 | ram_split[(config & Ram_split) >> Ram_split_shift], |
453 | 8 << config & Ram_size, | 455 | config & Autoselect ? "autoselect " : ""); |
454 | ram_split[(config & Ram_split) >> Ram_split_shift], | ||
455 | config & Autoselect ? "autoselect " : ""); | ||
456 | 456 | ||
457 | return 0; | 457 | return 0; |
458 | 458 | ||
@@ -499,14 +499,14 @@ static void dump_status(struct net_device *dev) | |||
499 | { | 499 | { |
500 | unsigned int ioaddr = dev->base_addr; | 500 | unsigned int ioaddr = dev->base_addr; |
501 | EL3WINDOW(1); | 501 | EL3WINDOW(1); |
502 | printk(KERN_INFO " irq status %04x, rx status %04x, tx status " | 502 | netdev_info(dev, " irq status %04x, rx status %04x, tx status %02x, tx free %04x\n", |
503 | "%02x, tx free %04x\n", inw(ioaddr+EL3_STATUS), | 503 | inw(ioaddr+EL3_STATUS), |
504 | inw(ioaddr+RxStatus), inb(ioaddr+TxStatus), | 504 | inw(ioaddr+RxStatus), inb(ioaddr+TxStatus), |
505 | inw(ioaddr+TxFree)); | 505 | inw(ioaddr+TxFree)); |
506 | EL3WINDOW(4); | 506 | EL3WINDOW(4); |
507 | printk(KERN_INFO " diagnostics: fifo %04x net %04x ethernet %04x" | 507 | netdev_info(dev, " diagnostics: fifo %04x net %04x ethernet %04x media %04x\n", |
508 | " media %04x\n", inw(ioaddr+0x04), inw(ioaddr+0x06), | 508 | inw(ioaddr+0x04), inw(ioaddr+0x06), |
509 | inw(ioaddr+0x08), inw(ioaddr+0x0a)); | 509 | inw(ioaddr+0x08), inw(ioaddr+0x0a)); |
510 | EL3WINDOW(1); | 510 | EL3WINDOW(1); |
511 | } | 511 | } |
512 | 512 | ||
@@ -520,7 +520,7 @@ static void tc574_wait_for_completion(struct net_device *dev, int cmd) | |||
520 | while (--i > 0) | 520 | while (--i > 0) |
521 | if (!(inw(dev->base_addr + EL3_STATUS) & 0x1000)) break; | 521 | if (!(inw(dev->base_addr + EL3_STATUS) & 0x1000)) break; |
522 | if (i == 0) | 522 | if (i == 0) |
523 | printk(KERN_NOTICE "%s: command 0x%04x did not complete!\n", dev->name, cmd); | 523 | netdev_notice(dev, "command 0x%04x did not complete!\n", cmd); |
524 | } | 524 | } |
525 | 525 | ||
526 | /* Read a word from the EEPROM using the regular EEPROM access register. | 526 | /* Read a word from the EEPROM using the regular EEPROM access register. |
@@ -722,7 +722,7 @@ static void el3_tx_timeout(struct net_device *dev) | |||
722 | { | 722 | { |
723 | unsigned int ioaddr = dev->base_addr; | 723 | unsigned int ioaddr = dev->base_addr; |
724 | 724 | ||
725 | printk(KERN_NOTICE "%s: Transmit timed out!\n", dev->name); | 725 | netdev_notice(dev, "Transmit timed out!\n"); |
726 | dump_status(dev); | 726 | dump_status(dev); |
727 | dev->stats.tx_errors++; | 727 | dev->stats.tx_errors++; |
728 | dev->trans_start = jiffies; /* prevent tx timeout */ | 728 | dev->trans_start = jiffies; /* prevent tx timeout */ |
@@ -845,8 +845,8 @@ static irqreturn_t el3_interrupt(int irq, void *dev_id) | |||
845 | EL3WINDOW(4); | 845 | EL3WINDOW(4); |
846 | fifo_diag = inw(ioaddr + Wn4_FIFODiag); | 846 | fifo_diag = inw(ioaddr + Wn4_FIFODiag); |
847 | EL3WINDOW(1); | 847 | EL3WINDOW(1); |
848 | printk(KERN_NOTICE "%s: adapter failure, FIFO diagnostic" | 848 | netdev_notice(dev, "adapter failure, FIFO diagnostic register %04x\n", |
849 | " register %04x.\n", dev->name, fifo_diag); | 849 | fifo_diag); |
850 | if (fifo_diag & 0x0400) { | 850 | if (fifo_diag & 0x0400) { |
851 | /* Tx overrun */ | 851 | /* Tx overrun */ |
852 | tc574_wait_for_completion(dev, TxReset); | 852 | tc574_wait_for_completion(dev, TxReset); |
@@ -900,7 +900,7 @@ static void media_check(unsigned long arg) | |||
900 | this, we can limp along even if the interrupt is blocked */ | 900 | this, we can limp along even if the interrupt is blocked */ |
901 | if ((inw(ioaddr + EL3_STATUS) & IntLatch) && (inb(ioaddr + Timer) == 0xff)) { | 901 | if ((inw(ioaddr + EL3_STATUS) & IntLatch) && (inb(ioaddr + Timer) == 0xff)) { |
902 | if (!lp->fast_poll) | 902 | if (!lp->fast_poll) |
903 | printk(KERN_INFO "%s: interrupt(s) dropped!\n", dev->name); | 903 | netdev_info(dev, "interrupt(s) dropped!\n"); |
904 | 904 | ||
905 | local_irq_save(flags); | 905 | local_irq_save(flags); |
906 | el3_interrupt(dev->irq, dev); | 906 | el3_interrupt(dev->irq, dev); |
@@ -923,23 +923,21 @@ static void media_check(unsigned long arg) | |||
923 | 923 | ||
924 | if (media != lp->media_status) { | 924 | if (media != lp->media_status) { |
925 | if ((media ^ lp->media_status) & 0x0004) | 925 | if ((media ^ lp->media_status) & 0x0004) |
926 | printk(KERN_INFO "%s: %s link beat\n", dev->name, | 926 | netdev_info(dev, "%s link beat\n", |
927 | (lp->media_status & 0x0004) ? "lost" : "found"); | 927 | (lp->media_status & 0x0004) ? "lost" : "found"); |
928 | if ((media ^ lp->media_status) & 0x0020) { | 928 | if ((media ^ lp->media_status) & 0x0020) { |
929 | lp->partner = 0; | 929 | lp->partner = 0; |
930 | if (lp->media_status & 0x0020) { | 930 | if (lp->media_status & 0x0020) { |
931 | printk(KERN_INFO "%s: autonegotiation restarted\n", | 931 | netdev_info(dev, "autonegotiation restarted\n"); |
932 | dev->name); | ||
933 | } else if (partner) { | 932 | } else if (partner) { |
934 | partner &= lp->advertising; | 933 | partner &= lp->advertising; |
935 | lp->partner = partner; | 934 | lp->partner = partner; |
936 | printk(KERN_INFO "%s: autonegotiation complete: " | 935 | netdev_info(dev, "autonegotiation complete: " |
937 | "%sbaseT-%cD selected\n", dev->name, | 936 | "%dbaseT-%cD selected\n", |
938 | ((partner & 0x0180) ? "100" : "10"), | 937 | (partner & 0x0180) ? 100 : 10, |
939 | ((partner & 0x0140) ? 'F' : 'H')); | 938 | (partner & 0x0140) ? 'F' : 'H'); |
940 | } else { | 939 | } else { |
941 | printk(KERN_INFO "%s: link partner did not autonegotiate\n", | 940 | netdev_info(dev, "link partner did not autonegotiate\n"); |
942 | dev->name); | ||
943 | } | 941 | } |
944 | 942 | ||
945 | EL3WINDOW(3); | 943 | EL3WINDOW(3); |
@@ -949,10 +947,9 @@ static void media_check(unsigned long arg) | |||
949 | 947 | ||
950 | } | 948 | } |
951 | if (media & 0x0010) | 949 | if (media & 0x0010) |
952 | printk(KERN_INFO "%s: remote fault detected\n", | 950 | netdev_info(dev, "remote fault detected\n"); |
953 | dev->name); | ||
954 | if (media & 0x0002) | 951 | if (media & 0x0002) |
955 | printk(KERN_INFO "%s: jabber detected\n", dev->name); | 952 | netdev_info(dev, "jabber detected\n"); |
956 | lp->media_status = media; | 953 | lp->media_status = media; |
957 | } | 954 | } |
958 | spin_unlock_irqrestore(&lp->window_lock, flags); | 955 | spin_unlock_irqrestore(&lp->window_lock, flags); |
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c index 61f9cf2100ff..1c534f392474 100644 --- a/drivers/net/pcmcia/3c589_cs.c +++ b/drivers/net/pcmcia/3c589_cs.c | |||
@@ -19,6 +19,8 @@ | |||
19 | 19 | ||
20 | ======================================================================*/ | 20 | ======================================================================*/ |
21 | 21 | ||
22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
23 | |||
22 | #define DRV_NAME "3c589_cs" | 24 | #define DRV_NAME "3c589_cs" |
23 | #define DRV_VERSION "1.162-ac" | 25 | #define DRV_VERSION "1.162-ac" |
24 | 26 | ||
@@ -273,8 +275,7 @@ static int tc589_config(struct pcmcia_device *link) | |||
273 | phys_addr = (__be16 *)dev->dev_addr; | 275 | phys_addr = (__be16 *)dev->dev_addr; |
274 | /* Is this a 3c562? */ | 276 | /* Is this a 3c562? */ |
275 | if (link->manf_id != MANFID_3COM) | 277 | if (link->manf_id != MANFID_3COM) |
276 | printk(KERN_INFO "3c589_cs: hmmm, is this really a " | 278 | dev_info(&link->dev, "hmmm, is this really a 3Com card??\n"); |
277 | "3Com card??\n"); | ||
278 | multi = (link->card_id == PRODID_3COM_3C562); | 279 | multi = (link->card_id == PRODID_3COM_3C562); |
279 | 280 | ||
280 | link->io_lines = 16; | 281 | link->io_lines = 16; |
@@ -315,8 +316,8 @@ static int tc589_config(struct pcmcia_device *link) | |||
315 | for (i = 0; i < 3; i++) | 316 | for (i = 0; i < 3; i++) |
316 | phys_addr[i] = htons(read_eeprom(ioaddr, i)); | 317 | phys_addr[i] = htons(read_eeprom(ioaddr, i)); |
317 | if (phys_addr[0] == htons(0x6060)) { | 318 | if (phys_addr[0] == htons(0x6060)) { |
318 | printk(KERN_ERR "3c589_cs: IO port conflict at 0x%03lx" | 319 | dev_err(&link->dev, "IO port conflict at 0x%03lx-0x%03lx\n", |
319 | "-0x%03lx\n", dev->base_addr, dev->base_addr+15); | 320 | dev->base_addr, dev->base_addr+15); |
320 | goto failed; | 321 | goto failed; |
321 | } | 322 | } |
322 | } | 323 | } |
@@ -330,12 +331,12 @@ static int tc589_config(struct pcmcia_device *link) | |||
330 | if ((if_port >= 0) && (if_port <= 3)) | 331 | if ((if_port >= 0) && (if_port <= 3)) |
331 | dev->if_port = if_port; | 332 | dev->if_port = if_port; |
332 | else | 333 | else |
333 | printk(KERN_ERR "3c589_cs: invalid if_port requested\n"); | 334 | dev_err(&link->dev, "invalid if_port requested\n"); |
334 | 335 | ||
335 | SET_NETDEV_DEV(dev, &link->dev); | 336 | SET_NETDEV_DEV(dev, &link->dev); |
336 | 337 | ||
337 | if (register_netdev(dev) != 0) { | 338 | if (register_netdev(dev) != 0) { |
338 | printk(KERN_ERR "3c589_cs: register_netdev() failed\n"); | 339 | dev_err(&link->dev, "register_netdev() failed\n"); |
339 | goto failed; | 340 | goto failed; |
340 | } | 341 | } |
341 | 342 | ||
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); |
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c index 3c400cfa82ae..f065c35cd4b7 100644 --- a/drivers/net/pcmcia/com20020_cs.c +++ b/drivers/net/pcmcia/com20020_cs.c | |||
@@ -52,23 +52,23 @@ | |||
52 | 52 | ||
53 | #define VERSION "arcnet: COM20020 PCMCIA support loaded.\n" | 53 | #define VERSION "arcnet: COM20020 PCMCIA support loaded.\n" |
54 | 54 | ||
55 | #ifdef DEBUG | ||
56 | 55 | ||
57 | static void regdump(struct net_device *dev) | 56 | static void regdump(struct net_device *dev) |
58 | { | 57 | { |
58 | #ifdef DEBUG | ||
59 | int ioaddr = dev->base_addr; | 59 | int ioaddr = dev->base_addr; |
60 | int count; | 60 | int count; |
61 | 61 | ||
62 | printk("com20020 register dump:\n"); | 62 | netdev_dbg(dev, "register dump:\n"); |
63 | for (count = ioaddr; count < ioaddr + 16; count++) | 63 | for (count = ioaddr; count < ioaddr + 16; count++) |
64 | { | 64 | { |
65 | if (!(count % 16)) | 65 | if (!(count % 16)) |
66 | printk("\n%04X: ", count); | 66 | pr_cont("%04X:", count); |
67 | printk("%02X ", inb(count)); | 67 | pr_cont(" %02X", inb(count)); |
68 | } | 68 | } |
69 | printk("\n"); | 69 | pr_cont("\n"); |
70 | 70 | ||
71 | printk("buffer0 dump:\n"); | 71 | netdev_dbg(dev, "buffer0 dump:\n"); |
72 | /* set up the address register */ | 72 | /* set up the address register */ |
73 | count = 0; | 73 | count = 0; |
74 | outb((count >> 8) | RDDATAflag | AUTOINCflag, _ADDR_HI); | 74 | outb((count >> 8) | RDDATAflag | AUTOINCflag, _ADDR_HI); |
@@ -77,19 +77,15 @@ static void regdump(struct net_device *dev) | |||
77 | for (count = 0; count < 256+32; count++) | 77 | for (count = 0; count < 256+32; count++) |
78 | { | 78 | { |
79 | if (!(count % 16)) | 79 | if (!(count % 16)) |
80 | printk("\n%04X: ", count); | 80 | pr_cont("%04X:", count); |
81 | 81 | ||
82 | /* copy the data */ | 82 | /* copy the data */ |
83 | printk("%02X ", inb(_MEMDATA)); | 83 | pr_cont(" %02X", inb(_MEMDATA)); |
84 | } | 84 | } |
85 | printk("\n"); | 85 | pr_cont("\n"); |
86 | #endif | ||
86 | } | 87 | } |
87 | 88 | ||
88 | #else | ||
89 | |||
90 | static inline void regdump(struct net_device *dev) { } | ||
91 | |||
92 | #endif | ||
93 | 89 | ||
94 | 90 | ||
95 | /*====================================================================*/ | 91 | /*====================================================================*/ |
@@ -301,13 +297,13 @@ static int com20020_config(struct pcmcia_device *link) | |||
301 | i = com20020_found(dev, 0); /* calls register_netdev */ | 297 | i = com20020_found(dev, 0); /* calls register_netdev */ |
302 | 298 | ||
303 | if (i != 0) { | 299 | if (i != 0) { |
304 | dev_printk(KERN_NOTICE, &link->dev, | 300 | dev_notice(&link->dev, |
305 | "com20020_cs: com20020_found() failed\n"); | 301 | "com20020_found() failed\n"); |
306 | goto failed; | 302 | goto failed; |
307 | } | 303 | } |
308 | 304 | ||
309 | dev_dbg(&link->dev,KERN_INFO "%s: port %#3lx, irq %d\n", | 305 | netdev_dbg(dev, "port %#3lx, irq %d\n", |
310 | dev->name, dev->base_addr, dev->irq); | 306 | dev->base_addr, dev->irq); |
311 | return 0; | 307 | return 0; |
312 | 308 | ||
313 | failed: | 309 | failed: |
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c index 98fffb03ecd7..8f26d548d1bb 100644 --- a/drivers/net/pcmcia/fmvj18x_cs.c +++ b/drivers/net/pcmcia/fmvj18x_cs.c | |||
@@ -28,6 +28,8 @@ | |||
28 | 28 | ||
29 | ======================================================================*/ | 29 | ======================================================================*/ |
30 | 30 | ||
31 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
32 | |||
31 | #define DRV_NAME "fmvj18x_cs" | 33 | #define DRV_NAME "fmvj18x_cs" |
32 | #define DRV_VERSION "2.9" | 34 | #define DRV_VERSION "2.9" |
33 | 35 | ||
@@ -291,7 +293,7 @@ static int mfc_try_io_port(struct pcmcia_device *link) | |||
291 | link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; | 293 | link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; |
292 | if (link->resource[1]->start == 0) { | 294 | if (link->resource[1]->start == 0) { |
293 | link->resource[1]->end = 0; | 295 | link->resource[1]->end = 0; |
294 | printk(KERN_NOTICE "fmvj18x_cs: out of resource for serial\n"); | 296 | pr_notice("out of resource for serial\n"); |
295 | } | 297 | } |
296 | ret = pcmcia_request_io(link); | 298 | ret = pcmcia_request_io(link); |
297 | if (ret == 0) | 299 | if (ret == 0) |
@@ -503,7 +505,7 @@ static int fmvj18x_config(struct pcmcia_device *link) | |||
503 | case XXX10304: | 505 | case XXX10304: |
504 | /* Read MACID from Buggy CIS */ | 506 | /* Read MACID from Buggy CIS */ |
505 | if (fmvj18x_get_hwinfo(link, buggybuf) == -1) { | 507 | if (fmvj18x_get_hwinfo(link, buggybuf) == -1) { |
506 | printk(KERN_NOTICE "fmvj18x_cs: unable to read hardware net address.\n"); | 508 | pr_notice("unable to read hardware net address\n"); |
507 | goto failed; | 509 | goto failed; |
508 | } | 510 | } |
509 | for (i = 0 ; i < 6; i++) { | 511 | for (i = 0 ; i < 6; i++) { |
@@ -524,15 +526,14 @@ static int fmvj18x_config(struct pcmcia_device *link) | |||
524 | SET_NETDEV_DEV(dev, &link->dev); | 526 | SET_NETDEV_DEV(dev, &link->dev); |
525 | 527 | ||
526 | if (register_netdev(dev) != 0) { | 528 | if (register_netdev(dev) != 0) { |
527 | printk(KERN_NOTICE "fmvj18x_cs: register_netdev() failed\n"); | 529 | pr_notice("register_netdev() failed\n"); |
528 | goto failed; | 530 | goto failed; |
529 | } | 531 | } |
530 | 532 | ||
531 | /* print current configuration */ | 533 | /* print current configuration */ |
532 | printk(KERN_INFO "%s: %s, sram %s, port %#3lx, irq %d, " | 534 | netdev_info(dev, "%s, sram %s, port %#3lx, irq %d, hw_addr %pM\n", |
533 | "hw_addr %pM\n", | 535 | card_name, sram_config == 0 ? "4K TX*2" : "8K TX*2", |
534 | dev->name, card_name, sram_config == 0 ? "4K TX*2" : "8K TX*2", | 536 | dev->base_addr, dev->irq, dev->dev_addr); |
535 | dev->base_addr, dev->irq, dev->dev_addr); | ||
536 | 537 | ||
537 | return 0; | 538 | return 0; |
538 | 539 | ||
@@ -606,7 +607,7 @@ static int fmvj18x_setup_mfc(struct pcmcia_device *link) | |||
606 | 607 | ||
607 | lp->base = ioremap(req.Base, req.Size); | 608 | lp->base = ioremap(req.Base, req.Size); |
608 | if (lp->base == NULL) { | 609 | if (lp->base == NULL) { |
609 | printk(KERN_NOTICE "fmvj18x_cs: ioremap failed\n"); | 610 | netdev_notice(dev, "ioremap failed\n"); |
610 | return -1; | 611 | return -1; |
611 | } | 612 | } |
612 | 613 | ||
@@ -800,17 +801,16 @@ static void fjn_tx_timeout(struct net_device *dev) | |||
800 | struct local_info_t *lp = netdev_priv(dev); | 801 | struct local_info_t *lp = netdev_priv(dev); |
801 | unsigned int ioaddr = dev->base_addr; | 802 | unsigned int ioaddr = dev->base_addr; |
802 | 803 | ||
803 | printk(KERN_NOTICE "%s: transmit timed out with status %04x, %s?\n", | 804 | netdev_notice(dev, "transmit timed out with status %04x, %s?\n", |
804 | dev->name, htons(inw(ioaddr + TX_STATUS)), | 805 | htons(inw(ioaddr + TX_STATUS)), |
805 | inb(ioaddr + TX_STATUS) & F_TMT_RDY | 806 | inb(ioaddr + TX_STATUS) & F_TMT_RDY |
806 | ? "IRQ conflict" : "network cable problem"); | 807 | ? "IRQ conflict" : "network cable problem"); |
807 | printk(KERN_NOTICE "%s: timeout registers: %04x %04x %04x " | 808 | netdev_notice(dev, "timeout registers: %04x %04x %04x " |
808 | "%04x %04x %04x %04x %04x.\n", | 809 | "%04x %04x %04x %04x %04x.\n", |
809 | dev->name, htons(inw(ioaddr + 0)), | 810 | htons(inw(ioaddr + 0)), htons(inw(ioaddr + 2)), |
810 | htons(inw(ioaddr + 2)), htons(inw(ioaddr + 4)), | 811 | htons(inw(ioaddr + 4)), htons(inw(ioaddr + 6)), |
811 | htons(inw(ioaddr + 6)), htons(inw(ioaddr + 8)), | 812 | htons(inw(ioaddr + 8)), htons(inw(ioaddr + 10)), |
812 | htons(inw(ioaddr +10)), htons(inw(ioaddr +12)), | 813 | htons(inw(ioaddr + 12)), htons(inw(ioaddr + 14))); |
813 | htons(inw(ioaddr +14))); | ||
814 | dev->stats.tx_errors++; | 814 | dev->stats.tx_errors++; |
815 | /* ToDo: We should try to restart the adaptor... */ | 815 | /* ToDo: We should try to restart the adaptor... */ |
816 | local_irq_disable(); | 816 | local_irq_disable(); |
@@ -845,13 +845,13 @@ static netdev_tx_t fjn_start_xmit(struct sk_buff *skb, | |||
845 | unsigned char *buf = skb->data; | 845 | unsigned char *buf = skb->data; |
846 | 846 | ||
847 | if (length > ETH_FRAME_LEN) { | 847 | if (length > ETH_FRAME_LEN) { |
848 | printk(KERN_NOTICE "%s: Attempting to send a large packet" | 848 | netdev_notice(dev, "Attempting to send a large packet (%d bytes)\n", |
849 | " (%d bytes).\n", dev->name, length); | 849 | length); |
850 | return NETDEV_TX_BUSY; | 850 | return NETDEV_TX_BUSY; |
851 | } | 851 | } |
852 | 852 | ||
853 | pr_debug("%s: Transmitting a packet of length %lu.\n", | 853 | netdev_dbg(dev, "Transmitting a packet of length %lu\n", |
854 | dev->name, (unsigned long)skb->len); | 854 | (unsigned long)skb->len); |
855 | dev->stats.tx_bytes += skb->len; | 855 | dev->stats.tx_bytes += skb->len; |
856 | 856 | ||
857 | /* Disable both interrupts. */ | 857 | /* Disable both interrupts. */ |
@@ -904,7 +904,7 @@ static void fjn_reset(struct net_device *dev) | |||
904 | unsigned int ioaddr = dev->base_addr; | 904 | unsigned int ioaddr = dev->base_addr; |
905 | int i; | 905 | int i; |
906 | 906 | ||
907 | pr_debug("fjn_reset(%s) called.\n",dev->name); | 907 | netdev_dbg(dev, "fjn_reset() called\n"); |
908 | 908 | ||
909 | /* Reset controller */ | 909 | /* Reset controller */ |
910 | if( sram_config == 0 ) | 910 | if( sram_config == 0 ) |
@@ -988,8 +988,8 @@ static void fjn_rx(struct net_device *dev) | |||
988 | while ((inb(ioaddr + RX_MODE) & F_BUF_EMP) == 0) { | 988 | while ((inb(ioaddr + RX_MODE) & F_BUF_EMP) == 0) { |
989 | u_short status = inw(ioaddr + DATAPORT); | 989 | u_short status = inw(ioaddr + DATAPORT); |
990 | 990 | ||
991 | pr_debug("%s: Rxing packet mode %02x status %04x.\n", | 991 | netdev_dbg(dev, "Rxing packet mode %02x status %04x.\n", |
992 | dev->name, inb(ioaddr + RX_MODE), status); | 992 | inb(ioaddr + RX_MODE), status); |
993 | #ifndef final_version | 993 | #ifndef final_version |
994 | if (status == 0) { | 994 | if (status == 0) { |
995 | outb(F_SKP_PKT, ioaddr + RX_SKIP); | 995 | outb(F_SKP_PKT, ioaddr + RX_SKIP); |
@@ -1008,16 +1008,16 @@ static void fjn_rx(struct net_device *dev) | |||
1008 | struct sk_buff *skb; | 1008 | struct sk_buff *skb; |
1009 | 1009 | ||
1010 | if (pkt_len > 1550) { | 1010 | if (pkt_len > 1550) { |
1011 | printk(KERN_NOTICE "%s: The FMV-18x claimed a very " | 1011 | netdev_notice(dev, "The FMV-18x claimed a very large packet, size %d\n", |
1012 | "large packet, size %d.\n", dev->name, pkt_len); | 1012 | pkt_len); |
1013 | outb(F_SKP_PKT, ioaddr + RX_SKIP); | 1013 | outb(F_SKP_PKT, ioaddr + RX_SKIP); |
1014 | dev->stats.rx_errors++; | 1014 | dev->stats.rx_errors++; |
1015 | break; | 1015 | break; |
1016 | } | 1016 | } |
1017 | skb = dev_alloc_skb(pkt_len+2); | 1017 | skb = dev_alloc_skb(pkt_len+2); |
1018 | if (skb == NULL) { | 1018 | if (skb == NULL) { |
1019 | printk(KERN_NOTICE "%s: Memory squeeze, dropping " | 1019 | netdev_notice(dev, "Memory squeeze, dropping packet (len %d)\n", |
1020 | "packet (len %d).\n", dev->name, pkt_len); | 1020 | pkt_len); |
1021 | outb(F_SKP_PKT, ioaddr + RX_SKIP); | 1021 | outb(F_SKP_PKT, ioaddr + RX_SKIP); |
1022 | dev->stats.rx_dropped++; | 1022 | dev->stats.rx_dropped++; |
1023 | break; | 1023 | break; |
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c index cbcda123b1bf..dc85282193bf 100644 --- a/drivers/net/pcmcia/ibmtr_cs.c +++ b/drivers/net/pcmcia/ibmtr_cs.c | |||
@@ -45,6 +45,8 @@ | |||
45 | 45 | ||
46 | ======================================================================*/ | 46 | ======================================================================*/ |
47 | 47 | ||
48 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
49 | |||
48 | #include <linux/kernel.h> | 50 | #include <linux/kernel.h> |
49 | #include <linux/init.h> | 51 | #include <linux/init.h> |
50 | #include <linux/ptrace.h> | 52 | #include <linux/ptrace.h> |
@@ -272,15 +274,14 @@ static int __devinit ibmtr_config(struct pcmcia_device *link) | |||
272 | 274 | ||
273 | i = ibmtr_probe_card(dev); | 275 | i = ibmtr_probe_card(dev); |
274 | if (i != 0) { | 276 | if (i != 0) { |
275 | printk(KERN_NOTICE "ibmtr_cs: register_netdev() failed\n"); | 277 | pr_notice("register_netdev() failed\n"); |
276 | goto failed; | 278 | goto failed; |
277 | } | 279 | } |
278 | 280 | ||
279 | printk(KERN_INFO | 281 | netdev_info(dev, "port %#3lx, irq %d, mmio %#5lx, sram %#5lx, hwaddr=%pM\n", |
280 | "%s: port %#3lx, irq %d, mmio %#5lx, sram %#5lx, hwaddr=%pM\n", | 282 | dev->base_addr, dev->irq, |
281 | dev->name, dev->base_addr, dev->irq, | 283 | (u_long)ti->mmio, (u_long)(ti->sram_base << 12), |
282 | (u_long)ti->mmio, (u_long)(ti->sram_base << 12), | 284 | dev->dev_addr); |
283 | dev->dev_addr); | ||
284 | return 0; | 285 | return 0; |
285 | 286 | ||
286 | failed: | 287 | failed: |
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c index 68f2deeb3ade..89cf63bb8c91 100644 --- a/drivers/net/pcmcia/nmclan_cs.c +++ b/drivers/net/pcmcia/nmclan_cs.c | |||
@@ -111,6 +111,8 @@ Log: nmclan_cs.c,v | |||
111 | 111 | ||
112 | ---------------------------------------------------------------------------- */ | 112 | ---------------------------------------------------------------------------- */ |
113 | 113 | ||
114 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
115 | |||
114 | #define DRV_NAME "nmclan_cs" | 116 | #define DRV_NAME "nmclan_cs" |
115 | #define DRV_VERSION "0.16" | 117 | #define DRV_VERSION "0.16" |
116 | 118 | ||
@@ -563,7 +565,7 @@ static int mace_init(mace_private *lp, unsigned int ioaddr, char *enet_addr) | |||
563 | /* Wait for reset bit to be cleared automatically after <= 200ns */; | 565 | /* Wait for reset bit to be cleared automatically after <= 200ns */; |
564 | if(++ct > 500) | 566 | if(++ct > 500) |
565 | { | 567 | { |
566 | printk(KERN_ERR "mace: reset failed, card removed ?\n"); | 568 | pr_err("reset failed, card removed?\n"); |
567 | return -1; | 569 | return -1; |
568 | } | 570 | } |
569 | udelay(1); | 571 | udelay(1); |
@@ -610,7 +612,7 @@ static int mace_init(mace_private *lp, unsigned int ioaddr, char *enet_addr) | |||
610 | { | 612 | { |
611 | if(++ ct > 500) | 613 | if(++ ct > 500) |
612 | { | 614 | { |
613 | printk(KERN_ERR "mace: ADDRCHG timeout, card removed ?\n"); | 615 | pr_err("ADDRCHG timeout, card removed?\n"); |
614 | return -1; | 616 | return -1; |
615 | } | 617 | } |
616 | } | 618 | } |
@@ -678,8 +680,8 @@ static int nmclan_config(struct pcmcia_device *link) | |||
678 | dev_dbg(&link->dev, "nmclan_cs configured: mace id=%x %x\n", | 680 | dev_dbg(&link->dev, "nmclan_cs configured: mace id=%x %x\n", |
679 | sig[0], sig[1]); | 681 | sig[0], sig[1]); |
680 | } else { | 682 | } else { |
681 | printk(KERN_NOTICE "nmclan_cs: mace id not found: %x %x should" | 683 | pr_notice("mace id not found: %x %x should be 0x40 0x?9\n", |
682 | " be 0x40 0x?9\n", sig[0], sig[1]); | 684 | sig[0], sig[1]); |
683 | return -ENODEV; | 685 | return -ENODEV; |
684 | } | 686 | } |
685 | } | 687 | } |
@@ -691,20 +693,18 @@ static int nmclan_config(struct pcmcia_device *link) | |||
691 | if (if_port <= 2) | 693 | if (if_port <= 2) |
692 | dev->if_port = if_port; | 694 | dev->if_port = if_port; |
693 | else | 695 | else |
694 | printk(KERN_NOTICE "nmclan_cs: invalid if_port requested\n"); | 696 | pr_notice("invalid if_port requested\n"); |
695 | 697 | ||
696 | SET_NETDEV_DEV(dev, &link->dev); | 698 | SET_NETDEV_DEV(dev, &link->dev); |
697 | 699 | ||
698 | i = register_netdev(dev); | 700 | i = register_netdev(dev); |
699 | if (i != 0) { | 701 | if (i != 0) { |
700 | printk(KERN_NOTICE "nmclan_cs: register_netdev() failed\n"); | 702 | pr_notice("register_netdev() failed\n"); |
701 | goto failed; | 703 | goto failed; |
702 | } | 704 | } |
703 | 705 | ||
704 | printk(KERN_INFO "%s: nmclan: port %#3lx, irq %d, %s port," | 706 | netdev_info(dev, "nmclan: port %#3lx, irq %d, %s port, hw_addr %pM\n", |
705 | " hw_addr %pM\n", | 707 | dev->base_addr, dev->irq, if_names[dev->if_port], dev->dev_addr); |
706 | dev->name, dev->base_addr, dev->irq, if_names[dev->if_port], | ||
707 | dev->dev_addr); | ||
708 | return 0; | 708 | return 0; |
709 | 709 | ||
710 | failed: | 710 | failed: |
@@ -798,8 +798,7 @@ static int mace_config(struct net_device *dev, struct ifmap *map) | |||
798 | if ((map->port != (u_char)(-1)) && (map->port != dev->if_port)) { | 798 | if ((map->port != (u_char)(-1)) && (map->port != dev->if_port)) { |
799 | if (map->port <= 2) { | 799 | if (map->port <= 2) { |
800 | dev->if_port = map->port; | 800 | dev->if_port = map->port; |
801 | printk(KERN_INFO "%s: switched to %s port\n", dev->name, | 801 | netdev_info(dev, "switched to %s port\n", if_names[dev->if_port]); |
802 | if_names[dev->if_port]); | ||
803 | } else | 802 | } else |
804 | return -EINVAL; | 803 | return -EINVAL; |
805 | } | 804 | } |
@@ -878,12 +877,12 @@ static void mace_tx_timeout(struct net_device *dev) | |||
878 | mace_private *lp = netdev_priv(dev); | 877 | mace_private *lp = netdev_priv(dev); |
879 | struct pcmcia_device *link = lp->p_dev; | 878 | struct pcmcia_device *link = lp->p_dev; |
880 | 879 | ||
881 | printk(KERN_NOTICE "%s: transmit timed out -- ", dev->name); | 880 | netdev_notice(dev, "transmit timed out -- "); |
882 | #if RESET_ON_TIMEOUT | 881 | #if RESET_ON_TIMEOUT |
883 | printk("resetting card\n"); | 882 | pr_cont("resetting card\n"); |
884 | pcmcia_reset_card(link->socket); | 883 | pcmcia_reset_card(link->socket); |
885 | #else /* #if RESET_ON_TIMEOUT */ | 884 | #else /* #if RESET_ON_TIMEOUT */ |
886 | printk("NOT resetting card\n"); | 885 | pr_cont("NOT resetting card\n"); |
887 | #endif /* #if RESET_ON_TIMEOUT */ | 886 | #endif /* #if RESET_ON_TIMEOUT */ |
888 | dev->trans_start = jiffies; /* prevent tx timeout */ | 887 | dev->trans_start = jiffies; /* prevent tx timeout */ |
889 | netif_wake_queue(dev); | 888 | netif_wake_queue(dev); |
@@ -965,22 +964,21 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id) | |||
965 | ioaddr = dev->base_addr; | 964 | ioaddr = dev->base_addr; |
966 | 965 | ||
967 | if (lp->tx_irq_disabled) { | 966 | if (lp->tx_irq_disabled) { |
968 | printk( | 967 | const char *msg; |
969 | (lp->tx_irq_disabled? | 968 | if (lp->tx_irq_disabled) |
970 | KERN_NOTICE "%s: Interrupt with tx_irq_disabled " | 969 | msg = "Interrupt with tx_irq_disabled"; |
971 | "[isr=%02X, imr=%02X]\n": | 970 | else |
972 | KERN_NOTICE "%s: Re-entering the interrupt handler " | 971 | msg = "Re-entering the interrupt handler"; |
973 | "[isr=%02X, imr=%02X]\n"), | 972 | netdev_notice(dev, "%s [isr=%02X, imr=%02X]\n", |
974 | dev->name, | 973 | msg, |
975 | inb(ioaddr + AM2150_MACE_BASE + MACE_IR), | 974 | inb(ioaddr + AM2150_MACE_BASE + MACE_IR), |
976 | inb(ioaddr + AM2150_MACE_BASE + MACE_IMR) | 975 | inb(ioaddr + AM2150_MACE_BASE + MACE_IMR)); |
977 | ); | ||
978 | /* WARNING: MACE_IR has been read! */ | 976 | /* WARNING: MACE_IR has been read! */ |
979 | return IRQ_NONE; | 977 | return IRQ_NONE; |
980 | } | 978 | } |
981 | 979 | ||
982 | if (!netif_device_present(dev)) { | 980 | if (!netif_device_present(dev)) { |
983 | pr_debug("%s: interrupt from dead card\n", dev->name); | 981 | netdev_dbg(dev, "interrupt from dead card\n"); |
984 | return IRQ_NONE; | 982 | return IRQ_NONE; |
985 | } | 983 | } |
986 | 984 | ||
@@ -1378,8 +1376,8 @@ static void BuildLAF(int *ladrf, int *adr) | |||
1378 | printk(KERN_DEBUG " adr =%pM\n", adr); | 1376 | printk(KERN_DEBUG " adr =%pM\n", adr); |
1379 | printk(KERN_DEBUG " hashcode = %d(decimal), ladrf[0:63] =", hashcode); | 1377 | printk(KERN_DEBUG " hashcode = %d(decimal), ladrf[0:63] =", hashcode); |
1380 | for (i = 0; i < 8; i++) | 1378 | for (i = 0; i < 8; i++) |
1381 | printk(KERN_CONT " %02X", ladrf[i]); | 1379 | pr_cont(" %02X", ladrf[i]); |
1382 | printk(KERN_CONT "\n"); | 1380 | pr_cont("\n"); |
1383 | #endif | 1381 | #endif |
1384 | } /* BuildLAF */ | 1382 | } /* BuildLAF */ |
1385 | 1383 | ||
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index 377367d03b41..cc7a357feac9 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -25,6 +25,8 @@ | |||
25 | 25 | ||
26 | ======================================================================*/ | 26 | ======================================================================*/ |
27 | 27 | ||
28 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
29 | |||
28 | #include <linux/module.h> | 30 | #include <linux/module.h> |
29 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
30 | #include <linux/init.h> | 32 | #include <linux/init.h> |
@@ -820,7 +822,7 @@ static int check_sig(struct pcmcia_device *link) | |||
820 | modconf_t mod = { | 822 | modconf_t mod = { |
821 | .Attributes = CONF_IO_CHANGE_WIDTH, | 823 | .Attributes = CONF_IO_CHANGE_WIDTH, |
822 | }; | 824 | }; |
823 | printk(KERN_INFO "smc91c92_cs: using 8-bit IO window.\n"); | 825 | pr_info("using 8-bit IO window\n"); |
824 | 826 | ||
825 | smc91c92_suspend(link); | 827 | smc91c92_suspend(link); |
826 | pcmcia_modify_configuration(link, &mod); | 828 | pcmcia_modify_configuration(link, &mod); |
@@ -881,7 +883,7 @@ static int smc91c92_config(struct pcmcia_device *link) | |||
881 | if ((if_port >= 0) && (if_port <= 2)) | 883 | if ((if_port >= 0) && (if_port <= 2)) |
882 | dev->if_port = if_port; | 884 | dev->if_port = if_port; |
883 | else | 885 | else |
884 | printk(KERN_NOTICE "smc91c92_cs: invalid if_port requested\n"); | 886 | dev_notice(&link->dev, "invalid if_port requested\n"); |
885 | 887 | ||
886 | switch (smc->manfid) { | 888 | switch (smc->manfid) { |
887 | case MANFID_OSITECH: | 889 | case MANFID_OSITECH: |
@@ -899,7 +901,7 @@ static int smc91c92_config(struct pcmcia_device *link) | |||
899 | } | 901 | } |
900 | 902 | ||
901 | if (i != 0) { | 903 | if (i != 0) { |
902 | printk(KERN_NOTICE "smc91c92_cs: Unable to find hardware address.\n"); | 904 | dev_notice(&link->dev, "Unable to find hardware address.\n"); |
903 | goto config_failed; | 905 | goto config_failed; |
904 | } | 906 | } |
905 | 907 | ||
@@ -952,30 +954,28 @@ static int smc91c92_config(struct pcmcia_device *link) | |||
952 | SET_NETDEV_DEV(dev, &link->dev); | 954 | SET_NETDEV_DEV(dev, &link->dev); |
953 | 955 | ||
954 | if (register_netdev(dev) != 0) { | 956 | if (register_netdev(dev) != 0) { |
955 | printk(KERN_ERR "smc91c92_cs: register_netdev() failed\n"); | 957 | dev_err(&link->dev, "register_netdev() failed\n"); |
956 | goto config_undo; | 958 | goto config_undo; |
957 | } | 959 | } |
958 | 960 | ||
959 | printk(KERN_INFO "%s: smc91c%s rev %d: io %#3lx, irq %d, " | 961 | netdev_info(dev, "smc91c%s rev %d: io %#3lx, irq %d, hw_addr %pM\n", |
960 | "hw_addr %pM\n", | 962 | name, (rev & 0x0f), dev->base_addr, dev->irq, dev->dev_addr); |
961 | dev->name, name, (rev & 0x0f), dev->base_addr, dev->irq, | ||
962 | dev->dev_addr); | ||
963 | 963 | ||
964 | if (rev > 0) { | 964 | if (rev > 0) { |
965 | if (mir & 0x3ff) | 965 | if (mir & 0x3ff) |
966 | printk(KERN_INFO " %lu byte", mir); | 966 | netdev_info(dev, " %lu byte", mir); |
967 | else | 967 | else |
968 | printk(KERN_INFO " %lu kb", mir>>10); | 968 | netdev_info(dev, " %lu kb", mir>>10); |
969 | printk(" buffer, %s xcvr\n", (smc->cfg & CFG_MII_SELECT) ? | 969 | pr_cont(" buffer, %s xcvr\n", |
970 | "MII" : if_names[dev->if_port]); | 970 | (smc->cfg & CFG_MII_SELECT) ? "MII" : if_names[dev->if_port]); |
971 | } | 971 | } |
972 | 972 | ||
973 | if (smc->cfg & CFG_MII_SELECT) { | 973 | if (smc->cfg & CFG_MII_SELECT) { |
974 | if (smc->mii_if.phy_id != -1) { | 974 | if (smc->mii_if.phy_id != -1) { |
975 | dev_dbg(&link->dev, " MII transceiver at index %d, status %x.\n", | 975 | netdev_dbg(dev, " MII transceiver at index %d, status %x\n", |
976 | smc->mii_if.phy_id, j); | 976 | smc->mii_if.phy_id, j); |
977 | } else { | 977 | } else { |
978 | printk(KERN_NOTICE " No MII transceivers found!\n"); | 978 | netdev_notice(dev, " No MII transceivers found!\n"); |
979 | } | 979 | } |
980 | } | 980 | } |
981 | return 0; | 981 | return 0; |
@@ -1081,10 +1081,10 @@ static void smc_dump(struct net_device *dev) | |||
1081 | save = inw(ioaddr + BANK_SELECT); | 1081 | save = inw(ioaddr + BANK_SELECT); |
1082 | for (w = 0; w < 4; w++) { | 1082 | for (w = 0; w < 4; w++) { |
1083 | SMC_SELECT_BANK(w); | 1083 | SMC_SELECT_BANK(w); |
1084 | printk(KERN_DEBUG "bank %d: ", w); | 1084 | netdev_printk(KERN_DEBUG, dev, "bank %d: ", w); |
1085 | for (i = 0; i < 14; i += 2) | 1085 | for (i = 0; i < 14; i += 2) |
1086 | printk(" %04x", inw(ioaddr + i)); | 1086 | pr_cont(" %04x", inw(ioaddr + i)); |
1087 | printk("\n"); | 1087 | pr_cont("\n"); |
1088 | } | 1088 | } |
1089 | outw(save, ioaddr + BANK_SELECT); | 1089 | outw(save, ioaddr + BANK_SELECT); |
1090 | } | 1090 | } |
@@ -1106,7 +1106,7 @@ static int smc_open(struct net_device *dev) | |||
1106 | return -ENODEV; | 1106 | return -ENODEV; |
1107 | /* Physical device present signature. */ | 1107 | /* Physical device present signature. */ |
1108 | if (check_sig(link) < 0) { | 1108 | if (check_sig(link) < 0) { |
1109 | printk("smc91c92_cs: Yikes! Bad chip signature!\n"); | 1109 | netdev_info(dev, "Yikes! Bad chip signature!\n"); |
1110 | return -ENODEV; | 1110 | return -ENODEV; |
1111 | } | 1111 | } |
1112 | link->open++; | 1112 | link->open++; |
@@ -1172,7 +1172,7 @@ static void smc_hardware_send_packet(struct net_device * dev) | |||
1172 | u_char packet_no; | 1172 | u_char packet_no; |
1173 | 1173 | ||
1174 | if (!skb) { | 1174 | if (!skb) { |
1175 | printk(KERN_ERR "%s: In XMIT with no packet to send.\n", dev->name); | 1175 | netdev_err(dev, "In XMIT with no packet to send\n"); |
1176 | return; | 1176 | return; |
1177 | } | 1177 | } |
1178 | 1178 | ||
@@ -1180,8 +1180,8 @@ static void smc_hardware_send_packet(struct net_device * dev) | |||
1180 | packet_no = inw(ioaddr + PNR_ARR) >> 8; | 1180 | packet_no = inw(ioaddr + PNR_ARR) >> 8; |
1181 | if (packet_no & 0x80) { | 1181 | if (packet_no & 0x80) { |
1182 | /* If not, there is a hardware problem! Likely an ejected card. */ | 1182 | /* If not, there is a hardware problem! Likely an ejected card. */ |
1183 | printk(KERN_WARNING "%s: 91c92 hardware Tx buffer allocation" | 1183 | netdev_warn(dev, "hardware Tx buffer allocation failed, status %#2.2x\n", |
1184 | " failed, status %#2.2x.\n", dev->name, packet_no); | 1184 | packet_no); |
1185 | dev_kfree_skb_irq(skb); | 1185 | dev_kfree_skb_irq(skb); |
1186 | smc->saved_skb = NULL; | 1186 | smc->saved_skb = NULL; |
1187 | netif_start_queue(dev); | 1187 | netif_start_queue(dev); |
@@ -1200,8 +1200,7 @@ static void smc_hardware_send_packet(struct net_device * dev) | |||
1200 | u_char *buf = skb->data; | 1200 | u_char *buf = skb->data; |
1201 | u_int length = skb->len; /* The chip will pad to ethernet min. */ | 1201 | u_int length = skb->len; /* The chip will pad to ethernet min. */ |
1202 | 1202 | ||
1203 | pr_debug("%s: Trying to xmit packet of length %d.\n", | 1203 | netdev_dbg(dev, "Trying to xmit packet of length %d\n", length); |
1204 | dev->name, length); | ||
1205 | 1204 | ||
1206 | /* send the packet length: +6 for status word, length, and ctl */ | 1205 | /* send the packet length: +6 for status word, length, and ctl */ |
1207 | outw(0, ioaddr + DATA_1); | 1206 | outw(0, ioaddr + DATA_1); |
@@ -1233,9 +1232,8 @@ static void smc_tx_timeout(struct net_device *dev) | |||
1233 | struct smc_private *smc = netdev_priv(dev); | 1232 | struct smc_private *smc = netdev_priv(dev); |
1234 | unsigned int ioaddr = dev->base_addr; | 1233 | unsigned int ioaddr = dev->base_addr; |
1235 | 1234 | ||
1236 | printk(KERN_NOTICE "%s: SMC91c92 transmit timed out, " | 1235 | netdev_notice(dev, "transmit timed out, Tx_status %2.2x status %4.4x.\n", |
1237 | "Tx_status %2.2x status %4.4x.\n", | 1236 | inw(ioaddr)&0xff, inw(ioaddr + 2)); |
1238 | dev->name, inw(ioaddr)&0xff, inw(ioaddr + 2)); | ||
1239 | dev->stats.tx_errors++; | 1237 | dev->stats.tx_errors++; |
1240 | smc_reset(dev); | 1238 | smc_reset(dev); |
1241 | dev->trans_start = jiffies; /* prevent tx timeout */ | 1239 | dev->trans_start = jiffies; /* prevent tx timeout */ |
@@ -1254,14 +1252,14 @@ static netdev_tx_t smc_start_xmit(struct sk_buff *skb, | |||
1254 | 1252 | ||
1255 | netif_stop_queue(dev); | 1253 | netif_stop_queue(dev); |
1256 | 1254 | ||
1257 | pr_debug("%s: smc_start_xmit(length = %d) called," | 1255 | netdev_dbg(dev, "smc_start_xmit(length = %d) called, status %04x\n", |
1258 | " status %4.4x.\n", dev->name, skb->len, inw(ioaddr + 2)); | 1256 | skb->len, inw(ioaddr + 2)); |
1259 | 1257 | ||
1260 | if (smc->saved_skb) { | 1258 | if (smc->saved_skb) { |
1261 | /* THIS SHOULD NEVER HAPPEN. */ | 1259 | /* THIS SHOULD NEVER HAPPEN. */ |
1262 | dev->stats.tx_aborted_errors++; | 1260 | dev->stats.tx_aborted_errors++; |
1263 | printk(KERN_DEBUG "%s: Internal error -- sent packet while busy.\n", | 1261 | netdev_printk(KERN_DEBUG, dev, |
1264 | dev->name); | 1262 | "Internal error -- sent packet while busy\n"); |
1265 | return NETDEV_TX_BUSY; | 1263 | return NETDEV_TX_BUSY; |
1266 | } | 1264 | } |
1267 | smc->saved_skb = skb; | 1265 | smc->saved_skb = skb; |
@@ -1269,7 +1267,7 @@ static netdev_tx_t smc_start_xmit(struct sk_buff *skb, | |||
1269 | num_pages = skb->len >> 8; | 1267 | num_pages = skb->len >> 8; |
1270 | 1268 | ||
1271 | if (num_pages > 7) { | 1269 | if (num_pages > 7) { |
1272 | printk(KERN_ERR "%s: Far too big packet error.\n", dev->name); | 1270 | netdev_err(dev, "Far too big packet error: %d pages\n", num_pages); |
1273 | dev_kfree_skb (skb); | 1271 | dev_kfree_skb (skb); |
1274 | smc->saved_skb = NULL; | 1272 | smc->saved_skb = NULL; |
1275 | dev->stats.tx_dropped++; | 1273 | dev->stats.tx_dropped++; |
@@ -1339,8 +1337,7 @@ static void smc_tx_err(struct net_device * dev) | |||
1339 | } | 1337 | } |
1340 | 1338 | ||
1341 | if (tx_status & TS_SUCCESS) { | 1339 | if (tx_status & TS_SUCCESS) { |
1342 | printk(KERN_NOTICE "%s: Successful packet caused error " | 1340 | netdev_notice(dev, "Successful packet caused error interrupt?\n"); |
1343 | "interrupt?\n", dev->name); | ||
1344 | } | 1341 | } |
1345 | /* re-enable transmit */ | 1342 | /* re-enable transmit */ |
1346 | SMC_SELECT_BANK(0); | 1343 | SMC_SELECT_BANK(0); |
@@ -1530,8 +1527,7 @@ static void smc_rx(struct net_device *dev) | |||
1530 | /* Assertion: we are in Window 2. */ | 1527 | /* Assertion: we are in Window 2. */ |
1531 | 1528 | ||
1532 | if (inw(ioaddr + FIFO_PORTS) & FP_RXEMPTY) { | 1529 | if (inw(ioaddr + FIFO_PORTS) & FP_RXEMPTY) { |
1533 | printk(KERN_ERR "%s: smc_rx() with nothing on Rx FIFO.\n", | 1530 | netdev_err(dev, "smc_rx() with nothing on Rx FIFO\n"); |
1534 | dev->name); | ||
1535 | return; | 1531 | return; |
1536 | } | 1532 | } |
1537 | 1533 | ||
@@ -1646,8 +1642,7 @@ static int s9k_config(struct net_device *dev, struct ifmap *map) | |||
1646 | else if (map->port > 2) | 1642 | else if (map->port > 2) |
1647 | return -EINVAL; | 1643 | return -EINVAL; |
1648 | dev->if_port = map->port; | 1644 | dev->if_port = map->port; |
1649 | printk(KERN_INFO "%s: switched to %s port\n", | 1645 | netdev_info(dev, "switched to %s port\n", if_names[dev->if_port]); |
1650 | dev->name, if_names[dev->if_port]); | ||
1651 | smc_reset(dev); | 1646 | smc_reset(dev); |
1652 | } | 1647 | } |
1653 | return 0; | 1648 | return 0; |
@@ -1798,7 +1793,7 @@ static void media_check(u_long arg) | |||
1798 | this, we can limp along even if the interrupt is blocked */ | 1793 | this, we can limp along even if the interrupt is blocked */ |
1799 | if (smc->watchdog++ && ((i>>8) & i)) { | 1794 | if (smc->watchdog++ && ((i>>8) & i)) { |
1800 | if (!smc->fast_poll) | 1795 | if (!smc->fast_poll) |
1801 | printk(KERN_INFO "%s: interrupt(s) dropped!\n", dev->name); | 1796 | netdev_info(dev, "interrupt(s) dropped!\n"); |
1802 | local_irq_save(flags); | 1797 | local_irq_save(flags); |
1803 | smc_interrupt(dev->irq, dev); | 1798 | smc_interrupt(dev->irq, dev); |
1804 | local_irq_restore(flags); | 1799 | local_irq_restore(flags); |
@@ -1822,7 +1817,7 @@ static void media_check(u_long arg) | |||
1822 | SMC_SELECT_BANK(3); | 1817 | SMC_SELECT_BANK(3); |
1823 | link = mdio_read(dev, smc->mii_if.phy_id, 1); | 1818 | link = mdio_read(dev, smc->mii_if.phy_id, 1); |
1824 | if (!link || (link == 0xffff)) { | 1819 | if (!link || (link == 0xffff)) { |
1825 | printk(KERN_INFO "%s: MII is missing!\n", dev->name); | 1820 | netdev_info(dev, "MII is missing!\n"); |
1826 | smc->mii_if.phy_id = -1; | 1821 | smc->mii_if.phy_id = -1; |
1827 | goto reschedule; | 1822 | goto reschedule; |
1828 | } | 1823 | } |
@@ -1830,15 +1825,13 @@ static void media_check(u_long arg) | |||
1830 | link &= 0x0004; | 1825 | link &= 0x0004; |
1831 | if (link != smc->link_status) { | 1826 | if (link != smc->link_status) { |
1832 | u_short p = mdio_read(dev, smc->mii_if.phy_id, 5); | 1827 | u_short p = mdio_read(dev, smc->mii_if.phy_id, 5); |
1833 | printk(KERN_INFO "%s: %s link beat\n", dev->name, | 1828 | netdev_info(dev, "%s link beat\n", link ? "found" : "lost"); |
1834 | (link) ? "found" : "lost"); | ||
1835 | smc->duplex = (((p & 0x0100) || ((p & 0x1c0) == 0x40)) | 1829 | smc->duplex = (((p & 0x0100) || ((p & 0x1c0) == 0x40)) |
1836 | ? TCR_FDUPLX : 0); | 1830 | ? TCR_FDUPLX : 0); |
1837 | if (link) { | 1831 | if (link) { |
1838 | printk(KERN_INFO "%s: autonegotiation complete: " | 1832 | netdev_info(dev, "autonegotiation complete: " |
1839 | "%sbaseT-%cD selected\n", dev->name, | 1833 | "%dbaseT-%cD selected\n", |
1840 | ((p & 0x0180) ? "100" : "10"), | 1834 | (p & 0x0180) ? 100 : 10, smc->duplex ? 'F' : 'H'); |
1841 | (smc->duplex ? 'F' : 'H')); | ||
1842 | } | 1835 | } |
1843 | SMC_SELECT_BANK(0); | 1836 | SMC_SELECT_BANK(0); |
1844 | outw(inw(ioaddr + TCR) | smc->duplex, ioaddr + TCR); | 1837 | outw(inw(ioaddr + TCR) | smc->duplex, ioaddr + TCR); |
@@ -1857,25 +1850,23 @@ static void media_check(u_long arg) | |||
1857 | if (media != smc->media_status) { | 1850 | if (media != smc->media_status) { |
1858 | if ((media & smc->media_status & 1) && | 1851 | if ((media & smc->media_status & 1) && |
1859 | ((smc->media_status ^ media) & EPH_LINK_OK)) | 1852 | ((smc->media_status ^ media) & EPH_LINK_OK)) |
1860 | printk(KERN_INFO "%s: %s link beat\n", dev->name, | 1853 | netdev_info(dev, "%s link beat\n", |
1861 | (smc->media_status & EPH_LINK_OK ? "lost" : "found")); | 1854 | smc->media_status & EPH_LINK_OK ? "lost" : "found"); |
1862 | else if ((media & smc->media_status & 2) && | 1855 | else if ((media & smc->media_status & 2) && |
1863 | ((smc->media_status ^ media) & EPH_16COL)) | 1856 | ((smc->media_status ^ media) & EPH_16COL)) |
1864 | printk(KERN_INFO "%s: coax cable %s\n", dev->name, | 1857 | netdev_info(dev, "coax cable %s\n", |
1865 | (media & EPH_16COL ? "problem" : "ok")); | 1858 | media & EPH_16COL ? "problem" : "ok"); |
1866 | if (dev->if_port == 0) { | 1859 | if (dev->if_port == 0) { |
1867 | if (media & 1) { | 1860 | if (media & 1) { |
1868 | if (media & EPH_LINK_OK) | 1861 | if (media & EPH_LINK_OK) |
1869 | printk(KERN_INFO "%s: flipped to 10baseT\n", | 1862 | netdev_info(dev, "flipped to 10baseT\n"); |
1870 | dev->name); | ||
1871 | else | 1863 | else |
1872 | smc_set_xcvr(dev, 2); | 1864 | smc_set_xcvr(dev, 2); |
1873 | } else { | 1865 | } else { |
1874 | if (media & EPH_16COL) | 1866 | if (media & EPH_16COL) |
1875 | smc_set_xcvr(dev, 1); | 1867 | smc_set_xcvr(dev, 1); |
1876 | else | 1868 | else |
1877 | printk(KERN_INFO "%s: flipped to 10base2\n", | 1869 | netdev_info(dev, "flipped to 10base2\n"); |
1878 | dev->name); | ||
1879 | } | 1870 | } |
1880 | } | 1871 | } |
1881 | smc->media_status = media; | 1872 | smc->media_status = media; |
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index f5819526b5ee..d858b5e4c4a7 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c | |||
@@ -63,6 +63,8 @@ | |||
63 | * OF THE POSSIBILITY OF SUCH DAMAGE. | 63 | * OF THE POSSIBILITY OF SUCH DAMAGE. |
64 | */ | 64 | */ |
65 | 65 | ||
66 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
67 | |||
66 | #include <linux/module.h> | 68 | #include <linux/module.h> |
67 | #include <linux/kernel.h> | 69 | #include <linux/kernel.h> |
68 | #include <linux/init.h> | 70 | #include <linux/init.h> |
@@ -210,13 +212,6 @@ enum xirc_cmd { /* Commands */ | |||
210 | 212 | ||
211 | static const char *if_names[] = { "Auto", "10BaseT", "10Base2", "AUI", "100BaseT" }; | 213 | static const char *if_names[] = { "Auto", "10BaseT", "10Base2", "AUI", "100BaseT" }; |
212 | 214 | ||
213 | |||
214 | #define KDBG_XIRC KERN_DEBUG "xirc2ps_cs: " | ||
215 | #define KERR_XIRC KERN_ERR "xirc2ps_cs: " | ||
216 | #define KWRN_XIRC KERN_WARNING "xirc2ps_cs: " | ||
217 | #define KNOT_XIRC KERN_NOTICE "xirc2ps_cs: " | ||
218 | #define KINF_XIRC KERN_INFO "xirc2ps_cs: " | ||
219 | |||
220 | /* card types */ | 215 | /* card types */ |
221 | #define XIR_UNKNOWN 0 /* unknown: not supported */ | 216 | #define XIR_UNKNOWN 0 /* unknown: not supported */ |
222 | #define XIR_CE 1 /* (prodid 1) different hardware: not supported */ | 217 | #define XIR_CE 1 /* (prodid 1) different hardware: not supported */ |
@@ -350,26 +345,26 @@ PrintRegisters(struct net_device *dev) | |||
350 | if (pc_debug > 1) { | 345 | if (pc_debug > 1) { |
351 | int i, page; | 346 | int i, page; |
352 | 347 | ||
353 | printk(KDBG_XIRC "Register common: "); | 348 | printk(KERN_DEBUG pr_fmt("Register common: ")); |
354 | for (i = 0; i < 8; i++) | 349 | for (i = 0; i < 8; i++) |
355 | printk(" %2.2x", GetByte(i)); | 350 | pr_cont(" %2.2x", GetByte(i)); |
356 | printk("\n"); | 351 | pr_cont("\n"); |
357 | for (page = 0; page <= 8; page++) { | 352 | for (page = 0; page <= 8; page++) { |
358 | printk(KDBG_XIRC "Register page %2x: ", page); | 353 | printk(KERN_DEBUG pr_fmt("Register page %2x: "), page); |
359 | SelectPage(page); | 354 | SelectPage(page); |
360 | for (i = 8; i < 16; i++) | 355 | for (i = 8; i < 16; i++) |
361 | printk(" %2.2x", GetByte(i)); | 356 | pr_cont(" %2.2x", GetByte(i)); |
362 | printk("\n"); | 357 | pr_cont("\n"); |
363 | } | 358 | } |
364 | for (page=0x40 ; page <= 0x5f; page++) { | 359 | for (page=0x40 ; page <= 0x5f; page++) { |
365 | if (page == 0x43 || (page >= 0x46 && page <= 0x4f) || | 360 | if (page == 0x43 || (page >= 0x46 && page <= 0x4f) || |
366 | (page >= 0x51 && page <=0x5e)) | 361 | (page >= 0x51 && page <=0x5e)) |
367 | continue; | 362 | continue; |
368 | printk(KDBG_XIRC "Register page %2x: ", page); | 363 | printk(KERN_DEBUG pr_fmt("Register page %2x: "), page); |
369 | SelectPage(page); | 364 | SelectPage(page); |
370 | for (i = 8; i < 16; i++) | 365 | for (i = 8; i < 16; i++) |
371 | printk(" %2.2x", GetByte(i)); | 366 | pr_cont(" %2.2x", GetByte(i)); |
372 | printk("\n"); | 367 | pr_cont("\n"); |
373 | } | 368 | } |
374 | } | 369 | } |
375 | } | 370 | } |
@@ -608,11 +603,11 @@ set_card_type(struct pcmcia_device *link) | |||
608 | local->modem = 0; | 603 | local->modem = 0; |
609 | local->card_type = XIR_UNKNOWN; | 604 | local->card_type = XIR_UNKNOWN; |
610 | if (!(prodid & 0x40)) { | 605 | if (!(prodid & 0x40)) { |
611 | printk(KNOT_XIRC "Ooops: Not a creditcard\n"); | 606 | pr_notice("Oops: Not a creditcard\n"); |
612 | return 0; | 607 | return 0; |
613 | } | 608 | } |
614 | if (!(mediaid & 0x01)) { | 609 | if (!(mediaid & 0x01)) { |
615 | printk(KNOT_XIRC "Not an Ethernet card\n"); | 610 | pr_notice("Not an Ethernet card\n"); |
616 | return 0; | 611 | return 0; |
617 | } | 612 | } |
618 | if (mediaid & 0x10) { | 613 | if (mediaid & 0x10) { |
@@ -643,12 +638,11 @@ set_card_type(struct pcmcia_device *link) | |||
643 | } | 638 | } |
644 | } | 639 | } |
645 | if (local->card_type == XIR_CE || local->card_type == XIR_CEM) { | 640 | if (local->card_type == XIR_CE || local->card_type == XIR_CEM) { |
646 | printk(KNOT_XIRC "Sorry, this is an old CE card\n"); | 641 | pr_notice("Sorry, this is an old CE card\n"); |
647 | return 0; | 642 | return 0; |
648 | } | 643 | } |
649 | if (local->card_type == XIR_UNKNOWN) | 644 | if (local->card_type == XIR_UNKNOWN) |
650 | printk(KNOT_XIRC "unknown card (mediaid=%02x prodid=%02x)\n", | 645 | pr_notice("unknown card (mediaid=%02x prodid=%02x)\n", mediaid, prodid); |
651 | mediaid, prodid); | ||
652 | 646 | ||
653 | return 1; | 647 | return 1; |
654 | } | 648 | } |
@@ -748,7 +742,7 @@ xirc2ps_config(struct pcmcia_device * link) | |||
748 | 742 | ||
749 | /* Is this a valid card */ | 743 | /* Is this a valid card */ |
750 | if (link->has_manf_id == 0) { | 744 | if (link->has_manf_id == 0) { |
751 | printk(KNOT_XIRC "manfid not found in CIS\n"); | 745 | pr_notice("manfid not found in CIS\n"); |
752 | goto failure; | 746 | goto failure; |
753 | } | 747 | } |
754 | 748 | ||
@@ -770,14 +764,14 @@ xirc2ps_config(struct pcmcia_device * link) | |||
770 | local->manf_str = "Toshiba"; | 764 | local->manf_str = "Toshiba"; |
771 | break; | 765 | break; |
772 | default: | 766 | default: |
773 | printk(KNOT_XIRC "Unknown Card Manufacturer ID: 0x%04x\n", | 767 | pr_notice("Unknown Card Manufacturer ID: 0x%04x\n", |
774 | (unsigned)link->manf_id); | 768 | (unsigned)link->manf_id); |
775 | goto failure; | 769 | goto failure; |
776 | } | 770 | } |
777 | dev_dbg(&link->dev, "found %s card\n", local->manf_str); | 771 | dev_dbg(&link->dev, "found %s card\n", local->manf_str); |
778 | 772 | ||
779 | if (!set_card_type(link)) { | 773 | if (!set_card_type(link)) { |
780 | printk(KNOT_XIRC "this card is not supported\n"); | 774 | pr_notice("this card is not supported\n"); |
781 | goto failure; | 775 | goto failure; |
782 | } | 776 | } |
783 | 777 | ||
@@ -803,7 +797,7 @@ xirc2ps_config(struct pcmcia_device * link) | |||
803 | err = pcmcia_loop_tuple(link, CISTPL_FUNCE, pcmcia_get_mac_ce, dev); | 797 | err = pcmcia_loop_tuple(link, CISTPL_FUNCE, pcmcia_get_mac_ce, dev); |
804 | 798 | ||
805 | if (err) { | 799 | if (err) { |
806 | printk(KNOT_XIRC "node-id not found in CIS\n"); | 800 | pr_notice("node-id not found in CIS\n"); |
807 | goto failure; | 801 | goto failure; |
808 | } | 802 | } |
809 | 803 | ||
@@ -838,7 +832,7 @@ xirc2ps_config(struct pcmcia_device * link) | |||
838 | * try to configure as Ethernet only. | 832 | * try to configure as Ethernet only. |
839 | * .... */ | 833 | * .... */ |
840 | } | 834 | } |
841 | printk(KNOT_XIRC "no ports available\n"); | 835 | pr_notice("no ports available\n"); |
842 | } else { | 836 | } else { |
843 | link->resource[0]->end = 16; | 837 | link->resource[0]->end = 16; |
844 | for (ioaddr = 0x300; ioaddr < 0x400; ioaddr += 0x10) { | 838 | for (ioaddr = 0x300; ioaddr < 0x400; ioaddr += 0x10) { |
@@ -911,24 +905,24 @@ xirc2ps_config(struct pcmcia_device * link) | |||
911 | #if 0 | 905 | #if 0 |
912 | { | 906 | { |
913 | u_char tmp; | 907 | u_char tmp; |
914 | printk(KERN_INFO "ECOR:"); | 908 | pr_info("ECOR:"); |
915 | for (i=0; i < 7; i++) { | 909 | for (i=0; i < 7; i++) { |
916 | tmp = readb(local->dingo_ccr + i*2); | 910 | tmp = readb(local->dingo_ccr + i*2); |
917 | printk(" %02x", tmp); | 911 | pr_cont(" %02x", tmp); |
918 | } | 912 | } |
919 | printk("\n"); | 913 | pr_cont("\n"); |
920 | printk(KERN_INFO "DCOR:"); | 914 | pr_info("DCOR:"); |
921 | for (i=0; i < 4; i++) { | 915 | for (i=0; i < 4; i++) { |
922 | tmp = readb(local->dingo_ccr + 0x20 + i*2); | 916 | tmp = readb(local->dingo_ccr + 0x20 + i*2); |
923 | printk(" %02x", tmp); | 917 | pr_cont(" %02x", tmp); |
924 | } | 918 | } |
925 | printk("\n"); | 919 | pr_cont("\n"); |
926 | printk(KERN_INFO "SCOR:"); | 920 | pr_info("SCOR:"); |
927 | for (i=0; i < 10; i++) { | 921 | for (i=0; i < 10; i++) { |
928 | tmp = readb(local->dingo_ccr + 0x40 + i*2); | 922 | tmp = readb(local->dingo_ccr + 0x40 + i*2); |
929 | printk(" %02x", tmp); | 923 | pr_cont(" %02x", tmp); |
930 | } | 924 | } |
931 | printk("\n"); | 925 | pr_cont("\n"); |
932 | } | 926 | } |
933 | #endif | 927 | #endif |
934 | 928 | ||
@@ -947,7 +941,7 @@ xirc2ps_config(struct pcmcia_device * link) | |||
947 | (local->mohawk && if_port==4)) | 941 | (local->mohawk && if_port==4)) |
948 | dev->if_port = if_port; | 942 | dev->if_port = if_port; |
949 | else | 943 | else |
950 | printk(KNOT_XIRC "invalid if_port requested\n"); | 944 | pr_notice("invalid if_port requested\n"); |
951 | 945 | ||
952 | /* we can now register the device with the net subsystem */ | 946 | /* we can now register the device with the net subsystem */ |
953 | dev->irq = link->irq; | 947 | dev->irq = link->irq; |
@@ -959,14 +953,14 @@ xirc2ps_config(struct pcmcia_device * link) | |||
959 | SET_NETDEV_DEV(dev, &link->dev); | 953 | SET_NETDEV_DEV(dev, &link->dev); |
960 | 954 | ||
961 | if ((err=register_netdev(dev))) { | 955 | if ((err=register_netdev(dev))) { |
962 | printk(KNOT_XIRC "register_netdev() failed\n"); | 956 | pr_notice("register_netdev() failed\n"); |
963 | goto config_error; | 957 | goto config_error; |
964 | } | 958 | } |
965 | 959 | ||
966 | /* give some infos about the hardware */ | 960 | /* give some infos about the hardware */ |
967 | printk(KERN_INFO "%s: %s: port %#3lx, irq %d, hwaddr %pM\n", | 961 | netdev_info(dev, "%s: port %#3lx, irq %d, hwaddr %pM\n", |
968 | dev->name, local->manf_str,(u_long)dev->base_addr, (int)dev->irq, | 962 | local->manf_str, (u_long)dev->base_addr, (int)dev->irq, |
969 | dev->dev_addr); | 963 | dev->dev_addr); |
970 | 964 | ||
971 | return 0; | 965 | return 0; |
972 | 966 | ||
@@ -1098,8 +1092,7 @@ xirc2ps_interrupt(int irq, void *dev_id) | |||
1098 | 1092 | ||
1099 | skb = dev_alloc_skb(pktlen+3); /* 1 extra so we can use insw */ | 1093 | skb = dev_alloc_skb(pktlen+3); /* 1 extra so we can use insw */ |
1100 | if (!skb) { | 1094 | if (!skb) { |
1101 | printk(KNOT_XIRC "low memory, packet dropped (size=%u)\n", | 1095 | pr_notice("low memory, packet dropped (size=%u)\n", pktlen); |
1102 | pktlen); | ||
1103 | dev->stats.rx_dropped++; | 1096 | dev->stats.rx_dropped++; |
1104 | } else { /* okay get the packet */ | 1097 | } else { /* okay get the packet */ |
1105 | skb_reserve(skb, 2); | 1098 | skb_reserve(skb, 2); |
@@ -1268,7 +1261,7 @@ xirc_tx_timeout(struct net_device *dev) | |||
1268 | { | 1261 | { |
1269 | local_info_t *lp = netdev_priv(dev); | 1262 | local_info_t *lp = netdev_priv(dev); |
1270 | dev->stats.tx_errors++; | 1263 | dev->stats.tx_errors++; |
1271 | printk(KERN_NOTICE "%s: transmit timed out\n", dev->name); | 1264 | netdev_notice(dev, "transmit timed out\n"); |
1272 | schedule_work(&lp->tx_timeout_task); | 1265 | schedule_work(&lp->tx_timeout_task); |
1273 | } | 1266 | } |
1274 | 1267 | ||
@@ -1435,8 +1428,7 @@ do_config(struct net_device *dev, struct ifmap *map) | |||
1435 | local->probe_port = 0; | 1428 | local->probe_port = 0; |
1436 | dev->if_port = map->port; | 1429 | dev->if_port = map->port; |
1437 | } | 1430 | } |
1438 | printk(KERN_INFO "%s: switching to %s port\n", | 1431 | netdev_info(dev, "switching to %s port\n", if_names[dev->if_port]); |
1439 | dev->name, if_names[dev->if_port]); | ||
1440 | do_reset(dev,1); /* not the fine way :-) */ | 1432 | do_reset(dev,1); /* not the fine way :-) */ |
1441 | } | 1433 | } |
1442 | return 0; | 1434 | return 0; |
@@ -1576,7 +1568,7 @@ do_reset(struct net_device *dev, int full) | |||
1576 | { | 1568 | { |
1577 | SelectPage(0); | 1569 | SelectPage(0); |
1578 | value = GetByte(XIRCREG_ESR); /* read the ESR */ | 1570 | value = GetByte(XIRCREG_ESR); /* read the ESR */ |
1579 | printk(KERN_DEBUG "%s: ESR is: %#02x\n", dev->name, value); | 1571 | pr_debug("%s: ESR is: %#02x\n", dev->name, value); |
1580 | } | 1572 | } |
1581 | #endif | 1573 | #endif |
1582 | 1574 | ||
@@ -1626,13 +1618,12 @@ do_reset(struct net_device *dev, int full) | |||
1626 | 1618 | ||
1627 | if (full && local->mohawk && init_mii(dev)) { | 1619 | if (full && local->mohawk && init_mii(dev)) { |
1628 | if (dev->if_port == 4 || local->dingo || local->new_mii) { | 1620 | if (dev->if_port == 4 || local->dingo || local->new_mii) { |
1629 | printk(KERN_INFO "%s: MII selected\n", dev->name); | 1621 | netdev_info(dev, "MII selected\n"); |
1630 | SelectPage(2); | 1622 | SelectPage(2); |
1631 | PutByte(XIRCREG2_MSR, GetByte(XIRCREG2_MSR) | 0x08); | 1623 | PutByte(XIRCREG2_MSR, GetByte(XIRCREG2_MSR) | 0x08); |
1632 | msleep(20); | 1624 | msleep(20); |
1633 | } else { | 1625 | } else { |
1634 | printk(KERN_INFO "%s: MII detected; using 10mbs\n", | 1626 | netdev_info(dev, "MII detected; using 10mbs\n"); |
1635 | dev->name); | ||
1636 | SelectPage(0x42); | 1627 | SelectPage(0x42); |
1637 | if (dev->if_port == 2) /* enable 10Base2 */ | 1628 | if (dev->if_port == 2) /* enable 10Base2 */ |
1638 | PutByte(XIRCREG42_SWC1, 0xC0); | 1629 | PutByte(XIRCREG42_SWC1, 0xC0); |
@@ -1677,8 +1668,8 @@ do_reset(struct net_device *dev, int full) | |||
1677 | } | 1668 | } |
1678 | 1669 | ||
1679 | if (full) | 1670 | if (full) |
1680 | printk(KERN_INFO "%s: media %s, silicon revision %d\n", | 1671 | netdev_info(dev, "media %s, silicon revision %d\n", |
1681 | dev->name, if_names[dev->if_port], local->silicon); | 1672 | if_names[dev->if_port], local->silicon); |
1682 | /* We should switch back to page 0 to avoid a bug in revision 0 | 1673 | /* We should switch back to page 0 to avoid a bug in revision 0 |
1683 | * where regs with offset below 8 can't be read after an access | 1674 | * where regs with offset below 8 can't be read after an access |
1684 | * to the MAC registers */ | 1675 | * to the MAC registers */ |
@@ -1720,8 +1711,7 @@ init_mii(struct net_device *dev) | |||
1720 | control = mii_rd(ioaddr, 0, 0); | 1711 | control = mii_rd(ioaddr, 0, 0); |
1721 | 1712 | ||
1722 | if (control & 0x0400) { | 1713 | if (control & 0x0400) { |
1723 | printk(KERN_NOTICE "%s can't take PHY out of isolation mode\n", | 1714 | netdev_notice(dev, "can't take PHY out of isolation mode\n"); |
1724 | dev->name); | ||
1725 | local->probe_port = 0; | 1715 | local->probe_port = 0; |
1726 | return 0; | 1716 | return 0; |
1727 | } | 1717 | } |
@@ -1739,8 +1729,7 @@ init_mii(struct net_device *dev) | |||
1739 | } | 1729 | } |
1740 | 1730 | ||
1741 | if (!(status & 0x0020)) { | 1731 | if (!(status & 0x0020)) { |
1742 | printk(KERN_INFO "%s: autonegotiation failed;" | 1732 | netdev_info(dev, "autonegotiation failed; using 10mbs\n"); |
1743 | " using 10mbs\n", dev->name); | ||
1744 | if (!local->new_mii) { | 1733 | if (!local->new_mii) { |
1745 | control = 0x0000; | 1734 | control = 0x0000; |
1746 | mii_wr(ioaddr, 0, 0, control, 16); | 1735 | mii_wr(ioaddr, 0, 0, control, 16); |
@@ -1750,8 +1739,7 @@ init_mii(struct net_device *dev) | |||
1750 | } | 1739 | } |
1751 | } else { | 1740 | } else { |
1752 | linkpartner = mii_rd(ioaddr, 0, 5); | 1741 | linkpartner = mii_rd(ioaddr, 0, 5); |
1753 | printk(KERN_INFO "%s: MII link partner: %04x\n", | 1742 | netdev_info(dev, "MII link partner: %04x\n", linkpartner); |
1754 | dev->name, linkpartner); | ||
1755 | if (linkpartner & 0x0080) { | 1743 | if (linkpartner & 0x0080) { |
1756 | dev->if_port = 4; | 1744 | dev->if_port = 4; |
1757 | } else | 1745 | } else |