linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: phy: mscc: fix PHYs using the vsc8574_probe
@ 2020-05-29  9:49 Antoine Tenart
  2020-05-29 11:11 ` Michael Walle
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Antoine Tenart @ 2020-05-29  9:49 UTC (permalink / raw)
  To: davem, andrew, f.fainelli, hkallweit1
  Cc: Antoine Tenart, michael, netdev, linux-kernel

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>
---

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(+)

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;
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: phy: mscc: fix PHYs using the vsc8574_probe
  2020-05-29  9:49 [PATCH net-next] net: phy: mscc: fix PHYs using the vsc8574_probe Antoine Tenart
@ 2020-05-29 11:11 ` Michael Walle
  2020-05-29 15:45 ` Florian Fainelli
  2020-05-29 19:45 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Walle @ 2020-05-29 11:11 UTC (permalink / raw)
  To: Antoine Tenart, davem, andrew, f.fainelli, hkallweit1
  Cc: netdev, linux-kernel

Am 29. Mai 2020 11:49:09 MESZ schrieb Antoine Tenart <antoine.tenart@bootlin.com>:
>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>

thanks, 
-michael


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: phy: mscc: fix PHYs using the vsc8574_probe
  2020-05-29  9:49 [PATCH net-next] net: phy: mscc: fix PHYs using the vsc8574_probe Antoine Tenart
  2020-05-29 11:11 ` Michael Walle
@ 2020-05-29 15:45 ` Florian Fainelli
  2020-05-29 19:45 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2020-05-29 15:45 UTC (permalink / raw)
  To: Antoine Tenart, davem, andrew, hkallweit1; +Cc: michael, netdev, linux-kernel



On 5/29/2020 2:49 AM, Antoine Tenart wrote:
> 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: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: phy: mscc: fix PHYs using the vsc8574_probe
  2020-05-29  9:49 [PATCH net-next] net: phy: mscc: fix PHYs using the vsc8574_probe Antoine Tenart
  2020-05-29 11:11 ` Michael Walle
  2020-05-29 15:45 ` Florian Fainelli
@ 2020-05-29 19:45 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2020-05-29 19:45 UTC (permalink / raw)
  To: antoine.tenart
  Cc: andrew, f.fainelli, hkallweit1, michael, netdev, linux-kernel

From: Antoine Tenart <antoine.tenart@bootlin.com>
Date: Fri, 29 May 2020 11:49:09 +0200

> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-29 19:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-29  9:49 [PATCH net-next] net: phy: mscc: fix PHYs using the vsc8574_probe Antoine Tenart
2020-05-29 11:11 ` Michael Walle
2020-05-29 15:45 ` Florian Fainelli
2020-05-29 19:45 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).