[openwrt/openwrt] realtek: clear spurious GPIO interrupts

LEDE Commits lede-commits at lists.infradead.org
Thu Jul 21 13:45:38 PDT 2022


svanheule pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/a3e49499981487eb0e5e7706ba5bc972b98859a0

commit a3e49499981487eb0e5e7706ba5bc972b98859a0
Author: Sander Vanheule <sander at svanheule.net>
AuthorDate: Thu Jul 21 22:43:39 2022 +0200

    realtek: clear spurious GPIO interrupts
    
    The interrupt controller in the internal GPIO peripheral will sometimes
    generate spurious interrupts. If these are not properly acknowledged, the
    system will be held busy until reboot. These spurious interrupts are identified
    by the fact that there is no system IRQ number associated, since the interrupt
    line was never allocated. Although most prevalent on RTL839x, RTL838x SoCs have
    also displayed this behaviour.
    
    Reported-by: Luiz Angelo Daros de Luca <luizluca at gmail.com> # DGS-1210-52
    Reported-by: Birger Koblitz <mail at birger-koblitz.de> # Netgear GS724TP v2
    Reported-by: Jan Hoffmann <jan at 3e8.eu> # HPE 1920-16G
    Signed-off-by: Sander Vanheule <sander at svanheule.net>
---
 ...pio-realtek-otto-clear-spurious-interrups.patch | 30 ++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/target/linux/realtek/patches-5.10/317-gpio-realtek-otto-clear-spurious-interrups.patch b/target/linux/realtek/patches-5.10/317-gpio-realtek-otto-clear-spurious-interrups.patch
new file mode 100644
index 0000000000..6e5957d13e
--- /dev/null
+++ b/target/linux/realtek/patches-5.10/317-gpio-realtek-otto-clear-spurious-interrups.patch
@@ -0,0 +1,30 @@
+realtek: clear spurious GPIO interrupts
+
+The interrupt controller in the internal GPIO peripheral will sometimes
+generate spurious interrupts. If these are not properly acknowledged, the
+system will be held busy until reboot. These spurious interrupts are identified
+by the fact that there is no system IRQ number associated, since the interrupt
+line was never allocated. Although most prevalent on RTL839x, RTL838x SoCs have
+also displayed this behaviour.
+
+Reported-by: Luiz Angelo Daros de Luca <luizluca at gmail.com> # DGS-1210-52
+Reported-by: Birger Koblitz <mail at birger-koblitz.de> # Netgear GS724TP v2
+Reported-by: Jan Hoffmann <jan at 3e8.eu> # HPE 1920-16G
+Signed-off-by: Sander Vanheule <sander at svanheule.net>
+---
+ drivers/gpio/gpio-realtek-otto.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/gpio/gpio-realtek-otto.c
++++ b/drivers/gpio/gpio-realtek-otto.c
+@@ -251,6 +251,10 @@ static void realtek_gpio_irq_handler(str
+ 		port_pin_count = min(gc->ngpio - lines_done, 8U);
+ 		for_each_set_bit(offset, &status, port_pin_count) {
+ 			irq = irq_find_mapping(gc->irq.domain, offset + lines_done);
++			if (unlikely(!irq)) {
++				realtek_gpio_clear_isr(ctrl, lines_done / 8, BIT(offset));
++				continue;
++			}
+ 			generic_handle_irq(irq);
+ 		}
+ 	}




More information about the lede-commits mailing list