diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-10-24 18:14:07 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-10-25 09:08:09 +0200 |
commit | 36dfe324fd4b5efd9ef1a5b4c352bbb158952e24 (patch) | |
tree | f465ff1788bc9a0e31810095a470aa1f45e5d6db /hw/usb/hcd-ohci.c | |
parent | d0ff81b871af3c6cf31c807dfdd480b9d1032780 (diff) | |
download | qemu-36dfe324fd4b5efd9ef1a5b4c352bbb158952e24.zip qemu-36dfe324fd4b5efd9ef1a5b4c352bbb158952e24.tar.gz qemu-36dfe324fd4b5efd9ef1a5b4c352bbb158952e24.tar.bz2 |
usb: Add USB_RET_ADD_TO_QUEUE packet result code
This can be used by usb-device code which wishes to process an entire endpoint
queue at once, to do this the usb-device code returns USB_RET_ADD_TO_QUEUE
from its handle_data class method and defines a flush_ep_queue class method
to call when the hcd is done queuing up packets.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/hcd-ohci.c')
-rw-r--r-- | hw/usb/hcd-ohci.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index 0cc1e5d..31dcfbb 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -816,6 +816,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, usb_packet_addbuf(&ohci->usb_packet, ohci->usb_buf, len); ret = usb_handle_packet(dev, &ohci->usb_packet); if (ret == USB_RET_ASYNC) { + usb_device_flush_ep_queue(dev, ep); return 1; } } @@ -1018,6 +1019,7 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed) DPRINTF("ret=%d\n", ret); #endif if (ret == USB_RET_ASYNC) { + usb_device_flush_ep_queue(dev, ep); ohci->async_td = addr; return 1; } |