* [PATCH] hwmon: (gpio-fan) return IRQ_HANDLED from the shared alarm IRQ handler
@ 2026-09-01 15:56 Cong Nguyen
2026-09-01 16:09 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Cong Nguyen @ 2026-09-01 15:56 UTC (permalink / raw)
To: Guenter Roeck, Simon Guinot
Cc: linux-hwmon, linux-kernel, Cong Nguyen, Sashiko AI review
fan_alarm_irq_handler() is IRQF_SHARED but unconditionally returns
IRQ_NONE, even though it always schedules work in response. Enough
"unhandled" reports on a shared line trips the kernel's spurious-
interrupt detection and disables it, taking every device sharing it
down too.
Return IRQ_HANDLED, matching what the handler actually does.
Fixes: d6fe1360f42e ("hwmon: add generic GPIO fan driver")
Reported-by: Sashiko AI review <sashiko-bot@kernel.org>
Link: https://lore.kernel.org/r/20260830152150.27F5F1F000E9@smtp.kernel.org
Assisted-by: Claude:claude-opus-4
Signed-off-by: Cong Nguyen <congnt264@gmail.com>
---
drivers/hwmon/gpio-fan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c
index 084828e1e281..a55a7ea07fc0 100644
--- a/drivers/hwmon/gpio-fan.c
+++ b/drivers/hwmon/gpio-fan.c
@@ -67,7 +67,7 @@ static irqreturn_t fan_alarm_irq_handler(int irq, void *dev_id)
schedule_work(&fan_data->alarm_work);
- return IRQ_NONE;
+ return IRQ_HANDLED;
}
static ssize_t fan1_alarm_show(struct device *dev,
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] hwmon: (gpio-fan) return IRQ_HANDLED from the shared alarm IRQ handler
2026-09-01 15:56 [PATCH] hwmon: (gpio-fan) return IRQ_HANDLED from the shared alarm IRQ handler Cong Nguyen
@ 2026-09-01 16:09 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2026-09-01 16:09 UTC (permalink / raw)
To: Cong Nguyen, Simon Guinot; +Cc: linux-hwmon, linux-kernel, Sashiko AI review
On 9/1/26 08:56, Cong Nguyen wrote:
> fan_alarm_irq_handler() is IRQF_SHARED but unconditionally returns
> IRQ_NONE, even though it always schedules work in response. Enough
> "unhandled" reports on a shared line trips the kernel's spurious-
> interrupt detection and disables it, taking every device sharing it
> down too.
>
> Return IRQ_HANDLED, matching what the handler actually does.
>
> Fixes: d6fe1360f42e ("hwmon: add generic GPIO fan driver")
> Reported-by: Sashiko AI review <sashiko-bot@kernel.org>
> Link: https://lore.kernel.org/r/20260830152150.27F5F1F000E9@smtp.kernel.org
> Assisted-by: Claude:claude-opus-4
> Signed-off-by: Cong Nguyen <congnt264@gmail.com>
> ---
> drivers/hwmon/gpio-fan.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c
> index 084828e1e281..a55a7ea07fc0 100644
> --- a/drivers/hwmon/gpio-fan.c
> +++ b/drivers/hwmon/gpio-fan.c
> @@ -67,7 +67,7 @@ static irqreturn_t fan_alarm_irq_handler(int irq, void *dev_id)
>
> schedule_work(&fan_data->alarm_work);
>
> - return IRQ_NONE;
> + return IRQ_HANDLED;
> }
>
That makes me wonder if IRQF_SHARED is appropriate for this driver's
interrupt handler. I think that should be dropped as well.
Thanks,
Guenter
> static ssize_t fan1_alarm_show(struct device *dev,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-01 16:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-01 15:56 [PATCH] hwmon: (gpio-fan) return IRQ_HANDLED from the shared alarm IRQ handler Cong Nguyen
2026-09-01 16:09 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®