aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux-6.6/linux-yocto-6.6/0014-amd-xgbe-Start-AN-with-KR-training-auto-start.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux-6.6/linux-yocto-6.6/0014-amd-xgbe-Start-AN-with-KR-training-auto-start.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-6.6/linux-yocto-6.6/0014-amd-xgbe-Start-AN-with-KR-training-auto-start.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux-6.6/linux-yocto-6.6/0014-amd-xgbe-Start-AN-with-KR-training-auto-start.patch b/meta-amd-bsp/recipes-kernel/linux-6.6/linux-yocto-6.6/0014-amd-xgbe-Start-AN-with-KR-training-auto-start.patch
new file mode 100644
index 00000000..347d2a1f
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-6.6/linux-yocto-6.6/0014-amd-xgbe-Start-AN-with-KR-training-auto-start.patch
@@ -0,0 +1,36 @@
+From e3cbc7e922132620af5e8d384fe5a767e327dc02 Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Sat, 22 Apr 2023 14:28:59 +0530
+Subject: [PATCH 14/31] amd-xgbe: Start AN with KR training auto start
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Change-Id: I73c49b2f45f4d70e8a3547ab923c5dc4ef91ade4
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+index 5a18df814aa2..94bdf58cfaac 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+@@ -414,6 +414,16 @@ 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 */
++ XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD,
++ MDIO_PMA_10GBR_PMD_CTRL,
++ (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)
+--
+2.34.1
+