diff mbox series

hw/usb: Check cycle bit before trace call

Message ID 20240403200349.2043-1-industrial.reformer@gmail.com
State New
Headers show
Series hw/usb: Check cycle bit before trace call | expand

Commit Message

Ian Moffett April 3, 2024, 8:03 p.m. UTC
Signed-off-by: Ian Moffett <industrial.reformer@gmail.com>
---
 hw/usb/hcd-xhci.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--
2.44.0
diff mbox series

Patch

diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index ad40232eb6..ea5bc64b26 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -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) {