diff mbox series

smsc911x: allow using IRQ0

Message ID 656036e4-6387-38df-b8a7-6ba683b16e63@omp.ru (mailing list archive)
State Accepted
Commit 5ef9b803a4af0f5e42012176889b40bb2a978b18
Delegated to: Netdev Maintainers
Headers show
Series smsc911x: allow using IRQ0 | expand

Checks

Context Check Description
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers fail 1 blamed authors not CCed: kamlakant.patel@broadcom.com; 1 maintainers not CCed: kamlakant.patel@broadcom.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Sergey Shtylyov May 2, 2022, 8:14 p.m. UTC
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>
CC: stable@vger.kernel.org

---
This patch is against DaveM's 'net.git' repo.

 drivers/net/ethernet/smsc/smsc911x.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org May 4, 2022, 12:10 a.m. UTC | #1
Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 2 May 2022 23:14:09 +0300 you wrote:
> 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...
> 
> [...]

Here is the summary with links:
  - smsc911x: allow using IRQ0
    https://git.kernel.org/netdev/net/c/5ef9b803a4af

You are awesome, thank you!
diff mbox series

Patch

Index: net/drivers/net/ethernet/smsc/smsc911x.c
===================================================================
--- net.orig/drivers/net/ethernet/smsc/smsc911x.c
+++ net/drivers/net/ethernet/smsc/smsc911x.c
@@ -2431,7 +2431,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;