Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150496
b: refs/heads/master
c: b93d584
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Beregalov authored and David S. Miller committed May 27, 2009
1 parent ced861d commit 80341e2
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 85 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 39738e161f7315bfa8f31a91d2262f93d818a7cd
refs/heads/master: b93d584772347323334253d5b21c4d720718d7da
32 changes: 15 additions & 17 deletions trunk/drivers/net/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,7 @@ static void cp_rx_err_acct (struct cp_private *cp, unsigned rx_tail,
u32 status, u32 len)
{
if (netif_msg_rx_err (cp))
printk (KERN_DEBUG
"%s: rx err, slot %d status 0x%x len %d\n",
pr_debug("%s: rx err, slot %d status 0x%x len %d\n",
cp->dev->name, rx_tail, status, len);
cp->dev->stats.rx_errors++;
if (status & RxErrFrame)
Expand Down Expand Up @@ -547,7 +546,7 @@ static int cp_rx_poll(struct napi_struct *napi, int budget)
}

if (netif_msg_rx_status(cp))
printk(KERN_DEBUG "%s: rx slot %d status 0x%x len %d\n",
pr_debug("%s: rx slot %d status 0x%x len %d\n",
dev->name, rx_tail, status, len);

buflen = cp->rx_buf_sz + NET_IP_ALIGN;
Expand Down Expand Up @@ -626,7 +625,7 @@ static irqreturn_t cp_interrupt (int irq, void *dev_instance)
return IRQ_NONE;

if (netif_msg_intr(cp))
printk(KERN_DEBUG "%s: intr, status %04x cmd %02x cpcmd %04x\n",
pr_debug("%s: intr, status %04x cmd %02x cpcmd %04x\n",
dev->name, status, cpr8(Cmd), cpr16(CpCmd));

cpw16(IntrStatus, status & ~cp_rx_intr_mask);
Expand Down Expand Up @@ -658,7 +657,7 @@ static irqreturn_t cp_interrupt (int irq, void *dev_instance)

pci_read_config_word(cp->pdev, PCI_STATUS, &pci_status);
pci_write_config_word(cp->pdev, PCI_STATUS, pci_status);
printk(KERN_ERR "%s: PCI bus error, status=%04x, PCI status=%04x\n",
pr_err("%s: PCI bus error, status=%04x, PCI status=%04x\n",
dev->name, status, pci_status);

/* TODO: reset hardware */
Expand Down Expand Up @@ -705,7 +704,7 @@ static void cp_tx (struct cp_private *cp)
if (status & LastFrag) {
if (status & (TxError | TxFIFOUnder)) {
if (netif_msg_tx_err(cp))
printk(KERN_DEBUG "%s: tx err, status 0x%x\n",
pr_debug("%s: tx err, status 0x%x\n",
cp->dev->name, status);
cp->dev->stats.tx_errors++;
if (status & TxOWC)
Expand All @@ -722,7 +721,7 @@ static void cp_tx (struct cp_private *cp)
cp->dev->stats.tx_packets++;
cp->dev->stats.tx_bytes += skb->len;
if (netif_msg_tx_done(cp))
printk(KERN_DEBUG "%s: tx done, slot %d\n", cp->dev->name, tx_tail);
pr_debug("%s: tx done, slot %d\n", cp->dev->name, tx_tail);
}
dev_kfree_skb_irq(skb);
}
Expand Down Expand Up @@ -755,7 +754,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
if (TX_BUFFS_AVAIL(cp) <= (skb_shinfo(skb)->nr_frags + 1)) {
netif_stop_queue(dev);
spin_unlock_irqrestore(&cp->lock, intr_flags);
printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n",
pr_err(PFX "%s: BUG! Tx Ring full when queue awake!\n",
dev->name);
return 1;
}
Expand Down Expand Up @@ -882,7 +881,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
}
cp->tx_head = entry;
if (netif_msg_tx_queued(cp))
printk(KERN_DEBUG "%s: tx queued, slot %d, skblen %d\n",
pr_debug("%s: tx queued, slot %d, skblen %d\n",
dev->name, entry, skb->len);
if (TX_BUFFS_AVAIL(cp) <= (MAX_SKB_FRAGS + 1))
netif_stop_queue(dev);
Expand Down Expand Up @@ -996,7 +995,7 @@ static void cp_reset_hw (struct cp_private *cp)
schedule_timeout_uninterruptible(10);
}

printk(KERN_ERR "%s: hardware reset timeout\n", cp->dev->name);
pr_err("%s: hardware reset timeout\n", cp->dev->name);
}

static inline void cp_start_hw (struct cp_private *cp)
Expand Down Expand Up @@ -1166,7 +1165,7 @@ static int cp_open (struct net_device *dev)
int rc;

if (netif_msg_ifup(cp))
printk(KERN_DEBUG "%s: enabling interface\n", dev->name);
pr_debug("%s: enabling interface\n", dev->name);

rc = cp_alloc_rings(cp);
if (rc)
Expand Down Expand Up @@ -1201,7 +1200,7 @@ static int cp_close (struct net_device *dev)
napi_disable(&cp->napi);

if (netif_msg_ifdown(cp))
printk(KERN_DEBUG "%s: disabling interface\n", dev->name);
pr_debug("%s: disabling interface\n", dev->name);

spin_lock_irqsave(&cp->lock, flags);

Expand All @@ -1224,7 +1223,7 @@ static void cp_tx_timeout(struct net_device *dev)
unsigned long flags;
int rc;

printk(KERN_WARNING "%s: Transmit timeout, status %2x %4x %4x %4x\n",
pr_warning("%s: Transmit timeout, status %2x %4x %4x %4x\n",
dev->name, cpr8(Cmd), cpr16(CpCmd),
cpr16(IntrStatus), cpr16(IntrMask));

Expand Down Expand Up @@ -1873,7 +1872,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
#ifndef MODULE
static int version_printed;
if (version_printed++ == 0)
printk("%s", version);
pr_info("%s", version);
#endif

if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
Expand Down Expand Up @@ -1995,8 +1994,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
if (rc)
goto err_out_iomap;

printk (KERN_INFO "%s: RTL-8139C+ at 0x%lx, "
"%pM, IRQ %d\n",
pr_info("%s: RTL-8139C+ at 0x%lx, %pM, IRQ %d\n",
dev->name,
dev->base_addr,
dev->dev_addr,
Expand Down Expand Up @@ -2113,7 +2111,7 @@ static struct pci_driver cp_driver = {
static int __init cp_init (void)
{
#ifdef MODULE
printk("%s", version);
pr_info("%s", version);
#endif
return pci_register_driver(&cp_driver);
}
Expand Down
Loading

0 comments on commit 80341e2

Please sign in to comment.