summaryrefslogtreecommitdiffstats
path: root/configs/platform-v7a/patches/barebox-2021.02.0/net-phy-fix-waiting-for-link.patch
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2021-03-14 16:47:46 +0100
committerRobert Schwebel <r.schwebel@pengutronix.de>2021-03-15 09:42:33 +0100
commit61be023775ab1ccef072bd8116f0ccf740bf8708 (patch)
tree5085522983fc0929e854b5b9e53ff8cdccffa2c3 /configs/platform-v7a/patches/barebox-2021.02.0/net-phy-fix-waiting-for-link.patch
parent5547488ca9f7c2f29f388bbaf808dfbfa7089796 (diff)
downloadDistroKit-61be023775ab1ccef072bd8116f0ccf740bf8708.tar.gz
DistroKit-61be023775ab1ccef072bd8116f0ccf740bf8708.tar.xz
v7a: barebox update 2020.09.0 -> 2021.02.0
One new patch is required to fix a regression for USB on rpi3. Also USB on rpi3 requires CONFIG_USB_NOP_XCEIV=y now which is enabled in the rpi2 config now. For the beaglebone two patches are added fixing a regression related to a dts sync from upstream. All three patches were already sent to the barebox mailing list. Acked-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'configs/platform-v7a/patches/barebox-2021.02.0/net-phy-fix-waiting-for-link.patch')
-rw-r--r--configs/platform-v7a/patches/barebox-2021.02.0/net-phy-fix-waiting-for-link.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/configs/platform-v7a/patches/barebox-2021.02.0/net-phy-fix-waiting-for-link.patch b/configs/platform-v7a/patches/barebox-2021.02.0/net-phy-fix-waiting-for-link.patch
new file mode 100644
index 0000000..cf42798
--- /dev/null
+++ b/configs/platform-v7a/patches/barebox-2021.02.0/net-phy-fix-waiting-for-link.patch
@@ -0,0 +1,35 @@
+From: Sascha Hauer <s.hauer@pengutronix.de>
+Date: Fri, 12 Mar 2021 11:13:09 +0100
+Subject: [PATCH] net: phy: fix waiting for link
+
+phydev->adjust_link() is called only from phy_update_status() when the
+link status changes during that function. phydev->link is also updated
+in genphy_update_link() called from phy_wait_aneg_done(), so it can
+happen that phydev->link changes outside of phy_update_status(), thus
+phydev->adjust_link is never called and no link change notice is
+printed.
+
+Instead of calling genphy_update_link() from phy_wait_aneg_done(), call
+phy_update_status(). This makes sure that a link change is properly
+noticed.
+
+Fixes: 8f75aa496dcb ("net: reply to ping requests")
+Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
+Link: https://lore.pengutronix.de/20210312101309.29650-1-s.hauer@pengutronix.de
+---
+ 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 622acbe40dd9..e8e8dad5bd25 100644
+--- a/drivers/net/phy/phy.c
++++ b/drivers/net/phy/phy.c
+@@ -571,7 +571,7 @@ int phy_wait_aneg_done(struct phy_device *phydev)
+ }
+
+ do {
+- genphy_update_link(phydev);
++ phy_update_status(phydev);
+ if (phydev->link == 1)
+ return 0;
+ } while (!is_timeout(start, PHY_AN_TIMEOUT * SECOND));