aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWade Farnsworth <wfarnsworth@users.noreply.github.com>2019-06-19 08:24:59 -0700
committerGitHub <noreply@github.com>2019-06-19 08:24:59 -0700
commitb1fa77c80d8e1c0e70e5f236fdf2447ec18b7f53 (patch)
treec110f9a635600c4acf52604afe2c0e3668dbb0f4
parent831e24761cb0ab980c89942cab3b5e82252b44b9 (diff)
parent70f30e6620a22ba79d0b8f21ff76e85488783647 (diff)
downloadmeta-amd-sumo.tar.gz
meta-amd-sumo.tar.bz2
meta-amd-sumo.zip
Merge pull request #638 from smavila/sumosumo
amd-xgbe Sometimes driver report incorrect link status
-rw-r--r--meta-snowyowl/recipes-kernel/linux/linux-yocto-4.14.71/0132-amd-xgbe-Sometimes-driver-report-incorrect-link-stat.patch39
-rwxr-xr-xmeta-snowyowl/recipes-kernel/linux/linux-yocto-4.14.71/amd-xgbe-patches.scc1
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