Commit 1e19a520 authored by Alan Stern's avatar Alan Stern Committed by Felipe Balbi

USB: gadget: Improve kerneldoc for usb_ep_dequeue()

Commit bf594c10 ("USB: gadget: Document that certain ep operations
can be called in interrupt context") documented that usb_ep_dequeue()
may be called in a non-process context.  It follows that the routine
must not sleep or wait for events.

However, the routine's existing kerneldoc seems to imply that it will
wait until the request being cancelled has fully completed.  This is
not so, and thus the comment needs to be improved.  Misunderstanding
this point may very well have been responsible for a bug recently
uncovered in the f_fs function.

The updated comment explicitly says that the routine may return before
the request's completion handler is called.
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
CC: John Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 1381a511
...@@ -281,10 +281,10 @@ EXPORT_SYMBOL_GPL(usb_ep_queue); ...@@ -281,10 +281,10 @@ EXPORT_SYMBOL_GPL(usb_ep_queue);
* @ep:the endpoint associated with the request * @ep:the endpoint associated with the request
* @req:the request being canceled * @req:the request being canceled
* *
* If the request is still active on the endpoint, it is dequeued and its * If the request is still active on the endpoint, it is dequeued and
* completion routine is called (with status -ECONNRESET); else a negative * eventually its completion routine is called (with status -ECONNRESET);
* error code is returned. This is guaranteed to happen before the call to * else a negative error code is returned. This routine is asynchronous,
* usb_ep_dequeue() returns. * that is, it may return before the completion routine runs.
* *
* Note that some hardware can't clear out write fifos (to unlink the request * Note that some hardware can't clear out write fifos (to unlink the request
* at the head of the queue) except as part of disconnecting from usb. Such * at the head of the queue) except as part of disconnecting from usb. Such
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment