From: sashiko-bot@kernel.org
To: "Petar Stepanovic" <pstepanovic@axiado.com>
Cc: devicetree@vger.kernel.org, linux-hwmon@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 2/2] hwmon: add Axiado AX3000 and AX3005 PWM fan controller driver
Date: Thu, 03 Sep 2026 08:48:44 +0000 [thread overview]
Message-ID: <20260903084844.D1CC11F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260903-axiado-ax3000-pwm-fan-v2-2-ef43df46163e@axiado.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The interrupt handler incorrectly returns IRQ_HANDLED for unhandled device interrupts, potentially causing an IRQ storm.
--
commit ac0edffb2c72d464c05c340c5df147fdcf10b0f4
Author: Petar Stepanovic <pstepanovic@axiado.com>
hwmon: add Axiado AX3000 and AX3005 PWM fan controller driver
This commit adds support for the PWM fan controller found on the Axiado AX3000
and AX3005 SoCs. It measures fan speed via a hardware tachometer interrupt and
controls the fan via an external PWM signal.
> diff --git a/drivers/hwmon/axiado-pwm-fan.c b/drivers/hwmon/axiado-pwm-fan.c
> new file mode 100644
> index 0000000000000..ac153afded47a
> --- /dev/null
> +++ b/drivers/hwmon/axiado-pwm-fan.c
[ ... ]
> +static irqreturn_t axiado_tach_irq_handler(int irq, void *dev)
> +{
> + struct axiado_pwm_fan_ctx *ctx = dev;
> + u32 status;
> +
> + status = ioread32(ctx->tach_base + AX_TACH_INT_STATUS_REG);
> +
> + if (!status)
> + return IRQ_NONE;
[Severity: High]
Will this handler cause an IRQ storm if the hardware asserts an interrupt
where the status is non-zero but AX_TACH_INT_PENDING is not set?
Since the condition only checks if status is zero, an unexpected bit could
bypass the IRQ_NONE return path. The handler would then proceed to clear only
the AX_TACH_INT_PENDING bit and return IRQ_HANDLED, leaving the actual
hardware interrupt active and bypassing the kernel's spurious IRQ protection.
Should this explicitly check if the AX_TACH_INT_PENDING bit is set before
processing the interrupt?
> +
> + scoped_guard(spinlock_irqsave, &ctx->tach_lock) {
> + ctx->tach.count = ioread32(ctx->tach_base + AX_TACH_COUNT_REG);
> + }
> +
> + iowrite32(AX_TACH_INT_PENDING, ctx->tach_base + AX_TACH_INT_STATUS_REG);
> +
> + return IRQ_HANDLED;
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260903-axiado-ax3000-pwm-fan-v2-0-ef43df46163e@axiado.com?part=2
next prev parent reply other threads:[~2026-09-03 8:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 8:38 [PATCH v2 0/2] hwmon: add Axiado AX3000 and AX3005 PWM fan support Petar Stepanovic
2026-09-03 8:38 ` [PATCH v2 1/2] dt-bindings: hwmon: add Axiado AX3000 and AX3005 PWM fan controller Petar Stepanovic
2026-09-03 8:43 ` sashiko-bot
2026-09-11 7:03 ` Krzysztof Kozlowski
2026-09-03 8:38 ` [PATCH v2 2/2] hwmon: add Axiado AX3000 and AX3005 PWM fan controller driver Petar Stepanovic
2026-09-03 8:48 ` sashiko-bot [this message]
2026-09-11 14:52 ` Guenter Roeck
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=20260903084844.D1CC11F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=pstepanovic@axiado.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.