aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4104-Fix-hot-plug-failure-with-SFP-RJ45-module.-Do-force-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4104-Fix-hot-plug-failure-with-SFP-RJ45-module.-Do-force-.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4104-Fix-hot-plug-failure-with-SFP-RJ45-module.-Do-force-.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4104-Fix-hot-plug-failure-with-SFP-RJ45-module.-Do-force-.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4104-Fix-hot-plug-failure-with-SFP-RJ45-module.-Do-force-.patch
new file mode 100644
index 00000000..9bbb1ee4
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4104-Fix-hot-plug-failure-with-SFP-RJ45-module.-Do-force-.patch
@@ -0,0 +1,42 @@
+From e33b0e04ddd97a9ed4a04f001255fb23263cfa13 Mon Sep 17 00:00:00 2001
+From: Sudheer Anumolu <sudheer.anumolu@amd.com>
+Date: Tue, 26 Nov 2019 18:37:56 +0530
+Subject: [PATCH 4104/4736] Fix hot plug failure with SFP+RJ45 module. Do force
+ MDIO only if an external phy is available.
+
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+index a6fb6754984f..3fcfd7cb04d6 100755
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+@@ -989,6 +989,13 @@ static int xgbe_phy_find_phy_device(struct xgbe_prv_data *pdata)
+ /* Clear the extra AN flag */
+ pdata->an_again = 0;
+
++ /* For SFP, only use an external PHY if available */
++ if (phy_data->port_mode == XGBE_PORT_MODE_SFP) {
++ force_mdio_mv_bp_con = 0;
++ if(!phy_data->sfp_phy_avail)
++ return 0;
++ }
++
+ /* Check for the use of an external PHY */
+ if (phy_data->phydev_mode == XGBE_MDIO_MODE_NONE) {
+ if(force_mdio_mv_bp_con) {
+@@ -1000,10 +1007,6 @@ static int xgbe_phy_find_phy_device(struct xgbe_prv_data *pdata)
+ }
+ }
+
+- /* For SFP, only use an external PHY if available */
+- if ((phy_data->port_mode == XGBE_PORT_MODE_SFP) &&
+- !phy_data->sfp_phy_avail)
+- return 0;
+
+ /* Set the proper MDIO mode for the PHY */
+ ret = pdata->hw_if.set_ext_mii_mode(pdata, phy_data->mdio_addr,
+--
+2.17.1
+