From: sashiko-bot@kernel.org
To: "Alexey Charkov" <alchark@flipper.net>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v2 2/4] usb: gadget: udc: Forget a deactivation when the gadget driver unbinds
Date: Fri, 13 Nov 2026 09:36:45 +0000 [thread overview]
Message-ID: <sashiko-outbox-212558@kernel.org> (raw)
In-Reply-To: <20261113-udc-connect-v2-2-f51b11f07eb8@flipper.net>
> A gadget driver deactivates the gadget through usb_gadget_deactivate()
> until its functions are ready, so the deactivation means nothing to the
> next driver. Yet the UDC core keeps gadget->deactivated set across
> unbind. Only configfs resets it, from its own unbind callback and
> without connect_lock, so a legacy gadget driver that unbinds while
> deactivated leaves the next driver unable to connect.
>
> Clear the flag under connect_lock once the driver has unbound, including
> when the bind fails after the driver has deactivated the gadget.
>
> Suggested-by: Alan Stern <stern@rowland.harvard.edu>
> Signed-off-by: Alexey Charkov <alchark@flipper.net>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261113-udc-connect-v2-0-f51b11f07eb8@flipper.net?part=2
next prev parent reply other threads:[~2026-11-13 9:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 9:28 [PATCH v2 0/4] usb: gadget: udc: Rework when the gadget connects Alexey Charkov
2026-11-13 9:28 ` [PATCH v2 1/4] usb: gadget: udc: Clear a pending connection when starting the UDC Alexey Charkov
2026-11-13 9:39 ` sashiko-bot
2026-11-13 9:28 ` [PATCH v2 2/4] usb: gadget: udc: Forget a deactivation when the gadget driver unbinds Alexey Charkov
2026-11-13 9:36 ` sashiko-bot [this message]
2026-11-13 9:28 ` [PATCH v2 3/4] usb: gadget: configfs: Leave resetting the deactivation to the UDC core Alexey Charkov
2026-11-13 9:35 ` sashiko-bot
2026-11-13 9:28 ` [PATCH v2 4/4] usb: gadget: udc: Decide on connecting in one place Alexey Charkov
2026-11-13 9:46 ` 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-212558@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=alchark@flipper.net \
--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