From: Sergey Shtylyov <s.shtylyov@omprussia.ru>
To: Jens Axboe <axboe@kernel.dk>, <linux-ide@vger.kernel.org>
Subject: [PATCH] sata_highbank: fix deferred probing
Date: Sun, 14 Mar 2021 23:34:27 +0300 [thread overview]
Message-ID: <105b456d-1199-f6e9-ceb7-ffc5ba551d1a@omprussia.ru> (raw)
The driver overrides the error codes returned by platform_get_irq() to
-EINVAL, so if it returns -EPROBE_DEFER, the driver would fail the probe
permanently instead of the deferred probing. Switch to propagating the
error code upstream, still checking/overriding IRQ0 as libata regards it
as "no IRQ" (thus polling) anyway...
Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>
---
This patch is againt the 'master' branch of Jens Axboe's linux-block repo.
drivers/ata/sata_highbank.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: linux-block/drivers/ata/sata_highbank.c
===================================================================
--- linux-block.orig/drivers/ata/sata_highbank.c
+++ linux-block/drivers/ata/sata_highbank.c
@@ -469,10 +469,12 @@ static int ahci_highbank_probe(struct pl
}
irq = platform_get_irq(pdev, 0);
- if (irq <= 0) {
+ if (irq < 0) {
dev_err(dev, "no irq\n");
- return -EINVAL;
+ return irq;
}
+ if (!irq)
+ return -EINVAL;
hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
if (!hpriv) {
next reply other threads:[~2021-03-14 20:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-14 20:34 Sergey Shtylyov [this message]
2021-05-18 18:30 ` [PATCH] sata_highbank: fix deferred probing Sergey Shtylyov
2021-05-18 21:18 ` Jens Axboe
2021-05-19 7:33 ` Geert Uytterhoeven
2021-05-19 15:19 ` 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=105b456d-1199-f6e9-ceb7-ffc5ba551d1a@omprussia.ru \
--to=s.shtylyov@omprussia.ru \
--cc=axboe@kernel.dk \
--cc=linux-ide@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.