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

Commit 67062ab5 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: dwc3: Do not call WARN_ON_ONCE from interrupt context"

parents 5bf2515b 842553e6
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -1002,7 +1002,6 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc,
	}

	dbg_queue(dep->number, &req->request, ret);
	WARN_ON(ret < 0);
}

static int dwc3_ep0_start_control_status(struct dwc3_ep *dep)
@@ -1053,7 +1052,11 @@ static void dwc3_ep0_end_control_data(struct dwc3 *dwc, struct dwc3_ep *dep)
	cmd |= DWC3_DEPCMD_PARAM(dep->resource_index);
	memset(&params, 0, sizeof(params));
	ret = dwc3_send_gadget_ep_cmd(dwc, dep->number, cmd, &params);
	WARN_ON_ONCE(ret);
	if (ret) {
		dev_dbg(dwc->dev, "%s: send ep cmd ENDTRANSFER failed",
			dep->name);
		dbg_event(dep->number, "EENDXFER", ret);
	}
	dep->resource_index = 0;
}

@@ -1098,7 +1101,9 @@ static void dwc3_ep0_xfernotready(struct dwc3 *dwc,
					dwc->ctrl_req_addr, 0,
					DWC3_TRBCTL_CONTROL_DATA);
			dbg_event(epnum, "ZLP", ret);
			WARN_ON(ret < 0);
			if (ret)
				dev_dbg(dwc->dev, "%s: start xfer cmd failed",
					dep->name);
		}

		break;
@@ -1115,7 +1120,8 @@ static void dwc3_ep0_xfernotready(struct dwc3 *dwc,

		if (dwc->delayed_status &&
				list_empty(&dwc->eps[0]->request_list)) {
			WARN_ON_ONCE(event->endpoint_number != 1);
			if (event->endpoint_number != 1)
				dbg_event(epnum, "EEPNUM", event->status);
			dev_vdbg(dwc->dev, "Mass Storage delayed status\n");
			return;
		}
+8 −3
Original line number Diff line number Diff line
@@ -445,7 +445,6 @@ int dwc3_send_gadget_ep_cmd(struct dwc3 *dwc, unsigned ep,
			dev_err(dwc->dev, "%s command timeout for %s\n",
				dwc3_gadget_ep_cmd_string(cmd),
				dep->name);
			WARN_ON_ONCE(1);
			ret = -ETIMEDOUT;
			break;
		}
@@ -2480,7 +2479,9 @@ static int dwc3_cleanup_done_reqs(struct dwc3 *dwc, struct dwc3_ep *dep,
		req = next_request(&dep->req_queued);
		if (!req) {
			if (event->status)
				WARN_ON_ONCE(1);
				dev_err(dwc->dev,
					"%s: evt sts %x for no req queued",
					dep->name, event->status);
			return 1;
		}

@@ -2820,7 +2821,11 @@ static void dwc3_clear_stall_all_ep(struct dwc3 *dwc)
		memset(&params, 0, sizeof(params));
		ret = dwc3_send_gadget_ep_cmd(dwc, dep->number,
				DWC3_DEPCMD_CLEARSTALL, &params);
		WARN_ON_ONCE(ret);
		if (ret) {
			dev_dbg(dwc->dev, "%s; send ep cmd CLEARSTALL failed",
				dep->name);
			dbg_event(dep->number, "ECLRSTALL", ret);
		}
	}
}