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

Commit 5ec274f2 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 45e3b69a
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -1495,8 +1495,16 @@ int ipa2_reset_flt(enum ipa_ip_type ip, bool user_only)
			}
		}
	}
	mutex_unlock(&ipa_ctx->lock);

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

+9 −0
Original line number Diff line number Diff line
@@ -1426,6 +1426,15 @@ int ipa2_reset_hdr(bool user_only)
	}
	mutex_unlock(&ipa_ctx->lock);

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

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

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

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

	return 0;
+9 −1
Original line number Diff line number Diff line
@@ -1445,8 +1445,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
@@ -1171,8 +1171,16 @@ int ipa3_reset_hdr(bool user_only)
		ipa3_ctx->hdr_proc_ctx_tbl.end = end;
		IPADBG("hdr_proc_tbl.end = %d\n", end);
	}

	/* 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;
}

Loading