Skip to contentSkip to conversation

net: phy: mscc: fix PHYs using the vsc8574_probe

PATCH Applied Antoine Tenart 4 participants 4 messages May 29, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")

---

Hello,

While the patch has a Fixes: tag, it's sent to net-next as commit deb04e9c0ff2 only is in net-next. This patch do not have to be backported to any prior version.

Thanks!
Antoine

 drivers/net/phy/mscc/mscc_main.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/phy/mscc/mscc_main.c +4 -0
index 550acf547ced..7ed0285206d0 100644
@@ -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;
Signature · 1 line
2.26.2
Reviewed-by on v1 1/1
#1 lore raw

Am 29. Mai 2020 11:49:09 MESZ schrieb Antoine Tenart <[email protected]>:

Quoted 11 lines

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.

Quoted 2 lines
Fixes deb04e9c0ff2 ("net: phy: mscc: use phy_package_shared")

thanks,
-michael

Reviewed-by on v1 1/1
#2 lore raw
In reply to Antoine Tenart
Quoted 11 lines · Antoine Tenart

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.

Quoted 2 lines
Fixes deb04e9c0ff2 ("net: phy: mscc: use phy_package_shared")
Signature · 1 line
Florian
maintainer Applied
#3 lore raw
In reply to Antoine Tenart

From: Antoine Tenart <[email protected]>
Date: Fri, 29 May 2020 11:49:09 +0200

Quoted 11 lines

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.

Quoted 2 lines
Fixes deb04e9c0ff2 ("net: phy: mscc: use phy_package_shared")

Applied, thanks.