[PATCH v2 1/3] usb: musb: sunxi: Assert reset before deasserting on init
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Sun Nov 22 23:00:36 PST 2026
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] usb: musb: sunxi: unchecked reset_control_assert() in
sunxi_musb_init()
--
commit 979d5486eac0aa36960d582b6b645fa08e41d62e
Author: Bobek Brzeczyszczykiewicz <admin at roadbobek.com>
usb: musb: sunxi: Assert reset before deasserting on init
This commit requests an exclusive reset control in sunxi_musb_probe() and
briefly asserts glue->rst before deasserting it in sunxi_musb_init() so
that MUSB starts from a clean state when a bootloader left the reset line
deasserted.
> diff --git a/drivers/usb/musb/sunxi.c b/drivers/usb/musb/sunxi.c
> index a17b1c150626b..5f63d519237b4 100644
> --- a/drivers/usb/musb/sunxi.c
> +++ b/drivers/usb/musb/sunxi.c
[ ... ]
> @@ -239,6 +240,8 @@ static int sunxi_musb_init(struct musb *musb)
> goto error_sram_release;
>
> if (test_bit(SUNXI_MUSB_FL_HAS_RESET, &glue->flags)) {
> + reset_control_assert(glue->rst);
> + usleep_range(10, 20);
> ret = reset_control_deassert(glue->rst);
> if (ret)
> goto error_clk_disable;
[Severity: Low]
As reported by Philipp Zabel on v1 [1], should the return value of
reset_control_assert(glue->rst) be checked and jump to error_clk_disable
on failure, matching reset_control_deassert() right below?
[1] https://lore.kernel.org/r/974d629b23d38d46a033513db9b4e783b9c11cda.camel@pengutronix.de
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123-usb-sunxi-reset-fix-v2-0-4e51d3a64964@roadbobek.com?part=1
More information about the linux-phy
mailing list