summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Dooks <ben.dooks@codethink.co.uk>2013-02-07 11:22:43 +0000
committerBen Dooks <ben.dooks@codethink.co.uk>2013-02-10 15:33:07 +0000
commitcf2b492f18a6e9f99bea4b6e593b90423d61529d (patch)
tree5ab32f8318c9e35fcfe43dcdef13e55a620a6c6f
parent836dc9e3fbbab0c30aa6e664417225f5c1fb1c39 (diff)
downloadlinux-cf2b492f18a6e9f99bea4b6e593b90423d61529d.tar.gz
net: calexdaxgmac: fix printing of hardware version
The current driver attempts to print netdev_info() before registering the network device and allowing the name to be set. Change this print to be after the network deviec has been registered, and thus has been allocated a network device name. Fix the following issue: calxedaxgmac fff50000.ethernet (unregistered net_device): h/w version is 0x1012 Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-rw-r--r--drivers/net/ethernet/calxeda/xgmac.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/calxeda/xgmac.c b/drivers/net/ethernet/calxeda/xgmac.c
index f7f02900f650..f91d9b2bae54 100644
--- a/drivers/net/ethernet/calxeda/xgmac.c
+++ b/drivers/net/ethernet/calxeda/xgmac.c
@@ -1715,9 +1715,6 @@ static int xgmac_probe(struct platform_device *pdev)
goto err_io;
}
- uid = readl(priv->base + XGMAC_VERSION);
- netdev_info(ndev, "h/w version is 0x%x\n", uid);
-
writel(0, priv->base + XGMAC_DMA_INTR_ENA);
ndev->irq = platform_get_irq(pdev, 0);
if (ndev->irq == -ENXIO) {
@@ -1771,6 +1768,9 @@ static int xgmac_probe(struct platform_device *pdev)
if (ret)
goto err_reg;
+ uid = readl(priv->base + XGMAC_VERSION);
+ netdev_info(ndev, "h/w version is 0x%x\n", uid);
+
return 0;
err_reg: