Linux Tegra architecture development
 help / color / mirror / Atom feed
* [PATCH] usb: xhci: tegra: Propagate -EPROBE_DEFER from IRQ lookup
@ 2026-08-06  6:39 phucduc.bui
  2026-08-06  7:03 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: phucduc.bui @ 2026-08-06  6:39 UTC (permalink / raw)
  To: Mathias Nyman, Greg Kroah-Hartman, Thierry Reding,
	Jonathan Hunter, linux-usb
  Cc: linux-kernel, linux-tegra, bui duc phuc

From: bui duc phuc <phucduc.bui@gmail.com>

Return -EPROBE_DEFER from platform_get_irq_optional() so the driver is
re-probed when the interrupt resource becomes available instead of
continuing probe without an IRQ.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
 drivers/usb/host/xhci-tegra.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
index e7e6d569f1db..cb946eb7a65d 100644
--- a/drivers/usb/host/xhci-tegra.c
+++ b/drivers/usb/host/xhci-tegra.c
@@ -1571,6 +1571,8 @@ static int tegra_xusb_setup_wakeup(struct platform_device *pdev, struct tegra_xu
 		struct irq_data *data;
 
 		tegra->wake_irqs[i] = platform_get_irq_optional(pdev, i + WAKE_IRQ_START_INDEX);
+		if (tegra->wake_irqs[i] == -EPROBE_DEFER)
+			return -EPROBE_DEFER;
 		if (tegra->wake_irqs[i] < 0)
 			break;
 
-- 
2.43.0


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

* Re: [PATCH] usb: xhci: tegra: Propagate -EPROBE_DEFER from IRQ lookup
  2026-08-06  6:39 [PATCH] usb: xhci: tegra: Propagate -EPROBE_DEFER from IRQ lookup phucduc.bui
@ 2026-08-06  7:03 ` Greg Kroah-Hartman
  2026-08-06  7:30   ` Bui Duc Phuc
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2026-08-06  7:03 UTC (permalink / raw)
  To: phucduc.bui
  Cc: Mathias Nyman, Thierry Reding, Jonathan Hunter, linux-usb,
	linux-kernel, linux-tegra

On Thu, Aug 06, 2026 at 01:39:33PM +0700, phucduc.bui@gmail.com wrote:
> From: bui duc phuc <phucduc.bui@gmail.com>
> 
> Return -EPROBE_DEFER from platform_get_irq_optional() so the driver is
> re-probed when the interrupt resource becomes available instead of
> continuing probe without an IRQ.
> 
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
> ---
>  drivers/usb/host/xhci-tegra.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
> index e7e6d569f1db..cb946eb7a65d 100644
> --- a/drivers/usb/host/xhci-tegra.c
> +++ b/drivers/usb/host/xhci-tegra.c
> @@ -1571,6 +1571,8 @@ static int tegra_xusb_setup_wakeup(struct platform_device *pdev, struct tegra_xu
>  		struct irq_data *data;
>  
>  		tegra->wake_irqs[i] = platform_get_irq_optional(pdev, i + WAKE_IRQ_START_INDEX);
> +		if (tegra->wake_irqs[i] == -EPROBE_DEFER)
> +			return -EPROBE_DEFER;
>  		if (tegra->wake_irqs[i] < 0)
>  			break;
>  
> -- 
> 2.43.0
> 
> 

As before, how was this found and tested?

thanks,

greg k-h

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

* Re: [PATCH] usb: xhci: tegra: Propagate -EPROBE_DEFER from IRQ lookup
  2026-08-06  7:03 ` Greg Kroah-Hartman
@ 2026-08-06  7:30   ` Bui Duc Phuc
  0 siblings, 0 replies; 3+ messages in thread
From: Bui Duc Phuc @ 2026-08-06  7:30 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mathias Nyman, Thierry Reding, Jonathan Hunter, linux-usb,
	linux-kernel, linux-tegra

Hi Greg,

Thank you for your feedback.

>
> As before, how was this found and tested?
>

I found this during code inspection while cleaning up probe functions in
the Rockchip ASoC drivers.

https://lore.kernel.org/all/20260806052136.21034-1-phucduc.bui@gmail.com/

platform_get_irq_optional() returns a positive IRQ number on success or
a negative error code on failure, including -EPROBE_DEFER. The driver
handled positive IRQ numbers but ignored -EPROBE_DEFER, continuing
probe without an IRQ instead of deferring.

I only compile-tested the change. I don't have the hardware to test this
path at runtime.

Best regards,
Phuc

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

end of thread, other threads:[~2026-08-06  7:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-06  6:39 [PATCH] usb: xhci: tegra: Propagate -EPROBE_DEFER from IRQ lookup phucduc.bui
2026-08-06  7:03 ` Greg Kroah-Hartman
2026-08-06  7:30   ` Bui Duc Phuc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox