]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 May 2022 11:17:01 +0000 (13:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 May 2022 11:17:01 +0000 (13:17 +0200)
added patches:
smsc911x-allow-using-irq0.patch

queue-4.9/series
queue-4.9/smsc911x-allow-using-irq0.patch [new file with mode: 0644]

index 67666e134e60b9a96e4126acf7c61e53061f6b66..3ea47cd6fb2d121e5b4ff072bfc3f9d5cbd0536d 100644 (file)
@@ -56,3 +56,4 @@ nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-download-timeout.patch
 hwmon-adt7470-fix-warning-on-module-removal.patch
 asoc-dmaengine-restore-null-prepare_slave_config-callback.patch
 net-emaclite-add-error-handling-for-of_address_to_resource.patch
+smsc911x-allow-using-irq0.patch
diff --git a/queue-4.9/smsc911x-allow-using-irq0.patch b/queue-4.9/smsc911x-allow-using-irq0.patch
new file mode 100644 (file)
index 0000000..eb84a5b
--- /dev/null
@@ -0,0 +1,42 @@
+From 5ef9b803a4af0f5e42012176889b40bb2a978b18 Mon Sep 17 00:00:00 2001
+From: Sergey Shtylyov <s.shtylyov@omp.ru>
+Date: Mon, 2 May 2022 23:14:09 +0300
+Subject: smsc911x: allow using IRQ0
+
+From: Sergey Shtylyov <s.shtylyov@omp.ru>
+
+commit 5ef9b803a4af0f5e42012176889b40bb2a978b18 upstream.
+
+The AlphaProject AP-SH4A-3A/AP-SH4AD-0A SH boards use IRQ0 for their SMSC
+LAN911x Ethernet chip, so the networking on them must have been broken by
+commit 965b2aa78fbc ("net/smsc911x: fix irq resource allocation failure")
+which filtered out 0 as well as the negative error codes -- it was kinda
+correct at the time, as platform_get_irq() could return 0 on of_irq_get()
+failure and on the actual 0 in an IRQ resource.  This issue was fixed by
+me (back in 2016!), so we should be able to fix this driver to allow IRQ0
+usage again...
+
+When merging this to the stable kernels, make sure you also merge commit
+e330b9a6bb35 ("platform: don't return 0 from platform_get_irq[_byname]()
+on error") -- that's my fix to platform_get_irq() for the DT platforms...
+
+Fixes: 965b2aa78fbc ("net/smsc911x: fix irq resource allocation failure")
+Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
+Link: https://lore.kernel.org/r/656036e4-6387-38df-b8a7-6ba683b16e63@omp.ru
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/smsc/smsc911x.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/smsc/smsc911x.c
++++ b/drivers/net/ethernet/smsc/smsc911x.c
+@@ -2441,7 +2441,7 @@ static int smsc911x_drv_probe(struct pla
+       if (irq == -EPROBE_DEFER) {
+               retval = -EPROBE_DEFER;
+               goto out_0;
+-      } else if (irq <= 0) {
++      } else if (irq < 0) {
+               pr_warn("Could not allocate irq resource\n");
+               retval = -ENODEV;
+               goto out_0;