[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [Patch RFC 2/4] usb: add flag to USBPacket to request complete callback after isoc transfer

On Do, 2015-07-16 at 17:47 +0200, Juergen Gross wrote:
> In order to avoid having to poll for the result of an iso transfer
> add the possibility to request the "complete" callback which is being
> used for bulk transfers as well.

Sorry for the late notice (didn't do much usb coding recently and forgot
about it):  We actually _have_ a notification mechanism already:
usb_wakeup(USBEndpoint *ep, int streamid). That will trigger a
USBPortOps->wakeup callback in the host adapter emulation.

So, the usb-host change should be as simple as this:

--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -451,6 +451,7 @@ static void usb_host_req_complete_iso(struct
libusb_transfer *transfer)
     if (xfer->ring->ep->pid == USB_TOKEN_IN) {
         QTAILQ_INSERT_TAIL(&xfer->ring->copy, xfer, next);
+        usb_wakeup(xfer->ring->ep, 0);
     } else {
         QTAILQ_INSERT_TAIL(&xfer->ring->unused, xfer, next);


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.