diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-11-17 12:47:15 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-12-04 14:41:54 +0100 |
commit | be41efde3ca0372dbf7543e09ff473b4eec25057 (patch) | |
tree | 56fc5bf4190b7f73613fc4097ca6ad295bd69a98 /hw/usb/host-linux.c | |
parent | 8beba9304391189666df1b62b23a5101b3831317 (diff) |
usb: Don't allow USB_RET_ASYNC for interrupt packets
It is tempting to use USB_RET_ASYNC for interrupt packets, rather then the
current NAK + polling approach, but this causes issues for migration, as
an async completed packet will not getting written back to guest memory until
the next poll time, and if a migration happens in between it will get lost!
Make an exception for host devices, because:
1) host-linux actually uses async completion for interrupt endpoints
2) host devices don't migrate anyways
Ideally we would convert host-linux.c to handle (input) interrupt endpoints in
a buffered manner like it does for isoc endpoints, keeping multiple urbs
submitted to ensure the devices timing requirements are met, as well as making
its interrupt ep handling the same as other usb-devices.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/host-linux.c')
-rw-r--r-- | hw/usb/host-linux.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/usb/host-linux.c b/hw/usb/host-linux.c index aa77b7704d..bdafb6bc87 100644 --- a/hw/usb/host-linux.c +++ b/hw/usb/host-linux.c @@ -1476,6 +1476,7 @@ static int usb_host_initfn(USBDevice *dev) { USBHostDevice *s = DO_UPCAST(USBHostDevice, dev, dev); + dev->flags |= (1 << USB_DEV_FLAG_IS_HOST); dev->auto_attach = 0; s->fd = -1; s->hub_fd = -1; |