Commit df60c332 authored by Raju Rangoju's avatar Raju Rangoju Committed by Paolo Abeni
Browse files

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: 4f3b20bf ("amd-xgbe: add support for rx-adaptation")
Signed-off-by: default avatarRaju Rangoju <Raju.Rangoju@amd.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Reviewed-by: default avatarShyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://patch.msgid.link/20251215151728.311713-1-Raju.Rangoju@amd.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent a9f96dc5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1928,6 +1928,7 @@ static void xgbe_set_rx_adap_mode(struct xgbe_prv_data *pdata,
{
	if (pdata->rx_adapt_retries++ >= MAX_RX_ADAPT_RETRIES) {
		pdata->rx_adapt_retries = 0;
		pdata->mode_set = false;
		return;
	}

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