Skip to content

Commit c04a17d

Browse files
ffainellidavem330
authored andcommitted
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: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5882d52 commit c04a17d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/dsa/bcm_sf2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,12 +1095,16 @@ static int bcm_sf2_sw_probe(struct platform_device *pdev)
10951095
return ret;
10961096
}
10971097

1098+
bcm_sf2_gphy_enable_set(priv->dev->ds, true);
1099+
10981100
ret = bcm_sf2_mdio_register(ds);
10991101
if (ret) {
11001102
pr_err("failed to register MDIO bus\n");
11011103
return ret;
11021104
}
11031105

1106+
bcm_sf2_gphy_enable_set(priv->dev->ds, false);
1107+
11041108
ret = bcm_sf2_cfp_rst(priv);
11051109
if (ret) {
11061110
pr_err("failed to reset CFP\n");

0 commit comments

Comments
 (0)