From: Wesley Cheng <quic_wcheng@quicinc.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: <balbi@kernel.org>, <gregkh@linuxfoundation.org>,
<linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>,
<jackp@codeaurora.org>
Subject: Re: [PATCH v2 1/2] usb: gadget: udc: core: Revise comments for usb_ep_disable()
Date: Wed, 27 Oct 2021 12:58:02 -0700 [thread overview]
Message-ID: <2c39336e-289e-b0c7-66a3-7aa844a0b252@quicinc.com> (raw)
In-Reply-To: <20211027142422.GA1319606@rowland.harvard.edu>
Hi Alan,
On 10/27/2021 7:24 AM, Alan Stern wrote:
> On Tue, Oct 26, 2021 at 07:50:24PM -0700, Wesley Cheng wrote:
>> The usb_ep_disable() routine is being widely used directly in the
>> disconnect callback path by function drivers. Hence, the statement
>> about it being able to only run in process context may not be true.
>>
>> Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
>> ---
>> drivers/usb/gadget/udc/core.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c
>> index d626511..e1f90d8 100644
>> --- a/drivers/usb/gadget/udc/core.c
>> +++ b/drivers/usb/gadget/udc/core.c
>> @@ -136,8 +136,6 @@ EXPORT_SYMBOL_GPL(usb_ep_enable);
>> * gadget drivers must call usb_ep_enable() again before queueing
>> * requests to the endpoint.
>> *
>> - * This routine must be called in process context.
>> - *
>> * returns zero, or a negative error code.
>> */
>> int usb_ep_disable(struct usb_ep *ep)
>
> You should also change the kerneldoc for usb_ep_enable. Neither routine
> needs to be called in process context.
>
> In fact, it might be good to change both comments to:
>
> * This routine may be called in an atomic (interrupt) context.
>
> just to be totally explicit.
>
Ah, missed the ep enable case as well, thanks for the catch. Sounds
good, I'll add that statement.
Thanks
Wesley Cheng
next prev parent reply other threads:[~2021-10-27 19:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-27 2:50 [PATCH v2 0/2] Disable mass storage endpoints during disconnect Wesley Cheng
2021-10-27 2:50 ` [PATCH v2 1/2] usb: gadget: udc: core: Revise comments for usb_ep_disable() Wesley Cheng
2021-10-27 14:24 ` Alan Stern
2021-10-27 19:58 ` Wesley Cheng [this message]
2021-10-27 2:50 ` [PATCH v2 2/2] usb: gadget: f_mass_storage: Disable eps during disconnect Wesley Cheng
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=2c39336e-289e-b0c7-66a3-7aa844a0b252@quicinc.com \
--to=quic_wcheng@quicinc.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jackp@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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
all inboxes | Powered by JetHome®