summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Marineau <mike@marineau.org>2013-05-12 19:19:37 -0400
committerMichael Roth <mdroth@linux.vnet.ibm.com>2013-06-11 17:35:19 -0500
commita548bacfba7c80304b78d74c49c69d877bffe1ef (patch)
tree5ddd242a17ce7c9a7891eb0de425182783c4600b
parent9b5751ec09702ddf043bdd1f611880113d212c1a (diff)
downloadqemu-a548bacfba7c80304b78d74c49c69d877bffe1ef.tar.gz
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> (cherry picked from commit 756335292f2b46775992c314cc70b54480a46d26) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-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 15a150aea0..05948ca9a4 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) {