]> git.itanic.dy.fi Git - linux-stable/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 Dec 2019 08:17:23 +0000 (09:17 +0100)
commit5f2dc610eb281af3f9f19e39b5ddb07598f033be
tree432383cf5e380cd17ec692baadef05cc2c111f95
parent2ac94b9e902fa2abe9de0c9b8262fb9e147f4b3a
net: dsa: bcm_sf2: Turn on PHY to allow successful registration

[ Upstream commit c04a17d2a9ccf1eaba1c5a56f83e997540a70556 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/dsa/bcm_sf2.c