Skip to content

Commit

Permalink
net: bcmgenet: fix MoCA LED control
Browse files Browse the repository at this point in the history
[ Upstream commit a7515af ]

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: 4f8d81b ("net: bcmgenet: Refactor register access in bcmgenet_mii_config")
Signed-off-by: Doug Berger <opendmb@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Doug Berger authored and gregkh committed Mar 10, 2023
1 parent 4bb736b commit 2e0b175
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions drivers/net/ethernet/broadcom/genet/bcmmii.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,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);
Expand Down Expand Up @@ -210,6 +201,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;
Expand Down

0 comments on commit 2e0b175

Please sign in to comment.