All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] Fix deferred probing in the USB host/gadget drivers
@ 2021-10-21 19:14 Sergey Shtylyov
  2021-10-21 19:14   ` Sergey Shtylyov
                   ` (9 more replies)
  0 siblings, 10 replies; 25+ messages in thread
From: Sergey Shtylyov @ 2021-10-21 19:14 UTC (permalink / raw)
  To: linux-usb, Greg Kroah-Hartman, Felipe Balbi, Alan Stern, Bin Liu

Here are 10 patches against the 'usb-next' branch of Wolfram's 'usb.git' repo
plus my 22 patches posted on Monday.  The affected host/gadget drivers call
platform_get_irq() but override its result in case of error -- which prevents
the deferred probing from working...

Sergey Shtylyov (10):
  usb: gadget: udc: bcm63xx: fix deferred probing
  usb: gadget: udc: gr: fix deferred probing
  usb: gadget: udc: pxa25x: fix deferred probing
  usb: host: ehci-atmel: fix deferred probing
  usb: host: ehci-orion: fix deferred probing
  usb: host: ehci-sh: fix deferred probing
  usb: host: ohci-da8xx: fix deferred probing
  usb: host: ohci-nxp: fix deferred probing
  usb: host: ohci-omap: fix deferred probing
  usb: musb: core: fix deferred probing

 drivers/usb/gadget/udc/bcm63xx_udc.c | 8 ++++++--
 drivers/usb/gadget/udc/gr_udc.c      | 8 ++++----
 drivers/usb/gadget/udc/pxa25x_udc.c  | 2 +-
 drivers/usb/host/ehci-atmel.c        | 8 ++++++--
 drivers/usb/host/ehci-orion.c        | 8 ++++++--
 drivers/usb/host/ehci-sh.c           | 8 ++++++--
 drivers/usb/host/ohci-da8xx.c        | 2 +-
 drivers/usb/host/ohci-nxp.c          | 2 +-
 drivers/usb/host/ohci-omap.c         | 2 +-
 drivers/usb/musb/musb_core.c         | 4 ++--
 10 files changed, 34 insertions(+), 18 deletions(-)

-- 
2.26.3


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

* [PATCH 01/10] usb: gadget: udc: bcm63xx: fix deferred probing
  2021-10-21 19:14 [PATCH 00/10] Fix deferred probing in the USB host/gadget drivers Sergey Shtylyov
@ 2021-10-21 19:14   ` Sergey Shtylyov
  2021-10-21 19:14 ` [PATCH 02/10] usb: gadget: udc: gr: " Sergey Shtylyov
                     ` (8 subsequent siblings)
  9 siblings, 0 replies; 25+ messages in thread
From: Sergey Shtylyov @ 2021-10-21 19:14 UTC (permalink / raw)
  To: linux-usb, Greg Kroah-Hartman, Felipe Balbi
  Cc: Kevin Cernekee, Florian Fainelli, bcm-kernel-feedback-list,
	linux-arm-kernel

The driver overrides the error codes returned by platform_get_irq() to
-ENXIO for some strange reason, 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.

Fixes: 613065e53cb1 ("usb: gadget: bcm63xx UDC driver")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 drivers/usb/gadget/udc/bcm63xx_udc.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/udc/bcm63xx_udc.c b/drivers/usb/gadget/udc/bcm63xx_udc.c
index a9f07c59fc37..2cdb07905bde 100644
--- a/drivers/usb/gadget/udc/bcm63xx_udc.c
+++ b/drivers/usb/gadget/udc/bcm63xx_udc.c
@@ -2321,8 +2321,10 @@ static int bcm63xx_udc_probe(struct platform_device *pdev)
 
 	/* IRQ resource #0: control interrupt (VBUS, speed, etc.) */
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0)
+	if (irq < 0) {
+		rc = irq;
 		goto out_uninit;
+	}
 	if (devm_request_irq(dev, irq, &bcm63xx_udc_ctrl_isr, 0,
 			     dev_name(dev), udc) < 0)
 		goto report_request_failure;
@@ -2330,8 +2332,10 @@ static int bcm63xx_udc_probe(struct platform_device *pdev)
 	/* IRQ resources #1-6: data interrupts for IUDMA channels 0-5 */
 	for (i = 0; i < BCM63XX_NUM_IUDMA; i++) {
 		irq = platform_get_irq(pdev, i + 1);
-		if (irq < 0)
+		if (irq < 0) {
+			rc = irq;
 			goto out_uninit;
+		}
 		if (devm_request_irq(dev, irq, &bcm63xx_udc_data_isr, 0,
 				     dev_name(dev), &udc->iudma[i]) < 0)
 			goto report_request_failure;
-- 
2.26.3


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

* [PATCH 01/10] usb: gadget: udc: bcm63xx: fix deferred probing
@ 2021-10-21 19:14   ` Sergey Shtylyov
  0 siblings, 0 replies; 25+ messages in thread
