From d7a41a3ab6b8e3a3158997cda13f1fe28a37268c Mon Sep 17 00:00:00 2001
From: Ziyang Huang <hzyitc@outlook.com>
Date: Sun, 8 Sep 2024 16:40:12 +0800
Subject: [PATCH] net: dsa: qca8k: always enable SGMII auto-negotiation

fixed-link can't work well without this

Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
---
 drivers/net/dsa/qca/qca8k-8xxx.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

--- a/drivers/net/dsa/qca/qca8k-8xxx.c
+++ b/drivers/net/dsa/qca/qca8k-8xxx.c
@@ -1545,11 +1545,10 @@ static int qca8k_pcs_config(struct phyli
 		return -EINVAL;
 	}
 
-	/* Enable/disable SerDes auto-negotiation as necessary */
-	val = neg_mode == PHYLINK_PCS_NEG_INBAND_ENABLED ?
-		0 : QCA8K_PWS_SERDES_AEN_DIS;
-
-	ret = qca8k_rmw(priv, QCA8K_REG_PWS, QCA8K_PWS_SERDES_AEN_DIS, val);
+	/* Enable SerDes auto-negotiation always.
+	 * So fixed-link can work.
+	 */
+	ret = qca8k_rmw(priv, QCA8K_REG_PWS, QCA8K_PWS_SERDES_AEN_DIS, 0);
 	if (ret)
 		return ret;
 
