]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
amd-xgbe: prevent CRC errors during RX adaptation with AN disabled
authorRaju Rangoju <Raju.Rangoju@amd.com>
Fri, 6 Mar 2026 11:16:28 +0000 (16:46 +0530)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 10 Mar 2026 11:07:07 +0000 (12:07 +0100)
commit27a4dd0c702b3b2b9cf2c045d100cc2fe8720b81
tree05afcff144a9384d724c570ca37456c2069f006b
parent6485cb96be5cd0f4bf39554737ba11322cc9b053
amd-xgbe: prevent CRC errors during RX adaptation with AN disabled

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.

The flag tracking the data path state is synchronized with hardware
state in xgbe_start() to prevent stale state after device restarts.
This ensures that after a restart cycle (where xgbe_stop disables
TX/RX and xgbe_start re-enables them), the flag correctly reflects
that the data path is active.

Fixes: 4f3b20bfbb75 ("amd-xgbe: add support for rx-adaptation")
Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
Link: https://patch.msgid.link/20260306111629.1515676-3-Raju.Rangoju@amd.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/amd/xgbe/xgbe-drv.c
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
drivers/net/ethernet/amd/xgbe/xgbe.h