linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pata_ep93xx: fix deferred probing
@ 2021-03-19 20:24 Sergey Shtylyov
  2021-03-19 20:37 ` Sergey Shtylyov
  0 siblings, 1 reply; 2+ messages in thread
From: Sergey Shtylyov @ 2021-03-19 20:24 UTC (permalink / raw)
  To: Jens Axboe, linux-ide

The driver overrides the error codes returned by platform_get_irq() to
-ENXIO, 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: 2fff27512600 ("PATA host controller driver for ep93xx")
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_ep93xx.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Index: linux-block/drivers/ata/pata_ep93xx.c
===================================================================
--- linux-block.orig/drivers/ata/pata_ep93xx.c
+++ linux-block/drivers/ata/pata_ep93xx.c
@@ -928,7 +928,11 @@ static int ep93xx_pata_probe(struct plat
 	/* INT[3] (IRQ_EP93XX_EXT3) line connected as pull down */
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
-		err = -ENXIO;
+		err = irq;
+		goto err_rel_gpio;
+	}
+	if (!irq) {
+		err = -EINVAL;
 		goto err_rel_gpio;
 	}
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] pata_ep93xx: fix deferred probing
  2021-03-19 20:24 [PATCH] pata_ep93xx: fix deferred probing Sergey Shtylyov
@ 2021-03-19 20:37 ` Sergey Shtylyov
  0 siblings, 0 replies; 2+ messages in thread
From: Sergey Shtylyov @ 2021-03-19 20:37 UTC (permalink / raw)
  To: Jens Axboe, linux-ide

Hello!

On 3/19/21 11:24 PM, Sergey Shtylyov wrote:

> The driver overrides the error codes returned by platform_get_irq() to
> -ENXIO, 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: 2fff27512600 ("PATA host controller driver for ep93xx")
> 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_ep93xx.c |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> Index: linux-block/drivers/ata/pata_ep93xx.c
> ===================================================================
> --- linux-block.orig/drivers/ata/pata_ep93xx.c
> +++ linux-block/drivers/ata/pata_ep93xx.c
> @@ -928,7 +928,11 @@ static int ep93xx_pata_probe(struct plat
>  	/* INT[3] (IRQ_EP93XX_EXT3) line connected as pull down */
>  	irq = platform_get_irq(pdev, 0);
>  	if (irq < 0) {
> -		err = -ENXIO;
> +		err = irq;
> +		goto err_rel_gpio;
> +	}
> +	if (!irq) {
> +		err = -EINVAL;

   Hm, this patch should be split in two, it appears... don't take it as yet please. :-)

[...]

MBR, Sergey

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-19 20:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 20:24 [PATCH] pata_ep93xx: fix deferred probing Sergey Shtylyov
2021-03-19 20:37 ` Sergey Shtylyov

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