linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Sergey Shtylyov <s.shtylyov@omprussia.ru>
Cc: Jens Axboe <axboe@kernel.dk>, linux-ide@vger.kernel.org
Subject: Re: [PATCH] sata_highbank: fix deferred probing
Date: Wed, 19 May 2021 09:33:54 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2105190930300.1685435@ramsan.of.borg> (raw)
In-Reply-To: <105b456d-1199-f6e9-ceb7-ffc5ba551d1a@omprussia.ru>

 	Hi Sergei,

On Sun, 14 Mar 2021, Sergey 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: Sergey Shtylyov <s.shtylyov@omprussia.ru>

Thanks for your patch, which is now commit 4a24efa16e7db023
("sata_highbank: fix deferred probing") in block/for-next.

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

This message should not be printed in case of -EPROBE_DEFER...

> -		return -EINVAL;
> +		return irq;

... hence

     return dev_err_probe(dev, irq, "no irq\n");

Same for pata_rb532_cf.

> 	}
> +	if (!irq)
> +		return -EINVAL;
>
> 	hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
> 	if (!hpriv) {
>
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

  parent reply	other threads:[~2021-05-19  7:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-14 20:34 [PATCH] sata_highbank: fix deferred probing Sergey Shtylyov
2021-05-18 18:30 ` Sergey Shtylyov
2021-05-18 21:18 ` Jens Axboe
2021-05-19  7:33 ` Geert Uytterhoeven [this message]
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=alpine.DEB.2.22.394.2105190930300.1685435@ramsan.of.borg \
    --to=geert@linux-m68k.org \
    --cc=axboe@kernel.dk \
    --cc=linux-ide@vger.kernel.org \
    --cc=s.shtylyov@omprussia.ru \
    /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 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).