All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] net: stmmac: Don't search for phys if mdio node is defined.
@ 2016-03-15  7:34 Phil Reid
  2016-03-15  7:34 ` [PATCH 1/1] " Phil Reid
  0 siblings, 1 reply; 5+ messages in thread
From: Phil Reid @ 2016-03-15  7:34 UTC (permalink / raw)
  To: peppe.cavallaro, netdev; +Cc: Phil Reid

If a dt mdio entry has been added least assume that we wont
search for phys attached. The DT and of_mdiobus_register already do
this. This stops DSA phys being found and phys created for them, as
this is handled by the DSA driver.

Note: I'm not 100% sure that priv->plat->phy_node should be included
in the conditional here. But it looks like if a phy-handle is used
then we don't want to search for phys.

Phil Reid (1):
  net: stmmac: Don't search for phys if mdio node is defined.

 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 4 ++++
 1 file changed, 4 insertions(+)

-- 
1.8.3.1

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

* [PATCH 1/1] net: stmmac: Don't search for phys if mdio node is defined.
  2016-03-15  7:34 [PATCH 0/1] net: stmmac: Don't search for phys if mdio node is defined Phil Reid
@ 2016-03-15  7:34 ` Phil Reid
  2016-03-16  9:36   ` Giuseppe CAVALLARO
  2016-03-18 22:31   ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Phil Reid @ 2016-03-15  7:34 UTC (permalink / raw)
  To: peppe.cavallaro, netdev; +Cc: Phil Reid

If a dt mdio entry has been added least assume that we wont
search for phys attached. The DT and of_mdiobus_register already do
this. This stops DSA phys being found and phys created for them, as
this is handled by the DSA driver.

Signed-off-by: Phil Reid <preid@electromag.com.au>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index 3f5512f..06704ca 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -235,6 +235,9 @@ int stmmac_mdio_register(struct net_device *ndev)
 		goto bus_register_fail;
 	}
 
+	if (priv->plat->phy_node || mdio_node)
+		goto bus_register_done;
+
 	found = 0;
 	for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
 		struct phy_device *phydev = mdiobus_get_phy(new_bus, addr);
@@ -290,6 +293,7 @@ int stmmac_mdio_register(struct net_device *ndev)
 		return -ENODEV;
 	}
 
+bus_register_done:
 	priv->mii = new_bus;
 
 	return 0;
-- 
1.8.3.1

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

* Re: [PATCH 1/1] net: stmmac: Don't search for phys if mdio node is defined.
  2016-03-15  7:34 ` [PATCH 1/1] " Phil Reid
@ 2016-03-16  9:36   ` Giuseppe CAVALLARO
  2016-03-16 13:18     ` Phil Reid
  2016-03-18 22:31   ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Giuseppe CAVALLARO @ 2016-03-16  9:36 UTC (permalink / raw)
  To: Phil Reid, netdev

On 3/15/2016 8:34 AM, Phil Reid wrote:
> If a dt mdio entry has been added least assume that we wont
> search for phys attached. The DT and of_mdiobus_register already do
> this. This stops DSA phys being found and phys created for them, as
> this is handled by the DSA driver.

iiuc, this doesn't conflict with the recent rework we are doing
for the mdio/phy platform management.

> Signed-off-by: Phil Reid <preid@electromag.com.au>

Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>

> ---
>   drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> index 3f5512f..06704ca 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> @@ -235,6 +235,9 @@ int stmmac_mdio_register(struct net_device *ndev)
>   		goto bus_register_fail;
>   	}
>
> +	if (priv->plat->phy_node || mdio_node)
> +		goto bus_register_done;
> +
>   	found = 0;
>   	for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
>   		struct phy_device *phydev = mdiobus_get_phy(new_bus, addr);
> @@ -290,6 +293,7 @@ int stmmac_mdio_register(struct net_device *ndev)
>   		return -ENODEV;
>   	}
>
> +bus_register_done:
>   	priv->mii = new_bus;
>
>   	return 0;
>

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

* Re: [PATCH 1/1] net: stmmac: Don't search for phys if mdio node is defined.
  2016-03-16  9:36   ` Giuseppe CAVALLARO
@ 2016-03-16 13:18     ` Phil Reid
  0 siblings, 0 replies; 5+ messages in thread
From: Phil Reid @ 2016-03-16 13:18 UTC (permalink / raw)
  To: Giuseppe CAVALLARO, netdev

On 16/03/2016 5:36 PM, Giuseppe CAVALLARO wrote:
> On 3/15/2016 8:34 AM, Phil Reid wrote:
>> If a dt mdio entry has been added least assume that we wont
>> search for phys attached. The DT and of_mdiobus_register already do
>> this. This stops DSA phys being found and phys created for them, as
>> this is handled by the DSA driver.
>
> iiuc, this doesn't conflict with the recent rework we are doing
> for the mdio/phy platform management.

It should apply equally well before or after the rework.


>
>> Signed-off-by: Phil Reid <preid@electromag.com.au>
>
> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
>
>> ---
>>   drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
>> index 3f5512f..06704ca 100644
>> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
>> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
>> @@ -235,6 +235,9 @@ int stmmac_mdio_register(struct net_device *ndev)
>>           goto bus_register_fail;
>>       }
>>
>> +    if (priv->plat->phy_node || mdio_node)
>> +        goto bus_register_done;
>> +
>>       found = 0;
>>       for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
>>           struct phy_device *phydev = mdiobus_get_phy(new_bus, addr);
>> @@ -290,6 +293,7 @@ int stmmac_mdio_register(struct net_device *ndev)
>>           return -ENODEV;
>>       }
>>
>> +bus_register_done:
>>       priv->mii = new_bus;
>>
>>       return 0;
>>
>
>
>


-- 
Regards
Phil Reid

ElectroMagnetic Imaging Technology Pty Ltd
Development of Geophysical Instrumentation & Software
www.electromag.com.au

3 The Avenue, Midland WA 6056, AUSTRALIA
Ph: +61 8 9250 8100
Fax: +61 8 9250 7100
Email: preid@electromag.com.au

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

* Re: [PATCH 1/1] net: stmmac: Don't search for phys if mdio node is defined.
  2016-03-15  7:34 ` [PATCH 1/1] " Phil Reid
  2016-03-16  9:36   ` Giuseppe CAVALLARO
@ 2016-03-18 22:31   ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2016-03-18 22:31 UTC (permalink / raw)
  To: preid; +Cc: peppe.cavallaro, netdev

From: Phil Reid <preid@electromag.com.au>
Date: Tue, 15 Mar 2016 15:34:33 +0800

> If a dt mdio entry has been added least assume that we wont
> search for phys attached. The DT and of_mdiobus_register already do
> this. This stops DSA phys being found and phys created for them, as
> this is handled by the DSA driver.
> 
> Signed-off-by: Phil Reid <preid@electromag.com.au>

Applied.

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

end of thread, other threads:[~2016-03-18 22:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-15  7:34 [PATCH 0/1] net: stmmac: Don't search for phys if mdio node is defined Phil Reid
2016-03-15  7:34 ` [PATCH 1/1] " Phil Reid
2016-03-16  9:36   ` Giuseppe CAVALLARO
2016-03-16 13:18     ` Phil Reid
2016-03-18 22:31   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.