summaryrefslogtreecommitdiff
path: root/hw/usb
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2012-03-22 15:28:45 +0100
committerGerd Hoffmann <kraxel@redhat.com>2012-04-17 10:23:27 +0200
commit39c20577009731d5e059db10ef269807b57e498d (patch)
treec15801960da9539acf902fd85d5a041f0467a3aa /hw/usb
parent19b89252a32e53aa8bd90a8d4c3e3dcc5f8fe46d (diff)
downloadqemu-39c20577009731d5e059db10ef269807b57e498d.tar.gz
usb-host: add property to turn off pipelining
Add a property to usb-host to disable the bulk endpoint pipelining. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb')
-rw-r--r--hw/usb/host-linux.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/hw/usb/host-linux.c b/hw/usb/host-linux.c
index 8084fd941a..a382f0ad98 100644
--- a/hw/usb/host-linux.c
+++ b/hw/usb/host-linux.c
@@ -94,6 +94,10 @@ struct USBAutoFilter {
uint32_t product_id;
};
+enum USBHostDeviceOptions {
+ USB_HOST_OPT_PIPELINE,
+};
+
typedef struct USBHostDevice {
USBDevice dev;
int fd;
@@ -104,6 +108,7 @@ typedef struct USBHostDevice {
int descr_len;
int closing;
uint32_t iso_urb_count;
+ uint32_t options;
Notifier exit;
struct endp_data ep_in[USB_MAX_ENDPOINTS];
@@ -1203,7 +1208,8 @@ static int usb_linux_update_endp_table(USBHostDevice *s)
USB_ENDPOINT_XFER_INVALID);
usb_ep_set_type(&s->dev, pid, ep, type);
usb_ep_set_ifnum(&s->dev, pid, ep, interface);
- if (type == USB_ENDPOINT_XFER_BULK) {
+ if ((s->options & (1 << USB_HOST_OPT_PIPELINE)) &&
+ (type == USB_ENDPOINT_XFER_BULK)) {
usb_ep_set_pipeline(&s->dev, pid, ep, true);
}
@@ -1431,6 +1437,8 @@ static Property usb_host_dev_properties[] = {
DEFINE_PROP_HEX32("productid", USBHostDevice, match.product_id, 0),
DEFINE_PROP_UINT32("isobufs", USBHostDevice, iso_urb_count, 4),
DEFINE_PROP_INT32("bootindex", USBHostDevice, bootindex, -1),
+ DEFINE_PROP_BIT("pipeline", USBHostDevice, options,
+ USB_HOST_OPT_PIPELINE, true),
DEFINE_PROP_END_OF_LIST(),
};