From patchwork Wed Jun 12 21:41:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 250893 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7E8EE2C009A for ; Thu, 13 Jun 2013 07:53:42 +1000 (EST) Received: from localhost ([::1]:52721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Umsz6-0005h8-DG for incoming@patchwork.ozlabs.org; Wed, 12 Jun 2013 17:53:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Umsre-0006pd-6x for qemu-devel@nongnu.org; Wed, 12 Jun 2013 17:45:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Umsrc-0001Ey-Ak for qemu-devel@nongnu.org; Wed, 12 Jun 2013 17:45:57 -0400 Received: from mail-ie0-x22d.google.com ([2607:f8b0:4001:c03::22d]:48809) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Umsrc-0001Ec-42; Wed, 12 Jun 2013 17:45:56 -0400 Received: by mail-ie0-f173.google.com with SMTP id k13so5208867iea.4 for ; Wed, 12 Jun 2013 14:45:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=Aa5P1z+xKUypeAFW6EjZPH0GA8zkeKt75O3zHYOzAdM=; b=NpnXPG1uLR1gyfg2/++zEJjecQ93gRf1SQOU01O0/Y64hWeDwqJtpxACOAqFdzIlYd 0O27oE1txMOes3D16MLGo6v3Ki0gMREm5DXuwx026zW3h9pckC98kDaOI8Rn3jhH1L/W sylC7fTxmecFrJIm7ZB+ri3kjf//o/fyuIwQHD69ddrju3AteHypzUJAvdcJQpjV5P/H sj5D0ZO7AADMMPOr/X4LVLxUdN0ihl6ass/OgACMu2RDoIwx0DL91ltNMtDAS6m71fXE F/BlA4zJbgzBCiKAeSAIdHXXwI711ed6YknTanw5S2pS58snZLZG5iE+qhNBC2+nf0rF Y0Sg== X-Received: by 10.50.136.201 with SMTP id qc9mr4426050igb.47.1371073555367; Wed, 12 Jun 2013 14:45:55 -0700 (PDT) Received: from localhost ([32.97.110.51]) by mx.google.com with ESMTPSA id wn10sm4281552igb.2.2013.06.12.14.45.54 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 12 Jun 2013 14:45:54 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Wed, 12 Jun 2013 16:41:30 -0500 Message-Id: <1371073298-14519-19-git-send-email-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1371073298-14519-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1371073298-14519-1-git-send-email-mdroth@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::22d Cc: qemu-stable@nongnu.org Subject: [Qemu-devel] [PATCH 18/26] Fix usage of USB_DEV_FLAG_IS_HOST flag. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 (cherry picked from commit 756335292f2b46775992c314cc70b54480a46d26) Signed-off-by: Michael Roth --- 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) {