diff options
2 files changed, 40 insertions, 0 deletions
diff --git a/meta-snowyowl/recipes-kernel/linux/linux-yocto-4.14.71/0132-amd-xgbe-Sometimes-driver-report-incorrect-link-stat.patch b/meta-snowyowl/recipes-kernel/linux/linux-yocto-4.14.71/0132-amd-xgbe-Sometimes-driver-report-incorrect-link-stat.patch new file mode 100644 index 00000000..384d8bdc --- /dev/null +++ b/meta-snowyowl/recipes-kernel/linux/linux-yocto-4.14.71/0132-amd-xgbe-Sometimes-driver-report-incorrect-link-stat.patch @@ -0,0 +1,39 @@ +From 94f4f26d64b2048d6c99a2aa120b295fa1afba26 Mon Sep 17 00:00:00 2001 +From: Sudheesh Mavila <sudheesh.mavila@amd.com> +Date: Tue, 12 Mar 2019 22:33:11 +0530 +Subject: [PATCH] amd-xgbe Sometimes driver report incorrect link status and + results in timeout error in driver + +Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com> +--- + drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +index 151bdb629e8a..ff4eeb55ab79 100755 +--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c ++++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +@@ -2565,8 +2565,18 @@ static int xgbe_phy_link_status(struct xgbe_prv_data *pdata, int *an_restart) + */ + reg = XMDIO_READ(pdata, MDIO_MMD_PCS, MDIO_STAT1); + reg = XMDIO_READ(pdata, MDIO_MMD_PCS, MDIO_STAT1); +- if (reg & MDIO_STAT1_LSTATUS) +- return 1; ++ if(phy_data->sfp_speed == XGBE_SFP_SPEED_10000) { ++ if ((reg & MDIO_STAT1_LSTATUS) && !(reg & MDIO_STAT1_FAULT)) { ++ return 1; ++ } else { ++ *an_restart = 1; ++ pdata->phy_if.phy_reset(pdata); ++ return 0; ++ } ++ } else { ++ if (reg & MDIO_STAT1_LSTATUS) ++ return 1; ++ } + + /* No link, attempt a receiver reset cycle */ + if (phy_data->rrc_count++ > XGBE_RRC_FREQUENCY) { +-- +2.17.1 + diff --git a/meta-snowyowl/recipes-kernel/linux/linux-yocto-4.14.71/amd-xgbe-patches.scc b/meta-snowyowl/recipes-kernel/linux/linux-yocto-4.14.71/amd-xgbe-patches.scc index 7b85eda7..3e3c0874 100755 --- a/meta-snowyowl/recipes-kernel/linux/linux-yocto-4.14.71/amd-xgbe-patches.scc +++ b/meta-snowyowl/recipes-kernel/linux/linux-yocto-4.14.71/amd-xgbe-patches.scc @@ -19,3 +19,4 @@ patch 0115-net-amd-fix-return-type-of-ndo_start_xmit-function.patch patch 0116-net-phy-Add-helper-for-advertise-to-lcl-value.patch patch 0117-drivers-net-remove-net-busy_poll.h-inclusion-when-no.patch patch 0118-net-ethernet-xgbe-expand-PHY_GBIT_FEAUTRES.patch +patch 0132-amd-xgbe-Sometimes-driver-report-incorrect-link-stat.patch |