From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TC4y6-0002jd-Ej for qemu-devel@nongnu.org; Thu, 13 Sep 2012 04:40:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TC4xz-0007Gi-0q for qemu-devel@nongnu.org; Thu, 13 Sep 2012 04:40:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27793) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TC4xy-0007Do-Me for qemu-devel@nongnu.org; Thu, 13 Sep 2012 04:40:06 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8D8e5fC029164 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 13 Sep 2012 04:40:06 -0400 From: Gerd Hoffmann Date: Thu, 13 Sep 2012 10:40:00 +0200 Message-Id: <1347525600-28220-15-git-send-email-kraxel@redhat.com> In-Reply-To: <1347525600-28220-1-git-send-email-kraxel@redhat.com> References: <1347525600-28220-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 14/14] 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: qemu-devel@nongnu.org Cc: Hans de Goede , Gerd Hoffmann From: Hans de Goede 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 Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-uhci.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) 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.1