From: Sergey Shtylyov <s.shtylyov@omp.ru> To: "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, <netdev@vger.kernel.org>, Steve Glendinning <steve.glendinning@shawell.net>, Eric Dumazet <edumazet@google.com>, Paolo Abeni <pabeni@redhat.com> Cc: <linux-sh@vger.kernel.org> Subject: [PATCH] smsc911x: allow using IRQ0 Date: Mon, 2 May 2022 23:14:09 +0300 [thread overview] Message-ID: <656036e4-6387-38df-b8a7-6ba683b16e63@omp.ru> (raw) 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(-) 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;
next reply other threads:[~2022-05-02 20:14 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-02 20:14 Sergey Shtylyov [this message] 2022-05-04 0:10 ` patchwork-bot+netdevbpf
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=656036e4-6387-38df-b8a7-6ba683b16e63@omp.ru \ --to=s.shtylyov@omp.ru \ --cc=davem@davemloft.net \ --cc=edumazet@google.com \ --cc=kuba@kernel.org \ --cc=linux-sh@vger.kernel.org \ --cc=netdev@vger.kernel.org \ --cc=pabeni@redhat.com \ --cc=steve.glendinning@shawell.net \ --subject='Re: [PATCH] smsc911x: allow using IRQ0' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.