Thinh Nguyen fa27e2f6c5 usb: dwc3: ep0: Fix delay status handling
If we want to send a control status on our own time (through
delayed_status), make sure to handle a case where we may queue the
delayed status before the host requesting for it (when XferNotReady
is generated). Otherwise, the driver won't send anything because it's
not EP0_STATUS_PHASE yet. To resolve this, regardless whether
dwc->ep0state is EP0_STATUS_PHASE, make sure to clear the
dwc->delayed_status flag if dwc3_ep0_send_delayed_status() is called.
The control status can be sent when the host requests it later.

Cc: <stable@vger.kernel.org>
Fixes: d97c78a1908e ("usb: dwc3: gadget: END_TRANSFER before CLEAR_STALL command")
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
2020-10-27 11:33:53 +02:00
..
2020-10-23 16:38:36 -07:00
2020-10-25 10:55:35 -07:00
2020-10-24 10:39:22 -07:00
2020-10-24 10:39:22 -07:00
2020-10-16 12:21:15 -07:00
2020-10-19 14:28:30 -07:00
2020-10-24 10:39:22 -07:00
2020-10-15 14:43:29 -07:00
2020-10-12 13:26:49 -07:00
2020-10-24 10:39:22 -07:00
2020-10-14 15:56:58 -07:00
2020-10-24 10:39:22 -07:00
2020-10-24 10:33:08 -07:00
2020-10-13 12:12:44 -07:00
2020-10-23 10:54:13 -07:00
2020-10-17 11:18:18 -07:00
2020-10-20 09:35:06 -07:00
2020-10-16 12:21:15 -07:00
2020-10-24 10:39:22 -07:00
2020-10-15 14:43:29 -07:00
2020-10-24 10:39:22 -07:00
2020-10-14 15:15:35 -07:00
2020-10-14 15:56:58 -07:00
2020-10-22 12:41:00 -07:00
2020-10-24 10:33:08 -07:00
2020-10-20 10:36:41 -07:00
2020-10-25 11:12:31 -07:00
2020-10-22 13:00:44 -07:00
2020-10-22 12:41:00 -07:00
2020-10-24 10:33:08 -07:00
2020-10-24 10:33:08 -07:00
2020-10-22 12:56:33 -07:00
2020-10-24 10:39:22 -07:00
2020-10-22 12:58:21 -07:00
2020-10-21 11:22:08 -07:00
2020-10-24 12:46:42 -07:00
2020-10-24 10:44:18 -07:00
2020-10-01 22:59:55 +02:00
2020-10-24 10:33:08 -07:00
2020-10-23 16:19:02 -07:00
2020-10-24 10:33:08 -07:00
2020-10-23 11:00:57 -07:00
2020-10-22 13:00:44 -07:00
2020-10-24 10:33:08 -07:00
2020-10-23 11:00:57 -07:00
2020-10-24 10:33:08 -07:00
2020-10-25 10:55:35 -07:00