diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index f4b555a..1434a3a 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -227,13 +227,12 @@ static void uhci_queue_free(UHCIQueue *queue, const char *reason)
     g_free(queue);
 }
 
-static UHCIQueue *uhci_queue_find(UHCIState *s, UHCI_TD *td)
+static UHCIQueue *uhci_queue_find(UHCIState *s, uint32_t qh_addr)
 {
-    uint32_t token = uhci_queue_token(td);
     UHCIQueue *queue;
 
     QTAILQ_FOREACH(queue, &s->queues, next) {
-        if (queue->token == token) {
+        if (queue->qh_addr == qh_addr) {
             return queue;
         }
     }
@@ -841,7 +840,7 @@ static int uhci_handle_td(UHCIState *s, UHCIQueue *q, uint32_t qh_addr,
     }
 
     if (q == NULL) {
-        q = uhci_queue_find(s, td);
+        q = uhci_queue_find(s, qh_addr);
         if (q && !uhci_queue_verify(q, qh_addr, td, td_addr, queuing)) {
             uhci_queue_free(q, "guest re-used qh");
             q = NULL;
