diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2009-05-26 08:35:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-26 23:35:04 -0400 |
commit | b93d584772347323334253d5b21c4d720718d7da (patch) | |
tree | 699d8849876f11362fa80a4792762049b1b0568b /drivers/net/8139cp.c | |
parent | 39738e161f7315bfa8f31a91d2262f93d818a7cd (diff) |
8139*: convert printk() to pr_<foo>()
Also convert DPRINTK to pr_debug and dev_printk to dev_<foo>.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/8139cp.c')
-rw-r--r-- | drivers/net/8139cp.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index 02330f3d5a55..c9fc0ff14a4d 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c | |||
@@ -471,8 +471,7 @@ static void cp_rx_err_acct (struct cp_private *cp, unsigned rx_tail, | |||
471 | u32 status, u32 len) | 471 | u32 status, u32 len) |
472 | { | 472 | { |
473 | if (netif_msg_rx_err (cp)) | 473 | if (netif_msg_rx_err (cp)) |
474 | printk (KERN_DEBUG | 474 | pr_debug("%s: rx err, slot %d status 0x%x len %d\n", |
475 | "%s: rx err, slot %d status 0x%x len %d\n", | ||
476 | cp->dev->name, rx_tail, status, len); | 475 | cp->dev->name, rx_tail, status, len); |
477 | cp->dev->stats.rx_errors++; | 476 | cp->dev->stats.rx_errors++; |
478 | if (status & RxErrFrame) | 477 | if (status & RxErrFrame) |
@@ -547,7 +546,7 @@ rx_status_loop: | |||
547 | } | 546 | } |
548 | 547 | ||
549 | if (netif_msg_rx_status(cp)) | 548 | if (netif_msg_rx_status(cp)) |
550 | printk(KERN_DEBUG "%s: rx slot %d status 0x%x len %d\n", | 549 | pr_debug("%s: rx slot %d status 0x%x len %d\n", |
551 | dev->name, rx_tail, status, len); | 550 | dev->name, rx_tail, status, len); |
552 | 551 | ||
553 | buflen = cp->rx_buf_sz + NET_IP_ALIGN; | 552 | buflen = cp->rx_buf_sz + NET_IP_ALIGN; |
@@ -626,7 +625,7 @@ static irqreturn_t cp_interrupt (int irq, void *dev_instance) | |||
626 | return IRQ_NONE; | 625 | return IRQ_NONE; |
627 | 626 | ||
628 | if (netif_msg_intr(cp)) | 627 | if (netif_msg_intr(cp)) |
629 | printk(KERN_DEBUG "%s: intr, status %04x cmd %02x cpcmd %04x\n", | 628 | pr_debug("%s: intr, status %04x cmd %02x cpcmd %04x\n", |
630 | dev->name, status, cpr8(Cmd), cpr16(CpCmd)); | 629 | dev->name, status, cpr8(Cmd), cpr16(CpCmd)); |
631 | 630 | ||
632 | cpw16(IntrStatus, status & ~cp_rx_intr_mask); | 631 | cpw16(IntrStatus, status & ~cp_rx_intr_mask); |
@@ -658,7 +657,7 @@ static irqreturn_t cp_interrupt (int irq, void *dev_instance) | |||
658 | 657 | ||
659 | pci_read_config_word(cp->pdev, PCI_STATUS, &pci_status); | 658 | pci_read_config_word(cp->pdev, PCI_STATUS, &pci_status); |
660 | pci_write_config_word(cp->pdev, PCI_STATUS, pci_status); | 659 | pci_write_config_word(cp->pdev, PCI_STATUS, pci_status); |
661 | printk(KERN_ERR "%s: PCI bus error, status=%04x, PCI status=%04x\n", | 660 | pr_err("%s: PCI bus error, status=%04x, PCI status=%04x\n", |
662 | dev->name, status, pci_status); | 661 | dev->name, status, pci_status); |
663 | 662 | ||
664 | /* TODO: reset hardware */ | 663 | /* TODO: reset hardware */ |
@@ -705,7 +704,7 @@ static void cp_tx (struct cp_private *cp) | |||
705 | if (status & LastFrag) { | 704 | if (status & LastFrag) { |
706 | if (status & (TxError | TxFIFOUnder)) { | 705 | if (status & (TxError | TxFIFOUnder)) { |
707 | if (netif_msg_tx_err(cp)) | 706 | if (netif_msg_tx_err(cp)) |
708 | printk(KERN_DEBUG "%s: tx err, status 0x%x\n", | 707 | pr_debug("%s: tx err, status 0x%x\n", |
709 | cp->dev->name, status); | 708 | cp->dev->name, status); |
710 | cp->dev->stats.tx_errors++; | 709 | cp->dev->stats.tx_errors++; |
711 | if (status & TxOWC) | 710 | if (status & TxOWC) |
@@ -722,7 +721,7 @@ static void cp_tx (struct cp_private *cp) | |||
722 | cp->dev->stats.tx_packets++; | 721 | cp->dev->stats.tx_packets++; |
723 | cp->dev->stats.tx_bytes += skb->len; | 722 | cp->dev->stats.tx_bytes += skb->len; |
724 | if (netif_msg_tx_done(cp)) | 723 | if (netif_msg_tx_done(cp)) |
725 | printk(KERN_DEBUG "%s: tx done, slot %d\n", cp->dev->name, tx_tail); | 724 | pr_debug("%s: tx done, slot %d\n", cp->dev->name, tx_tail); |
726 | } | 725 | } |
727 | dev_kfree_skb_irq(skb); | 726 | dev_kfree_skb_irq(skb); |
728 | } | 727 | } |
@@ -755,7 +754,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev) | |||
755 | if (TX_BUFFS_AVAIL(cp) <= (skb_shinfo(skb)->nr_frags + 1)) { | 754 | if (TX_BUFFS_AVAIL(cp) <= (skb_shinfo(skb)->nr_frags + 1)) { |
756 | netif_stop_queue(dev); | 755 | netif_stop_queue(dev); |
757 | spin_unlock_irqrestore(&cp->lock, intr_flags); | 756 | spin_unlock_irqrestore(&cp->lock, intr_flags); |
758 | printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n", | 757 | pr_err(PFX "%s: BUG! Tx Ring full when queue awake!\n", |
759 | dev->name); | 758 | dev->name); |
760 | return 1; | 759 | return 1; |
761 | } | 760 | } |
@@ -882,7 +881,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev) | |||
882 | } | 881 | } |
883 | cp->tx_head = entry; | 882 | cp->tx_head = entry; |
884 | if (netif_msg_tx_queued(cp)) | 883 | if (netif_msg_tx_queued(cp)) |
885 | printk(KERN_DEBUG "%s: tx queued, slot %d, skblen %d\n", | 884 | pr_debug("%s: tx queued, slot %d, skblen %d\n", |
886 | dev->name, entry, skb->len); | 885 | dev->name, entry, skb->len); |
887 | if (TX_BUFFS_AVAIL(cp) <= (MAX_SKB_FRAGS + 1)) | 886 | if (TX_BUFFS_AVAIL(cp) <= (MAX_SKB_FRAGS + 1)) |
888 | netif_stop_queue(dev); | 887 | netif_stop_queue(dev); |
@@ -996,7 +995,7 @@ static void cp_reset_hw (struct cp_private *cp) | |||
996 | schedule_timeout_uninterruptible(10); | 995 | schedule_timeout_uninterruptible(10); |
997 | } | 996 | } |
998 | 997 | ||
999 | printk(KERN_ERR "%s: hardware reset timeout\n", cp->dev->name); | 998 | pr_err("%s: hardware reset timeout\n", cp->dev->name); |
1000 | } | 999 | } |
1001 | 1000 | ||
1002 | static inline void cp_start_hw (struct cp_private *cp) | 1001 | static inline void cp_start_hw (struct cp_private *cp) |
@@ -1166,7 +1165,7 @@ static int cp_open (struct net_device *dev) | |||
1166 | int rc; | 1165 | int rc; |
1167 | 1166 | ||
1168 | if (netif_msg_ifup(cp)) | 1167 | if (netif_msg_ifup(cp)) |
1169 | printk(KERN_DEBUG "%s: enabling interface\n", dev->name); | 1168 | pr_debug("%s: enabling interface\n", dev->name); |
1170 | 1169 | ||
1171 | rc = cp_alloc_rings(cp); | 1170 | rc = cp_alloc_rings(cp); |
1172 | if (rc) | 1171 | if (rc) |
@@ -1201,7 +1200,7 @@ static int cp_close (struct net_device *dev) | |||
1201 | napi_disable(&cp->napi); | 1200 | napi_disable(&cp->napi); |
1202 | 1201 | ||
1203 | if (netif_msg_ifdown(cp)) | 1202 | if (netif_msg_ifdown(cp)) |
1204 | printk(KERN_DEBUG "%s: disabling interface\n", dev->name); | 1203 | pr_debug("%s: disabling interface\n", dev->name); |
1205 | 1204 | ||
1206 | spin_lock_irqsave(&cp->lock, flags); | 1205 | spin_lock_irqsave(&cp->lock, flags); |
1207 | 1206 | ||
@@ -1224,7 +1223,7 @@ static void cp_tx_timeout(struct net_device *dev) | |||
1224 | unsigned long flags; | 1223 | unsigned long flags; |
1225 | int rc; | 1224 | int rc; |
1226 | 1225 | ||
1227 | printk(KERN_WARNING "%s: Transmit timeout, status %2x %4x %4x %4x\n", | 1226 | pr_warning("%s: Transmit timeout, status %2x %4x %4x %4x\n", |
1228 | dev->name, cpr8(Cmd), cpr16(CpCmd), | 1227 | dev->name, cpr8(Cmd), cpr16(CpCmd), |
1229 | cpr16(IntrStatus), cpr16(IntrMask)); | 1228 | cpr16(IntrStatus), cpr16(IntrMask)); |
1230 | 1229 | ||
@@ -1873,7 +1872,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1873 | #ifndef MODULE | 1872 | #ifndef MODULE |
1874 | static int version_printed; | 1873 | static int version_printed; |
1875 | if (version_printed++ == 0) | 1874 | if (version_printed++ == 0) |
1876 | printk("%s", version); | 1875 | pr_info("%s", version); |
1877 | #endif | 1876 | #endif |
1878 | 1877 | ||
1879 | if (pdev->vendor == PCI_VENDOR_ID_REALTEK && | 1878 | if (pdev->vendor == PCI_VENDOR_ID_REALTEK && |
@@ -1995,8 +1994,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1995 | if (rc) | 1994 | if (rc) |
1996 | goto err_out_iomap; | 1995 | goto err_out_iomap; |
1997 | 1996 | ||
1998 | printk (KERN_INFO "%s: RTL-8139C+ at 0x%lx, " | 1997 | pr_info("%s: RTL-8139C+ at 0x%lx, %pM, IRQ %d\n", |
1999 | "%pM, IRQ %d\n", | ||
2000 | dev->name, | 1998 | dev->name, |
2001 | dev->base_addr, | 1999 | dev->base_addr, |
2002 | dev->dev_addr, | 2000 | dev->dev_addr, |
@@ -2113,7 +2111,7 @@ static struct pci_driver cp_driver = { | |||
2113 | static int __init cp_init (void) | 2111 | static int __init cp_init (void) |
2114 | { | 2112 | { |
2115 | #ifdef MODULE | 2113 | #ifdef MODULE |
2116 | printk("%s", version); | 2114 | pr_info("%s", version); |
2117 | #endif | 2115 | #endif |
2118 | return pci_register_driver(&cp_driver); | 2116 | return pci_register_driver(&cp_driver); |
2119 | } | 2117 | } |