netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net: phy: mscc: fix Serdes configuration in vsc8584_config_init
@ 2020-06-05 14:00 Antoine Tenart
  2020-06-05 16:31 ` Florian Fainelli
  2020-06-05 20:16 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Antoine Tenart @ 2020-06-05 14:00 UTC (permalink / raw)
  To: davem, andrew, f.fainelli, hkallweit1
  Cc: Antoine Tenart, michael, netdev, linux-kernel

When converting the MSCC PHY driver to shared PHY packages, the Serdes
configuration in vsc8584_config_init was modified to use 'base_addr'
instead of 'base' as the port number. But 'base_addr' isn't equal to
'addr' for all PHYs inside the package, which leads to the Serdes still
being enabled on those ports. This patch fixes it.

Fixes: deb04e9c0ff2 ("net: phy: mscc: use phy_package_shared")
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
---
 drivers/net/phy/mscc/mscc_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/mscc/mscc_main.c b/drivers/net/phy/mscc/mscc_main.c
index 7ed0285206d0..24687ac5ee14 100644
--- a/drivers/net/phy/mscc/mscc_main.c
+++ b/drivers/net/phy/mscc/mscc_main.c
@@ -1396,7 +1396,7 @@ static int vsc8584_config_init(struct phy_device *phydev)
 
 	/* Disable SerDes for 100Base-FX */
 	ret = vsc8584_cmd(phydev, PROC_CMD_FIBER_MEDIA_CONF |
-			  PROC_CMD_FIBER_PORT(vsc8531->base_addr) |
+			  PROC_CMD_FIBER_PORT(vsc8531->addr) |
 			  PROC_CMD_FIBER_DISABLE |
 			  PROC_CMD_READ_MOD_WRITE_PORT |
 			  PROC_CMD_RST_CONF_PORT | PROC_CMD_FIBER_100BASE_FX);
@@ -1405,7 +1405,7 @@ static int vsc8584_config_init(struct phy_device *phydev)
 
 	/* Disable SerDes for 1000Base-X */
 	ret = vsc8584_cmd(phydev, PROC_CMD_FIBER_MEDIA_CONF |
-			  PROC_CMD_FIBER_PORT(vsc8531->base_addr) |
+			  PROC_CMD_FIBER_PORT(vsc8531->addr) |
 			  PROC_CMD_FIBER_DISABLE |
 			  PROC_CMD_READ_MOD_WRITE_PORT |
 			  PROC_CMD_RST_CONF_PORT | PROC_CMD_FIBER_1000BASE_X);
-- 
2.26.2


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

* Re: [PATCH net] net: phy: mscc: fix Serdes configuration in vsc8584_config_init
  2020-06-05 14:00 [PATCH net] net: phy: mscc: fix Serdes configuration in vsc8584_config_init Antoine Tenart
@ 2020-06-05 16:31 ` Florian Fainelli
  2020-06-05 20:16 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2020-06-05 16:31 UTC (permalink / raw)
  To: Antoine Tenart, davem, andrew, hkallweit1; +Cc: michael, netdev, linux-kernel



On 6/5/2020 7:00 AM, Antoine Tenart wrote:
> When converting the MSCC PHY driver to shared PHY packages, the Serdes
> configuration in vsc8584_config_init was modified to use 'base_addr'
> instead of 'base' as the port number. But 'base_addr' isn't equal to
> 'addr' for all PHYs inside the package, which leads to the Serdes still
> being enabled on those ports. 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] 3+ messages in thread

* Re: [PATCH net] net: phy: mscc: fix Serdes configuration in vsc8584_config_init
  2020-06-05 14:00 [PATCH net] net: phy: mscc: fix Serdes configuration in vsc8584_config_init Antoine Tenart
  2020-06-05 16:31 ` Florian Fainelli
@ 2020-06-05 20:16 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-06-05 20:16 UTC (permalink / raw)
  To: antoine.tenart
  Cc: andrew, f.fainelli, hkallweit1, michael, netdev, linux-kernel

From: Antoine Tenart <antoine.tenart@bootlin.com>
Date: Fri,  5 Jun 2020 16:00:09 +0200

> When converting the MSCC PHY driver to shared PHY packages, the Serdes
> configuration in vsc8584_config_init was modified to use 'base_addr'
> instead of 'base' as the port number. But 'base_addr' isn't equal to
> 'addr' for all PHYs inside the package, which leads to the Serdes still
> being enabled on those ports. This patch fixes it.
> 
> Fixes: deb04e9c0ff2 ("net: phy: mscc: use phy_package_shared")
> Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>

Applied, thank you.

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

end of thread, other threads:[~2020-06-05 20:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-05 14:00 [PATCH net] net: phy: mscc: fix Serdes configuration in vsc8584_config_init Antoine Tenart
2020-06-05 16:31 ` Florian Fainelli
2020-06-05 20:16 ` 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).