From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjReP-0002AT-Qc for qemu-devel@nongnu.org; Mon, 03 Jun 2013 06:06:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjReF-00063V-L8 for qemu-devel@nongnu.org; Mon, 03 Jun 2013 06:06:05 -0400 From: Gerd Hoffmann Date: Mon, 3 Jun 2013 12:05:45 +0200 Message-Id: <1370253951-12323-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1370253951-12323-1-git-send-email-kraxel@redhat.com> References: <1370253951-12323-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 1/7] Fix usage of USB_DEV_FLAG_IS_HOST flag. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Michael Marineau , qemu-stable@nongnu.org, Gerd Hoffmann From: Michael Marineau 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 Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann --- hw/usb/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 1.7.9.7