[PATCH] usb: renesas_usbhs: Fix power-off ordering on unbind
From: Biju
Date: Mon Jun 15 2026 - 13:39:27 EST
From: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
Move the usbhsc_power_ctrl() call to before usbhs_*_hardware_exit(), so
that usbhs_*_hardware_exit() sets priv->phy to NULL only after
usbhsc_power_ctrl() has executed, which controls the PHY power.
Fixes: eb9ac779830b ("usb: renesas_usbhs: Fix synchronous external abort on unbind")
Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
---
drivers/usb/renesas_usbhs/common.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index 8c93bde4b816..614b724a0e52 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -813,6 +813,10 @@ static void usbhs_remove(struct platform_device *pdev)
flush_delayed_work(&priv->notify_hotplug_work);
+ /* power off */
+ if (!usbhs_get_dparam(priv, runtime_pwctrl))
+ usbhsc_power_ctrl(priv, 0);
+
usbhs_platform_call(priv, hardware_exit, pdev);
reset_control_assert(priv->rsts);
@@ -828,10 +832,6 @@ static void usbhs_remove(struct platform_device *pdev)
usbhs_fifo_remove(priv);
usbhs_pipe_remove(priv);
- /* power off */
- if (!usbhs_get_dparam(priv, runtime_pwctrl))
- usbhsc_power_ctrl(priv, 0);
-
usbhsc_clk_put(priv);
pm_runtime_disable(&pdev->dev);
}
--
2.43.0