aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2009-04-08 13:36:28 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-17 13:50:27 -0400
commit3444b26afa145148951112534f298bdc554ec789 (patch)
treeb2c8d9b13d04869ffdad1e46a9ebbf819e7ed7b4 /drivers/usb/storage
parentd45e230bf03850f17394a760dfa003d986a67729 (diff)
USB: add reset endpoint operations
Wireless USB endpoint state has a sequence number and a current window and not just a single toggle bit. So allow HCDs to provide a endpoint_reset method and call this or clear the software toggles as required (after a clear halt, set configuration etc.). usb_settoggle() and friends are then HCD internal and are moved into core/hcd.h and all device drivers call usb_reset_endpoint() instead. If the device endpoint state has been reset (with a clear halt) but the host endpoint state has not then subsequent data transfers will not complete. The device will only work again after it is reset or disconnected. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r--drivers/usb/storage/transport.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
index 49aedb36dc19..fcb320217218 100644
--- a/drivers/usb/storage/transport.c
+++ b/drivers/usb/storage/transport.c
@@ -247,10 +247,8 @@ int usb_stor_clear_halt(struct us_data *us, unsigned int pipe)
247 USB_ENDPOINT_HALT, endp, 247 USB_ENDPOINT_HALT, endp,
248 NULL, 0, 3*HZ); 248 NULL, 0, 3*HZ);
249 249
250 /* reset the endpoint toggle */
251 if (result >= 0) 250 if (result >= 0)
252 usb_settoggle(us->pusb_dev, usb_pipeendpoint(pipe), 251 usb_reset_endpoint(us->pusb_dev, endp);
253 usb_pipeout(pipe), 0);
254 252
255 US_DEBUGP("%s: result = %d\n", __func__, result); 253 US_DEBUGP("%s: result = %d\n", __func__, result);
256 return result; 254 return result;