diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2004-07-14 00:28:52 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <greg@kroah.com> | 2004-07-14 00:28:52 -0700 |
commit | 1d92d8c62cbe4a2287b87bdeba0b382abd841904 (patch) | |
tree | 47e508bfb86f24a5f39c78f1a2beb4804035a9dc /Documentation | |
parent | e2cebaa69270847e71954d2d0085634a66015d2a (diff) | |
download | history-1d92d8c62cbe4a2287b87bdeba0b382abd841904.tar.gz |
[PATCH] USB: Add usb_kill_urb()
This patch is a slightly revised version of as277c, updated to match the
current source. The only difference from the older version is that this
makes urb->use_count into an atomic_t, to avoid the overhead of an extra
locking step each time an URB is submitted and given back. The important
features of this patch are:
-EPERM added to Documentation/usb/error-codes.txt.
Failure to use URB_ASYNC_UNLINK with usb_unlink_urb() is
deprecated in the documentation.
New ->reject and ->use_count fields added to struct urb.
The reject field is protected by urb->lock, and locking is
required only in usb_kill_urb() which doesn't have to be fast.
Single wait_queue used for all processes waiting inside
usb_kill_urb(). The wait queue is woken up only when an URB
is given back with ->reject set.
usb_rh_status_dequeue() changed to return int. It looks like
this function should be declared static; it's not used outside
the hcd.c file.
Prototype for unlink_urb() in struct usb_operations is changed
to include a status code argument. This is necessary so that
the different unlink paths can return -ENOENT and -ECONNRESET
as appropriate.
Support for synchronous usb_unlink_urb() has been removed;
such calls are passed to usb_kill_urb().
Kerneldoc for usb_unlink_urb() is updated.
usb_kill_urb() added to urb.c.
hc_simple() host driver is partially updated -- it should
compile but it won't really work right.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/usb/error-codes.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Documentation/usb/error-codes.txt b/Documentation/usb/error-codes.txt index 7fb11c33db6772..64ade120d430bc 100644 --- a/Documentation/usb/error-codes.txt +++ b/Documentation/usb/error-codes.txt @@ -47,6 +47,8 @@ USB-specific: -ESHUTDOWN The host controller has been disabled due to some problem that could not be worked around. +-EPERM Submission failed because urb->reject was set. + ************************************************************************** * Error codes returned by in urb->status * |