Skip to content

Commit 2cd5cf9

Browse files
RajuRangojuNipaLocal
authored andcommitted
amd-xgbe: reset retries and mode on RX adapt failures
During the stress tests, early RX adaptation handshakes can fail, such as missing the RX_ADAPT ACK or not receiving a coefficient update before block lock is established. Continuing to retry RX adaptation in this state is often ineffective if the current mode selection is not viable. Resetting the RX adaptation retry counter when an RX_ADAPT request fails to receive ACK or a coefficient update prior to block lock, and clearing mode_set so the next bring-up performs a fresh mode selection rather than looping on a likely invalid configuration. Fixes: 4f3b20b ("amd-xgbe: add support for rx-adaptation") Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: NipaLocal <nipa@local>
1 parent ddb139d commit 2cd5cf9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1928,6 +1928,7 @@ static void xgbe_set_rx_adap_mode(struct xgbe_prv_data *pdata,
19281928
{
19291929
if (pdata->rx_adapt_retries++ >= MAX_RX_ADAPT_RETRIES) {
19301930
pdata->rx_adapt_retries = 0;
1931+
pdata->mode_set = false;
19311932
return;
19321933
}
19331934

@@ -1974,6 +1975,7 @@ static void xgbe_rx_adaptation(struct xgbe_prv_data *pdata)
19741975
*/
19751976
netif_dbg(pdata, link, pdata->netdev, "Block_lock done");
19761977
pdata->rx_adapt_done = true;
1978+
pdata->rx_adapt_retries = 0;
19771979
pdata->mode_set = false;
19781980
return;
19791981
}

0 commit comments

Comments
 (0)