aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/usb.h
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2009-01-15 17:03:33 -0500
committerGreg Kroah-Hartman <gregkh@kvm.kroah.org>2009-01-27 19:15:32 -0500
commitddeac4e75f2527a340f9dc655bde49bb2429b39b (patch)
tree2bde5ee81d30cb6010de9262f97ba07b9cb8969b /drivers/usb/core/usb.h
parent95bec45d2051227ef037f1080d7cef003b88d852 (diff)
USB: fix toggle mismatch in disable_endpoint paths
This patch (as1200) finishes some fixes that were left incomplete by an earlier patch. Although nobody has addressed this issue in the past, it turns out that we need to distinguish between two different modes of disabling and enabling endpoints. In one mode only the data structures in usbcore are affected, and in the other mode the host controller and device hardware states are affected as well. The earlier patch added an extra argument to the routines in the enable_endpoint pathways to reflect this difference. This patch adds corresponding arguments to the disable_endpoint pathways. Without this change, the endpoint toggle state can get out of sync between the host and the device. The exact mechanism depends on the details of the host controller (whether or not it stores its own copy of the toggle values). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Dan Streetman <ddstreet@ieee.org> Tested-by: Dan Streetman <ddstreet@ieee.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/usb.h')
-rw-r--r--drivers/usb/core/usb.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h
index 386177867a8..9d0f33fe871 100644
--- a/drivers/usb/core/usb.h
+++ b/drivers/usb/core/usb.h
@@ -15,9 +15,10 @@ extern void usb_enable_endpoint(struct usb_device *dev,
15 struct usb_host_endpoint *ep, bool reset_toggle); 15 struct usb_host_endpoint *ep, bool reset_toggle);
16extern void usb_enable_interface(struct usb_device *dev, 16extern void usb_enable_interface(struct usb_device *dev,
17 struct usb_interface *intf, bool reset_toggles); 17 struct usb_interface *intf, bool reset_toggles);
18extern void usb_disable_endpoint(struct usb_device *dev, unsigned int epaddr); 18extern void usb_disable_endpoint(struct usb_device *dev, unsigned int epaddr,
19 bool reset_hardware);
19extern void usb_disable_interface(struct usb_device *dev, 20extern void usb_disable_interface(struct usb_device *dev,
20 struct usb_interface *intf); 21 struct usb_interface *intf, bool reset_hardware);
21extern void usb_release_interface_cache(struct kref *ref); 22extern void usb_release_interface_cache(struct kref *ref);
22extern void usb_disable_device(struct usb_device *dev, int skip_ep0); 23extern void usb_disable_device(struct usb_device *dev, int skip_ep0);
23extern int usb_deauthorize_device(struct usb_device *); 24extern int usb_deauthorize_device(struct usb_device *);