From: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
To: Raju Rangoju <Raju.Rangoju@amd.com>, netdev@vger.kernel.org
Cc: pabeni@redhat.com, kuba@kernel.org, edumazet@google.com,
davem@davemloft.net, andrew+netdev@lunn.ch,
thomas.lendacky@amd.com, Shyam-sundar.S-k@amd.com
Subject: Re: [PATCH net] amd-xgbe: Avoid spurious link down messages during interface toggle
Date: Fri, 10 Oct 2025 14:51:39 +0200 [thread overview]
Message-ID: <c2513fa8-1c8c-49d0-a9b0-92f86d058012@linux.intel.com> (raw)
In-Reply-To: <20251010065142.1189310-1-Raju.Rangoju@amd.com>
On 2025-10-10 8:51 AM, Raju Rangoju wrote:
> 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>
> ---
> drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 1 -
> drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 1 +
> 2 files changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
> index f0989aa01855..4dc631af7933 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
> @@ -1080,7 +1080,6 @@ static void xgbe_free_rx_data(struct xgbe_prv_data *pdata)
>
> static int xgbe_phy_reset(struct xgbe_prv_data *pdata)
> {
> - pdata->phy_link = -1;
> pdata->phy_speed = SPEED_UNKNOWN;
>
> return pdata->phy_if.phy_reset(pdata);
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
> index 1a37ec45e650..7675bb98f029 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
> @@ -1555,6 +1555,7 @@ static int xgbe_phy_init(struct xgbe_prv_data *pdata)
> pdata->phy.duplex = DUPLEX_FULL;
> }
>
> + pdata->phy_link = 0;
> pdata->phy.link = 0;
Took me a sec to spot the difference between the two :)
>
> pdata->phy.pause_autoneg = pdata->pause_autoneg;
next prev parent reply other threads:[~2025-10-10 12:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-10 6:51 [PATCH net] amd-xgbe: Avoid spurious link down messages during interface toggle Raju Rangoju
2025-10-10 12:51 ` Dawid Osuchowski [this message]
2025-10-10 13:30 ` Tom Lendacky
2025-10-10 18:08 ` Rangoju, Raju
2025-10-14 9:00 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c2513fa8-1c8c-49d0-a9b0-92f86d058012@linux.intel.com \
--to=dawid.osuchowski@linux.intel.com \
--cc=Raju.Rangoju@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=thomas.lendacky@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).