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

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

Merge "soc: qcom: rpmh: Fix sending incorrect data during flush"

parents 59b69413 3864d223
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -908,6 +908,7 @@ int send_single(struct rpmh_client *rc, enum rpmh_state state, u32 addr,
 */
int rpmh_flush(struct rpmh_client *rc)
{
	DEFINE_RPMH_MSG_ONSTACK(rc, 0, NULL, NULL, rpm_msg);
	struct rpmh_req *p;
	struct rpmh_mbox *rpm = rc->rpmh;
	int ret;
@@ -930,6 +931,13 @@ int rpmh_flush(struct rpmh_client *rc)
	}
	spin_unlock_irqrestore(&rpm->lock, flags);

	/* Invalidate sleep and wake TCS */
	rpm_msg.msg.invalidate = true;
	rpm_msg.msg.is_complete = false;
	ret = mbox_write_controller_data(rc->chan, &rpm_msg.msg);
	if (ret)
		return ret;

	/* First flush the cached passthru's */
	ret = flush_passthru(rc);
	if (ret)