diff mbox series

[6/6] bus: mhi: change IRQ_HANDLED to IRQ_NONE in mhi_irq_handler

Message ID 20240718061344.575653-7-quic_gokulsri@quicinc.com
State New
Headers show
Series add improvements to mhi driver | expand

Commit Message

Gokul Sriram Palanisamy July 18, 2024, 6:13 a.m. UTC
From: Karthick Shanmugham <quic_kartshan@quicinc.com>

When mhi_irq_handler is a shared interrupt handler. It is the shared
interrupt handlers responsibility to identify its own interrupt and exit
quickly if it is not. If there is no pending event in the event ring
handled, exit the interrupt context returning IRQ_NONE denoting the
interrupt either doesn't belong to this event ring or not handled.

Signed-off-by: Karthick Shanmugham <quic_kartshan@quicinc.com>
Signed-off-by: Vignesh Viswanathan <quic_viswanat@quicinc.com>
Signed-off-by: Gokul Sriram Palanisamy <quic_gokulsri@quicinc.com>
---
 drivers/bus/mhi/host/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeffrey Hugo July 28, 2024, 8:29 p.m. UTC | #1
On 7/28/2024 7:41 AM, Gokul Sriram P wrote:
> 
> On 7/18/2024 9:59 PM, Jeffrey Hugo wrote:
>> On 7/18/2024 12:13 AM, Gokul Sriram Palanisamy wrote:
>>> From: Karthick Shanmugham <quic_kartshan@quicinc.com>
>>>
>>> When mhi_irq_handler is a shared interrupt handler. It is the shared
>>> interrupt handlers responsibility to identify its own interrupt and exit
>>> quickly if it is not. If there is no pending event in the event ring
>>> handled, exit the interrupt context returning IRQ_NONE denoting the
>>> interrupt either doesn't belong to this event ring or not handled.
>>
>> How was this found?
> 
> Internally, the proprietary cnss drivers shares the same msi interrupt 
> for streaming certain debug information.
> 
> In that scenario, the interrupt didn't reach the corresponding shared 
> handler since the mhi_irq_handler( ) returned IRQ_HANDLED when there is 
> actually no pending mhi event.
> 
> This resulted in debug information not collected.

You should probably explain this in the commit text.

Also, are you sure other parts of the irq handler don't need to be updated?
diff mbox series

Patch

diff --git a/drivers/bus/mhi/host/main.c b/drivers/bus/mhi/host/main.c
index de804a701b85..f87eb0c2b01a 100644
--- a/drivers/bus/mhi/host/main.c
+++ b/drivers/bus/mhi/host/main.c
@@ -462,7 +462,7 @@  irqreturn_t mhi_irq_handler(int irq_number, void *dev)
 
 	/* Only proceed if event ring has pending events */
 	if (ev_ring->rp == dev_rp)
-		return IRQ_HANDLED;
+		return IRQ_NONE;
 
 	/* For client managed event ring, notify pending data */
 	if (mhi_event->cl_manage) {