summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAishwarya Pant <aishpant@gmail.com>2018-02-13 03:18:16 -0500
committerTejun Heo <tj@kernel.org>2018-02-13 09:41:02 -0500
commit0a65e125150c227314dcd561a202a84228398449 (patch)
tree5aa2ba52e54d5f14f9654601419b3d06657a4e5d
parent8f8ca51dbb4da0457f57f83d94aea81931b0707a (diff)
libata: update documentation for sysfs interfaces
Dcoumentation has been added by parsing through git commit history and reading code. This might be useful for scripting and tracking changes in the ABI. I do not have complete descriptions for the following 3 attributes; they have been annotated with the comment [to be documented] - /sys/class/scsi_host/hostX/ahci_port_cmd /sys/class/scsi_host/hostX/ahci_host_caps /sys/class/scsi_host/hostX/ahci_host_cap2 Signed-off-by: Aishwarya Pant <aishpant@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r--Documentation/ABI/testing/sysfs-block-device58
-rw-r--r--Documentation/ABI/testing/sysfs-class-scsi_host89
2 files changed, 147 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/sysfs-block-device b/Documentation/ABI/testing/sysfs-block-device
new file mode 100644
index 000000000000..82ef6eab042d
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-block-device
@@ -0,0 +1,58 @@
1What: /sys/block/*/device/sw_activity
2Date: Jun, 2008
3KernelVersion: v2.6.27
4Contact: linux-ide@vger.kernel.org
5Description:
6 (RW) Used by drivers which support software controlled activity
7 LEDs.
8
9 It has the following valid values:
10
11 0 OFF - the LED is not activated on activity
12 1 BLINK_ON - the LED blinks on every 10ms when activity is
13 detected.
14 2 BLINK_OFF - the LED is on when idle, and blinks off
15 every 10ms when activity is detected.
16
17 Note that the user must turn sw_activity OFF it they wish to
18 control the activity LED via the em_message file.
19
20
21What: /sys/block/*/device/unload_heads
22Date: Sep, 2008
23KernelVersion: v2.6.28
24Contact: linux-ide@vger.kernel.org
25Description:
26 (RW) Hard disk shock protection
27
28 Writing an integer value to this file will take the heads of the
29 respective drive off the platter and block all I/O operations
30 for the specified number of milliseconds.
31
32 - If the device does not support the unload heads feature,
33 access is denied with -EOPNOTSUPP.
34 - The maximal value accepted for a timeout is 30000
35 milliseconds.
36 - A previously set timeout can be cancelled and disk can resume
37 normal operation immediately by specifying a timeout of 0.
38 - Some hard drives only comply with an earlier version of the
39 ATA standard, but support the unload feature nonetheless.
40 There is no safe way Linux can detect these devices, so this
41 is not enabled by default. If it is known that your device
42 does support the unload feature, then you can tell the kernel
43 to enable it by writing -1. It can be disabled again by
44 writing -2.
45 - Values below -2 are rejected with -EINVAL
46
47 For more information, see
48 Documentation/laptops/disk-shock-protection.txt
49
50
51What: /sys/block/*/device/ncq_prio_enable
52Date: Oct, 2016
53KernelVersion: v4.10
54Contact: linux-ide@vger.kernel.org
55Description:
56 (RW) Write to the file to turn on or off the SATA ncq (native
57 command queueing) support. By default this feature is turned
58 off.
diff --git a/Documentation/ABI/testing/sysfs-class-scsi_host b/Documentation/ABI/testing/sysfs-class-scsi_host
index 0eb255e7db12..bafc59fd7b69 100644
--- a/Documentation/ABI/testing/sysfs-class-scsi_host
+++ b/Documentation/ABI/testing/sysfs-class-scsi_host
@@ -27,3 +27,92 @@ Description: This file contains the current status of the "SSD Smart Path"
27 the direct i/o path to physical devices. This setting is 27 the direct i/o path to physical devices. This setting is
28 controller wide, affecting all configured logical drives on the 28 controller wide, affecting all configured logical drives on the
29 controller. This file is readable and writable. 29 controller. This file is readable and writable.
30
31What: /sys/class/scsi_host/hostX/link_power_management_policy
32Date: Oct, 2007
33KernelVersion: v2.6.24
34Contact: linux-ide@vger.kernel.org
35Description:
36 (RW) This parameter allows the user to read and set the link
37 (interface) power management.
38
39 There are four possible options:
40
41 min_power: Tell the controller to try to make the link use the
42 least possible power when possible. This may sacrifice some
43 performance due to increased latency when coming out of lower
44 power states.
45
46 max_performance: Generally, this means no power management.
47 Tell the controller to have performance be a priority over power
48 management.
49
50 medium_power: Tell the controller to enter a lower power state
51 when possible, but do not enter the lowest power state, thus
52 improving latency over min_power setting.
53
54 med_power_with_dipm: Identical to the existing medium_power
55 setting except that it enables dipm (device initiated power
56 management) on top, which makes it match the Windows IRST (Intel
57 Rapid Storage Technology) driver settings. This setting is also
58 close to min_power, except that:
59 a) It does not use host-initiated slumber mode, but it does
60 allow device-initiated slumber
61 b) It does not enable low power device sleep mode (DevSlp).
62
63What: /sys/class/scsi_host/hostX/em_message
64What: /sys/class/scsi_host/hostX/em_message_type
65Date: Jun, 2008
66KernelVersion: v2.6.27
67Contact: linux-ide@vger.kernel.org
68Description:
69 em_message: (RW) Enclosure management support. For the LED
70 protocol, writes and reads correspond to the LED message format
71 as defined in the AHCI spec.
72
73 The user must turn sw_activity (under /sys/block/*/device/) OFF
74 it they wish to control the activity LED via the em_message
75 file.
76
77 em_message_type: (RO) Displays the current enclosure management
78 protocol that is being used by the driver (for eg. LED, SAF-TE,
79 SES-2, SGPIO etc).
80
81What: /sys/class/scsi_host/hostX/ahci_port_cmd
82What: /sys/class/scsi_host/hostX/ahci_host_caps
83What: /sys/class/scsi_host/hostX/ahci_host_cap2
84Date: Mar, 2010
85KernelVersion: v2.6.35
86Contact: linux-ide@vger.kernel.org
87Description:
88 [to be documented]
89
90What: /sys/class/scsi_host/hostX/ahci_host_version
91Date: Mar, 2010
92KernelVersion: v2.6.35
93Contact: linux-ide@vger.kernel.org
94Description:
95 (RO) Display the version of the AHCI spec implemented by the
96 host.
97
98What: /sys/class/scsi_host/hostX/em_buffer
99Date: Apr, 2010
100KernelVersion: v2.6.35
101Contact: linux-ide@vger.kernel.org
102Description:
103 (RW) Allows access to AHCI EM (enclosure management) buffer
104 directly if the host supports EM.
105
106 For eg. the AHCI driver supports SGPIO EM messages but the
107 SATA/AHCI specs do not define the SGPIO message format of the EM
108 buffer. Different hardware(HW) vendors may have different
109 definitions. With the em_buffer attribute, this issue can be
110 solved by allowing HW vendors to provide userland drivers and
111 tools for their SGPIO initiators.
112
113What: /sys/class/scsi_host/hostX/em_message_supported
114Date: Oct, 2009
115KernelVersion: v2.6.39
116Contact: linux-ide@vger.kernel.org
117Description:
118 (RO) Displays supported enclosure management message types.