From: Ben Dooks <ben.dooks@codethink.co.uk>
To: netdev@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
Ben Dooks <ben.dooks@codethink.co.uk>,
"David S. Miller" <davem@davemloft.net>,
Rob Herring <rob.herring@calxeda.com>
Subject: [PATCH 1/2] net: calexdaxgmac: fix printing of hardware version
Date: Sun, 10 Feb 2013 15:38:40 +0000 [thread overview]
Message-ID: <1360510721-17860-2-git-send-email-ben.dooks@codethink.co.uk> (raw)
In-Reply-To: <1360510721-17860-1-git-send-email-ben.dooks@codethink.co.uk>
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>
---
drivers/net/ethernet/calxeda/xgmac.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/calxeda/xgmac.c b/drivers/net/ethernet/calxeda/xgmac.c
index f7f0290..f91d9b2 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:
--
1.7.10.4
next prev parent reply other threads:[~2013-02-10 15:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-10 15:38 calexda/xgmac bug fixes Ben Dooks
2013-02-10 15:38 ` Ben Dooks [this message]
2013-02-10 22:34 ` [PATCH 1/2] net: calexdaxgmac: fix printing of hardware version Rob Herring
2013-02-11 10:59 ` Ben Dooks
2013-02-10 15:38 ` [PATCH 2/2] net: calexdaxgmac: fixup endian issues after __raw IO function change Ben Dooks
2013-02-10 22:32 ` Rob Herring
2013-02-11 18:17 ` Ben Hutchings
2013-02-11 18:27 ` Ben Dooks
2013-02-12 9:19 ` David Laight
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1360510721-17860-2-git-send-email-ben.dooks@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=davem@davemloft.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=rob.herring@calxeda.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).