From patchwork Tue Feb 13 08:18:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aishwarya Pant X-Patchwork-Id: 872636 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nsfOatcs"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zgb5Z3QXpz9t63 for ; Tue, 13 Feb 2018 19:18:26 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933662AbeBMISZ (ORCPT ); Tue, 13 Feb 2018 03:18:25 -0500 Received: from mail-ot0-f195.google.com ([74.125.82.195]:40478 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933651AbeBMISX (ORCPT ); Tue, 13 Feb 2018 03:18:23 -0500 Received: by mail-ot0-f195.google.com with SMTP id s4so16533226oth.7; Tue, 13 Feb 2018 00:18:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=0MKjXTeDx15Sp+L7YweSh0AWXuZ8i5EMoab8nQA22ao=; b=nsfOatcsYUhynkuX0NBTUq9snKiLyXZb2ZJXhmaDdCMWgAnTPd6/p5ydDpoIUgIE6p e7pc0ZtvquBbsaaIyr381yWysjfy/sjmUqvd1ZLdgGbEsoYW/ktKpId6d4dYWZQG5+pt XVQgsptjKwa49Sfp8B+qPiQz4GVJuolPLT86OEJe/PtWOvq+vsabrHpxqYdUAlh1lWnQ yCEwOZEPkH9aHNy/cB25bzhJSfuUdnWXnIH21bwCSi3zfOPZ7pAsvrdbv42TYCoMXtMY cZ8A7GXmhFsD252YFYmvumPWqPfStgfC2s5ixoNhffTfsXoC6WSN58/WM0tChvOiqYVL ioUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=0MKjXTeDx15Sp+L7YweSh0AWXuZ8i5EMoab8nQA22ao=; b=sOCtwkS7UNCpMHcL3puyCwfUjOTo+7QTGIIrQ+ab4+hym2zD2teU1DYiO2HKR2073I J2Act95acqbfBx+dlqqp3N+uG5IXfqw9R6zg//u1rbB78SeI9lYy36GSPhfX51vqhOrl p48YYkkD5yXWDjexwL3T+UNbO8TZTx9t4Hk2IiKbkJit+3r/cNdQNVzywgp5XXs25BO3 uMEMG49tV0lsxvmZxbbXhzj+955pSb60n5aNfBPr0sGxV+PZUpzWslF+hZY95onzl840 YvhPpo3gvFUzgSAOLjxmi6rMFVo8dpttAsTOKy4OcOobJ8djDHpI6GxiJOtISgAsfZeC H7kQ== X-Gm-Message-State: APf1xPAAAfG6ZKiFSiuoyXC55PpcJSpSjvRIMDFU/TTzSPQ6LDQ2quTj DO4MSyoBkqvrpGc87xJd2mc= X-Google-Smtp-Source: AH8x224d3dsYZUuw7qfMK5aXdlFd3Sokww+MT/ybBiyh4bEsyPiPHf67jlw8b2H7Kte5x0k8WvRYYw== X-Received: by 10.157.0.102 with SMTP id 93mr277676ota.373.1518509902651; Tue, 13 Feb 2018 00:18:22 -0800 (PST) Received: from mordor.localdomain ([49.205.217.191]) by smtp.gmail.com with ESMTPSA id b6sm100706oia.16.2018.02.13.00.18.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Feb 2018 00:18:22 -0800 (PST) Date: Tue, 13 Feb 2018 13:48:16 +0530 From: Aishwarya Pant To: Tejun Heo , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Corbet , Greg KH Cc: Julia Lawall Subject: [PATCH] libata: update documentation for sysfs interfaces Message-ID: <20180213081816.GA11350@mordor.localdomain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org 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 --- 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 index 000000000000..82ef6eab042d --- /dev/null +++ b/Documentation/ABI/testing/sysfs-block-device @@ -0,0 +1,58 @@ +What: /sys/block/*/device/sw_activity +Date: Jun, 2008 +KernelVersion: v2.6.27 +Contact: linux-ide@vger.kernel.org +Description: + (RW) Used by drivers which support software controlled activity + LEDs. + + 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 + detected. + 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. + + +What: /sys/block/*/device/unload_heads +Date: Sep, 2008 +KernelVersion: v2.6.28 +Contact: linux-ide@vger.kernel.org +Description: + (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 + milliseconds. + - 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 + Documentation/laptops/disk-shock-protection.txt + + +What: /sys/block/*/device/ncq_prio_enable +Date: Oct, 2016 +KernelVersion: v4.10 +Contact: linux-ide@vger.kernel.org +Description: + (RW) Write to the file to turn on or off the SATA ncq (native + command queueing) support. By default this feature is turned + 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" 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. + +What: /sys/class/scsi_host/hostX/link_power_management_policy +Date: Oct, 2007 +KernelVersion: v2.6.24 +Contact: linux-ide@vger.kernel.org +Description: + (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 + management. + + 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). + +What: /sys/class/scsi_host/hostX/em_message +What: /sys/class/scsi_host/hostX/em_message_type +Date: Jun, 2008 +KernelVersion: v2.6.27 +Contact: linux-ide@vger.kernel.org +Description: + 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 + file. + + 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). + +What: /sys/class/scsi_host/hostX/ahci_port_cmd +What: /sys/class/scsi_host/hostX/ahci_host_caps +What: /sys/class/scsi_host/hostX/ahci_host_cap2 +Date: Mar, 2010 +KernelVersion: v2.6.35 +Contact: linux-ide@vger.kernel.org +Description: + [to be documented] + +What: /sys/class/scsi_host/hostX/ahci_host_version +Date: Mar, 2010 +KernelVersion: v2.6.35 +Contact: linux-ide@vger.kernel.org +Description: + (RO) Display the version of the AHCI spec implemented by the + host. + +What: /sys/class/scsi_host/hostX/em_buffer +Date: Apr, 2010 +KernelVersion: v2.6.35 +Contact: linux-ide@vger.kernel.org +Description: + (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. + +What: /sys/class/scsi_host/hostX/em_message_supported +Date: Oct, 2009 +KernelVersion: v2.6.39 +Contact: linux-ide@vger.kernel.org +Description: + (RO) Displays supported enclosure management message types.