Hi Claudiu,
On Wed, 22 Oct 2025 at 15:06, Claudiu claudiu.beznea@tuxon.dev wrote:
From: Claudiu Beznea claudiu.beznea.uj@bp.renesas.com
A synchronous external abort occurs on the Renesas RZ/G3S SoC if unbind is executed after the configuration sequence described above:
[...]
The issue occurs because usbhs_sys_function_pullup(), which accesses the IP registers, is executed after the USBHS clocks have been disabled. The problem is reproducible on the Renesas RZ/G3S SoC starting with the addition of module stop in the clock enable/disable APIs. With module stop functionality enabled, a bus error is expected if a master accesses a module whose clock has been stopped and module stop activated.
Disable the IP clocks at the end of remove.
Cc: stable@vger.kernel.org Fixes: f1407d5c6624 ("usb: renesas_usbhs: Add Renesas USBHS common code") Signed-off-by: Claudiu Beznea claudiu.beznea.uj@bp.renesas.com
Thanks for your patch!
--- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c @@ -813,18 +813,18 @@ 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);pm_runtime_disable(&pdev->dev);usbhs_platform_call(priv, hardware_exit, pdev); usbhsc_clk_put(priv);
Shouldn't the usbhsc_clk_put() call be moved just before the pm_runtime_disable() call, too, cfr. the error path in usbhs_probe()?
reset_control_assert(priv->rsts); usbhs_mod_remove(priv); usbhs_fifo_remove(priv); usbhs_pipe_remove(priv);
/* power off */if (!usbhs_get_dparam(priv, runtime_pwctrl))usbhsc_power_ctrl(priv, 0);pm_runtime_disable(&pdev->dev);}
static int usbhsc_suspend(struct device *dev)
Gr{oetje,eeting}s,
Geert