usb: dwc3: gadget: Properly handle ClearFeature(halt)

Commit 1bfa091472 ("usb: dwc3: gadget: Properly handle
ClearFeature(halt)") introduces stop active transfer to be done
as a part of clear feature. But for gsi as a part of clear
feature if stop active transfer is issued, as gsi uses hardware
path for transfers it cannot issue start active transfer which
leads to device sending not ready to the host while host trying
to send data which inturn leads to rmnet call failure. Fix this
by bailing out early without issuing stop active transfer in clear
feature for the interfaces that use hardware path for transfers.

Change-Id: I3929c610f50e6e5798517a03a9929db2824f87ff
Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
This commit is contained in:
Rohith Kollalsi 2021-04-08 16:49:44 +05:30 • committed by Gerrit - the friendly Code Review server
commit 24823f1592

View file

@ -1873,6 +1873,9 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value, int protocol)
dep->flags &= ~(DWC3_EP_STALL | DWC3_EP_WEDGE);
if (dep->gsi || dep->endless)
return 0;
dwc3_stop_active_transfer(dep, true, true);
list_for_each_entry_safe(req, tmp, &dep->started_list, list)