aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-5.15/9043-amd-xgbe-10Gbaset-MDIO-for-10G.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-5.15/9043-amd-xgbe-10Gbaset-MDIO-for-10G.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-5.15/9043-amd-xgbe-10Gbaset-MDIO-for-10G.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-5.15/9043-amd-xgbe-10Gbaset-MDIO-for-10G.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-5.15/9043-amd-xgbe-10Gbaset-MDIO-for-10G.patch
new file mode 100644
index 00000000..80c67642
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-5.15/9043-amd-xgbe-10Gbaset-MDIO-for-10G.patch
@@ -0,0 +1,71 @@
+From a4cf803958f674229d9827147a3f278c7bdefe19 Mon Sep 17 00:00:00 2001
+From: rgaridap <Ramesh.Garidapuri@amd.com>
+Date: Fri, 29 Apr 2022 12:10:49 +0530
+Subject: [PATCH 43/48] amd-xgbe: 10Gbaset MDIO for 10G
+
+Signed-off-by: rgaridap <Ramesh.Garidapuri@amd.com>
+Change-Id: I071e647c1aa06c0b715f4a449c6970168036e54a
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 17 +++++++++++++----
+ 1 file changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+index bc8172c19082..944271556e0c 100755
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+@@ -402,6 +402,7 @@ static void xgbe_an73_set(struct xgbe_prv_data *pdata, bool enable,
+ reg |= MDIO_AN_CTRL1_RESTART;
+
+ XMDIO_WRITE(pdata, MDIO_MMD_AN, MDIO_CTRL1, reg);
++ if(pdata->an_mode != XGBE_AN_MODE_MDIO) {
+
+ if(xgbe_cur_mode(pdata) == XGBE_MODE_KR) {
+ /* step-4 Start AN with KR training auto start */
+@@ -410,6 +411,7 @@ static void xgbe_an73_set(struct xgbe_prv_data *pdata, bool enable,
+ (XGBE_KR_TRAINING_ENABLE | XGBE_KR_TRAINING_START),
+ (XGBE_KR_TRAINING_ENABLE | XGBE_KR_TRAINING_START));
+ }
++ }
+ }
+
+ static void xgbe_an73_restart(struct xgbe_prv_data *pdata)
+@@ -1062,6 +1064,9 @@ static void xgbe_an_init(struct xgbe_prv_data *pdata)
+ case XGBE_AN_MODE_CL37_SGMII:
+ xgbe_an37_init(pdata);
+ break;
++ case XGBE_AN_MODE_MDIO:
++ netif_dbg(pdata, link, pdata->netdev, "xgbe_an_init for MDIO\n");
++ break;
+ default:
+ break;
+ }
+@@ -1214,9 +1219,11 @@ static int __xgbe_phy_config_aneg(struct xgbe_prv_data *pdata, bool set_mode)
+ /* Disable auto-negotiation interrupt */
+ disable_irq(pdata->an_irq);
+
+- if(xgbe_cur_mode(pdata) == XGBE_MODE_KR) {
+- xgbe_change_mode(pdata, XGBE_MODE_KR);
+- netif_dbg(pdata, link, pdata->netdev, "AN force modeset 10GKR \n");
++ if(pdata->an_mode != XGBE_AN_MODE_MDIO) {
++ if(xgbe_cur_mode(pdata) == XGBE_MODE_KR) {
++ xgbe_change_mode(pdata, XGBE_MODE_KR);
++ netif_dbg(pdata, link, pdata->netdev, "AN force modeset 10GKR \n");
++ }
+ }
+
+ if (set_mode) {
+@@ -1285,8 +1292,10 @@ static bool xgbe_phy_aneg_done(struct xgbe_prv_data *pdata)
+ if (pdata->an_mode == XGBE_AN_MODE_MDIO) {
+ if(pdata->phy.link)
+ pdata->an_result = XGBE_AN_COMPLETE;
+- else
++ else {
++ netif_dbg(pdata, link, pdata->netdev, "xgbe_phy_aneg_done : ******* Forcing next mode ******* \n");
+ pdata->an_result = XGBE_AN_NO_LINK;
++ }
+ }
+ return (pdata->an_result == XGBE_AN_COMPLETE);
+ }
+--
+2.27.0
+