usb: dwc3: gadget: Resume pending requests after CLEAR_STALL
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Thu, 3 Sep 2020 01:42:58 +0000 (18:42 -0700)
committerFelipe Balbi <balbi@kernel.org>
Thu, 24 Sep 2020 08:56:00 +0000 (11:56 +0300)
commitc503672abe1348f10f5a54a662336358c6e1a297
tree88ed4d03a4aa0f1001a3e911637714d90f87ca82
parentba4f184e126b751d1bffad5897f263108befc780
usb: dwc3: gadget: Resume pending requests after CLEAR_STALL

The function driver may queue new requests right after halting the
endpoint (i.e. queue new requests while the endpoint is stalled).
There's no restriction preventing it from doing so. However, dwc3
currently drops those requests after CLEAR_STALL. The driver should only
drop started requests. Keep the pending requests in the pending list to
resume and process them after the host issues ClearFeature(Halt) to the
endpoint.

Cc: stable@vger.kernel.org
Fixes: cb11ea56f37a ("usb: dwc3: gadget: Properly handle ClearFeature(halt)")
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/dwc3/gadget.c