Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 87ebbd27 authored by Wesley Cheng's avatar Wesley Cheng Committed by Gerrit - the friendly Code Review server
Browse files

usb: dwc3: gadget: Ignore ENDXFER completion for GSI endpoints



GSI endpoints do not generate a completion event for endxfer commands.
Upstream added a check for this event completion before continuing the
clear endpoint halt sequence.  Since this does not happen, skip the
check and continue with the clear halt command.

Change-Id: I082289dfb5ca23f48f794ec92f175ef7a4c830fb
Signed-off-by: default avatarWesley Cheng <wcheng@codeaurora.org>
Signed-off-by: default avatarSrinivasarao P <spathi@codeaurora.org>
parent b403cd66
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -543,7 +543,7 @@ static int dwc3_ep0_handle_endpoint(struct dwc3 *dwc,
			return -EINVAL;

		/* ClearFeature(Halt) may need delayed status */
		if (!set && (dep->flags & DWC3_EP_END_TRANSFER_PENDING))
		if (!set && (!dep->gsi && (dep->flags & DWC3_EP_END_TRANSFER_PENDING)))
			return USB_GADGET_DELAYED_STATUS;

		break;
+10 −8
Original line number Diff line number Diff line
@@ -1928,6 +1928,7 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value, int protocol)
			return 0;
		}

		if (!dep->gsi) {
			dwc3_stop_active_transfer(dep, true, true);

			list_for_each_entry_safe(req, tmp, &dep->started_list, list)
@@ -1939,6 +1940,7 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value, int protocol)
			}

			dwc3_gadget_ep_cleanup_cancelled_requests(dep);
		}

		ret = dwc3_send_clear_stall_ep_cmd(dep);
		if (ret) {