]> git.proxmox.com Git - qemu.git/commitdiff
Fix usage of USB_DEV_FLAG_IS_HOST flag.
authorMichael Marineau <mike@marineau.org>
Sun, 12 May 2013 23:19:37 +0000 (19:19 -0400)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 11 Jun 2013 22:35:19 +0000 (17:35 -0500)
USB_DEV_FLAG_IS_HOST is the bit number, not value. Booting with a
"Fitbit Base Station" USB dongle was triggering this assert.

Signed-off-by: Michael Marineau <mike@marineau.org>
Cc: qemu-stable@nongnu.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 756335292f2b46775992c314cc70b54480a46d26)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/usb/core.c

index 15a150aea03806fded1adbb193bb0b41505aef6d..05948ca9a4e8f00f0252e6bd1380f530f7b8c3c4 100644 (file)
@@ -410,7 +410,7 @@ void usb_handle_packet(USBDevice *dev, USBPacket *p)
             assert(p->ep->type != USB_ENDPOINT_XFER_ISOC);
             /* using async for interrupt packets breaks migration */
             assert(p->ep->type != USB_ENDPOINT_XFER_INT ||
-                   (dev->flags & USB_DEV_FLAG_IS_HOST));
+                   (dev->flags & (1 << USB_DEV_FLAG_IS_HOST)));
             usb_packet_set_state(p, USB_PACKET_ASYNC);
             QTAILQ_INSERT_TAIL(&p->ep->queue, p, queue);
         } else if (p->status == USB_RET_ADD_TO_QUEUE) {