Skip to content

Commit 6c27e3d

Browse files
RajuRangojuNipaLocal
authored andcommitted
amd-xgbe: Avoid spurious link down messages during interface toggle
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]> Signed-off-by: NipaLocal <nipa@local>
1 parent e836e8d commit 6c27e3d

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
@@ -1080,7 +1080,6 @@ static void xgbe_free_rx_data(struct xgbe_prv_data *pdata)
10801080

10811081
static int xgbe_phy_reset(struct xgbe_prv_data *pdata)
10821082
{
1083-
pdata->phy_link = -1;
10841083
pdata->phy_speed = SPEED_UNKNOWN;
10851084

10861085
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
@@ -1555,6 +1555,7 @@ static int xgbe_phy_init(struct xgbe_prv_data *pdata)
15551555
pdata->phy.duplex = DUPLEX_FULL;
15561556
}
15571557

1558+
pdata->phy_link = 0;
15581559
pdata->phy.link = 0;
15591560

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

0 commit comments

Comments
 (0)