[PATCH] libata: update documentation for sysfs interfaces
- Date: Tue, 13 Feb 2018 13:48:16 +0530
- From: Aishwarya Pant <aishpant@xxxxxxxxx>
- Subject: [PATCH] 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
I do not have complete descriptions for the following 3 attributes; they
have been annotated with the comment [to be documented] -
Signed-off-by: Aishwarya Pant <aishpant@xxxxxxxxx>
Documentation/ABI/testing/sysfs-block-device | 58 ++++++++++++++++
Documentation/ABI/testing/sysfs-class-scsi_host | 89 +++++++++++++++++++++++++
2 files changed, 147 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-block-device
diff --git a/Documentation/ABI/testing/sysfs-block-device b/Documentation/ABI/testing/sysfs-block-device
new file mode 100644
@@ -0,0 +1,58 @@
+Date: Jun, 2008
+ (RW) Used by drivers which support software controlled activity
+ It has the following valid values:
+ 0 OFF - the LED is not activated on activity
+ 1 BLINK_ON - the LED blinks on every 10ms when activity is
+ 2 BLINK_OFF - the LED is on when idle, and blinks off
+ every 10ms when activity is detected.
+ Note that the user must turn sw_activity OFF it they wish to
+ control the activity LED via the em_message file.
+Date: Sep, 2008
+ (RW) Hard disk shock protection
+ Writing an integer value to this file will take the heads of the
+ respective drive off the platter and block all I/O operations
+ for the specified number of milliseconds.
+ - If the device does not support the unload heads feature,
+ access is denied with -EOPNOTSUPP.
+ - The maximal value accepted for a timeout is 30000
+ - A previously set timeout can be cancelled and disk can resume
+ normal operation immediately by specifying a timeout of 0.
+ - Some hard drives only comply with an earlier version of the
+ ATA standard, but support the unload feature nonetheless.
+ There is no safe way Linux can detect these devices, so this
+ is not enabled by default. If it is known that your device
+ does support the unload feature, then you can tell the kernel
+ to enable it by writing -1. It can be disabled again by
+ writing -2.
+ - Values below -2 are rejected with -EINVAL
+ For more information, see
+Date: Oct, 2016
+ (RW) Write to the file to turn on or off the SATA ncq (native
+ command queueing) support. By default this feature is turned
diff --git a/Documentation/ABI/testing/sysfs-class-scsi_host b/Documentation/ABI/testing/sysfs-class-scsi_host
index 0eb255e7db12..bafc59fd7b69 100644
@@ -27,3 +27,92 @@ Description: This file contains the current status of the "SSD Smart Path"
the direct i/o path to physical devices. This setting is
controller wide, affecting all configured logical drives on the
controller. This file is readable and writable.
+Date: Oct, 2007
+ (RW) This parameter allows the user to read and set the link
+ (interface) power management.
+ There are four possible options:
+ min_power: Tell the controller to try to make the link use the
+ least possible power when possible. This may sacrifice some
+ performance due to increased latency when coming out of lower
+ power states.
+ max_performance: Generally, this means no power management.
+ Tell the controller to have performance be a priority over power
+ medium_power: Tell the controller to enter a lower power state
+ when possible, but do not enter the lowest power state, thus
+ improving latency over min_power setting.
+ med_power_with_dipm: Identical to the existing medium_power
+ setting except that it enables dipm (device initiated power
+ management) on top, which makes it match the Windows IRST (Intel
+ Rapid Storage Technology) driver settings. This setting is also
+ close to min_power, except that:
+ a) It does not use host-initiated slumber mode, but it does
+ allow device-initiated slumber
+ b) It does not enable low power device sleep mode (DevSlp).
+Date: Jun, 2008
+ em_message: (RW) Enclosure management support. For the LED
+ protocol, writes and reads correspond to the LED message format
+ as defined in the AHCI spec.
+ The user must turn sw_activity (under /sys/block/*/device/) OFF
+ it they wish to control the activity LED via the em_message
+ em_message_type: (RO) Displays the current enclosure management
+ protocol that is being used by the driver (for eg. LED, SAF-TE,
+ SES-2, SGPIO etc).
+Date: Mar, 2010
+ [to be documented]
+Date: Mar, 2010
+ (RO) Display the version of the AHCI spec implemented by the
+Date: Apr, 2010
+ (RW) Allows access to AHCI EM (enclosure management) buffer
+ directly if the host supports EM.
+ For eg. the AHCI driver supports SGPIO EM messages but the
+ SATA/AHCI specs do not define the SGPIO message format of the EM
+ buffer. Different hardware(HW) vendors may have different
+ definitions. With the em_buffer attribute, this issue can be
+ solved by allowing HW vendors to provide userland drivers and
+ tools for their SGPIO initiators.
+Date: Oct, 2009
+ (RO) Displays supported enclosure management message types.