Skip to contentSkip to conversation

hw/usb: Check cycle bit before trace call

PATCH New Ian Moffett 1 participant 1 message Apr 4, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/usb: Check cycle bit before trace call

---
 hw/usb/hcd-xhci.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
hw/usb/hcd-xhci.c +3 -3
index ad40232eb6..ea5bc64b26 100644
@@ -710,13 +710,13 @@ static TRBType xhci_ring_fetch(XHCIState *xhci, XHCIRing *ring, XHCITRB *trb,
         le32_to_cpus(&trb->status);
         le32_to_cpus(&trb->control);
 
-        trace_usb_xhci_fetch_trb(ring->dequeue, trb_name(trb),
-                                 trb->parameter, trb->status, trb->control);
-
         if ((trb->control & TRB_C) != ring->ccs) {
             return 0;
         }
 
+        trace_usb_xhci_fetch_trb(ring->dequeue, trb_name(trb),
+                                 trb->parameter, trb->status, trb->control);
+
         type = TRB_TYPE(*trb);
 
         if (type != TR_LINK) {

--
2.44.0