From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBmfR-0001bI-4l for qemu-devel@nongnu.org; Wed, 12 Sep 2012 09:07:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBmfM-0006Oy-7D for qemu-devel@nongnu.org; Wed, 12 Sep 2012 09:07:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8107) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBmfL-0006Oo-VO for qemu-devel@nongnu.org; Wed, 12 Sep 2012 09:07:40 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8CD7d1B019257 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 12 Sep 2012 09:07:39 -0400 From: Hans de Goede Date: Wed, 12 Sep 2012 15:08:40 +0200 Message-Id: <1347455320-10809-9-git-send-email-hdegoede@redhat.com> In-Reply-To: <1347455320-10809-1-git-send-email-hdegoede@redhat.com> References: <1347455320-10809-1-git-send-email-hdegoede@redhat.com> Subject: [Qemu-devel] [PATCH 9/9] uhci: Don't queue up packets after one with the SPD flag set List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Hans de Goede , qemu-devel@nongnu.org Don't queue up packets after a packet with the SPD (short packet detect) flag set. Since we won't know if the packet will actually be short until it has completed, and if it is short we should stop the queue. This fixes a miniature photoframe emulating a USB cdrom with the windows software for it not working. Signed-off-by: Hans de Goede --- hw/usb/hcd-uhci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index c7c8786..cdc8bc3 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -1000,6 +1000,9 @@ static void uhci_fill_queue(UHCIState *s, UHCI_TD *td) } assert(ret == TD_RESULT_ASYNC_START); assert(int_mask == 0); + if (ptd.ctrl & TD_CTRL_SPD) { + break; + } plink = ptd.link; } } @@ -1097,7 +1100,7 @@ static void uhci_process_frame(UHCIState *s) case TD_RESULT_ASYNC_START: trace_usb_uhci_td_async(curr_qh & ~0xf, link & ~0xf); - if (is_valid(td.link)) { + if (is_valid(td.link) && !(td.ctrl & TD_CTRL_SPD)) { uhci_fill_queue(s, &td); } link = curr_qh ? qh.link : td.link; -- 1.7.12