From 16e70b68ee5064f0173d41acd2a74536951c8fab Mon Sep 17 00:00:00 2001 From: Sivan Reinstein Date: Wed, 12 May 2021 09:03:45 +0300 Subject: [PATCH] msm: ipa: Clear IEOB for stopped channels with MSI IRQ Clear IEOBs as part of CH stop for channels with MSI IRQ type Change-Id: I7b9af7f385b0876fc2f43314bd3588110911a021 Acked-by: Nadav Levintov Signed-off-by: Sivan Reinstein --- drivers/platform/msm/gsi/gsi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/platform/msm/gsi/gsi.c b/drivers/platform/msm/gsi/gsi.c index e43c46c8acc2..09edf862f896 100644 --- a/drivers/platform/msm/gsi/gsi.c +++ b/drivers/platform/msm/gsi/gsi.c @@ -3213,6 +3213,7 @@ int gsi_stop_channel(unsigned long chan_hdl) int res; uint32_t val; struct gsi_chan_ctx *ctx; + unsigned long flags; if (!gsi_ctx) { pr_err("%s:%d gsi context not allocated\n", __func__, __LINE__); @@ -3279,6 +3280,15 @@ int gsi_stop_channel(unsigned long chan_hdl) goto free_lock; } + /* If channel is stopped succesfully and has an event with IRQ type MSI + - clear IEOB */ + if (ctx->evtr && ctx->evtr->props.intr == GSI_INTR_MSI) { + spin_lock_irqsave(&ctx->evtr->ring.slock, flags); + gsi_writel(1 << ctx->evtr->id, gsi_ctx->base + + GSI_EE_n_CNTXT_SRC_IEOB_IRQ_CLR_OFFS(gsi_ctx->per.ee)); + spin_unlock_irqrestore(&ctx->evtr->ring.slock, flags); + } + res = GSI_STATUS_SUCCESS; free_lock: