From: Alan Stern <stern@rowland.harvard.edu>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Cc: Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, Peter Chen <peter.chen@nxp.com>,
Lee Jones <lee.jones@linaro.org>,
Dejin Zheng <zhengdejin5@gmail.com>,
"Ahmed S. Darwish" <a.darwish@linutronix.de>,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH] usb: udc: core: Introduce started state
Date: Mon, 11 Jan 2021 16:29:55 -0500 [thread overview]
Message-ID: <20210111212955.GA1209265@rowland.harvard.edu> (raw)
In-Reply-To: <a7c4112fcd4dc2f0169af94a24f5685ca77f09fd.1610395599.git.Thinh.Nguyen@synopsys.com>
On Mon, Jan 11, 2021 at 12:38:05PM -0800, Thinh Nguyen wrote:
> For some UDCs, the initialization sequence by udc_start() should not be
> repeated until it is properly cleaned up with udc_stop() and vise versa.
> We may run into some cleanup failure as seen with the DWC3 driver during
> the irq cleanup. This issue can occur when the user triggers
> soft-connect/soft-disconnect from the soft_connect sysfs. To avoid
> adding checks to every UDC driver, at the UDC framework, introduce a
> "started" state to track and prevent the UDC from repeating the
> udc_start() and udc_stop() if it had already started/stopped.
>
> Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Is the new "started" field subject to races? What happens if there are
concurrent requests to start and stop the UDC?
Alan Stern
next prev parent reply other threads:[~2021-01-11 21:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-11 20:38 [PATCH] usb: udc: core: Introduce started state Thinh Nguyen
2021-01-11 21:29 ` Alan Stern [this message]
2021-01-11 21:45 ` Thinh Nguyen
2021-01-11 22:35 ` Thinh Nguyen
2021-01-12 1:27 ` Peter Chen
2021-01-12 1:33 ` Thinh Nguyen
2021-01-12 8:20 ` Felipe Balbi
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=20210111212955.GA1209265@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=Thinh.Nguyen@synopsys.com \
--cc=a.darwish@linutronix.de \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=lee.jones@linaro.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=peter.chen@nxp.com \
--cc=zhengdejin5@gmail.com \
/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.