From: sashiko-bot@kernel.org
To: "Dickson Wu" <dickson.wu@certik.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH 5.10.y-cip] usb: cdns3: gadget: fix state inconsistency on gadget init failure
Date: Fri, 27 Nov 2026 12:26:52 +0000 [thread overview]
Message-ID: <sashiko-outbox-237388@kernel.org> (raw)
In-Reply-To: <20261127-cip-cdns3-510c-v1-1-56e5faa149b9@certik.com>
> From: Yongchao Wu <yongchao.wu@autochips.com>
>
> commit c32f8748d70c8fc77676ad92ed76cede17bf2c48 upstream.
>
> When cdns3_gadget_start() fails, the DRD hardware is left in gadget mode
> while software state remains INACTIVE, creating hardware/software state
> inconsistency.
>
> When switching to host mode via sysfs:
> echo host > /sys/class/usb_role/13180000.usb-role-switch/role
>
> The role state is not set to CDNS_ROLE_STATE_ACTIVE due to the error,
> so cdns_role_stop() skips cleanup because state is still INACTIVE.
> This violates the DRD controller design specification (Figure22),
> which requires returning to idle state before switching roles.
> [ ... ]
> Acked-by: Peter Chen <peter.chen@kernel.org>
> Link: https://patch.msgid.link/20260401001000.5761-1-yongchao.wu@autochips.com
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> [ adapted to 5.10.y-cip: use gadget.c and cdns3_drd_gadget_off() ]
> Signed-off-by: Dickson Wu <dickson.wu@certik.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261127-cip-cdns3-510c-v1-1-56e5faa149b9@certik.com?part=1
prev parent reply other threads:[~2026-11-27 12:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 12:18 [PATCH 5.10.y-cip] usb: cdns3: gadget: fix state inconsistency on gadget init failure Dickson Wu via B4 Relay
2026-11-27 12:26 ` sashiko-bot [this message]
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-237388@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dickson.wu@certik.com \
--cc=linux-usb@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox