diff --git a/0209-Fix-usage-of-USB_DEV_FLAG_IS_HOST-flag.patch b/0209-Fix-usage-of-USB_DEV_FLAG_IS_HOST-flag.patch new file mode 100644 index 0000000..14bc1fd --- /dev/null +++ b/0209-Fix-usage-of-USB_DEV_FLAG_IS_HOST-flag.patch @@ -0,0 +1,29 @@ +From e787bef7d85fdbb6a8d5b07bb84542e81d14cb8d Mon Sep 17 00:00:00 2001 +From: Michael Marineau +Date: Sun, 12 May 2013 19:19:37 -0400 +Subject: [PATCH] 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 +Cc: qemu-stable@nongnu.org +Signed-off-by: Gerd Hoffmann +(cherry picked from commit 756335292f2b46775992c314cc70b54480a46d26) +--- + 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 d057aab..67c41cd 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) { diff --git a/qemu.spec b/qemu.spec index b8322e8..2b20907 100644 --- a/qemu.spec +++ b/qemu.spec @@ -131,7 +131,7 @@ Summary: QEMU is a FAST! processor emulator Name: qemu Version: 1.4.2 -Release: 4%{?dist} +Release: 5%{?dist} # Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped Epoch: 2 License: GPLv2+ and LGPLv2+ and BSD @@ -249,6 +249,8 @@ Patch0206: 0206-rtl8139-flush-queued-packets-when-RxBufPtr-is-writte.patch Patch0207: 0207-spice-qemu-char-vmc_write-Don-t-write-more-bytes-the.patch # Fix build with latest libfdt Patch0208: 0208-configure-dtc-Probe-for-libfdt_env.h.patch +# Fix usb_handle_packet assertions (bz #981459) +Patch0209: 0209-Fix-usage-of-USB_DEV_FLAG_IS_HOST-flag.patch BuildRequires: SDL-devel BuildRequires: zlib-devel @@ -787,6 +789,8 @@ CAC emulation development files. %patch0207 -p1 # Fix build with latest libfdt %patch0208 -p1 +# Fix usb_handle_packet assertions (bz #981459) +%patch0209 -p1 %build %if %{with kvmonly} @@ -1433,6 +1437,9 @@ getent passwd qemu >/dev/null || \ %endif %changelog +* Tue Jul 30 2013 Cole Robinson - 2:1.4.2-5 +- Fix usb_handle_packet assertions (bz #981459) + * Wed Jun 19 2013 Cole Robinson - 2:1.4.2-4 - Fix build with latest libfdt - Don't install conflicting binfmt handler on arm (bz #974804)