]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: bcm_sf2: Turn on PHY to allow successful registration
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 6 Nov 2018 23:15:16 +0000 (15:15 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Nov 2018 23:39:48 +0000 (15:39 -0800)
commitb237d012181dd8b03d211b2c8ac2292270b5c07a
treec45fb9203f05e4eab6c2c06c4e86d582a80ac129
parent7583befe7523298a88eaa70eb2193ca4d4a3e714
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 <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/bcm_sf2.c