Skip to content

nvme: make SMART / Health Status AENs reach hwmon alarms - #7

Open
ghost wants to merge 1 commit into
for-next_basefrom
series/1206011=>for-next
Open

ghost wants to merge 1 commit into
for-next_basefrom
series/1206011=>for-next

Conversation

@ghost

@ghost ghost commented Nov 10, 2026

Copy link
Copy Markdown

Pull request for series with
subject: nvme: make SMART / Health Status AENs reach hwmon alarms
version: 1
url: https://patchwork.kernel.org/series/1206011/

@ghost

ghost commented Nov 10, 2026

Copy link
Copy Markdown
Author

Upstream branch: de52810
series: https://patchwork.kernel.org/series/1206011/
version: 1

@ghost
ghost force-pushed the for-next_base branch from 8c33852 to 18eb5ad Compare November 10, 2026 10:19
@ghost

ghost commented Nov 10, 2026

Copy link
Copy Markdown
Author

Upstream branch: de52810
series: https://patchwork.kernel.org/series/1206011/
version: 1

@ghost
ghost force-pushed the series/1206011=>for-next branch from a8ccbed to d7eafeb Compare November 10, 2026 10:22
@ghost

ghost commented Nov 10, 2026

Copy link
Copy Markdown
Author

Upstream branch: de52810
series: https://patchwork.kernel.org/series/1207163/
version: 2

The NVMe hwmon support exposes the temperature alarm as a plain sysfs
attribute, so monitoring tools have to poll temp1_alarm to learn about
a critical temperature condition. The device does send a SMART / Health
Status asynchronous event when a critical warning is raised, but the
host never enables it in the Asynchronous Event Configuration, and the
completion path silently drops the event.

The temperature warning is bit 1 of the SMART / Health Critical
Warnings field of the Asynchronous Event Configuration (feature 0x0b,
command dword 11 bits 7:0), which mirrors the critical_warning byte of
the SMART log. Unlike the notice events, it has no OAES capability bit,
so the subscription does not go through ctrl->oaes.

The event stays latched until the SMART log is read with RAE cleared,
so the deferred work re-reads it before the completion path re-arms
the Asynchronous Event Request, and then calls hwmon_notify_event()
on temp1_alarm. hwmon_notify_event() also feeds the thermal zone
registered with HWMON_C_REGISTER_TZ and emits the standard hwmon
uevent, which a plain sysfs_notify() would skip.

The nvme-pci transport completes asynchronous events from interrupt
context, so the completion path only queues the work.

Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
@ghost ghost added V2 and removed V1 labels Nov 10, 2026
@ghost
ghost force-pushed the series/1206011=>for-next branch from d7eafeb to 11f20a4 Compare November 10, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant