stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] usb: dwc3: gadget: Fix halt/clear_stall handling
@ 2020-07-30 23:28 Thinh Nguyen
  2020-07-30 23:28 ` [PATCH 1/3] usb: dwc3: gadget: Resume pending requests after CLEAR_STALL Thinh Nguyen
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Thinh Nguyen @ 2020-07-30 23:28 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, Thinh Nguyen, linux-usb
  Cc: John Youn, stable

This series fixes a couple of driver issues handling ClearFeature(halt)
request:

1) A function driver often uses set_halt() to reject a class driver protocol
command. After set_halt(), the endpoint will be stalled. It can queue new
requests while the endpoint is stalled. 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.

2) DWC3 should issue CLEAR_STALL command _after_ END_TRANSFER command completes.


Thinh Nguyen (3):
  usb: dwc3: gadget: Resume pending requests after CLEAR_STALL
  usb: dwc3: gadget: END_TRANSFER before CLEAR_STALL command
  usb: dwc3: gadget: Refactor ep command completion

 drivers/usb/dwc3/core.h   |  1 +
 drivers/usb/dwc3/ep0.c    | 16 +++++++++
 drivers/usb/dwc3/gadget.c | 85 +++++++++++++++++++++++++++++++----------------
 drivers/usb/dwc3/gadget.h |  1 +
 4 files changed, 75 insertions(+), 28 deletions(-)


base-commit: e3ee0e740c3887d2293e8d54a8707218d70d86ca
-- 
2.11.0


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2020-08-26 13:55 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30 23:28 [PATCH 0/3] usb: dwc3: gadget: Fix halt/clear_stall handling Thinh Nguyen
2020-07-30 23:28 ` [PATCH 1/3] usb: dwc3: gadget: Resume pending requests after CLEAR_STALL Thinh Nguyen
2020-08-01 23:18   ` Sasha Levin
2020-08-06  1:24   ` Sasha Levin
2020-08-09 15:53   ` Sasha Levin
2020-08-13 16:25   ` Sasha Levin
2020-08-19 23:56   ` Sasha Levin
2020-08-26 13:53   ` Sasha Levin
2020-07-30 23:28 ` [PATCH 2/3] usb: dwc3: gadget: END_TRANSFER before CLEAR_STALL command Thinh Nguyen
2020-08-01 23:18   ` Sasha Levin
2020-08-06  1:24   ` Sasha Levin
2020-08-09 15:53   ` Sasha Levin
2020-08-13 16:25   ` Sasha Levin
2020-08-19 23:56   ` Sasha Levin
2020-08-26 13:53   ` Sasha Levin
2020-08-06  1:24 ` [PATCH 0/3] usb: dwc3: gadget: Fix halt/clear_stall handling Sasha Levin
2020-08-17 18:06 ` Thinh Nguyen
2020-08-18  6:56   ` Felipe Balbi
2020-08-18 21:40     ` Thinh Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).