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

This reverts commit 17f230fd930d9c71578c197001623574bfec530d.

Reason for revert: Still present MTP functional issues when using MAC OS.

We can revert this later if we find and fix any userspace issues that might be causing this.

Bug: 188778499
Change-Id: I9507207b4093d3eba25132657c84ecf7407d6df9
Signed-off-by: Saravana Kannan <saravanak@google.com>
(cherry picked from commit f2d87eb3a02f9bc3442910120f431dac74c8ae10)
This commit is contained in:
Saravana Kannan
2021-06-03 18:13:57 +00:00
committed by Isaac Manjarres
parent eef9e1295b
commit 554a967167

View File

@@ -2100,8 +2100,6 @@ 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)) {
@@ -2150,8 +2148,8 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value, int protocol)
dwc3_stop_active_transfer(dep, true, true);
list_for_each_entry_safe(req, tmp, &dep->started_list, list)
dwc3_gadget_move_cancelled_request(req, DWC3_REQUEST_STATUS_STALLED);
if (!list_empty(&dep->started_list))
dep->flags |= DWC3_EP_DELAY_START;
if (dep->flags & DWC3_EP_END_TRANSFER_PENDING ||
(dep->flags & DWC3_EP_DELAY_STOP)) {
@@ -2162,8 +2160,6 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value, int protocol)
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",