From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFmx7-0005ju-LP for qemu-devel@nongnu.org; Tue, 18 Feb 2014 10:51:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFmwt-0007Xk-Me for qemu-devel@nongnu.org; Tue, 18 Feb 2014 10:51:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:15378) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFmwt-0007XR-Ed for qemu-devel@nongnu.org; Tue, 18 Feb 2014 10:51:07 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1IFp5ed022934 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 18 Feb 2014 10:51:05 -0500 From: Gerd Hoffmann Date: Tue, 18 Feb 2014 16:50:50 +0100 Message-Id: <1392738654-4698-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1392738654-4698-1-git-send-email-kraxel@redhat.com> References: <1392738654-4698-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 3/7] uhci: invalidate queue on device address changes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-uhci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index ad814b5..0820244 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -252,9 +252,11 @@ static bool uhci_queue_verify(UHCIQueue *queue, uint32_t qh_addr, UHCI_TD *td, uint32_t td_addr, bool queuing) { UHCIAsync *first = QTAILQ_FIRST(&queue->asyncs); + uint32_t queue_token_addr = (queue->token >> 8) & 0x7f; return queue->qh_addr == qh_addr && queue->token == uhci_queue_token(td) && + queue_token_addr == queue->ep->dev->addr && (queuing || !(td->ctrl & TD_CTRL_ACTIVE) || first == NULL || first->td_addr == td_addr); } -- 1.8.3.1