* [PATCH] pata_rb532_cf: fix deferred probing
@ 2021-03-15 11:46 Sergey Shtylyov
2021-05-18 18:32 ` Sergey Shtylyov
2021-05-18 21:18 ` Jens Axboe
0 siblings, 2 replies; 3+ messages in thread
From: Sergey Shtylyov @ 2021-03-15 11:46 UTC (permalink / raw)
To: Jens Axboe, linux-ide
The driver overrides the error codes returned by platform_get_irq() to
-ENOENT, 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 against the 'master' branch of Jens Axboe's 'linux-block.git'
repo.
drivers/ata/pata_rb532_cf.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: linux-block/drivers/ata/pata_rb532_cf.c
===================================================================
--- linux-block.orig/drivers/ata/pata_rb532_cf.c
+++ linux-block/drivers/ata/pata_rb532_cf.c
@@ -115,10 +115,12 @@ static int rb532_pata_driver_probe(struc
}
irq = platform_get_irq(pdev, 0);
- if (irq <= 0) {
+ if (irq < 0) {
dev_err(&pdev->dev, "no IRQ resource found\n");
- return -ENOENT;
+ return irq;
}
+ if (!irq)
+ return -EINVAL;
gpiod = devm_gpiod_get(&pdev->dev, NULL, GPIOD_IN);
if (IS_ERR(gpiod)) {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pata_rb532_cf: fix deferred probing
2021-03-15 11:46 [PATCH] pata_rb532_cf: fix deferred probing Sergey Shtylyov
@ 2021-05-18 18:32 ` Sergey Shtylyov
2021-05-18 21:18 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Sergey Shtylyov @ 2021-05-18 18:32 UTC (permalink / raw)
To: Sergey Shtylyov, Jens Axboe, linux-ide
On 3/15/21 2:46 PM, Sergey Shtylyov wrote:
> The driver overrides the error codes returned by platform_get_irq() to
> -ENOENT, 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>
[...]
Again, 2 months have passed, and it seems the patch has been lost somewhere...
MNR, Sergey
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pata_rb532_cf: fix deferred probing
2021-03-15 11:46 [PATCH] pata_rb532_cf: fix deferred probing Sergey Shtylyov
2021-05-18 18:32 ` Sergey Shtylyov
@ 2021-05-18 21:18 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2021-05-18 21:18 UTC (permalink / raw)
To: Sergey Shtylyov, linux-ide
On 3/15/21 5:46 AM, Sergey Shtylyov wrote:
> The driver overrides the error codes returned by platform_get_irq() to
> -ENOENT, 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...
Applied, sorry about the delay.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-18 21:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15 11:46 [PATCH] pata_rb532_cf: fix deferred probing Sergey Shtylyov
2021-05-18 18:32 ` Sergey Shtylyov
2021-05-18 21:18 ` Jens Axboe
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.