aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/phy/mscc/mscc_main.c
diff options
context:
space:
mode:
authorAntoine Tenart <antoine.tenart@bootlin.com>2020-05-29 11:49:09 +0200
committerDavid S. Miller <davem@davemloft.net>2020-05-29 12:44:27 -0700
commit2684bda34786b6ae0944a4bacb7f59b5955979a8 (patch)
treeac15ea994eb0f3847e9339f18411647aecb66ecb /drivers/net/phy/mscc/mscc_main.c
parentnet: ethernet: mtk-star-emac: remove unused variable (diff)
downloadwireguard-linux-2684bda34786b6ae0944a4bacb7f59b5955979a8.tar.xz
wireguard-linux-2684bda34786b6ae0944a4bacb7f59b5955979a8.zip
net: phy: mscc: fix PHYs using the vsc8574_probe
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: deb04e9c0ff2 ("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>
Diffstat (limited to 'drivers/net/phy/mscc/mscc_main.c')
-rw-r--r--drivers/net/phy/mscc/mscc_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/phy/mscc/mscc_main.c b/drivers/net/phy/mscc/mscc_main.c
index 550acf547ced..7ed0285206d0 100644
--- a/drivers/net/phy/mscc/mscc_main.c
+++ b/drivers/net/phy/mscc/mscc_main.c
@@ -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;