]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
amd-xgbe: Avoid spurious link down messages during interface toggle
authorRaju Rangoju <Raju.Rangoju@amd.com>
Fri, 10 Oct 2025 06:51:42 +0000 (12:21 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2025 13:04:33 +0000 (14:04 +0100)
commite9f5c264233ee2ce2bacf11966861b7707a28173
treec1c272bd9845136c2bbf2320c3bfea3b6b61f566
parent10fe967efe73c610e526ff7460581610633dee9c
amd-xgbe: Avoid spurious link down messages during interface toggle

[ Upstream commit 2616222e423398bb374ffcb5d23dea4ba2c3e524 ]

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: 88131a812b16 ("amd-xgbe: Perform phy connect/disconnect at dev open/stop")
Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
Reviewed-by: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
Link: https://patch.msgid.link/20251010065142.1189310-1-Raju.Rangoju@amd.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/amd/xgbe/xgbe-drv.c
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c