All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: <linux-usb@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alan Stern <stern@rowland.harvard.edu>
Subject: [PATCH 05/10] usb: host: ehci-orion: fix deferred probing
Date: Thu, 21 Oct 2021 22:14:32 +0300	[thread overview]
Message-ID: <20211021191437.8737-6-s.shtylyov@omp.ru> (raw)
In-Reply-To: <20211021191437.8737-1-s.shtylyov@omp.ru>

The driver overrides the error codes (and also IRQ0) returned by
platform_get_irq() to -ENODEV, so if it returns -EPROBE_DEFER, the driver
will fail the probe permanently instead of the deferred probing. Switch to
propagating the error codes upstream -- that means we have to explicitly
filter out IRQ0 as bad since usb_add_hcd() doesn't quite like it... :-)

Fixes: e96ffe2f9deb ("USB: add Marvell Orion USB host support")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 drivers/usb/host/ehci-orion.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c
index 3626758b3e2a..4fa77883f901 100644
--- a/drivers/usb/host/ehci-orion.c
+++ b/drivers/usb/host/ehci-orion.c
@@ -222,8 +222,12 @@ static int ehci_orion_drv_probe(struct platform_device *pdev)
 	pr_debug("Initializing Orion-SoC USB Host Controller\n");
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq <= 0) {
-		err = -ENODEV;
+	if (irq < 0) {
+		err = irq;
+		goto err;
+	}
+	if (!irq) {
+		err = -EINVAL;
 		goto err;
 	}
 
-- 
2.26.3


  parent reply	other threads:[~2021-10-21 19:14 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21 19:14 [PATCH 00/10] Fix deferred probing in the USB host/gadget drivers Sergey Shtylyov
2021-10-21 19:14 ` [PATCH 01/10] usb: gadget: udc: bcm63xx: fix deferred probing Sergey Shtylyov
2021-10-21 19:14   ` Sergey Shtylyov
2021-10-26 21:33   ` Florian Fainelli
2021-10-26 21:33     ` Florian Fainelli
2021-12-10 19:53     ` Sergey Shtylyov
2021-12-10 19:53       ` Sergey Shtylyov
2021-10-21 19:14 ` [PATCH 02/10] usb: gadget: udc: gr: " Sergey Shtylyov
2021-10-21 19:14 ` [PATCH 03/10] usb: gadget: udc: pxa25x: " Sergey Shtylyov
2021-10-21 19:14   ` Sergey Shtylyov
2021-10-21 19:14 ` [PATCH 04/10] usb: host: ehci-atmel: " Sergey Shtylyov
2021-10-21 19:14   ` Sergey Shtylyov
2021-10-21 19:21   ` Alan Stern
2021-10-21 19:21     ` Alan Stern
2021-10-21 19:14 ` Sergey Shtylyov [this message]
2021-10-21 19:14 ` [PATCH 06/10] usb: host: ehci-sh: " Sergey Shtylyov
2021-10-21 19:14 ` [PATCH 07/10] usb: host: ohci-da8xx: " Sergey Shtylyov
2021-10-21 19:17   ` Sergey Shtylyov
2021-10-22  9:08     ` Greg Kroah-Hartman
2021-10-21 19:14 ` [PATCH 08/10] usb: host: ohci-nxp: " Sergey Shtylyov
2021-10-21 19:14   ` Sergey Shtylyov
2021-10-23 18:48   ` Vladimir Zapolskiy
2021-10-23 18:48     ` Vladimir Zapolskiy
2021-10-21 19:14 ` [PATCH 09/10] usb: host: ohci-omap: " Sergey Shtylyov
2021-10-21 19:14 ` [PATCH 10/10] usb: musb: core: " 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=20211021191437.8737-6-s.shtylyov@omp.ru \
    --to=s.shtylyov@omp.ru \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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 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.