diff options
author | Joachim Eastwood <manabian@gmail.com> | 2012-11-07 03:14:56 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-07 17:44:38 -0500 |
commit | ed2b97d3537cd64ef9af2a090c8e8d99d99a0e37 (patch) | |
tree | b7c33def4d98ac62b8ba510cd100495611160121 /drivers/net/ethernet/cadence/at91_ether.c | |
parent | 4dda6f6d241c846a7783461ee66671866781e305 (diff) |
net/at91_ether: clean up print outs
Convert all printk's to netdev_ counterparts and fix up some
printed texts.
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cadence/at91_ether.c')
-rw-r--r-- | drivers/net/ethernet/cadence/at91_ether.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/net/ethernet/cadence/at91_ether.c b/drivers/net/ethernet/cadence/at91_ether.c index 67b66c4132dd..cf0cf0692197 100644 --- a/drivers/net/ethernet/cadence/at91_ether.c +++ b/drivers/net/ethernet/cadence/at91_ether.c | |||
@@ -60,7 +60,7 @@ static int at91ether_start(struct net_device *dev) | |||
60 | MAX_RX_DESCR * sizeof(struct macb_dma_desc), | 60 | MAX_RX_DESCR * sizeof(struct macb_dma_desc), |
61 | &lp->rx_ring_dma, GFP_KERNEL); | 61 | &lp->rx_ring_dma, GFP_KERNEL); |
62 | if (!lp->rx_ring) { | 62 | if (!lp->rx_ring) { |
63 | netdev_err(lp->dev, "unable to alloc rx ring DMA buffer\n"); | 63 | netdev_err(dev, "unable to alloc rx ring DMA buffer\n"); |
64 | return -ENOMEM; | 64 | return -ENOMEM; |
65 | } | 65 | } |
66 | 66 | ||
@@ -68,7 +68,7 @@ static int at91ether_start(struct net_device *dev) | |||
68 | MAX_RX_DESCR * MAX_RBUFF_SZ, | 68 | MAX_RX_DESCR * MAX_RBUFF_SZ, |
69 | &lp->rx_buffers_dma, GFP_KERNEL); | 69 | &lp->rx_buffers_dma, GFP_KERNEL); |
70 | if (!lp->rx_buffers) { | 70 | if (!lp->rx_buffers) { |
71 | netdev_err(lp->dev, "unable to alloc rx data DMA buffer\n"); | 71 | netdev_err(dev, "unable to alloc rx data DMA buffer\n"); |
72 | 72 | ||
73 | dma_free_coherent(&lp->pdev->dev, | 73 | dma_free_coherent(&lp->pdev->dev, |
74 | MAX_RX_DESCR * sizeof(struct macb_dma_desc), | 74 | MAX_RX_DESCR * sizeof(struct macb_dma_desc), |
@@ -189,7 +189,7 @@ static int at91ether_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
189 | macb_writel(lp, TCR, skb->len); | 189 | macb_writel(lp, TCR, skb->len); |
190 | 190 | ||
191 | } else { | 191 | } else { |
192 | printk(KERN_ERR "at91_ether.c: at91ether_start_xmit() called, but device is busy!\n"); | 192 | netdev_err(dev, "%s called, but device is busy!\n", __func__); |
193 | return NETDEV_TX_BUSY; /* if we return anything but zero, dev.c:1055 calls kfree_skb(skb) | 193 | return NETDEV_TX_BUSY; /* if we return anything but zero, dev.c:1055 calls kfree_skb(skb) |
194 | on this skb, he also reports -ENETDOWN and printk's, so either | 194 | on this skb, he also reports -ENETDOWN and printk's, so either |
195 | we free and return(0) or don't free and return 1 */ | 195 | we free and return(0) or don't free and return 1 */ |
@@ -279,7 +279,7 @@ static irqreturn_t at91ether_interrupt(int irq, void *dev_id) | |||
279 | } | 279 | } |
280 | 280 | ||
281 | if (intstatus & MACB_BIT(ISR_ROVR)) | 281 | if (intstatus & MACB_BIT(ISR_ROVR)) |
282 | printk("%s: ROVR error\n", dev->name); | 282 | netdev_err(dev, "ROVR error\n"); |
283 | 283 | ||
284 | return IRQ_HANDLED; | 284 | return IRQ_HANDLED; |
285 | } | 285 | } |
@@ -449,14 +449,11 @@ static int __init at91ether_probe(struct platform_device *pdev) | |||
449 | 449 | ||
450 | phydev = lp->phy_dev; | 450 | phydev = lp->phy_dev; |
451 | netdev_info(dev, "attached PHY driver [%s] (mii_bus:phy_addr=%s, irq=%d)\n", | 451 | netdev_info(dev, "attached PHY driver [%s] (mii_bus:phy_addr=%s, irq=%d)\n", |
452 | phydev->drv->name, dev_name(&phydev->dev), phydev->irq); | 452 | phydev->drv->name, dev_name(&phydev->dev), phydev->irq); |
453 | 453 | ||
454 | /* Display ethernet banner */ | 454 | /* Display ethernet banner */ |
455 | printk(KERN_INFO "%s: AT91 ethernet at 0x%08x int=%d %s%s (%pM)\n", | 455 | netdev_info(dev, "AT91 ethernet at 0x%08lx int=%d (%pM)\n", |
456 | dev->name, (uint) dev->base_addr, dev->irq, | 456 | dev->base_addr, dev->irq, dev->dev_addr); |
457 | macb_readl(lp, NCFGR) & MACB_BIT(SPD) ? "100-" : "10-", | ||
458 | macb_readl(lp, NCFGR) & MACB_BIT(FD) ? "FullDuplex" : "HalfDuplex", | ||
459 | dev->dev_addr); | ||
460 | 457 | ||
461 | return 0; | 458 | return 0; |
462 | 459 | ||