Revert "ANDROID: usb: dwc3: gadget: don't cancel the started requests"

This reverts commit 92de566762.

This commit is not needed since userspace will handle corresponding
behavior if the device received ClearFeature(halt_ep) request.

Bug: 178904115
Signed-off-by: Ray Chi <raychi@google.com>
Change-Id: I94d40af0b25f7f582cd67ac509c6498355a6ba8a
This commit is contained in:
Ray Chi 2021-05-17 16:52:14 +08:00 committed by Greg Kroah-Hartman
commit 17f230fd93

View file

@ -1822,6 +1822,8 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value, int protocol)
{
struct dwc3_gadget_ep_cmd_params params;
struct dwc3 *dwc = dep->dwc;
struct dwc3_request *req;
struct dwc3_request *tmp;
int ret;
if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
@ -1870,14 +1872,16 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value, int protocol)
dwc3_stop_active_transfer(dep, true, true);
if (!list_empty(&dep->started_list))
dep->flags |= DWC3_EP_DELAY_START;
list_for_each_entry_safe(req, tmp, &dep->started_list, list)
dwc3_gadget_move_cancelled_request(req, DWC3_REQUEST_STATUS_STALLED);
if (dep->flags & DWC3_EP_END_TRANSFER_PENDING) {
dep->flags |= DWC3_EP_PENDING_CLEAR_STALL;
return 0;
}
dwc3_gadget_ep_cleanup_cancelled_requests(dep);
ret = dwc3_send_clear_stall_ep_cmd(dep);
if (ret) {
dev_err(dwc->dev, "failed to clear STALL on %s\n",