xref: /OK3568_Linux_fs/kernel/Documentation/hwmon/drivetemp.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunKernel driver drivetemp
4*4882a593Smuzhiyun=======================
5*4882a593Smuzhiyun
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunReferences
8*4882a593Smuzhiyun----------
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunANS T13/1699-D
11*4882a593SmuzhiyunInformation technology - AT Attachment 8 - ATA/ATAPI Command Set (ATA8-ACS)
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunANS Project T10/BSR INCITS 513
14*4882a593SmuzhiyunInformation technology - SCSI Primary Commands - 4 (SPC-4)
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunANS Project INCITS 557
17*4882a593SmuzhiyunInformation technology - SCSI / ATA Translation - 5 (SAT-5)
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunDescription
21*4882a593Smuzhiyun-----------
22*4882a593Smuzhiyun
23*4882a593SmuzhiyunThis driver supports reporting the temperature of disk and solid state
24*4882a593Smuzhiyundrives with temperature sensors.
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunIf supported, it uses the ATA SCT Command Transport feature to read
27*4882a593Smuzhiyunthe current drive temperature and, if available, temperature limits
28*4882a593Smuzhiyunas well as historic minimum and maximum temperatures. If SCT Command
29*4882a593SmuzhiyunTransport is not supported, the driver uses SMART attributes to read
30*4882a593Smuzhiyunthe drive temperature.
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun
33*4882a593SmuzhiyunUsage Note
34*4882a593Smuzhiyun----------
35*4882a593Smuzhiyun
36*4882a593SmuzhiyunReading the drive temperature may reset the spin down timer on some drives.
37*4882a593SmuzhiyunThis has been observed with WD120EFAX drives, but may be seen with other
38*4882a593Smuzhiyundrives as well. The same behavior is observed if the 'hdtemp' or 'smartd'
39*4882a593Smuzhiyuntools are used to access the drive.
40*4882a593SmuzhiyunWith the WD120EFAX drive, reading the drive temperature using the drivetemp
41*4882a593Smuzhiyundriver is still possible _after_ it transitioned to standby mode, and
42*4882a593Smuzhiyunreading the drive temperature in this mode will not cause the drive to
43*4882a593Smuzhiyunchange its mode (meaning the drive will not spin up). It is unknown if other
44*4882a593Smuzhiyundrives experience similar behavior.
45*4882a593Smuzhiyun
46*4882a593SmuzhiyunA known workaround for WD120EFAX drives is to read the drive temperature at
47*4882a593Smuzhiyunintervals larger than twice the spin-down time. Otherwise affected drives
48*4882a593Smuzhiyunwill never spin down.
49*4882a593Smuzhiyun
50*4882a593Smuzhiyun
51*4882a593SmuzhiyunSysfs entries
52*4882a593Smuzhiyun-------------
53*4882a593Smuzhiyun
54*4882a593SmuzhiyunOnly the temp1_input attribute is always available. Other attributes are
55*4882a593Smuzhiyunavailable only if reported by the drive. All temperatures are reported in
56*4882a593Smuzhiyunmilli-degrees Celsius.
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun=======================	=====================================================
59*4882a593Smuzhiyuntemp1_input		Current drive temperature
60*4882a593Smuzhiyuntemp1_lcrit		Minimum temperature limit. Operating the device below
61*4882a593Smuzhiyun			this temperature may cause physical damage to the
62*4882a593Smuzhiyun			device.
63*4882a593Smuzhiyuntemp1_min		Minimum recommended continuous operating limit
64*4882a593Smuzhiyuntemp1_max		Maximum recommended continuous operating temperature
65*4882a593Smuzhiyuntemp1_crit		Maximum temperature limit. Operating the device above
66*4882a593Smuzhiyun			this temperature may cause physical damage to the
67*4882a593Smuzhiyun			device.
68*4882a593Smuzhiyuntemp1_lowest		Minimum temperature seen this power cycle
69*4882a593Smuzhiyuntemp1_highest		Maximum temperature seen this power cycle
70*4882a593Smuzhiyun=======================	=====================================================
71