aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux-5.4/linux-yocto-5.4.69-amdx86/0018-amd-xgbe-rrc-is-required-only-for-Fixed-PHY-configur.patch
blob: 726fa33d027b2f55fa9d71cc4d1acdc40781cda5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 88d67055f583bd937cbd923e4f2def16490ae1be Mon Sep 17 00:00:00 2001
From: Sudheesh Mavila <sudheesh.mavila@amd.com>
Date: Tue, 10 Nov 2020 12:42:28 +0530
Subject: [PATCH 18/21] 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 <sudheesh.mavila@amd.com>
---
 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 a02a906cff4d..28e2c5961747 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
@@ -2608,7 +2608,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