Received: by 10.223.185.116 with SMTP id b49csp3304433wrg; Tue, 13 Feb 2018 00:20:43 -0800 (PST) X-Google-Smtp-Source: AH8x2270WtMNeDqL5K8LBqBLFAZp9FpNtes371szfBe/ckJyGvvC77s/0F3fTEwiy2nCAT/gA9lj X-Received: by 2002:a17:902:6c41:: with SMTP id h1-v6mr383861pln.25.1518510043240; Tue, 13 Feb 2018 00:20:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518510043; cv=none; d=google.com; s=arc-20160816; b=0o1/DSMcxhLw7AXLlV8TxJnvqRKJ7rXaYDcXQhE54El18Oh80jviOc0UuiMEezbkHd ukmqL2J5rl0nTugNkGVUQNryqWGEdvckIf5Sns36n5HUtsYpNIrJXeKrdzdrBL5CJ3d4 UG7ILjlfiDTcTSTY0TfT3Q3U5QO/iLBW7DnY0pgFXbC8REH++klatqfiJXxwwZJVa8Qq rQGa5JZrhtA8d1jkMhcet/jtx2qaKoJQdNtDWpkENUiHxSoKgeulBTWbYDBRmVfS97m/ LmAAESO/t6gesJ5zYyyFbNyDZ0hbkhK4ghQRobAySXPbSDxOD2lVsuarhXHLmLJHQsE4 ppvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=0MKjXTeDx15Sp+L7YweSh0AWXuZ8i5EMoab8nQA22ao=; b=dRW3Y1/XwL93ZxQjdR4PKJf3AKJBoukmnpmYVZSun9BgzvDn3s6lHFadkkKtVamoKK H3q8jLfH8uEg7oPB6ohleu4h+ZjkOGhORVl8oPKPQJDc+UJ8WT3n93GkjR49nXiXkStY SYAOz0wUe/opzLErPUOgFTITyzHvOan2W14PIv+ZkeZkzfvrPaI4MqcEgst6qsW94ATW 9ATbh3WmkE+M19DKA5TsLpcd+8SCFEpjcOO1U9Yz0w2HBlluspwXnFhDdQU6QAQdat+g P+S/WJ0aAOvHGlAc0uHbMQ0D0EmN2YN4m/cy/JWZFdig34lfbDOD9FJsWW4N/I3GT3Tt POZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nsfOatcs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c74si5142387pfb.306.2018.02.13.00.20.28; Tue, 13 Feb 2018 00:20:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nsfOatcs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933750AbeBMIS2 (ORCPT + 99 others); Tue, 13 Feb 2018 03:18:28 -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-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-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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. -- 2.16.1