From: Josh Law <hlcj1234567@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Josh Law <objecting@objecting.org>
Subject: [PATCH 3/3] staging: axis-fifo: improve IRQ handler
Date: Sun, 1 Mar 2026 00:55:19 +0000 [thread overview]
Message-ID: <20260301005519.2512706-3-objecting@objecting.org> (raw)
In-Reply-To: <20260301005519.2512706-1-objecting@objecting.org>
Return IRQ_NONE when no interrupts were triggered to avoid spurious interrupt storms, and only clear the active interrupts instead of blindly clearing all interrupts by writing 'intr' to the ISR instead of XLLF_INT_CLEAR_ALL.
Signed-off-by: Josh Law <objecting@objecting.org>
---
drivers/staging/axis-fifo/axis-fifo.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index 28268881cda2..aad2206b481a 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -302,6 +302,9 @@ static irqreturn_t axis_fifo_irq(int irq, void *dw)
isr = ioread32(fifo->base_addr + XLLF_ISR_OFFSET);
intr = ier & isr;
+ if (!intr)
+ return IRQ_NONE;
+
if (intr & XLLF_INT_RC_MASK)
wake_up(&fifo->read_queue);
@@ -324,7 +327,7 @@ static irqreturn_t axis_fifo_irq(int irq, void *dw)
dev_err(fifo->dt_device,
"transmit length mismatch error interrupt\n");
- iowrite32(XLLF_INT_CLEAR_ALL, fifo->base_addr + XLLF_ISR_OFFSET);
+ iowrite32(intr, fifo->base_addr + XLLF_ISR_OFFSET);
return IRQ_HANDLED;
}
--
2.43.0
next prev parent reply other threads:[~2026-03-01 0:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-01 0:55 [PATCH 1/3] staging: axis-fifo: simplify resource mapping Josh Law
2026-03-01 0:55 ` [PATCH 2/3] staging: axis-fifo: use dev_err_probe() for IRQ error handling Josh Law
2026-03-01 0:55 ` Josh Law [this message]
2026-03-02 9:19 ` [PATCH 1/3] staging: axis-fifo: simplify resource mapping Dan Carpenter
2026-03-02 21:31 ` Ethan Tidmore
2026-03-02 21:36 ` Josh Law
2026-03-02 21:38 ` Ethan Tidmore
2026-03-02 21:40 ` Josh Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260301005519.2512706-3-objecting@objecting.org \
--to=hlcj1234567@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=objecting@objecting.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox