* [PATCH] sata_rcar: fix deferred probing
@ 2018-11-24 18:14 Sergei Shtylyov
2018-11-26 8:33 ` Simon Horman
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2018-11-24 18:14 UTC (permalink / raw)
To: Jens Axboe, linux-ide; +Cc: linux-renesas-soc
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: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
This patch is against the 'master' branch of Jens Axboe's 'linux-block.git'
repo.
drivers/ata/sata_rcar.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: linux-block/drivers/ata/sata_rcar.c
===================================================================
--- linux-block.orig/drivers/ata/sata_rcar.c
+++ linux-block/drivers/ata/sata_rcar.c
@@ -891,7 +891,9 @@ static int sata_rcar_probe(struct platfo
int ret = 0;
irq = platform_get_irq(pdev, 0);
- if (irq <= 0)
+ if (irq < 0)
+ return irq;
+ if (!irq)
return -EINVAL;
priv = devm_kzalloc(dev, sizeof(struct sata_rcar_priv), GFP_KERNEL);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sata_rcar: fix deferred probing
2018-11-24 18:14 [PATCH] sata_rcar: fix deferred probing Sergei Shtylyov
@ 2018-11-26 8:33 ` Simon Horman
2018-11-26 10:16 ` Geert Uytterhoeven
2018-12-10 16:41 ` Sergei Shtylyov
2 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2018-11-26 8:33 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: Jens Axboe, linux-ide, linux-renesas-soc
On Sat, Nov 24, 2018 at 09:14:16PM +0300, Sergei Shtylyov wrote:
> 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: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
>
> ---
> This patch is against the 'master' branch of Jens Axboe's 'linux-block.git'
> repo.
>
> drivers/ata/sata_rcar.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> Index: linux-block/drivers/ata/sata_rcar.c
> ===================================================================
> --- linux-block.orig/drivers/ata/sata_rcar.c
> +++ linux-block/drivers/ata/sata_rcar.c
> @@ -891,7 +891,9 @@ static int sata_rcar_probe(struct platfo
> int ret = 0;
>
> irq = platform_get_irq(pdev, 0);
> - if (irq <= 0)
> + if (irq < 0)
> + return irq;
> + if (!irq)
> return -EINVAL;
>
> priv = devm_kzalloc(dev, sizeof(struct sata_rcar_priv), GFP_KERNEL);
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sata_rcar: fix deferred probing
2018-11-24 18:14 [PATCH] sata_rcar: fix deferred probing Sergei Shtylyov
2018-11-26 8:33 ` Simon Horman
@ 2018-11-26 10:16 ` Geert Uytterhoeven
2018-12-10 16:41 ` Sergei Shtylyov
2 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2018-11-26 10:16 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: Jens Axboe, linux-ide, Linux-Renesas
On Sat, Nov 24, 2018 at 7:14 PM Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> 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: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sata_rcar: fix deferred probing
2018-11-24 18:14 [PATCH] sata_rcar: fix deferred probing Sergei Shtylyov
2018-11-26 8:33 ` Simon Horman
2018-11-26 10:16 ` Geert Uytterhoeven
@ 2018-12-10 16:41 ` Sergei Shtylyov
2018-12-10 18:09 ` Jens Axboe
2 siblings, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2018-12-10 16:41 UTC (permalink / raw)
To: Jens Axboe, linux-ide; +Cc: linux-renesas-soc
On 11/24/2018 09:14 PM, Sergei Shtylyov wrote:
> 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: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> ---
> This patch is against the 'master' branch of Jens Axboe's 'linux-block.git'
> repo.
Jens, what about this patch? 2 weeks passed, there were 2 R-b tags, and
that's all...
MBR, Sergei
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sata_rcar: fix deferred probing
2018-12-10 16:41 ` Sergei Shtylyov
@ 2018-12-10 18:09 ` Jens Axboe
0 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2018-12-10 18:09 UTC (permalink / raw)
To: Sergei Shtylyov, linux-ide; +Cc: linux-renesas-soc
On 12/10/18 9:41 AM, Sergei Shtylyov wrote:
> On 11/24/2018 09:14 PM, Sergei Shtylyov wrote:
>
>> 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: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>
>> ---
>> This patch is against the 'master' branch of Jens Axboe's 'linux-block.git'
>> repo.
>
> Jens, what about this patch? 2 weeks passed, there were 2 R-b tags, and
> that's all...
I'll queue it up, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-12-10 18:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-24 18:14 [PATCH] sata_rcar: fix deferred probing Sergei Shtylyov
2018-11-26 8:33 ` Simon Horman
2018-11-26 10:16 ` Geert Uytterhoeven
2018-12-10 16:41 ` Sergei Shtylyov
2018-12-10 18:09 ` Jens Axboe
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).