From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ubv2m-0006pG-7X for qemu-devel@nongnu.org; Mon, 13 May 2013 11:52:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ubv2h-0001rZ-Da for qemu-devel@nongnu.org; Mon, 13 May 2013 11:52:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35814) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ubv2h-0001qH-5F for qemu-devel@nongnu.org; Mon, 13 May 2013 11:52:03 -0400 Message-ID: <51910C1A.5000603@redhat.com> Date: Mon, 13 May 2013 17:51:54 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1368400777-2938-1-git-send-email-mike@marineau.org> In-Reply-To: <1368400777-2938-1-git-send-email-mike@marineau.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Fix usage of USB_DEV_FLAG_IS_HOST flag. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Marineau Cc: Anthony Liguori , qemu-devel@nongnu.org On 05/13/13 01:19, Michael Marineau wrote: > 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 > --- > 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) { Looks good. Anthony? Can you pick it for 1.5 directly? I don't have any other pending usb bits for 1.5 at the moment. Reviewed-by: Gerd Hoffmann cheers, Gerd