mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
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:
committed by
Greg Kroah-Hartman
parent
262fd53a10
commit
17f230fd93
@@ -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_gadget_ep_cmd_params params;
|
||||||
struct dwc3 *dwc = dep->dwc;
|
struct dwc3 *dwc = dep->dwc;
|
||||||
|
struct dwc3_request *req;
|
||||||
|
struct dwc3_request *tmp;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
|
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);
|
dwc3_stop_active_transfer(dep, true, true);
|
||||||
|
|
||||||
if (!list_empty(&dep->started_list))
|
list_for_each_entry_safe(req, tmp, &dep->started_list, list)
|
||||||
dep->flags |= DWC3_EP_DELAY_START;
|
dwc3_gadget_move_cancelled_request(req, DWC3_REQUEST_STATUS_STALLED);
|
||||||
|
|
||||||
if (dep->flags & DWC3_EP_END_TRANSFER_PENDING) {
|
if (dep->flags & DWC3_EP_END_TRANSFER_PENDING) {
|
||||||
dep->flags |= DWC3_EP_PENDING_CLEAR_STALL;
|
dep->flags |= DWC3_EP_PENDING_CLEAR_STALL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dwc3_gadget_ep_cleanup_cancelled_requests(dep);
|
||||||
|
|
||||||
ret = dwc3_send_clear_stall_ep_cmd(dep);
|
ret = dwc3_send_clear_stall_ep_cmd(dep);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dwc->dev, "failed to clear STALL on %s\n",
|
dev_err(dwc->dev, "failed to clear STALL on %s\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user