Skip to content

Commit

Permalink
net: phy: mscc: fix PHYs using the vsc8574_probe
Browse files Browse the repository at this point in the history
PHYs using the vsc8574_probe fail to be initialized and their
config_init return -EIO leading to errors like:
"could not attach PHY: -5".

This is because when the conversion of the MSCC PHY driver to use the
shared PHY package helpers was done, the base address retrieval and the
base PHY read and write helpers in the driver were modified. In
particular, the base address retrieval logic was moved from the
config_init to the probe. But the vsc8574_probe was forgotten. This
patch fixes it.

Fixes: deb04e9 ("net: phy: mscc: use phy_package_shared")
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Antoine Tenart authored and David S. Miller committed May 29, 2020
1 parent 09b547a commit 2684bda
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/phy/mscc/mscc_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1977,6 +1977,10 @@ static int vsc8574_probe(struct phy_device *phydev)

phydev->priv = vsc8531;

vsc8584_get_base_addr(phydev);
devm_phy_package_join(&phydev->mdio.dev, phydev,
vsc8531->base_addr, 0);

vsc8531->nleds = 4;
vsc8531->supp_led_modes = VSC8584_SUPP_LED_MODES;
vsc8531->hw_stats = vsc8584_hw_stats;
Expand Down

0 comments on commit 2684bda

Please sign in to comment.