From: Sergey Shtylyov @ 2021-10-21 19:14 UTC (permalink / raw)
  To: linux-usb, Greg Kroah-Hartman, Felipe Balbi
  Cc: Kevin Cernekee, Florian Fainelli, bcm-kernel-feedback-list,
	linux-arm-kernel

The driver overrides the error codes returned by platform_get_irq() to
-ENXIO for some strange reason, 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.

Fixes: 613065e53cb1 ("usb: gadget: bcm63xx UDC driver")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 drivers/usb/gadget/udc/bcm63xx_udc.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/udc/bcm63xx_udc.c b/drivers/usb/gadget/udc/bcm63xx_udc.c
index a9f07c59fc37..2cdb07905bde 100644
--- a/drivers/usb/gadget/udc/bcm63xx_udc.c
+++ b/drivers/usb/gadget/udc/bcm63xx_udc.c
@@ -2321,8 +2321,10 @@ static int bcm63xx_udc_probe(struct platform_device *pdev)
 
 	/* IRQ resource #0: control interrupt (VBUS, speed, etc.) */
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0)
+	if (irq < 0) {
+		rc = irq;
 		goto out_uninit;
+	}
 	if (devm_request_irq(dev, irq, &bcm63xx_udc_ctrl_isr, 0,
 			     dev_name(dev), udc) < 0)
 		goto report_request_failure;
@@ -2330,8 +2332,10 @@ static int bcm63xx_udc_probe(struct platform_device *pdev)
 	/* IRQ resources #1-6: data interrupts for IUDMA channels 0-5 */
 	for (i = 0; i < BCM63XX_NUM_IUDMA; i++) {
 		irq = platform_get_irq(pdev, i + 1);
-		if (irq < 0)
+		if (irq < 0) {
+			rc = irq;
 			goto out_uninit;
+		}
 		if (devm_request_irq(dev, irq, &bcm63xx_udc_data_isr, 0,
 				     dev_name(dev), &udc->iudma[i]) < 0)
 			goto report_request_failure;
-- 
2.26.3


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 02/10] usb: gadget: udc: gr: fix deferred probing
  2021-10-21 19:14 [PATCH 00/10] Fix deferred probing in the USB host/gadget drivers Sergey Shtylyov
  2021-10-21 19:14   ` Sergey Shtylyov
@ 2021-10-21 19:14 ` Sergey Shtylyov
  2021-10-21 19:14   ` Sergey Shtylyov
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 25+ messages in thread
From: Sergey Shtylyov @ 2021-10-21 19:14 UTC (permalink / raw)
  To: linux-usb, Greg Kroah-Hartman, Felipe Balbi

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, considering IRQ0 valid for simplicity
devm_request_threaded_irq() can always override that decision...

Fixes: 196800da39a1 ("usb: gadget: gr_udc: Use platform_get_irq instead of irq_of_parse_and_map")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 drivers/usb/gadget/udc/gr_udc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/gadget/udc/gr_udc.c b/drivers/usb/gadget/udc/gr_udc.c
index 4b35739d3695..4aa5246a77e5 100644
--- a/drivers/usb/gadget/udc/gr_udc.c
+++ b/drivers/usb/gadget/udc/gr_udc.c
@@ -2136,15 +2136,15 @@ static int gr_probe(struct platform_device *pdev)
 		return PTR_ERR(regs);
 
 	dev->irq = platform_get_irq(pdev, 0);
-	if (dev->irq <= 0)
-		return -ENODEV;
+	if (dev->irq < 0)
+		return dev->irq;
 
 	/* Some core configurations has separate irqs for IN and OUT events */
 	dev->irqi = platform_get_irq(pdev, 1);
 	if (dev->irqi > 0) {
 		dev->irqo = platform_get_irq(pdev, 2);
-		if (dev->irqo <= 0)
-			return -ENODEV;
+		if (dev->irqo < 0)
+			return dev->irqo;
 	} else {
 		dev->irqi = 0;
 	}
-- 
2.26.3


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

* [PATCH 03/10] usb: gadget: udc: pxa25x: fix deferred probing
  2021-10-21 19:14 [PATCH 00/10] Fix deferred probing in the USB host/gadget drivers Sergey Shtylyov
@ 2021-10-21 19:14   ` Sergey Shtylyov
  2021-10-21 19:14 ` [PATCH 02/10] usb: gadget: udc: gr: " Sergey Shtylyov
                     ` (8 subsequent siblings)
  9 siblings, 0 replies; 25+ messages in thread
