From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Raju Rangoju <Raju.Rangoju@amd.com>, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, pabeni@redhat.com, kuba@kernel.org,
edumazet@google.com, davem@davemloft.net, andrew+netdev@lunn.ch,
horms@kernel.org, Shyam-sundar.S-k@amd.com
Subject: Re: [PATCH net 2/3] amd-xgbe: prevent CRC errors during RX adaptation with AN disabled
Date: Wed, 4 Mar 2026 14:40:33 +0100 [thread overview]
Message-ID: <5826cc04-10c6-45f5-a39c-6fe56bc671dd@bootlin.com> (raw)
In-Reply-To: <20260304122305.812541-3-Raju.Rangoju@amd.com>
Hi Raju,
On 04/03/2026 13:23, Raju Rangoju wrote:
> When operating in 10GBASE-KR mode with auto-negotiation disabled and RX
> adaptation enabled, CRC errors can occur during the RX adaptation
> process. This happens because the driver continues transmitting and
> receiving packets while adaptation is in progress.
>
> Fix this by stopping TX/RX immediately when the link goes down and RX
> adaptation needs to be re-triggered, and only re-enabling TX/RX after
> adaptation completes and the link is confirmed up. Introduce a flag to
> track whether TX/RX was disabled for adaptation so it can be restored
> correctly.
>
> This prevents packets from being transmitted or received during the RX
> adaptation window and avoids CRC errors from corrupted frames.
>
> Fixes: 4f3b20bfbb75 ("amd-xgbe: add support for rx-adaptation")
> Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
Small nit on my side :
[...]
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe.h b/drivers/net/ethernet/amd/xgbe/xgbe.h
> index 4333d269ee84..75c021b38a28 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe.h
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe.h
> @@ -1266,6 +1266,10 @@ struct xgbe_prv_data {
> bool en_rx_adap;
> int rx_adapt_retries;
> bool rx_adapt_done;
> + /* Flag to track if data path (TX/RX) was stopped for RX adaptation.
> + * This prevents packet corruption during the adaptation window.
> + */
> + unsigned int rx_adapt_data_path_stopped;
This is only ever set as true/false, maybe make it a bool ?
> bool mode_set;
> bool sph;
> };
Maxime
next prev parent reply other threads:[~2026-03-04 13:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 12:23 [PATCH net 0/3] amd-xgbe: RX adaptation and PHY handling fixes Raju Rangoju
2026-03-04 12:23 ` [PATCH net 1/3] amd-xgbe: fix link status handling in xgbe_rx_adaptation Raju Rangoju
2026-03-04 12:23 ` [PATCH net 2/3] amd-xgbe: prevent CRC errors during RX adaptation with AN disabled Raju Rangoju
2026-03-04 13:40 ` Maxime Chevallier [this message]
2026-03-04 12:23 ` [PATCH net 3/3] amd-xgbe: reset PHY settings before starting PHY Raju Rangoju
2026-03-04 13:44 ` Maxime Chevallier
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=5826cc04-10c6-45f5-a39c-6fe56bc671dd@bootlin.com \
--to=maxime.chevallier@bootlin.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=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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