diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2015-03-14 21:21:59 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-15 00:16:44 +0100 |
commit | 96026d057a1fb7da1e314a24e3a1c528321ed45e (patch) | |
tree | c6dab92b2cf8a51d83baec86ac95a03187263824 /net/dsa | |
parent | Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsh... (diff) | |
download | linux-96026d057a1fb7da1e314a24e3a1c528321ed45e.tar.xz linux-96026d057a1fb7da1e314a24e3a1c528321ed45e.zip |
net: dsa: do not use slave MII bus for fixed PHYs
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/slave.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |