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

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

Merge "msm: ipa3: fix xDCI suspend sequence"

parents b08e7c3b ce5b84aa
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1298,7 +1298,10 @@ static bool ipa3_is_xdci_channel_empty(struct ipa3_ep_context *ep,
		is_empty = (chan_info->rp == chan_info->wp);
	} else {
		/* For DL channel: */
		if (chan_info->wp != (ep->gsi_mem_info.chan_ring_len - 1)) {
		if (chan_info->wp !=
		    (ep->gsi_mem_info.chan_ring_base_addr +
		     ep->gsi_mem_info.chan_ring_len -
		     GSI_CHAN_RE_SIZE_16B)) {
			/*  if chan.WP != LINK TRB: chan.WP == evt.RP */
			is_empty = (chan_info->wp == chan_info->evt_rp);
		} else {
@@ -1578,7 +1581,7 @@ int ipa3_xdci_suspend(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
			dl_data_pending = true;
	}
	if (dl_data_pending) {
		IPADBG("DL data pending, can't suspend\n");
		IPAERR("DL data pending, can't suspend\n");
		result = -EFAULT;
		goto query_chan_info_fail;
	}
@@ -1603,7 +1606,7 @@ int ipa3_xdci_suspend(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
	 */
	is_empty = ipa3_is_xdci_channel_empty(dl_ep, &dl_gsi_chan_info);
	if (!is_empty) {
		IPADBG("DL data pending, can't suspend\n");
		IPAERR("DL data pending, can't suspend\n");
		/* Unsuspend the DL EP */
		memset(&ep_cfg_ctrl, 0 , sizeof(struct ipa_ep_cfg_ctrl));
		ep_cfg_ctrl.ipa_ep_suspend = false;
+2 −1
Original line number Diff line number Diff line
@@ -183,7 +183,8 @@ static bool ipa3_usb_set_state(enum ipa3_usb_state new_state)
	case IPA_USB_CONNECTED:
		if (ipa3_usb_ctx->state == IPA_USB_INITIALIZED ||
			ipa3_usb_ctx->state == IPA_USB_STOPPED ||
			ipa3_usb_ctx->state == IPA_USB_RESUME_IN_PROGRESS)
			ipa3_usb_ctx->state == IPA_USB_RESUME_IN_PROGRESS ||
			ipa3_usb_ctx->state == IPA_USB_SUSPEND_REQUESTED)
			state_legal = true;
		if (ipa3_usb_ctx->rm_ctx.cons_state == IPA_USB_CONS_GRANTED ||
			ipa3_usb_ctx->rm_ctx.cons_requested_released) {