Log the MAC address after the interface gets a meaningful name and in doing so, make the registration error path more idiomatic. Drop redundant debug messages for FIFO events recorded in the interface statistics (consistent with mace.c).
Signed-off-by: Finn Thain <fth...@telegraphics.com.au> Tested-by: Stan Johnson <user...@yahoo.com> --- drivers/net/ethernet/apple/macmace.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/apple/macmace.c b/drivers/net/ethernet/apple/macmace.c index f17a160dbff2..54c1f1c2f54a 100644 --- a/drivers/net/ethernet/apple/macmace.c +++ b/drivers/net/ethernet/apple/macmace.c @@ -247,13 +247,14 @@ static int mace_probe(struct platform_device *pdev) dev->netdev_ops = &mace_netdev_ops; dev->watchdog_timeo = TX_TIMEOUT; - printk(KERN_INFO "%s: 68K MACE, hardware address %pM\n", - dev->name, dev->dev_addr); - err = register_netdev(dev); - if (!err) - return 0; + if (err) + goto out_free; + + netdev_info(dev, "MAC %pM, IRQ %d\n", dev->dev_addr, dev->irq); + return 0; +out_free: free_netdev(dev); return err; } @@ -589,7 +590,6 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id) else if (fs & (UFLO|LCOL|RTRY)) { ++dev->stats.tx_aborted_errors; if (mb->xmtfs & UFLO) { - printk(KERN_ERR "%s: DMA underrun.\n", dev->name); dev->stats.tx_fifo_errors++; mace_txdma_reset(dev); } @@ -644,10 +644,8 @@ static void mace_dma_rx_frame(struct net_device *dev, struct mace_frame *mf) if (frame_status & (RS_OFLO | RS_CLSN | RS_FRAMERR | RS_FCSERR)) { dev->stats.rx_errors++; - if (frame_status & RS_OFLO) { - printk(KERN_DEBUG "%s: fifo overflow.\n", dev->name); + if (frame_status & RS_OFLO) dev->stats.rx_fifo_errors++; - } if (frame_status & RS_CLSN) dev->stats.collisions++; if (frame_status & RS_FRAMERR) -- 2.13.5