freebsd-dev/sbin/nvmecontrol
Wanpeng Qian 3a194eac3c nvmecontrol: fix wrong temperature unit for INTEL SSDs.
Although intel's specification did not tell which unit for Temperature
Statistics (Log Identifier C5h), I believe it is based on Celsius
instead of Kelvin.

here is my P3700 SSDs result(before):

Intel Temperature Log
=====================
Current:                        30 K, -243.15 C, -405.67 F
Overtemp Last Flags             0
Overtemp Lifetime Flags         0
Max Temperature                 53 K, -220.15 C, -364.27 F
Min Temperature                 17 K, -256.15 C, -429.07 F
Max Operating Temperature       63 K, -210.15 C, -346.27 F
Min Operating Temperature       0 K, -273.15 C, -459.67 F
Estimated Temperature Offset:   0 C/K
after apply the patch, result is

Intel Temperature Log
=====================
Current:                        303.15 K, 30 C, 86.00 F
Overtemp Last Flags             0
Overtemp Lifetime Flags         0
Max Temperature                 326.15 K, 53 C, 127.40 F
Min Temperature                 290.15 K, 17 C, 62.60 F
Max Operating Temperature       336.15 K, 63 C, 145.40 F
Min Operating Temperature       273.15 K, 0 C, 32.00 F
Estimated Temperature Offset:   0 C/K
I also compare to smartctl's report. it match very well.

also tested on Intel P3600, it fixed the problem.

Signed-off-by: Wanpeng Qian <wanpengqian@gmail.com>
Reviewed by: imp (added tweak to samsung.c so it still compiles)
Differential Revision: https://reviews.freebsd.org/D32845
2022-11-11 12:15:52 -07:00
..
modules nvmecontrol: fix wrong temperature unit for INTEL SSDs. 2022-11-11 12:15:52 -07:00
tests Ensure kyua list working when there is no /dev/nvme* 2020-04-13 21:08:54 +00:00
comnd.c Make use of the getlocalbase() function for run-time adjustment of the 2020-11-18 20:00:55 +00:00
comnd.h Revert the whole getlocalbase() set of changes while a different design is 2020-11-15 20:24:59 +00:00
devlist.c nvmecontrol: use uintmax_t for a size 2022-10-07 21:44:23 -06:00
firmware.c [nvmecontrol] Fix type signedness warning-to-error on gcc-6.4 2020-11-17 17:12:28 +00:00
format.c Improve nvmecontrol error reporting. 2020-11-13 02:05:45 +00:00
identify_ext.c nvmecontrol: Display Metadata and Sanitize capabilities of the device 2021-09-21 21:15:55 +00:00
identify.c nvmecontrol: Display Metadata and Sanitize capabilities of the device 2021-09-21 21:15:55 +00:00
logpage.c nvmecontrol: fix wrong temperature unit for INTEL SSDs. 2022-11-11 12:15:52 -07:00
Makefile pkgbase: Put nvmecontrol in its own package 2022-10-26 19:46:22 +02:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
nc_util.c Add SPDX tag. 2019-02-28 02:29:48 +00:00
ns.c Correct a typo in a string literal. 2022-06-07 21:48:59 +02:00
nsid.c Open device with O_RDONLY when command is non-invasive. 2020-04-20 13:47:07 +00:00
nvmecontrol_ext.h Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00
nvmecontrol.8 nvmecontrol: improve namespace size unit of devlist command output 2022-10-07 17:59:20 -06:00
nvmecontrol.c Make use of the getlocalbase() function for run-time adjustment of the 2020-11-18 20:00:55 +00:00
nvmecontrol.h nvmecontrol: fix wrong temperature unit for INTEL SSDs. 2022-11-11 12:15:52 -07:00
passthru.c nvmecontrol: update copyright on passthru command 2021-05-06 16:09:31 -06:00
perftest.c Improve nvmecontrol error reporting. 2020-11-13 02:05:45 +00:00
power.c Improve nvmecontrol error reporting. 2020-11-13 02:05:45 +00:00
reset.c Improve nvmecontrol error reporting. 2020-11-13 02:05:45 +00:00
resv.c Improve nvmecontrol error reporting. 2020-11-13 02:05:45 +00:00
sanitize.c Improve nvmecontrol error reporting. 2020-11-13 02:05:45 +00:00
selftest.c nvmecontrol: add device self-test op and log page 2021-01-08 09:27:56 -08:00