Currently, the code consults both local AN support status, which is stable, and the dynamic AN status on the link partner, which is flaky. Exclude the latter, as the client should have the opportunity to re-initiate AN afresh.
Fixes: 2a5cf77e6de8 ("common/sfc_efx/base: provide PHY link get method on Medford4") Cc: sta...@dpdk.org Signed-off-by: Ivan Malov <ivan.ma...@arknetworks.am> Reviewed-by: Andy Moreton <andy.more...@amd.com> --- drivers/common/sfc_efx/base/efx_np.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/common/sfc_efx/base/efx_np.c b/drivers/common/sfc_efx/base/efx_np.c index a19c986691..599daa7a60 100644 --- a/drivers/common/sfc_efx/base/efx_np.c +++ b/drivers/common/sfc_efx/base/efx_np.c @@ -397,8 +397,7 @@ efx_np_link_state( v3_flags = MCDI_OUT_DWORD(req, LINK_STATE_OUT_V3_FLAGS); memset(lsp, 0, sizeof (*lsp)); - if (status_flags & (1U << MC_CMD_LINK_STATUS_FLAGS_AN_ABLE) && - MCDI_OUT_DWORD(req, LINK_STATE_OUT_V2_LOCAL_AN_SUPPORT) != + if (MCDI_OUT_DWORD(req, LINK_STATE_OUT_V2_LOCAL_AN_SUPPORT) != MC_CMD_AN_NONE) lsp->enls_an_supported = B_TRUE; @@ -437,7 +436,7 @@ efx_np_link_state( MCDI_OUT2(req, const uint8_t, LINK_STATE_OUT_ADVERTISED_ABILITIES), &lsp->enls_adv_cap_mask); - if (lsp->enls_an_supported != B_FALSE) + if (status_flags & (1U << MC_CMD_LINK_STATUS_FLAGS_AN_ABLE)) lsp->enls_lp_cap_mask |= 1U << EFX_PHY_CAP_AN; efx_np_cap_hw_data_to_sw_mask( -- 2.47.2