All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Bobek Brzeczyszczykiewicz" <admin@roadbobek.com>
Cc: linux-usb@vger.kernel.org, linux-sunxi@lists.linux.dev,
	linux-phy@lists.infradead.org, vkoul@kernel.org,
	neil.armstrong@linaro.org, olteanv@gmail.com
Subject: Re: [PATCH v2 1/3] usb: musb: sunxi: Assert reset before deasserting on init
Date: Mon, 23 Nov 2026 07:00:36 +0000	[thread overview]
Message-ID: <sashiko-outbox-228788@kernel.org> (raw)
In-Reply-To: <20261123-usb-sunxi-reset-fix-v2-1-4e51d3a64964@roadbobek.com>

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@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

WARNING: multiple messages have this Message-ID (diff)
From: sashiko-bot@kernel.org
To: "Bobek Brzeczyszczykiewicz" <admin@roadbobek.com>
Cc: linux-usb@vger.kernel.org, linux-sunxi@lists.linux.dev,
	linux-phy@lists.infradead.org, vkoul@kernel.org,
	neil.armstrong@linaro.org, olteanv@gmail.com
Subject: Re: [PATCH v2 1/3] usb: musb: sunxi: Assert reset before deasserting on init
Date: Mon, 23 Nov 2026 07:00:36 +0000	[thread overview]
Message-ID: <sashiko-outbox-228788@kernel.org> (raw)
In-Reply-To: <20261123-usb-sunxi-reset-fix-v2-1-4e51d3a64964@roadbobek.com>

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@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

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  reply	other threads:[~2026-11-23  7:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23  6:54 [PATCH v2 0/3] usb/phy: sunxi: Assert reset before deasserting on init Bobek Brzeczyszczykiewicz
2026-11-23  6:54 ` Bobek Brzeczyszczykiewicz via B4 Relay
2026-11-23  6:54 ` Bobek Brzeczyszczykiewicz via B4 Relay
2026-11-23  6:54 ` [PATCH v2 1/3] usb: musb: " Bobek Brzeczyszczykiewicz
2026-11-23  6:54   ` Bobek Brzeczyszczykiewicz via B4 Relay
2026-11-23  6:54   ` Bobek Brzeczyszczykiewicz via B4 Relay
2026-11-23  7:00   ` sashiko-bot [this message]
2026-11-23  7:00     ` sashiko-bot
2026-11-23  6:54 ` [PATCH v2 2/3] phy: sun4i-usb: Assert PHY resets in sun4i_usb_phy_probe() Bobek Brzeczyszczykiewicz
2026-11-23  6:54   ` Bobek Brzeczyszczykiewicz via B4 Relay
2026-11-23  6:54   ` Bobek Brzeczyszczykiewicz via B4 Relay
2026-11-23  6:54 ` [PATCH v2 3/3] phy: sun4i-usb: Fix phy2->clk2 reference imbalance in sun4i_usb_phy_init() Bobek Brzeczyszczykiewicz
2026-11-23  6:54   ` Bobek Brzeczyszczykiewicz via B4 Relay
2026-11-23  6:54   ` Bobek Brzeczyszczykiewicz via B4 Relay
2026-11-23  7:00 ` [PATCH v2 0/3] usb/phy: sunxi: Assert reset before deasserting on init sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-228788@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=admin@roadbobek.com \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=linux-usb@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=olteanv@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.