usb: dwc3: Stop active transfer on control endpoints
If cable disconnects before data stage completion dwc3_remove_requests() gets called for ep0 in and out but dwc3_ep0_complete_data() does not get called. dwc3_ep0_complete_data() function resets TRB enqueue count to 0. As a result upon next cable connect start transfer is called with wrong TRB address because trb_enqueue is set to 1. Since this TRB was completed in the past, HWO bit is cleared for this TRB. This results into usb enumeration failure due to control transfer stall. Fix this issue by issuing end transfer command on control endpoints after ep0 requests are removed for IN and OUT and reset trb_enqueue counters to 0. Change-Id: Ic5364f11372d85ec7c133024dc48bbc5d848ebf4 Signed-off-by:Hemant Kumar <hemantk@codeaurora.org> Signed-off-by:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment