From be45dacd424e7efa31c33b24dea09693fca9c1df Mon Sep 17 00:00:00 2001 From: Rander Wang Date: Fri, 7 Dec 2018 16:37:56 +0800 Subject: [PATCH] ipc: apply ipc change on BDW & HSW this patch follows: ipc: Fix false positive IPC dropped messages. On receiving an IPC IRQ the handler currently does not check the IRQ mask. This means notification received ACKs (i.e. for trace updates) from the host may be reported as duplicate host command IPCs. Fix this by checking IPC IRQ mask. Signed-off-by: Liam Girdwood Signed-off-by: Keyon Jie Signed-off-by: Rander Wang --- src/ipc/hsw-ipc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ipc/hsw-ipc.c b/src/ipc/hsw-ipc.c index 8a48d854d..2b198b10a 100644 --- a/src/ipc/hsw-ipc.c +++ b/src/ipc/hsw-ipc.c @@ -87,11 +87,12 @@ out: static void irq_handler(void *arg) { - uint32_t isr; + uint32_t isr, imrd; uint32_t msg = 0; /* Interrupt arrived, check src */ isr = shim_read(SHIM_ISRD); + imrd = shim_read(SHIM_IMRD); tracev_ipc("ipc: irq isr 0x%x", isr); @@ -103,7 +104,7 @@ static void irq_handler(void *arg) do_notify(); } - if (isr & SHIM_ISRD_BUSY) { + if (isr & SHIM_ISRD_BUSY && !(imrd & SHIM_IMRD_BUSY)) { /* Mask Busy interrupt before return */ shim_write(SHIM_IMRD, shim_read(SHIM_IMRD) | SHIM_IMRD_BUSY);