Skip to content

Commit 4f4af83

Browse files
RajuRangojugregkh
authored andcommitted
amd-xgbe: Avoid spurious link down messages during interface toggle
[ Upstream commit 2616222 ] During interface toggle operations (ifdown/ifup), the driver currently resets the local helper variable 'phy_link' to -1. This causes the link state machine to incorrectly interpret the state as a link change event, resulting in spurious "Link is down" messages being logged when the interface is brought back up. Preserve the phy_link state across interface toggles to avoid treating the -1 sentinel value as a legitimate link state transition. Fixes: 88131a8 ("amd-xgbe: Perform phy connect/disconnect at dev open/stop") Signed-off-by: Raju Rangoju <[email protected]> Reviewed-by: Dawid Osuchowski <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent eeb4345 commit 4f4af83

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

drivers/net/ethernet/amd/xgbe/xgbe-drv.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,6 @@ static void xgbe_free_rx_data(struct xgbe_prv_data *pdata)
11721172

11731173
static int xgbe_phy_reset(struct xgbe_prv_data *pdata)
11741174
{
1175-
pdata->phy_link = -1;
11761175
pdata->phy_speed = SPEED_UNKNOWN;
11771176

11781177
return pdata->phy_if.phy_reset(pdata);

drivers/net/ethernet/amd/xgbe/xgbe-mdio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,6 +1664,7 @@ static int xgbe_phy_init(struct xgbe_prv_data *pdata)
16641664
pdata->phy.duplex = DUPLEX_FULL;
16651665
}
16661666

1667+
pdata->phy_link = 0;
16671668
pdata->phy.link = 0;
16681669

16691670
pdata->phy.pause_autoneg = pdata->pause_autoneg;

0 commit comments

Comments
 (0)