On Mon, 23 Jan 2012, Paul Zimmerman wrote: > On Mon, 23 Jan 2012, Sebastian Andrzej Siewior wrote: > > <snip> > > > Fixing this not easy. We are atomic here and I can't sleep. A busy loop > > to wait until the command is not simple (but ugly) because other > > commands may complete in between. So the only way to fix this behavior > > from dwc3's point of view is allowing usb_ep_disable() to be called in > > process context. That means I have to get composite to use a workqueue > > as you suggested in other thread for other reason. So it seems now to > > be unavoidable..... > > You don't need to wait for the hardware to complete the transfer. You > just need to be sure the completion callbacks are called with an > appropriate error code before usb_ep_disable() returns. You can arrange > for the DWC3 driver to handle the hardware completions later when/if > they happen. But you do need to wait until the hardware has finished accessing the data buffers. 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