All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: dsa: do not use slave MII bus for fixed PHYs
@ 2015-03-14 20:21 Florian Fainelli
  2015-03-14 23:17 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2015-03-14 20:21 UTC (permalink / raw)
  To: netdev; +Cc: davem, Florian Fainelli

Commit cd28a1a9baee7 ("net: dsa: fully divert PHY reads/writes if
requested") introduced a check for particular PHYs that need to be
accessed using the slave MII bus created by DSA, but this check was too
inclusive. This would prevent fixed PHYs from being successfully
registered because those should not go through the slave MII bus created
by DSA.

Make sure we check that the PHY is not a fixed PHY to prevent that from
happening.

Fixes: cd28a1a9baee7 ("net: dsa: fully divert PHY reads/writes if requested")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
Hi David,

This change is only in net-next for now, thanks!

 net/dsa/slave.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 188b69773e70..6511552039d6 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -675,7 +675,8 @@ static int dsa_slave_phy_setup(struct dsa_slave_priv *p,
 		 * want to bind this device using the slave MII bus created by
 		 * DSA to make that happen.
 		 */
-		if (ret >= 0 && (ds->phys_mii_mask & (1 << ret))) {
+		if (!phy_is_fixed && ret >= 0 &&
+		    (ds->phys_mii_mask & (1 << ret))) {
 			ret = dsa_slave_phy_connect(p, slave_dev, ret);
 			if (ret)
 				return ret;
-- 
2.1.0

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

* Re: [PATCH net-next] net: dsa: do not use slave MII bus for fixed PHYs
  2015-03-14 20:21 [PATCH net-next] net: dsa: do not use slave MII bus for fixed PHYs Florian Fainelli
@ 2015-03-14 23:17 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-03-14 23:17 UTC (permalink / raw)
  To: f.fainelli; +Cc: netdev

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Sat, 14 Mar 2015 13:21:59 -0700

> Commit cd28a1a9baee7 ("net: dsa: fully divert PHY reads/writes if
> requested") introduced a check for particular PHYs that need to be
> accessed using the slave MII bus created by DSA, but this check was too
> inclusive. This would prevent fixed PHYs from being successfully
> registered because those should not go through the slave MII bus created
> by DSA.
> 
> Make sure we check that the PHY is not a fixed PHY to prevent that from
> happening.
> 
> Fixes: cd28a1a9baee7 ("net: dsa: fully divert PHY reads/writes if requested")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> Hi David,
> 
> This change is only in net-next for now, thanks!

Applied, thanks.

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

end of thread, other threads:[~2015-03-14 23:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-14 20:21 [PATCH net-next] net: dsa: do not use slave MII bus for fixed PHYs Florian Fainelli
2015-03-14 23:17 ` 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.