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/fmvj18x_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/fmvj18x_cs.c')
-rw-r--r-- | drivers/net/pcmcia/fmvj18x_cs.c | 60 |
1 files changed, 30 insertions, 30 deletions
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; |