diff mbox

[15/17] xgmac: fix printing of hardware version

Message ID 1360365467-25056-16-git-send-email-ben.dooks@codethink.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Dooks Feb. 8, 2013, 11:17 p.m. UTC
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.

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(-)

Comments

Russell King - ARM Linux Feb. 9, 2013, 12:10 p.m. UTC | #1
On Fri, Feb 08, 2013 at 11:17:45PM +0000, Ben Dooks wrote:
> 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.

typo: device
Ben Dooks Feb. 9, 2013, 5:20 p.m. UTC | #2
On 09/02/2013 12:10, Russell King - ARM Linux wrote:
> On Fri, Feb 08, 2013 at 11:17:45PM +0000, Ben Dooks wrote:
>> 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.
>
> typo: device

Thanks. I'll send this patch to the netdev list, forgot to remove it 
from
here.
Rob Herring Feb. 9, 2013, 9:35 p.m. UTC | #3
On 02/08/2013 05:17 PM, Ben Dooks wrote:
> 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.
> 
> 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>
> ---

Please post to netdev list.

Acked-by: Rob Herring <rob.herring@calxeda.com>

>  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:
>
diff mbox

Patch

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: