From ad5db4f4a9c49e8699171aed6add9fd277841c55011ba375eb09fcabe42ec295 Mon Sep 17 00:00:00 2001 From: Guillaume GARDET Date: Thu, 30 Jan 2020 10:49:49 +0000 Subject: [PATCH] Accepting request 768555 from hardware:boot:staging OBS-URL: https://build.opensuse.org/request/show/768555 OBS-URL: https://build.opensuse.org/package/show/hardware:boot/u-boot?expand=0&rev=82 --- 0017-net-phy-Fix-overlong-PHY-timeout.patch | 33 +++++++++++++++++++++ u-boot.changes | 7 +++++ u-boot.spec | 1 + 3 files changed, 41 insertions(+) create mode 100644 0017-net-phy-Fix-overlong-PHY-timeout.patch diff --git a/0017-net-phy-Fix-overlong-PHY-timeout.patch b/0017-net-phy-Fix-overlong-PHY-timeout.patch new file mode 100644 index 0000000..c7090e5 --- /dev/null +++ b/0017-net-phy-Fix-overlong-PHY-timeout.patch @@ -0,0 +1,33 @@ +From 55cefec93c8fae1ad5bd0f2f892785610c142d91 Mon Sep 17 00:00:00 2001 +From: Andre Przywara +Date: Fri, 3 Jan 2020 22:08:47 +0000 +Subject: [PATCH] net: phy: Fix overlong PHY timeout + +Commit 27c3f70f3b50 ("net: phy: Increase link up delay in +genphy_update_link()") increased the per-iteration waiting time from +1ms to 50ms, without adjusting the timeout counter. This lead to the +timeout increasing from the typical 4 seconds to over three minutes. + +Adjust the timeout counter evaluation by that factor of 50 to bring the +timeout back to the intended value. + +Signed-off-by: Andre Przywara +Reviewed-by: Stefan Roese +Signed-off-by: Matthias Brugger +--- + drivers/net/phy/phy.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c +index 80a7664e49..5cf9c165b6 100644 +--- a/drivers/net/phy/phy.c ++++ b/drivers/net/phy/phy.c +@@ -244,7 +244,7 @@ int genphy_update_link(struct phy_device *phydev) + /* + * Timeout reached ? + */ +- if (i > PHY_ANEG_TIMEOUT) { ++ if (i > (PHY_ANEG_TIMEOUT / 50)) { + printf(" TIMEOUT !\n"); + phydev->link = 0; + return -ETIMEDOUT; diff --git a/u-boot.changes b/u-boot.changes index 868560d..aa03361 100644 --- a/u-boot.changes +++ b/u-boot.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jan 30 10:43:44 UTC 2020 - Matthias Brugger + +Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2020.01 +* Patches added: + 0017-net-phy-Fix-overlong-PHY-timeout.patch + ------------------------------------------------------------------- Wed Jan 29 09:28:32 UTC 2020 - Matthias Brugger diff --git a/u-boot.spec b/u-boot.spec index f14c036..6a199eb 100644 --- a/u-boot.spec +++ b/u-boot.spec @@ -217,6 +217,7 @@ Patch0013: 0013-rpi4-Enable-GENET-Ethernet-controll.patch Patch0014: 0014-Kconfig-add-btrfs-to-distro-boot.patch Patch0015: 0015-configs-Re-sync-with-CONFIG_DISTRO_.patch Patch0016: 0016-configs-am335x_evm-disable-BTRFS.patch +Patch0017: 0017-net-phy-Fix-overlong-PHY-timeout.patch # Patches: end BuildRequires: bc BuildRequires: bison