diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2014-02-05 14:54:14 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-02-18 15:39:13 +0100 |
commit | c348e481759057c925cce4bf54336f1518b8c702 (patch) | |
tree | 8ab3accfbd6e8f4dae149e23b34639931dd369c8 | |
parent | f6969b9fef543da1ffa975d24f4d7b75dc369b03 (diff) |
uhci: invalidate queue on device address changes
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r-- | hw/usb/hcd-uhci.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); } |