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

Commit 8dbc5e0d authored by Skylar Chang's avatar Skylar Chang
Browse files

msm: ipa: fix the ipa-hw rules not clean



After getting reset ioctl from user-space
module, the caches in ipa-driver are clean
however ipa-hw still has it. The fix is
to commit those caches in ipa-hw.

Change-Id: Iee0009b2bf3cdff2979d1fdba629c86a7c5afe21
Signed-off-by: default avatarSkylar Chang <chiaweic@codeaurora.org>
parent 853d7314
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -1451,8 +1451,16 @@ int ipa3_reset_flt(enum ipa_ip_type ip, bool user_only)
			}
		}
	}
	mutex_unlock(&ipa3_ctx->lock);

	/* commit the change to IPA-HW */
	if (ipa3_ctx->ctrl->ipa3_commit_flt(IPA_IP_v4) ||
		ipa3_ctx->ctrl->ipa3_commit_flt(IPA_IP_v6)) {
		IPAERR("fail to commit flt-rule\n");
		WARN_ON_RATELIMIT_IPA(1);
		mutex_unlock(&ipa3_ctx->lock);
		return -EPERM;
	}
	mutex_unlock(&ipa3_ctx->lock);
	return 0;
}

+9 −1
Original line number Diff line number Diff line
@@ -1145,8 +1145,16 @@ int ipa3_reset_hdr(bool user_only)
		ipa3_ctx->hdr_proc_ctx_tbl.end = 0;
		ipa3_ctx->hdr_proc_ctx_tbl.proc_ctx_cnt = 0;
	}

	/* commit the change to IPA-HW */
	if (ipa3_ctx->ctrl->ipa3_commit_hdr()) {
		IPAERR("fail to commit hdr\n");
		WARN_ON_RATELIMIT_IPA(1);
		mutex_unlock(&ipa3_ctx->lock);
		return -EFAULT;
	}

	mutex_unlock(&ipa3_ctx->lock);
	return 0;
}

+9 −0
Original line number Diff line number Diff line
@@ -1601,6 +1601,15 @@ int ipa3_reset_rt(enum ipa_ip_type ip, bool user_only)
			}
		}
	}

	/* commit the change to IPA-HW */
	if (ipa3_ctx->ctrl->ipa3_commit_rt(IPA_IP_v4) ||
		ipa3_ctx->ctrl->ipa3_commit_rt(IPA_IP_v6)) {
		IPAERR("fail to commit rt-rule\n");
		WARN_ON_RATELIMIT_IPA(1);
		mutex_unlock(&ipa3_ctx->lock);
		return -EPERM;
	}
	mutex_unlock(&ipa3_ctx->lock);

	return 0;