From c348e481759057c925cce4bf54336f1518b8c702 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 5 Feb 2014 14:54:14 +0100 Subject: uhci: invalidate queue on device address changes 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 ad814b58d4..0820244905 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); } -- cgit v1.2.3