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

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

Merge "msm: ipa: invalidate uC requested command after completion"

parents aa5b7887 8e57cad2
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -568,9 +568,11 @@ int ipa_uc_send_cmd(u32 cmd, u32 opcode, u32 expected_status,
				uc_rsp.raw32b = ipa_ctx->uc_ctx.uc_sram_mmio->
						responseParams;
				if (uc_rsp.params.originalCmdOp ==
				    ipa_ctx->uc_ctx.pending_cmd)
				    ipa_ctx->uc_ctx.pending_cmd) {
					ipa_ctx->uc_ctx.pending_cmd = -1;
					break;
				}
			}
			usleep_range(IPA_UC_POLL_SLEEP_USEC,
					IPA_UC_POLL_SLEEP_USEC);
		}
@@ -604,10 +606,12 @@ int ipa_uc_send_cmd(u32 cmd, u32 opcode, u32 expected_status,
	if (ipa_ctx->uc_ctx.uc_status != expected_status) {
		IPAERR("Recevied status %u, Expected status %u\n",
			ipa_ctx->uc_ctx.uc_status, expected_status);
		ipa_ctx->uc_ctx.pending_cmd = -1;
		mutex_unlock(&ipa_ctx->uc_ctx.uc_lock);
		return -EFAULT;
	}

	ipa_ctx->uc_ctx.pending_cmd = -1;
	mutex_unlock(&ipa_ctx->uc_ctx.uc_lock);

	IPADBG("uC cmd %u send succeeded\n", opcode);