Thread (2 messages) flat view 2 messages, 1 author, 2021-10-12
DORMANTno replies

[PATCH 2/2] net: amd-xgbe: Enable RRC when auto-negotiation is enabled

From: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Date: 2021-10-12 17:37:52
Subsystem: amd xgbe driver, networking drivers, the rest · Maintainers: Raju Rangoju, Prashanth Kumar K R, Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

Receiver Reset Cycle (RRC) is only required when the
auto-negotiation is enabled.

Co-developed-by: Sudheesh Mavila <redacted>
Signed-off-by: Sudheesh Mavila <redacted>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
---
 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 4 +++-
 1 file changed, 3 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 4465af9b72cf..1a11407e277c 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
@@ -2642,7 +2642,9 @@ 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);
+		/* RRC is required only if auto-negotiation is enabled */
+		if (pdata->phy.autoneg == AUTONEG_ENABLE)
+			xgbe_phy_rrc(pdata);
 	}
 
 	return 0;
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help