linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* stmmac: fix phy naming inconsistency
@ 2012-01-24  9:26 Alessandro Rubini
  2012-01-24 11:06 ` Florian Fainelli
  0 siblings, 1 reply; 3+ messages in thread
From: Alessandro Rubini @ 2012-01-24  9:26 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: giancarlo.asnaghi, peppe.cavallaro, florian

After commit "db8857b stmmac: use an unique MDIO bus name" my
device stopped being probed because two different names were being
used in different places. This fixes the inconsistency.

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Florian Fainelli <florian@openwrt.org>
---

Before the commit, the phy was identified like this and stuff worked:

     PHY ID 20005c90 at 1 IRQ 0 (506:01) active

After that commit, I get 

     PHY ID 20005c90 at 1 IRQ 0 (STMMAC MII Bus-1:01) active
     PHY stmmac-1:01 not found

In one place, "stmmac" is a static string, on the other the commit
used the name field of the bus that was "STMMAC MII Bus", so I changed
this older string to be nicer -- without spaces.

Maybe the name is available where "stmmac" is spelled out, but I
didn't check.

Now it works for me:

    eth1: PHY ID 20005c90 at 1 IRQ 0 (stmmac-1:01) active
    PHY: stmmac-1:01 - Link is Up - 100/Full


 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index 6e712c5..819606e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -154,7 +154,7 @@ int stmmac_mdio_register(struct net_device *ndev)
 	else
 		irqlist = priv->mii_irq;
 
-	new_bus->name = "STMMAC MII Bus";
+	new_bus->name = "stmmac";
 	new_bus->read = &stmmac_mdio_read;
 	new_bus->write = &stmmac_mdio_write;
 	new_bus->reset = &stmmac_mdio_reset;
-- 
1.7.7.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: stmmac: fix phy naming inconsistency
  2012-01-24  9:26 stmmac: fix phy naming inconsistency Alessandro Rubini
@ 2012-01-24 11:06 ` Florian Fainelli
  2012-01-24 20:29   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2012-01-24 11:06 UTC (permalink / raw)
  To: Alessandro Rubini
  Cc: linux-kernel, netdev, giancarlo.asnaghi, peppe.cavallaro

Hello Alessandro,

On 01/24/12 10:26, Alessandro Rubini wrote:
> After commit "db8857b stmmac: use an unique MDIO bus name" my
> device stopped being probed because two different names were being
> used in different places. This fixes the inconsistency.
>
> Signed-off-by: Alessandro Rubini<rubini@gnudd.com>
> Acked-by: Giancarlo Asnaghi<giancarlo.asnaghi@st.com>
> Cc: Giuseppe Cavallaro<peppe.cavallaro@st.com>
> Cc: Florian Fainelli<florian@openwrt.org>

Acked-by: Florian Fainelli <florian@openwrt.org>

> ---
>
> Before the commit, the phy was identified like this and stuff worked:
>
>       PHY ID 20005c90 at 1 IRQ 0 (506:01) active
>
> After that commit, I get
>
>       PHY ID 20005c90 at 1 IRQ 0 (STMMAC MII Bus-1:01) active
>       PHY stmmac-1:01 not found
>
> In one place, "stmmac" is a static string, on the other the commit
> used the name field of the bus that was "STMMAC MII Bus", so I changed
> this older string to be nicer -- without spaces.
>
> Maybe the name is available where "stmmac" is spelled out, but I
> didn't check.
>
> Now it works for me:
>
>      eth1: PHY ID 20005c90 at 1 IRQ 0 (stmmac-1:01) active
>      PHY: stmmac-1:01 - Link is Up - 100/Full
>
>
>   drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> index 6e712c5..819606e 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> @@ -154,7 +154,7 @@ int stmmac_mdio_register(struct net_device *ndev)
>   	else
>   		irqlist = priv->mii_irq;
>
> -	new_bus->name = "STMMAC MII Bus";
> +	new_bus->name = "stmmac";
>   	new_bus->read =&stmmac_mdio_read;
>   	new_bus->write =&stmmac_mdio_write;
>   	new_bus->reset =&stmmac_mdio_reset;


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: stmmac: fix phy naming inconsistency
  2012-01-24 11:06 ` Florian Fainelli
@ 2012-01-24 20:29   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2012-01-24 20:29 UTC (permalink / raw)
  To: florian; +Cc: rubini, linux-kernel, netdev, giancarlo.asnaghi, peppe.cavallaro

From: Florian Fainelli <florian@openwrt.org>
Date: Tue, 24 Jan 2012 12:06:30 +0100

> Hello Alessandro,
> 
> On 01/24/12 10:26, Alessandro Rubini wrote:
>> After commit "db8857b stmmac: use an unique MDIO bus name" my
>> device stopped being probed because two different names were being
>> used in different places. This fixes the inconsistency.
>>
>> Signed-off-by: Alessandro Rubini<rubini@gnudd.com>
>> Acked-by: Giancarlo Asnaghi<giancarlo.asnaghi@st.com>
>> Cc: Giuseppe Cavallaro<peppe.cavallaro@st.com>
>> Cc: Florian Fainelli<florian@openwrt.org>
> 
> Acked-by: Florian Fainelli <florian@openwrt.org>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-24 20:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-24  9:26 stmmac: fix phy naming inconsistency Alessandro Rubini
2012-01-24 11:06 ` Florian Fainelli
2012-01-24 20:29   ` David Miller

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