Skip to contentSkip to conversation

usb: xhci: tegra: Propagate -EPROBE_DEFER from IRQ lookup

PATCH Superseded [email protected] 2 participants 3 messages Aug 6

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: xhci: tegra: Propagate -EPROBE_DEFER from IRQ lookup

From: bui duc phuc <[email protected]>

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.

---
 drivers/usb/host/xhci-tegra.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/host/xhci-tegra.c +2 -0
index e7e6d569f1db..cb946eb7a65d 100644
@@ -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;
 
Signature · 1 line
2.43.0
#1 lore raw
Quoted 28 lines · On Thu, Aug 06, 2026 at 01:39:33PM +0700, [email protected] wrote:

From: bui duc phuc <[email protected]>

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.

---
 drivers/usb/host/xhci-tegra.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/host/xhci-tegra.c +2 -0
index e7e6d569f1db..cb946eb7a65d 100644
@@ -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;
 
Signature · 1 line
2.43.0

As before, how was this found and tested?

thanks,

greg k-h

#2 lore raw

Hi Greg,

Thank you for your feedback.

Quoted 3 lines

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/[email protected]/

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