Skip to contentSkip to conversation

sata_rcar: fix deferred probing

PATCH In review Sergei Shtylyov 4 participants 5 messages Nov 25, 2018 – Dec 10, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sata_rcar: fix deferred probing

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")

---
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(-)
drivers/ata/sata_rcar.c +3 -1
Index: 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);
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Sergei Shtylyov

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")
Quoted 24 lines

---
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
===================================================================

drivers/ata/sata_rcar.c +3 -1
@@ -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);
Reviewed-by on v1 1/1
#2 lore raw
In reply to Sergei Shtylyov
Quoted 8 lines · Sergei Shtylyov

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")

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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
#3 lore raw
In reply to Sergei Shtylyov
Quoted 6 lines · Sergei Shtylyov

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...

Quoted 6 lines
Fixes 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq")

---
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

#4 lore raw
Quoted 11 lines · Sergei Shtylyov
Quoted 9 lines · Sergei Shtylyov

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")
Quoted 6 lines
Quoted 3 lines

---
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.

Signature · 1 line
Jens Axboe