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

Commit 54126c12 authored by Pratham Pratap's avatar Pratham Pratap
Browse files

usb: dwc3: Avoid store doorbell address if run/stop is cleared



Since ipa_work_handler runs in workqueue context there is a
possiblity that store doorbell address can  happen even after
run/stop is cleared which may lead to SMMU fault. Avoid this by
adding a check for pullups_connected before storing doorbell
address.

Change-Id: I933d6972aa9c6077481e0bdb56a5ca22a1c57e55
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent 1526c9c6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1569,6 +1569,11 @@ static int dwc3_msm_gsi_ep_op(struct usb_ep *ep,
		ret = gsi_get_xfer_index(ep);
		break;
	case GSI_EP_OP_STORE_DBL_INFO:
		if (!dwc->pullups_connected) {
			dbg_log_string("No Pullup\n");
			return -ESHUTDOWN;
		}

		request = (struct usb_gsi_request *)op_data;
		gsi_store_ringbase_dbl_info(ep, request);
		break;