提交 96026d05 编写于 作者: F Florian Fainelli 提交者: David S. Miller

net: dsa: do not use slave MII bus for fixed PHYs

Commit cd28a1a9 ("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: cd28a1a9 ("net: dsa: fully divert PHY reads/writes if requested")
Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 316ad4be
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册