On Fri, Aug 31, 2018 at 4:34 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > On Fri, 31 Aug 2018, Andrey Konovalov wrote: [...] >> Yes, I understand this. The idea is to stall/wait until the userspace >> provides a response. Like gadgetfs, but for every USB request. > > If all you want to do is wait, STALL is not the appropriate strategy. > Instead the device should send NAK packets to the host. > > STALL means "I can't process that request, because it is erroneous or I > don't understand it". NAK means "I'm not yet ready to reply; try > again later". [...] >> Is there a way to tell the UDC to not send the STALL packet, but to >> just wait? Assuming the userspace will read the request and provide a >> response within the timeout (50ms? [1]). Would this approach be >> supported by more hosts than sending STALLs? >> >> [1] https://www.beyondlogic.org/usbnutshell/usb6.shtml > > Sure. Just don't submit any response. With no data in its FIFO, the > UDC will respond with NAK packets. Perfect, that's what I need, thanks a lot!