mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 10:39:04 +00:00
2bb02ccae3
Deleted (upstreamed): bcm27xx/patches-5.10/950-0186-pinctrl-bcm2835-Change-init-order-for-gpio-hogs.patch [1] sunxi/patches-5.10/103-arm64-dts-allwinner-orangepi-zero-plus-fix-PHY-mo.patch [2] [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.89&id=ba696b470839d70c6b8290c1f798bac7fb2a584c [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.89&id=93a957bbf46ceb224b959de61fe85cfc6f71b6c7 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
From 4f060bf5900e8f17fb8cb8508dc08006b2a844b1 Mon Sep 17 00:00:00 2001
|
|
From: Phil Elwell <phil@raspberrypi.com>
|
|
Date: Tue, 15 Dec 2020 16:38:37 +0000
|
|
Subject: [PATCH] net: lan78xx: Ack pending PHY ints when resetting
|
|
|
|
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ
|
|
status. In doing so it potentially leaves the PHY with a pending
|
|
interrupt that will never be acknowledged, at which point no further
|
|
interrupts will be generated.
|
|
|
|
Avoid the problem by acknowledging any pending PHY interrupt after
|
|
clearing the MAC's status bit.
|
|
|
|
See: https://github.com/raspberrypi/linux/issues/2937
|
|
|
|
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
|
---
|
|
drivers/net/usb/lan78xx.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
--- a/drivers/net/usb/lan78xx.c
|
|
+++ b/drivers/net/usb/lan78xx.c
|
|
@@ -1183,6 +1183,9 @@ static int lan78xx_link_reset(struct lan
|
|
if (unlikely(ret < 0))
|
|
return -EIO;
|
|
|
|
+ /* Acknowledge any pending PHY interrupt, lest it be the last */
|
|
+ phy_read(phydev, LAN88XX_INT_STS);
|
|
+
|
|
mutex_lock(&phydev->lock);
|
|
phy_read_status(phydev);
|
|
link = phydev->link;
|