]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase
authorBaolin Wang <baolin.wang@linaro.org>
Sat, 14 Jan 2017 08:40:39 +0000 (16:40 +0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 24 Jan 2017 09:04:15 +0000 (11:04 +0200)
commit48e3a08e61b5236928b1ed809b3ccf3a1c6967c2
tree73e514e8d42d09ab89d7d1e8266e6dc6c256cd38
parent942c1d29c34d086250207045420c40efdaa39047
usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

When handing the SETUP packet by composite_setup(), we will release the
dwc->lock. If we get the 'USB_GADGET_DELAYED_STATUS' result from setup
function, which means we need to delay handling the STATUS phase.

But during the lock release period, maybe the request for handling delay
STATUS phase has been queued into list before we set 'dwc->delayed_status'
flag or entering 'EP0_STATUS_PHASE' phase, then we will miss the chance
to handle the STATUS phase. Thus we should check if the request for delay
STATUS phase has been enqueued when entering 'EP0_STATUS_PHASE' phase in
dwc3_ep0_xfernotready(), if so, we should handle it.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/ep0.c