linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Shtylyov <s.shtylyov@omprussia.ru>
To: Jens Axboe <axboe@kernel.dk>, <linux-ide@vger.kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	"NXP Linux Team" <linux-imx@nxp.com>,
	<linux-arm-kernel@lists.infradead.org>
Subject: [PATCH 4/4] pata_imx: deny IRQ0
Date: Sun, 21 Mar 2021 21:59:57 +0300	[thread overview]
Message-ID: <d9aa4052-f3d1-6595-65d5-0b0bfc489047@omprussia.ru> (raw)
In-Reply-To: <2e552c36-84a5-a642-a8f0-1395f77a1a6a@omprussia.ru>

If platform_get_irq() returns IRQ0 (considered invalid according to Linus)
the driver blithely passes it to ata_host_activate() that treats IRQ0 as
a sign that libata should use polling and thus complains about non-NULL 
IRQ handler passed to it. Deny IRQ0 right away, returning -EINVAL from
the probe() method...

Fixes: e39c75cf3e04 ("ata: Add iMX pata support")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>

---
 drivers/ata/pata_imx.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-block/drivers/ata/pata_imx.c
===================================================================
--- linux-block.orig/drivers/ata/pata_imx.c
+++ linux-block/drivers/ata/pata_imx.c
@@ -135,6 +135,8 @@ static int pata_imx_probe(struct platfor
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
 		return irq;
+	if (!irq)
+		return -EINVAL;
 
 	priv = devm_kzalloc(&pdev->dev,
 				sizeof(struct pata_imx_priv), GFP_KERNEL);

  parent reply	other threads:[~2021-03-21 19:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-21 18:50 [PATCH 0/4] Explicitly deny IRQ0 in the libata drivers Sergey Shtylyov
2021-03-21 18:54 ` [PATCH 1/4] pata_bk3710: deny IRQ0 Sergey Shtylyov
2021-03-21 18:55 ` [PATCH 2/4] pata_ep93xx: " Sergey Shtylyov
2021-03-21 18:57 ` [PATCH 3/4] pata_ftide010: " Sergey Shtylyov
2021-03-21 18:59 ` Sergey Shtylyov [this message]
2021-03-21 19:06   ` [PATCH 4/4] pata_imx: " Fabio Estevam
2021-09-18 20:49     ` Sergey Shtylyov
2021-09-20 12:45       ` Fabio Estevam
2021-09-20 12:52         ` Fabio Estevam
2021-09-20 16:42           ` Sergey Shtylyov
2021-09-20 16:41         ` Sergey Shtylyov
2021-05-10 20:48 ` [PATCH 0/4] Explicitly deny IRQ0 in the libata drivers Sergey Shtylyov
2021-09-04 18:57   ` Sergey Shtylyov
2021-09-04 21:25     ` Jens Axboe
2021-09-05  9:47       ` Sergey Shtylyov

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=d9aa4052-f3d1-6595-65d5-0b0bfc489047@omprussia.ru \
    --to=s.shtylyov@omprussia.ru \
    --cc=axboe@kernel.dk \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --subject='Re: [PATCH 4/4] pata_imx: deny 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).