@samitouri / QOSamiQemu / commits / 7b1eba96ae

hw/usb/hcd-ohci: Assert isochronous TDs are never deferred

Suggested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Munkhbaatar Enkhbaatar <munkhuu0825@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Munkhbaatar Enkhbaatar committed May 6, 2026 at 23:22 UTC 7b1eba96aecac32d186d4c16b81c7b4681186844
1 file changed +4 -5
hw/usb/hcd-ohci.c
+4 -5
@@ -746,11 +746,10 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed)
746 usb_packet_setup(pkt, pid, ep, 0, addr, false, int_req);
747 usb_packet_addbuf(pkt, buf, len);
748 usb_handle_packet(dev, pkt);
749 - if (pkt->status == USB_RET_ASYNC) {
750 - usb_device_flush_ep_queue(dev, ep);
751 - g_free(pkt);
752 - return 1;
753 - }
749 +
750 + /* The USB core guarantees to never defer ISO TDs. */
751 + assert(pkt->status != USB_RET_ASYNC);
752 +
753 if (pkt->status == USB_RET_SUCCESS) {
754 ret = pkt->actual_length;
755 } else {