From: Sergey Shtylyov @ 2021-10-21 19:14 UTC (permalink / raw)
  To: linux-usb, Greg Kroah-Hartman, Felipe Balbi; +Cc: Daniel Mack, linux-arm-kernel

The driver overrides the error codes returned by platform_get_irq() to
-ENODEV for some strange reason, 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.

Fixes: 34ebcd28235d ("pxa2xx_udc: cleanups, use platform_get_irq")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 drivers/usb/gadget/udc/pxa25x_udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c
index 52cdfd8212d6..b38747fd3bb0 100644
--- a/drivers/usb/gadget/udc/pxa25x_udc.c
+++ b/drivers/usb/gadget/udc/pxa25x_udc.c
@@ -2364,7 +2364,7 @@ static int pxa25x_udc_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
-		return -ENODEV;
+		return irq;
 
 	dev->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(dev->regs))
-- 
2.26.3


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

* [PATCH 03/10] usb: gadget: udc: pxa25x: fix deferred probing
@ 2021-10-21 19:14   ` Sergey Shtylyov
  0 siblings, 0 replies; 25+ messages in thread
From: Sergey Shtylyov @ 2021-10-21 19:14 UTC (permalink / raw)
  To: linux-usb, Greg Kroah-Hartman, Felipe Balbi; +Cc: Daniel Mack, linux-arm-kernel

The driver overrides the error codes returned by platform_get_irq() to
-ENODEV for some strange reason, 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.

Fixes: 34ebcd28235d ("pxa2xx_udc: cleanups, use platform_get_irq")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 drivers/usb/gadget/udc/pxa25x_udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c
index 52cdfd8212d6..b38747fd3bb0 100644
--- a/drivers/usb/gadget/udc/pxa25x_udc.c
+++ b/drivers/usb/gadget/udc/pxa25x_udc.c
@@ -2364,7 +2364,7 @@ static int pxa25x_udc_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
-		return -ENODEV;
+		return irq;
 
 	dev->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(dev->regs))
-- 
2.26.3


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 04/10] usb: host: ehci-atmel: fix deferred probing
  2021-10-21 19:14 [PATCH 00/10] Fix deferred probing in the USB host/gadget drivers Sergey Shtylyov
@ 2021-10-21 19:14   ` Sergey Shtylyov
  2021-10-21 19:14 ` [PATCH 02/10] usb: gadget: udc: gr: " Sergey Shtylyov
                     ` (8 subsequent siblings)
  9 siblings, 0 replies; 25+ messages in thread
