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

net: dsa: bcm_sf2: Turn on PHY to allow successful registration

We are binding to the PHY using the SF2 slave MDIO bus that we create,
binding involves reading the PHY's MII_PHYSID1/2 which won't be possible
if the PHY is turned off. Temporarily turn it on/off for the bus probing
to succeeed. This fixes unbind/bind problems where the port connecting
to that PHY would be in error since it could not connect to it.
Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5882d526
...@@ -1095,12 +1095,16 @@ static int bcm_sf2_sw_probe(struct platform_device *pdev) ...@@ -1095,12 +1095,16 @@ static int bcm_sf2_sw_probe(struct platform_device *pdev)
return ret; return ret;
} }
bcm_sf2_gphy_enable_set(priv->dev->ds, true);
ret = bcm_sf2_mdio_register(ds); ret = bcm_sf2_mdio_register(ds);
if (ret) { if (ret) {
pr_err("failed to register MDIO bus\n"); pr_err("failed to register MDIO bus\n");
return ret; return ret;
} }
bcm_sf2_gphy_enable_set(priv->dev->ds, false);
ret = bcm_sf2_cfp_rst(priv); ret = bcm_sf2_cfp_rst(priv);
if (ret) { if (ret) {
pr_err("failed to reset CFP\n"); pr_err("failed to reset CFP\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册