diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/usb.h | 10 | ||||
-rw-r--r-- | include/linux/usb/hcd.h | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index 191af498c4f..1ea25377ca0 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -570,6 +570,16 @@ static inline void usb_mark_last_busy(struct usb_device *udev) /* for drivers using iso endpoints */ extern int usb_get_current_frame_number(struct usb_device *usb_dev); +/* Sets up a group of bulk endpoints to support multiple stream IDs. */ +extern int usb_alloc_streams(struct usb_interface *interface, + struct usb_host_endpoint **eps, unsigned int num_eps, + unsigned int num_streams, gfp_t mem_flags); + +/* Reverts a group of bulk endpoints back to not using stream IDs. */ +extern void usb_free_streams(struct usb_interface *interface, + struct usb_host_endpoint **eps, unsigned int num_eps, + gfp_t mem_flags); + /* used these for multi-interface device registration */ extern int usb_driver_claim_interface(struct usb_driver *driver, struct usb_interface *iface, void *priv); diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index d268415b7a4..aca73a5c3af 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h @@ -250,6 +250,16 @@ struct hc_driver { int (*alloc_dev)(struct usb_hcd *, struct usb_device *); /* Called by usb_disconnect to free HC device structures */ void (*free_dev)(struct usb_hcd *, struct usb_device *); + /* Change a group of bulk endpoints to support multiple stream IDs */ + int (*alloc_streams)(struct usb_hcd *hcd, struct usb_device *udev, + struct usb_host_endpoint **eps, unsigned int num_eps, + unsigned int num_streams, gfp_t mem_flags); + /* Reverts a group of bulk endpoints back to not using stream IDs. + * Can fail if we run out of memory. + */ + int (*free_streams)(struct usb_hcd *hcd, struct usb_device *udev, + struct usb_host_endpoint **eps, unsigned int num_eps, + gfp_t mem_flags); /* Bandwidth computation functions */ /* Note that add_endpoint() can only be called once per endpoint before |