Skip to content

Commit

Permalink
uhci: invalidate queue on device address changes
Browse files Browse the repository at this point in the history
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  • Loading branch information
kraxel committed Feb 18, 2014
1 parent f6969b9 commit c348e48
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hw/usb/hcd-uhci.c
Expand Up @@ -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);
}
Expand Down

0 comments on commit c348e48

Please sign in to comment.