diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2007-08-21 15:39:21 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 17:55:19 -0400 |
commit | b0d9efba3ec53468984aecef8eeaf079089f2e5a (patch) | |
tree | a372d053daddc5ff041949b80bab347317a76938 /drivers/usb/host/ehci-q.c | |
parent | ee7d1f3f0c32d8abe9627aa73dc62ee5bf2daf7f (diff) |
USB: centralize -EREMOTEIO handling
This patch (as969) continues the ongoing changes to the way HCDs
report URB statuses. The programming interface has been simplified by
making usbcore responsible for clearing urb->hcpriv and for setting
-EREMOTEIO status when an URB with the URB_SHORT_NOT_OK flag ends up
as a short transfer.
By moving the work out of the HCDs, this removes a fair amount of
repeated code.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: David Brownell <david-b@pacbell.net>
CC: Olav Kongas <ok@artecdesign.ee>
CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
CC: Tony Olech <tony.olech@elandigitalsystems.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-q.c')
-rw-r--r-- | drivers/usb/host/ehci-q.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c index 1da2de4d34ed..e80b5c417d74 100644 --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c | |||
@@ -232,7 +232,6 @@ __acquires(ehci->lock) | |||
232 | } | 232 | } |
233 | 233 | ||
234 | spin_lock (&urb->lock); | 234 | spin_lock (&urb->lock); |
235 | urb->hcpriv = NULL; | ||
236 | switch (urb->status) { | 235 | switch (urb->status) { |
237 | case -EINPROGRESS: /* success */ | 236 | case -EINPROGRESS: /* success */ |
238 | urb->status = 0; | 237 | urb->status = 0; |
@@ -395,8 +394,10 @@ halt: | |||
395 | /* remove it from the queue */ | 394 | /* remove it from the queue */ |
396 | spin_lock (&urb->lock); | 395 | spin_lock (&urb->lock); |
397 | qtd_copy_status (ehci, urb, qtd->length, token); | 396 | qtd_copy_status (ehci, urb, qtd->length, token); |
398 | do_status = (urb->status == -EREMOTEIO) | 397 | if (unlikely(urb->status == -EREMOTEIO)) { |
399 | && usb_pipecontrol (urb->pipe); | 398 | do_status = usb_pipecontrol(urb->pipe); |
399 | urb->status = 0; | ||
400 | } | ||
400 | spin_unlock (&urb->lock); | 401 | spin_unlock (&urb->lock); |
401 | 402 | ||
402 | if (stopped && qtd->qtd_list.prev != &qh->qtd_list) { | 403 | if (stopped && qtd->qtd_list.prev != &qh->qtd_list) { |