From d8d342c6d0c4076b509faf1ae1a87df24814abe0 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Wed, 23 Feb 2022 07:44:56 +0100
Subject: [PATCH] Revert "ipq40xx: ar40xx: reset port status register"

This reverts commit 88151b8303f29f18e8b037076628fd82eda0978a.

This actually causes several boards to have bad eth connectivity
after reboot.

Signed-off-by: John Crispin <john@phrozen.org>
---
 target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c b/target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c
index 8b3ae53bd9..9758f013f0 100644
--- a/target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c
+++ b/target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c
@@ -1198,7 +1198,8 @@ ar40xx_init_port(struct ar40xx_priv *priv, int port)
 {
 	u32 t;
 
-	ar40xx_write(priv, AR40XX_REG_PORT_STATUS(port), 0);
+	ar40xx_rmw(priv, AR40XX_REG_PORT_STATUS(port),
+			AR40XX_PORT_AUTO_LINK_EN, 0);
 
 	/* CPU port is setting headers to limit output ports */
 	if (port == 0)
-- 
2.25.1

