diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2013-09-03 13:58:43 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-17 09:49:24 -0700 |
commit | c7ccde6eac6d3c4bc6110cc3fd76ef3823bc0831 (patch) | |
tree | f5221b8296a245cb9f3e3f84801b1d5d8feb12f9 /drivers/usb/core/hcd.c | |
parent | 272b98c6455f00884f0350f775c5342358ebb73f (diff) | |
download | linux-c7ccde6eac6d3c4bc6110cc3fd76ef3823bc0831.tar.gz linux-c7ccde6eac6d3c4bc6110cc3fd76ef3823bc0831.tar.bz2 linux-c7ccde6eac6d3c4bc6110cc3fd76ef3823bc0831.zip |
USB: see if URB comes from a completion handler
Now that URBs can be completed inside tasklets, we need a way of
determining whether a completion handler for a given endpoint is
currently running. Otherwise it's not possible to maintain the API
guarantee about keeping isochronous streams synchronous when an
underrun occurs.
This patch adds a field and a routine to check whether a completion
handler for a periodic endpoint is running. At the moment no
analogous routine appears to be necessary for async endpoints, but one
can always be added.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/hcd.c')
-rw-r--r-- | drivers/usb/core/hcd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index d6a8d23f047b..3a2e82a9c115 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -1703,7 +1703,9 @@ static void usb_giveback_urb_bh(unsigned long param) urb = list_entry(local_list.next, struct urb, urb_list); list_del_init(&urb->urb_list); + bh->completing_ep = urb->ep; __usb_hcd_giveback_urb(urb); + bh->completing_ep = NULL; } /* check if there are new URBs to giveback */ |