aboutsummaryrefslogtreecommitdiff
path: root/include/hw/usb.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-11-19 14:36:57 +0100
committerGerd Hoffmann <kraxel@redhat.com>2013-11-26 09:21:17 +0100
commit3b444eadf7726d976be4ac89e8e742cb7eb7a5ee (patch)
tree49d68c050f8edd656364d6891d7ac6dd293bbdcb /include/hw/usb.h
parent04b300f85fafd2d6a92ec0a766f0035e9bc5835c (diff)
usb: Add usb_device_alloc/free_streams
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'include/hw/usb.h')
-rw-r--r--include/hw/usb.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/hw/usb.h b/include/hw/usb.h
index e9d96baf4b..0a6ef4af7c 100644
--- a/include/hw/usb.h
+++ b/include/hw/usb.h
@@ -315,6 +315,14 @@ typedef struct USBDeviceClass {
*/
void (*ep_stopped)(USBDevice *dev, USBEndpoint *ep);
+ /*
+ * Called by the hcd to alloc / free streams on a bulk endpoint.
+ * Optional may be NULL.
+ */
+ int (*alloc_streams)(USBDevice *dev, USBEndpoint **eps, int nr_eps,
+ int streams);
+ void (*free_streams)(USBDevice *dev, USBEndpoint **eps, int nr_eps);
+
const char *product_desc;
const USBDesc *usb_desc;
} USBDeviceClass;
@@ -553,6 +561,10 @@ void usb_device_flush_ep_queue(USBDevice *dev, USBEndpoint *ep);
void usb_device_ep_stopped(USBDevice *dev, USBEndpoint *ep);
+int usb_device_alloc_streams(USBDevice *dev, USBEndpoint **eps, int nr_eps,
+ int streams);
+void usb_device_free_streams(USBDevice *dev, USBEndpoint **eps, int nr_eps);
+
const char *usb_device_get_product_desc(USBDevice *dev);
const USBDesc *usb_device_get_usb_desc(USBDevice *dev);