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
next prev parent reply other threads:[~2026-11-27 12:26 UTC|newest]
Thread overview: 9+ 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:18 ` Dickson Wu
2026-11-27 12:26 ` sashiko-bot [this message]
2026-11-27 13:11 ` Greg KH
2026-11-27 18:46 ` Dickson Wu
2026-11-27 22:07 ` Pavel Machek
2026-11-27 22:19 ` Dickson Wu
2026-12-01 12:12 ` Pavel Machek
2026-12-01 18:50 ` Dickson Wu
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 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.