Skip to contentSkip to conversation

net: bcmgenet: fix MoCA LED control

PATCH Applied Doug Berger 3 participants 3 messages Feb 16, 2023 – Feb 20, 2023

Subsystems (3)
lore
Share & tools
lore

Doug Berger

author maintainer
#0 lore raw

PATCH 1/1 net: bcmgenet: fix MoCA LED control

When the bcmgenet_mii_config() code was refactored it was missed that the LED control for the MoCA interface got overwritten by the port_ctrl value. Its previous programming is restored here.

Fixes 4f8d81b77e66 ("net: bcmgenet: Refactor register access in bcmgenet_mii_config")
---
 drivers/net/ethernet/broadcom/genet/bcmmii.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
drivers/net/ethernet/broadcom/genet/bcmmii.c +2 -9
index b615176338b2..be042905ada2 100644
@@ -176,15 +176,6 @@ void bcmgenet_phy_power_set(struct net_device *dev, bool enable)
 
 static void bcmgenet_moca_phy_setup(struct bcmgenet_priv *priv)
 {
-	u32 reg;
-
-	if (!GENET_IS_V5(priv)) {
-		/* Speed settings are set in bcmgenet_mii_setup() */
-		reg = bcmgenet_sys_readl(priv, SYS_PORT_CTRL);
-		reg |= LED_ACT_SOURCE_MAC;
-		bcmgenet_sys_writel(priv, reg, SYS_PORT_CTRL);
-	}
-
 	if (priv->hw_params->flags & GENET_HAS_MOCA_LINK_DET)
 		fixed_phy_set_link_update(priv->dev->phydev,
 					  bcmgenet_fixed_phy_link_update);
@@ -217,6 +208,8 @@ int bcmgenet_mii_config(struct net_device *dev, bool init)
 
 		if (!phy_name) {
 			phy_name = "MoCA";
+			if (!GENET_IS_V5(priv))
+				port_ctrl |= LED_ACT_SOURCE_MAC;
 			bcmgenet_moca_phy_setup(priv);
 		}
 		break;
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Doug Berger

When the bcmgenet_mii_config() code was refactored it was missed that the LED control for the MoCA interface got overwritten by the port_ctrl value. Its previous programming is restored here.

Fixes 4f8d81b77e66 ("net: bcmgenet: Refactor register access in bcmgenet_mii_config")
Signature · 1 line
Florian
#2 lore raw
In reply to Doug Berger
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:

Quoted 8 lines · On Thu, 16 Feb 2023 11:41:28 -0800 you wrote:

When the bcmgenet_mii_config() code was refactored it was missed that the LED control for the MoCA interface got overwritten by the port_ctrl value. Its previous programming is restored here.

Fixes 4f8d81b77e66 ("net: bcmgenet: Refactor register access in bcmgenet_mii_config")

[...]

Here is the summary with links:
- [net] net: bcmgenet: fix MoCA LED control

    https://git.kernel.org/netdev/net/c/a7515af9fb8f

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html