On Fri, Aug 21, 2020 at 12:15:49PM +0300, Mathias Nyman wrote: > From: Ding Hui <dinghui@xxxxxxxxxxxxxx> > > Some device drivers call libusb_clear_halt when target ep queue > is not empty. (eg. spice client connected to qemu for usb redir) > > Before commit f5249461b504 ("xhci: Clear the host side toggle > manually when endpoint is soft reset"), that works well. > But now, we got the error log: > > EP not empty, refuse reset > > xhci_endpoint_reset failed and left ep_state's EP_SOFT_CLEAR_TOGGLE > bit still set > > So all the subsequent urb sumbits to the ep will fail with the > warn log: > > Can't enqueue URB while manually clearing toggle > > We need to clear ep_state EP_SOFT_CLEAR_TOGGLE bit after > xhci_endpoint_reset, even if it failed. > > Fixes: f5249461b504 ("xhci: Clear the host side toggle manually when endpoint is soft reset" Nit, you forgot the trailing ')' here...