From 739c48e581242c57425de1a632d307e4c7a036dd Mon Sep 17 00:00:00 2001 From: Sudheesh Mavila Date: Tue, 10 Nov 2020 12:42:28 +0530 Subject: [PATCH 08/10] amd-xgbe: rrc is required only for Fixed PHY configuration xgbe driver does RRC in every 10 seconds if the link is down. When AN is enabled and KR training is in progress, doing RRC cause KR training failure. The patch enables RRC only if AN is disabled. Signed-off-by: Sudheesh Mavila --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c index 88663acae8b3..a043c30358d2 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c @@ -2638,7 +2638,8 @@ static int xgbe_phy_link_status(struct xgbe_prv_data *pdata, int *an_restart) /* No link, attempt a receiver reset cycle */ if (phy_data->rrc_count++ > XGBE_RRC_FREQUENCY) { phy_data->rrc_count = 0; - xgbe_phy_rrc(pdata); + if (pdata->phy.autoneg == AUTONEG_DISABLE) + xgbe_phy_rrc(pdata); } return 0; -- 2.17.1