From: Sergey Shtylyov @ 2021-10-21 19:14 UTC (permalink / raw)
  To: linux-usb, Greg Kroah-Hartman, Alan Stern
  Cc: Nicolas Ferre, Alexandre Belloni, Ludovic Desroches, linux-arm-kernel

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: 501c9c0802d9 ("USB: at91: Add USB EHCI driver for at91sam9g45 series")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 drivers/usb/host/ehci-atmel.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
index 05d41fd65f25..3f7c8ccc6d7f 100644
--- a/drivers/usb/host/ehci-atmel.c
+++ b/drivers/usb/host/ehci-atmel.c
@@ -104,8 +104,12 @@ static int ehci_atmel_drv_probe(struct platform_device *pdev)
 	pr_debug("Initializing Atmel-SoC USB Host Controller\n");
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq <= 0) {
-		retval = -ENODEV;
+	if (irq < 0) {
+		retval = irq;
+		goto fail_create_hcd;
+	}
+	if (!irq) {
+		retval = -EINVAL;
 		goto fail_create_hcd;
 	}
 
-- 
2.26.3


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

* [PATCH 04/10] usb: host: ehci-atmel: fix deferred probing
@ 2021-10-21 19:14   ` Sergey Shtylyov
  0 siblings, 0 replies; 25+ messages in thread
From: Sergey Shtylyov @ 2021-10-21 19:14 UTC (permalink / raw)
  To: linux-usb, Greg Kroah-Hartman, Alan Stern
  Cc: Alexandre Belloni, Ludovic Desroches, linux-arm-kernel

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: 501c9c0802d9 ("USB: at91: Add USB EHCI driver for at91sam9g45 series")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 drivers/usb/host/ehci-atmel.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
index 05d41fd65f25..3f7c8ccc6d7f 100644
--- a/drivers/usb/host/ehci-atmel.c
+++ b/drivers/usb/host/ehci-atmel.c
@@ -104,8 +104,12 @@ static int ehci_atmel_drv_probe(struct platform_device *pdev)
 	pr_debug("Initializing Atmel-SoC USB Host Controller\n");
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq <= 0) {
-		retval = -ENODEV;
+	if (irq < 0) {
+		retval = irq;
+		goto fail_create_hcd;
+	}
+	if (!irq) {
+		retval = -EINVAL;
 		goto fail_create_hcd;
 	}
 
-- 
2.26.3


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 05/10] usb: host: ehci-orion: fix deferred probing
  2021-10-21 19:14 [PATCH 00/10] Fix deferred probing in the USB host/gadget drivers Sergey Shtylyov
                   ` (3 preceding siblings ...)
  2021-10-21 19:14   ` Sergey Shtylyov
@ 2021-10-21 19:14 ` Sergey Shtylyov
  2021-10-21 19:14 ` [PATCH 06/10] usb: host: ehci-sh: " Sergey Shtylyov
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 25+ messages in thread
From: Sergey Shtylyov @ 2021-10-21 19:14 UTC (permalink / raw)
  To: linux-usb, Greg Kroah-Hartman, Alan Stern

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


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

* [PATCH 06/10] usb: host: ehci-sh: fix deferred probing
  2021-10-21 19:14 [PATCH 00/10] Fix deferred probing in the USB host/gadget drivers Sergey Shtylyov
                   ` (4 preceding siblings ...)
  2021-10-21 19:14 ` [PATCH 05/10] usb: host: ehci-orion: " Sergey Shtylyov
@ 2021-10-21 19:14 ` Sergey Shtylyov
  2021-10-21 19:14 ` [PATCH 07/10] usb: host: ohci-da8xx: " Sergey Shtylyov
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 25+ messages in thread
From: Sergey Shtylyov @ 2021-10-21 19:14 UTC (permalink / raw)
  To: linux-usb, Greg Kroah-Hartman, Alan Stern

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: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 drivers/usb/host/ehci-sh.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-sh.c b/drivers/usb/host/ehci-sh.c
index c25c51d26f26..8ce880610212 100644
--- a/drivers/usb/host/ehci-sh.c
+++ b/drivers/usb/host/ehci-sh.c
@@ -82,8 +82,12 @@ static int ehci_hcd_sh_probe(struct platform_device *pdev)
 		return -ENODEV;
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq <= 0) {
-		ret = -ENODEV;
+	if (irq < 0) {
+		ret = irq;
+		goto fail_create_hcd;
+	}
+	if (!irq) {
+		ret = -EINVAL;
 		goto fail_create_hcd;
 	}
 
-- 
2.26.3


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

* [PATCH 07/10] usb: host: ohci-da8xx: fix deferred probing
  2021-10-21 19:14 [PATCH 00/10] Fix deferred probing in the USB host/gadget drivers Sergey Shtylyov
                   ` (5 preceding siblings ...)
  2021-10-21 19:14 ` [PATCH 06/10] usb: host: ehci-sh: " Sergey Shtylyov
@ 2021-10-21 19:14 ` Sergey Shtylyov
  2021-10-21 19:17   ` Sergey Shtylyov
  2021-10-21 19:14   ` Sergey Shtylyov
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 25+ messages in thread
From: Sergey Shtylyov @ 2021-10-21 19:14 UTC (permalink / raw)
  To: linux-usb, Greg Kroah-Hartman, Alan Stern; +Cc: Sergey Shtylyov

From: Sergey Shtylyov <s.shtylyov@omprussia.ru>

The driver overrides the error codes returned by platform_get_irq() to
-ENODEV for some strange reason, 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.

Fixes: efe7daf2231a ("USB: OHCI: DA8xx/OMAP-L1x glue layer")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 drivers/usb/host/ohci-da8xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c
index 6d08ab2bf163..8eceb6a92fe9 100644
--- a/drivers/usb/host/ohci-da8xx.c
+++ b/drivers/usb/host/ohci-da8xx.c
@@ -446,7 +446,7 @@ static int ohci_da8xx_probe(struct platform_device *pdev)
 
 	hcd_irq = platform_get_irq(pdev, 0);
 	if (hcd_irq < 0) {
-		error = -ENODEV;
+		error = hcd_irq;
 		goto err;
 	}
 	if (!hcd_irq) {
-- 
2.26.3


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

* [PATCH 08/10] usb: host: ohci-nxp: fix deferred probing
  2021-10-21 19:14 [PATCH 00/10] Fix deferred probing in the USB host/gadget drivers Sergey Shtylyov
@ 2021-10-21 19:14   ` Sergey Shtylyov
  2021-10-21 19:14 ` [PATCH 02/10] usb: gadget: udc: gr: " Sergey Shtylyov
                     ` (8 subsequent siblings)
  9 siblings, 0 replies; 25+ messages in thread
From: Sergey Shtylyov @ 2021-10-21 19:14 UTC (permalink / raw)
  To: linux-usb, Greg Kroah-Hartman, Alan Stern
  Cc: Vladimir Zapolskiy, linux-arm-kernel

The driver overrides the error codes returned by platform_get_irq() to
-ENXIO for some strange reason, 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...

Fixes: 60bbfc84b6d9 ("USB OHCI controller support for PNX4008")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 drivers/usb/host/ohci-nxp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c
index afb9c2fc85c3..2492f78da6f1 100644
--- a/drivers/usb/host/ohci-nxp.c
+++ b/drivers/usb/host/ohci-nxp.c
@@ -212,7 +212,7 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
-		ret = -ENXIO;
+		ret = irq;
 		goto fail_resource;
 	}
 	if (!irq) {
-- 
2.26.3


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

* [PATCH 08/10] usb: host: ohci-nxp: fix deferred probing
@ 2021-10-21 19:14   ` Sergey Shtylyov
  0 siblings, 0 replies; 25+ messages in thread
From: Sergey Shtylyov @ 2021-10-21 19:14 UTC (permalink / raw)
  To: linux-usb, Greg Kroah-Hartman, Alan Stern
  Cc: Vladimir Zapolskiy, linux-arm-kernel

The driver overrides the error codes returned by platform_get_irq() to
-ENXIO for some strange reason, 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...

Fixes: 60bbfc84b6d9 ("USB OHCI controller support for PNX4008")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 drivers/usb/host/ohci-nxp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c
index afb9c2fc85c3..2492f78da6f1 100644
--- a/drivers/usb/host/ohci-nxp.c
+++ b/drivers/usb/host/ohci-nxp.c
@@ -212,7 +212,7 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
-		ret = -ENXIO;
+		ret = irq;
 		goto fail_resource;
 	}
 	if (!irq) {
-- 
2.26.3


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 09/10] usb: host: ohci-omap: fix deferred probing
  2021-10-21 19:14 [PATCH 00/10] Fix deferred probing in the USB host/gadget drivers Sergey Shtylyov
                   ` (7 preceding siblings ...)
  2021-10-21 19:14   ` Sergey Shtylyov
@ 2021-10-21 19:14 ` Sergey Shtylyov
  2021-10-21 19:14 ` [PATCH 10/10] usb: musb: core: " Sergey Shtylyov
  9 siblings, 0 replies; 25+ messages in thread
From: Sergey Shtylyov @ 2021-10-21 19:14 UTC (permalink / raw)
  To: linux-usb, Greg Kroah-Hartman, Alan Stern

The driver overrides the error codes returned by platform_get_irq() to
-ENXIO for some strange reason, 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.

Fixes: 60bbfc84b6d9 ("USB OHCI controller support for PNX4008")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 drivers/usb/host/ohci-omap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index 6d5f964d0995..87e27c478c4f 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -306,7 +306,7 @@ static int ohci_hcd_omap_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
-		retval = -ENXIO;
+		retval = irq;
 		goto err3;
 	}
 	if (!irq) {
-- 
2.26.3


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

* [PATCH 10/10] usb: musb: core: fix deferred probing
  2021-10-21 19:14 [PATCH 00/10] Fix deferred probing in the USB host/gadget drivers Sergey Shtylyov
                   ` (8 preceding siblings ...)
  2021-10-21 19:14 ` [PATCH 09/10] usb: host: ohci-omap: " Sergey Shtylyov
@ 2021-10-21 19:14 ` Sergey Shtylyov
  9 siblings, 0 replies; 25+ messages in thread
From: Sergey Shtylyov @ 2021-10-21 19:14 UTC (permalink / raw)
  To: linux-usb, Greg Kroah-Hartman, Bin Liu

The driver overrides the error codes 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, while considering IRQ0 valid for simplicity --
request_irq() can always override that decision...

Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 drivers/usb/musb/musb_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index f7b1d5993f8c..e57abc54d12b 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2618,8 +2618,8 @@ static int musb_probe(struct platform_device *pdev)
 	int		irq = platform_get_irq_byname(pdev, "mc");
 	void __iomem	*base;
 
-	if (irq <= 0)
-		return -ENODEV;
+	if (irq < 0)
+		return irq;
 
 	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))
-- 
2.26.3


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

* Re: [PATCH 07/10] usb: host: ohci-da8xx: fix deferred probing
  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
  0 siblings, 1 reply; 25+ messages in thread
From: Sergey Shtylyov @ 2021-10-21 19:17 UTC (permalink / raw)
  To: linux-usb, Greg Kroah-Hartman, Alan Stern; +Cc: Sergey Shtylyov

On 10/21/21 10:14 PM, Sergey Shtylyov wrote:

> From: Sergey Shtylyov <s.shtylyov@omprussia.ru>

   Oops, should have been @omp.ru -- missed it somehow... :-?

> The driver overrides the error codes returned by platform_get_irq() to
> -ENODEV for some strange reason, 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.
> 
> Fixes: efe7daf2231a ("USB: OHCI: DA8xx/OMAP-L1x glue layer")
> Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>

   Hm, this needs fixing too...

> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
[...]

MBR, Sergey

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

* Re: [PATCH 04/10] usb: host: ehci-atmel: fix deferred probing
  2021-10-21 19:14   ` Sergey Shtylyov
@ 2021-10-21 19:21     ` Alan Stern
  -1 siblings, 0 replies; 25+ messages in thread
From: Alan Stern @ 2021-10-21 19:21 UTC (permalink / raw)
  To: Sergey Shtylyov
  Cc: linux-usb, Greg Kroah-Hartman, Nicolas Ferre, Alexandre Belloni,
	Ludovic Desroches, linux-arm-kernel

On Thu, Oct 21, 2021 at 10:14:31PM +0300, Sergey Shtylyov wrote:
> 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: 501c9c0802d9 ("USB: at91: Add USB EHCI driver for at91sam9g45 series")
> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
> ---

For patches 4 - 9:

Acked-by: Alan Stern <stern@rowland.harvard.edu>

>  drivers/usb/host/ehci-atmel.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
> index 05d41fd65f25..3f7c8ccc6d7f 100644
> --- a/drivers/usb/host/ehci-atmel.c
> +++ b/drivers/usb/host/ehci-atmel.c
> @@ -104,8 +104,12 @@ static int ehci_atmel_drv_probe(struct platform_device *pdev)
>  	pr_debug("Initializing Atmel-SoC USB Host Controller\n");
>  
>  	irq = platform_get_irq(pdev, 0);
> -	if (irq <= 0) {
> -		retval = -ENODEV;
> +	if (irq < 0) {
> +		retval = irq;
> +		goto fail_create_hcd;
> +	}
> +	if (!irq) {
> +		retval = -EINVAL;
>  		goto fail_create_hcd;
>  	}
>  
> -- 
> 2.26.3
> 

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

* Re: [PATCH 04/10] usb: host: ehci-atmel: fix deferred probing
@ 2021-10-21 19:21     ` Alan Stern
  0 siblings, 0 replies; 25+ messages in thread
From: Alan Stern @ 2021-10-21 19:21 UTC (permalink / raw)
  To: Sergey Shtylyov
  Cc: Alexandre Belloni, Greg Kroah-Hartman, linux-usb,
	Ludovic Desroches, linux-arm-kernel

On Thu, Oct 21, 2021 at 10:14:31PM +0300, Sergey Shtylyov wrote:
> 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: 501c9c0802d9 ("USB: at91: Add USB EHCI driver for at91sam9g45 series")
> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
> ---

For patches 4 - 9:

Acked-by: Alan Stern <stern@rowland.harvard.edu>

>  drivers/usb/host/ehci-atmel.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
> index 05d41fd65f25..3f7c8ccc6d7f 100644
> --- a/drivers/usb/host/ehci-atmel.c
> +++ b/drivers/usb/host/ehci-atmel.c
> @@ -104,8 +104,12 @@ static int ehci_atmel_drv_probe(struct platform_device *pdev)
>  	pr_debug("Initializing Atmel-SoC USB Host Controller\n");
>  
>  	irq = platform_get_irq(pdev, 0);
> -	if (irq <= 0) {
> -		retval = -ENODEV;
> +	if (irq < 0) {
> +		retval = irq;
> +		goto fail_create_hcd;
> +	}
> +	if (!irq) {
> +		retval = -EINVAL;
>  		goto fail_create_hcd;
>  	}
>  
> -- 
> 2.26.3
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 07/10] usb: host: ohci-da8xx: fix deferred probing
  2021-10-21 19:17   ` Sergey Shtylyov
@ 2021-10-22  9:08     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 25+ messages in thread
From: Greg Kroah-Hartman @ 2021-10-22  9:08 UTC (permalink / raw)
  To: Sergey Shtylyov; +Cc: linux-usb, Alan Stern, Sergey Shtylyov

On Thu, Oct 21, 2021 at 10:17:43PM +0300, Sergey Shtylyov wrote:
> On 10/21/21 10:14 PM, Sergey Shtylyov wrote:
> 
> > From: Sergey Shtylyov <s.shtylyov@omprussia.ru>
> 
>    Oops, should have been @omp.ru -- missed it somehow... :-?
> 
> > The driver overrides the error codes returned by platform_get_irq() to
> > -ENODEV for some strange reason, 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.
> > 
> > Fixes: efe7daf2231a ("USB: OHCI: DA8xx/OMAP-L1x glue layer")
> > Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>
> 
>    Hm, this needs fixing too...
> 
> > Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
> [...]

Please fix up and add Alan's acks and send a v2 of this series.

thanks,

greg k-h

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

* Re: [PATCH 08/10] usb: host: ohci-nxp: fix deferred probing
  2021-10-21 19:14   ` Sergey Shtylyov
@ 2021-10-23 18:48     ` Vladimir Zapolskiy
  -1 siblings, 0 replies; 25+ messages in thread
From: Vladimir Zapolskiy @ 2021-10-23 18:48 UTC (permalink / raw)
  To: Sergey Shtylyov, linux-usb, Greg Kroah-Hartman, Alan Stern
  Cc: linux-arm-kernel

Hi Sergey,

On 10/21/21 10:14 PM, Sergey Shtylyov wrote:
> The driver overrides the error codes returned by platform_get_irq() to
> -ENXIO for some strange reason, 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...
> 
> Fixes: 60bbfc84b6d9 ("USB OHCI controller support for PNX4008")

thank you for the change, it is correct per se, however the blamed commit id
is obviously invalid and must be fixed.

The driver has been added 6 years before introduction of the EPROBE_DEFER by
commit d1c3414c2a9d ("drivercore: Add driver probe deferral mechanism"), and
the mechanism in connection to getting an irq was added even later, presumably
in commit 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq"), but
please correct me here.

> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
> ---
>   drivers/usb/host/ohci-nxp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c
> index afb9c2fc85c3..2492f78da6f1 100644
> --- a/drivers/usb/host/ohci-nxp.c
> +++ b/drivers/usb/host/ohci-nxp.c
> @@ -212,7 +212,7 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev)
>   
>   	irq = platform_get_irq(pdev, 0);
>   	if (irq < 0) {
> -		ret = -ENXIO;
> +		ret = irq;
>   		goto fail_resource;
>   	}
>   	if (!irq) {
> 

After an expected correction of the blamed commit id is done:

Acked-by: Vladimir Zapolskiy <vz@mleia.com>

--
Best wishes,
Vladimir

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 08/10] usb: host: ohci-nxp: fix deferred probing
@ 2021-10-23 18:48     ` Vladimir Zapolskiy
  0 siblings, 0 replies; 25+ messages in thread
From: Vladimir Zapolskiy @ 2021-10-23 18:48 UTC (permalink / raw)
  To: Sergey Shtylyov, linux-usb, Greg Kroah-Hartman, Alan Stern
  Cc: linux-arm-kernel

Hi Sergey,

On 10/21/21 10:14 PM, Sergey Shtylyov wrote:
> The driver overrides the error codes returned by platform_get_irq() to
> -ENXIO for some strange reason, 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...
> 
> Fixes: 60bbfc84b6d9 ("USB OHCI controller support for PNX4008")

thank you for the change, it is correct per se, however the blamed commit id
is obviously invalid and must be fixed.

The driver has been added 6 years before introduction of the EPROBE_DEFER by
commit d1c3414c2a9d ("drivercore: Add driver probe deferral mechanism"), and
the mechanism in connection to getting an irq was added even later, presumably
in commit 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq"), but
please correct me here.

> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
> ---
>   drivers/usb/host/ohci-nxp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c
> index afb9c2fc85c3..2492f78da6f1 100644
> --- a/drivers/usb/host/ohci-nxp.c
> +++ b/drivers/usb/host/ohci-nxp.c
> @@ -212,7 +212,7 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev)
>   
>   	irq = platform_get_irq(pdev, 0);
>   	if (irq < 0) {
> -		ret = -ENXIO;
> +		ret = irq;
>   		goto fail_resource;
>   	}
>   	if (!irq) {
> 

After an expected correction of the blamed commit id is done:

Acked-by: Vladimir Zapolskiy <vz@mleia.com>

--
Best wishes,
Vladimir

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

* Re: [PATCH 01/10] usb: gadget: udc: bcm63xx: fix deferred probing
  2021-10-21 19:14   ` Sergey Shtylyov
@ 2021-10-26 21:33     ` Florian Fainelli
  -1 siblings, 0 replies; 25+ messages in thread
From: Florian Fainelli @ 2021-10-26 21:33 UTC (permalink / raw)
  To: Sergey Shtylyov, linux-usb, Greg Kroah-Hartman, Felipe Balbi
  Cc: Kevin Cernekee, Florian Fainelli, bcm-kernel-feedback-list,
	linux-arm-kernel

On 10/21/21 12:14 PM, Sergey Shtylyov wrote:
> The driver overrides the error codes returned by platform_get_irq() to
> -ENXIO for some strange reason, 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.
> 
> Fixes: 613065e53cb1 ("usb: gadget: bcm63xx UDC driver")
> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Not that this is going to happen for this particular driver on the
platform where it is use MIPS BCM63XX but this is still the right thing
to do anyway.
-- 
Florian

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

* Re: [PATCH 01/10] usb: gadget: udc: bcm63xx: fix deferred probing
@ 2021-10-26 21:33     ` Florian Fainelli
  0 siblings, 0 replies; 25+ messages in thread
From: Florian Fainelli @ 2021-10-26 21:33 UTC (permalink / raw)
  To: Sergey Shtylyov, linux-usb, Greg Kroah-Hartman, Felipe Balbi
  Cc: Kevin Cernekee, Florian Fainelli, bcm-kernel-feedback-list,
	linux-arm-kernel

On 10/21/21 12:14 PM, Sergey Shtylyov wrote:
> The driver overrides the error codes returned by platform_get_irq() to
> -ENXIO for some strange reason, 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.
> 
> Fixes: 613065e53cb1 ("usb: gadget: bcm63xx UDC driver")
> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Not that this is going to happen for this particular driver on the
platform where it is use MIPS BCM63XX but this is still the right thing
to do anyway.
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 01/10] usb: gadget: udc: bcm63xx: fix deferred probing
  2021-10-26 21:33     ` Florian Fainelli
@ 2021-12-10 19:53       ` Sergey Shtylyov
  -1 siblings, 0 replies; 25+ messages in thread
From: Sergey Shtylyov @ 2021-12-10 19:53 UTC (permalink / raw)
  To: Florian Fainelli, Sergey Shtylyov, linux-usb, Greg Kroah-Hartman,
	Felipe Balbi
  Cc: Kevin Cernekee, bcm-kernel-feedback-list, linux-arm-kernel

On 10/27/21 12:33 AM, Florian Fainelli wrote:

>> The driver overrides the error codes returned by platform_get_irq() to
>> -ENXIO for some strange reason, 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.
>>
>> Fixes: 613065e53cb1 ("usb: gadget: bcm63xx UDC driver")
>> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
> 
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> 
> Not that this is going to happen for this particular driver on the
> platform where it is use MIPS BCM63XX

   Thanks for noting that. I think I should re-qualify this patch from
a bug fix to cleanup. I'll split the series into 2 parts now.

> but this is still the right thing
> to do anyway.

   Yes, propagating the error is the Right Thing. :-)

MBR, Sergey

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

* Re: [PATCH 01/10] usb: gadget: udc: bcm63xx: fix deferred probing
@ 2021-12-10 19:53       ` Sergey Shtylyov
  0 siblings, 0 replies; 25+ messages in thread
From: Sergey Shtylyov @ 2021-12-10 19:53 UTC (permalink / raw)
  To: Florian Fainelli, Sergey Shtylyov, linux-usb, Greg Kroah-Hartman,
	Felipe Balbi
  Cc: Kevin Cernekee, bcm-kernel-feedback-list, linux-arm-kernel

On 10/27/21 12:33 AM, Florian Fainelli wrote:

>> The driver overrides the error codes returned by platform_get_irq() to
>> -ENXIO for some strange reason, 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.
>>
>> Fixes: 613065e53cb1 ("usb: gadget: bcm63xx UDC driver")
>> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
> 
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> 
> Not that this is going to happen for this particular driver on the
> platform where it is use MIPS BCM63XX

   Thanks for noting that. I think I should re-qualify this patch from
a bug fix to cleanup. I'll split the series into 2 parts now.

> but this is still the right thing
> to do anyway.

   Yes, propagating the error is the Right Thing. :-)

MBR, Sergey

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-12-10 19:55 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 05/10] usb: host: ehci-orion: " Sergey Shtylyov
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

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.