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 14:55:19 -0700 |
commit | b0d9efba3ec53468984aecef8eeaf079089f2e5a (patch) | |
tree | a372d053daddc5ff041949b80bab347317a76938 /drivers/usb/gadget/dummy_hcd.c | |
parent | ee7d1f3f0c32d8abe9627aa73dc62ee5bf2daf7f (diff) | |
download | op-kernel-dev-b0d9efba3ec53468984aecef8eeaf079089f2e5a.zip op-kernel-dev-b0d9efba3ec53468984aecef8eeaf079089f2e5a.tar.gz |
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/gadget/dummy_hcd.c')
-rw-r--r-- | drivers/usb/gadget/dummy_hcd.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index c441d10..0cb0325 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c @@ -1099,8 +1099,7 @@ top: * * partially filling a buffer optionally blocks queue advances * (so completion handlers can clean up the queue) but we don't - * need to emulate such data-in-flight. so we only show part - * of the URB_SHORT_NOT_OK effect: completion status. + * need to emulate such data-in-flight. */ if (is_short) { if (host_len == dev_len) { @@ -1111,10 +1110,7 @@ top: if (dev_len > host_len) maybe_set_status (urb, -EOVERFLOW); else - maybe_set_status (urb, - (urb->transfer_flags - & URB_SHORT_NOT_OK) - ? -EREMOTEIO : 0); + maybe_set_status (urb, 0); } else if (!to_host) { maybe_set_status (urb, 0); if (host_len > dev_len) @@ -1516,7 +1512,6 @@ restart: continue; return_urb: - urb->hcpriv = NULL; list_del (&urbp->urbp_list); kfree (urbp); if (ep) |