From: sashiko-bot@kernel.org
To: "Zinc Lim" <limzhineng2@gmail.com>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH net-next v4 5/6] eth: fbnic: report temperature and voltage alarms via hwmon
Date: Thu, 15 Oct 2026 22:22:48 +0000 [thread overview]
Message-ID: <sashiko-outbox-173447@kernel.org> (raw)
In-Reply-To: <20261014222225.2803660-6-limzhineng2@gmail.com>
> Firmware reports the range a sensor has entered on every threshold
> crossing, including the one back into the normal range. Expose that as
> temp1_alarm and in0_alarm, so the alarm reflects a condition the
> hardware raised and an excursion that starts and ends between two sysfs
> reads is still caught. Each crossing wakes anything polling the
> attribute through hwmon_notify_event().
>
> Each alarm is only visible if all of its thresholds are reported by the
> firmware. Voltage has no crit threshold, only min and max.
>
> Firmware only reports a range when it changes, so a sensor already out of
> range when the driver attaches has nothing cached. The first alarm read
> resolves that via a sensor read, its response carrying the range.
> Old firmware that doesn't report a range leaves the alarm to be
> classified from the reading against the thresholds, with no range to
> notify on.
>
> fbnic_hwmon_notify_event() runs from the mailbox IRQ, so it can race
> registration and teardown. Publish fbd->hwmon with WRITE_ONCE() only
> after a successful registration, clear it with WRITE_ONCE(NULL) followed
> by synchronize_irq() to drain any in-flight handler, and skip the
> notification when the read returns NULL.
>
> Signed-off-by: Zinc Lim <limzhineng2@gmail.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261014222225.2803660-1-limzhineng2@gmail.com?part=5
next prev parent reply other threads:[~2026-10-15 22:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 22:22 [PATCH net-next v4 0/6] eth: fbnic: expand hwmon sensor support Zinc Lim
2026-10-14 22:22 ` [PATCH net-next v4 1/6] eth: fbnic: move sensor read logic out of fbnic_mac Zinc Lim
2026-10-15 22:22 ` sashiko-bot
2026-10-14 22:22 ` [PATCH net-next v4 2/6] eth: fbnic: cache hwmon sensor readings Zinc Lim
2026-10-15 22:22 ` sashiko-bot
2026-10-14 22:22 ` [PATCH net-next v4 3/6] eth: fbnic: report temperature and voltage thresholds via hwmon Zinc Lim
2026-10-15 22:22 ` sashiko-bot
2026-10-14 22:22 ` [PATCH net-next v4 4/6] eth: fbnic: parse the alarm range reported by firmware Zinc Lim
2026-10-15 22:22 ` sashiko-bot
2026-10-14 22:22 ` [PATCH net-next v4 5/6] eth: fbnic: report temperature and voltage alarms via hwmon Zinc Lim
2026-10-15 22:22 ` sashiko-bot [this message]
2026-10-14 22:22 ` [PATCH net-next v4 6/6] eth: fbnic: derive the alarm range on older firmware Zinc Lim
2026-10-15 22:22 ` sashiko-bot
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=sashiko-outbox-173447@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=limzhineng2@gmail.com \
--cc=linux-hwmon@vger.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.