Skip to content

nvme: hwmon: provide temperature threshold features

Akinobu Mita linux-hwmon linux-nvme 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 7 repliesIn review
  2. v11 patch 15 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2nvme: hwmon: provide temperature min and max values for each sensordrivers/nvme/host/nvme-hwmon.c include/linux/nvme.h+96 -165 replies
2/2nvme: hwmon: add quirk to avoid changing temperature thresholddrivers/nvme/host/nvme-hwmon.c drivers/nvme/host/nvme.h drivers/nvme/host/pci.c+12 -22 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchGuenter RoeckChristoph Hellwig
1/2R-b T-b R-b
2/2R-b T-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] nvme: hwmon: provide temperature threshold features

According to the NVMe specification, the over temperature threshold and under temperature threshold features shall be implemented for Composite Temperature if a non-zero WCTEMP field value is reported in the Identify Controller data structure. The features are also implemented for all implemented temperature sensors (i.e., all Temperature Sensor fields that report a non-zero value).

This provides the over temperature threshold and under temperature threshold for each sensor as temperature min and max values of hwmon sysfs attributes.

This patch depends on the patch "nvme: Add hardware monitoring support".
(http://lists.infradead.org/pipermail/linux-nvme/2019-November/027883.html)

* v2
- Add helper macros for kelvin from/to milli Celsius conversion
- Remove alarm attributes for each implemented temperature sensor
- Use u32 variable for the last parameter of nvme_get_features()
- Use NULL for the unused last parameter of nvme_set_features()
- Avoid ternary operator
- Adjust temperature value ranges with clamp_val()
- Don't use WCTEMP after initialization
- Avoid accessing negative index when WCTEMP == 0
- Add a new quirk to avoid changing temperature threshold

Akinobu Mita (2):
nvme: hwmon: provide temperature min and max values for each sensor
nvme: hwmon: add quirk to avoid changing temperature threshold

 drivers/nvme/host/nvme-hwmon.c | 110 +++++++++++++++++++++++++++++++++++------
 drivers/nvme/host/nvme.h       |   5 ++
 drivers/nvme/host/pci.c        |   3 +-
 include/linux/nvme.h           |   6 +++
 4 files changed, 107 insertions(+), 17 deletions(-)
Cc Keith Busch <[email protected]>
Cc Jens Axboe <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Sagi Grimberg <[email protected]>
Cc Jean Delvare <[email protected]>
Cc Guenter Roeck <[email protected]>
Signature · 1 line
2.7.4