summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hcd.h
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-09-10 11:33:05 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 14:55:26 -0700
commit95cf82f99cfbd697c15572c444bd4f54f19745b0 (patch)
tree87d0bd6c842922231f5177522b6635532416d206 /drivers/usb/core/hcd.h
parent5ad4f71e2f19a06f738463da1f09ea7fda3a3db2 (diff)
downloadblackbird-op-linux-95cf82f99cfbd697c15572c444bd4f54f19745b0.tar.gz
blackbird-op-linux-95cf82f99cfbd697c15572c444bd4f54f19745b0.zip
USB: break apart flush_endpoint and disable_endpoint
This patch (as988) breaks usb_hcd_endpoint_disable() apart into two routines. The first, usb_hcd_flush_endpoint() does the -ESHUTDOWN unlinking of all URBs in the endpoint's queue and waits for them to complete. The second, usb_hcd_disable_endpoint() -- renamed for better grammatical style -- merely calls the HCD's endpoint_disable method. The changeover is easy because the routine currently has only one caller. This separation of function will be exploited in the following patch: When a device is suspended, the core will be able to cancel all outstanding URBs for that device while leaving the HCD's endpoint-related data structures intact for later. As an added benefit, HCDs no longer need to check for existing URBs in their endpoint_disable methods. It is now guaranteed that there will be none. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/hcd.h')
-rw-r--r--drivers/usb/core/hcd.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h
index 0fc7b95259f5..1396141274f1 100644
--- a/drivers/usb/core/hcd.h
+++ b/drivers/usb/core/hcd.h
@@ -219,7 +219,9 @@ extern int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags);
extern int usb_hcd_unlink_urb (struct urb *urb, int status);
extern void usb_hcd_giveback_urb(struct usb_hcd *hcd, struct urb *urb,
int status);
-extern void usb_hcd_endpoint_disable (struct usb_device *udev,
+extern void usb_hcd_flush_endpoint(struct usb_device *udev,
+ struct usb_host_endpoint *ep);
+extern void usb_hcd_disable_endpoint(struct usb_device *udev,
struct usb_host_endpoint *ep);
extern int usb_hcd_get_frame_number (struct usb_device *udev);
OpenPOWER on IntegriCloud