On Mon, 2 Jul 2018, Paul Elder wrote: > Hello Felipe, > > We have discovered an issue in MUSB gadget when receiving control OUT > transfers. I have specifically observed it very frequently on the second > SET_CUR UVC request when trying to stream video with yavta from a UVC > gadget. > > What happens is that in the DATA phase, the controller copies the > incoming data to FIFO which generates an interrupt (as per the docs), > then the interrupt handler (actually ep0_rxstate) sends a stall because > there is no usb_request to put the data into. > > Currently this usb_request is supposed to come from userspace by ioctl > UVCIOC_SEND_RESPONSE, which means that (more often than not) if the > interrupt corresponding to the DATA phase comes before userspace has a > chance to call the ioctl (or before the ioctl handler has a chance to > finish), then it will send a stall (usbmon ends with EPIPE). Shouldn't the UDC send a NAK install of a STALL under these circumstances? In fact, shouldn't the controller not even bother to copy the incoming data to its FIFO? I realize the MUSB hardware has a number of limitations, but this seems a little peculiar. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html