aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMichael Marineau <mike@marineau.org>2013-05-12 19:19:37 -0400
committerGerd Hoffmann <kraxel@redhat.com>2013-06-03 07:17:12 +0200
commit756335292f2b46775992c314cc70b54480a46d26 (patch)
tree674da87466666e7c44cdb9980c8c2d81fb82553c /hw
parentf10acc8b38d65a66ffa0588a036489d7fa6a593e (diff)
downloadqemu-756335292f2b46775992c314cc70b54480a46d26.zip
qemu-756335292f2b46775992c314cc70b54480a46d26.tar.gz
qemu-756335292f2b46775992c314cc70b54480a46d26.tar.bz2
Fix usage of USB_DEV_FLAG_IS_HOST flag.
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>
Diffstat (limited to 'hw')
-rw-r--r--hw/usb/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb/core.c b/hw/usb/core.c
index 15a150a..05948ca 100644
--- a/hw/usb/core.c
+++ b/hw/usb/core.c
@@ -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) {