Received: by 10.223.185.116 with SMTP id b49csp3502221wrg; Tue, 13 Feb 2018 03:24:58 -0800 (PST) X-Google-Smtp-Source: AH8x227ArGIdyFsNTx5o/Cue4p6rL4bleEDGU+so9joXPpAsiTadQ4WRBLcG9nen7+igNmN8iiW2 X-Received: by 2002:a17:902:526d:: with SMTP id z100-v6mr833538plh.396.1518521098096; Tue, 13 Feb 2018 03:24:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518521098; cv=none; d=google.com; s=arc-20160816; b=qZULsMLiSlK47QvXPLOVG0Sf17iu20rVPcZBJ1wSFteTnNcouKxd5+ilug46I8yy07 TyLvKWr8bgCQ97eh2rfgW2JKd7/j4gpeybJjGetIDuPqBOM5N4L5hAO12zFViEmJ0J5G vR+Xu0zNkyuV4+xkimFWBOQ57QCCGU3eELus5KqvAGYV+ZrhGVqUiSOERXP312BFVA2J gmCS7KutAT9ujgyMe5dC67ise5ScWatd19ny8NbCPG1hAFMnW2htFe/DzkwG6Jh3Jj1r OrJRttEXrWxeIO73wlA5ugud28eNDr0+N1H2ZP/UfTPf9SzcJIspE7juGZLcd7Lmp3hX 4dgg== 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=7PvPQhiAwwkOtGkpmtQgSK4E5LvTd2vYfVOqIexaXGA=; b=qRf0r/PMMNKMoyBdFUFv2cFxlaOO5IzA4LyVHRsCdU74ByOhOX/yIV5PgjUyV+ZcPU UqadamcG0Ep/knWWZQ8Ep0nG/RL9jBwcBrinY6vePJY4vsIqegSetdLA+YWGk9Uwdy1p O6GdHIP09N8PN/L4Yd2EwNyEFUO34z4eZWbXsRLNE1WUP9dZaJ9CbTF7/1KlIEp+qFOz 0NOCk/MTjkgCHvGG71T50qjZjkywbHkQiKVBdGioAGA8Z4qzMLjsCK9HVlMlVGgyC1wf DYUYA+mgz5ycEPJ8FVS6aM2t0B2Ffjn8Rf4xJze0CN8JsE7AHsYiN/oQBjEb+dkVq2fE b3/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rye9Q5Z+; 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 x77si3261667pgx.159.2018.02.13.03.24.42; Tue, 13 Feb 2018 03:24:58 -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=rye9Q5Z+; 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 S934683AbeBMLWK (ORCPT + 99 others); Tue, 13 Feb 2018 06:22:10 -0500 Received: from mail-oi0-f68.google.com ([209.85.218.68]:41969 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934226AbeBMLWF (ORCPT ); Tue, 13 Feb 2018 06:22:05 -0500 Received: by mail-oi0-f68.google.com with SMTP id t135so957806oif.8; Tue, 13 Feb 2018 03:22:05 -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=7PvPQhiAwwkOtGkpmtQgSK4E5LvTd2vYfVOqIexaXGA=; b=rye9Q5Z+7H7rrpiZBEiukJUJ+mf5vLIzxQhrZXduBFEomKPzUZG7l/fCAoQ2FygUGH LH+eVpSeNsInSBCs4O+NGyfDL23jgn24QPARXBP+wgCd6zSK4FHDAIsmRowr0a32owkA dXNmVvAadUV5zKeDXdc7dFd4aM6JfUjnQNHmwhoX+8t9izwgnVnKAClgLt++BGCIg6tR F37DLeTwMJViPYG+j1UxweFmujpkxkVR2Y0cQL2JjJU3z5OuaKGPFYRjq6hKkKznQwsP o/8wHYWFSGuwL5J2VfQPMhbw4Y8bkmme+0OZpNhD1fEGY9Vr726K3V6xconXtadMO2k1 Ue6g== 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=7PvPQhiAwwkOtGkpmtQgSK4E5LvTd2vYfVOqIexaXGA=; b=Icd0+rMje2S0RI4nBUZ2ECKJ6Y6HlPLI9WGx/g7uDgSO5YeiCt2Y4bvzJDCo+GT2jH bEAqBlG9gB2SeI7ZIDRmZsA3buhLGuvIHcgeGHOcQzb+wCvddlFq+4AwEr2pSAmUsQgH KVj1M+ZIr/j37NlQGWtfiMm2in0Av3QhkfphrR6cJzwTthcUjHeOmBYqXpJw+/vAhXOa OJJUTOEW8pQk1ZbcuRELiOh3eIXskDI2ks8kyfmYA30xkMzKSOm+7JYkwWw/z44HgD9A C/75BGT/X9DmcF8zBgXiVOw1vWRwZ07SlQCxcgBdXSD0wXm8M6/pZRPfF4cZchXeMFTM 3M2Q== X-Gm-Message-State: APf1xPBti4sH44SB7LUSwMQtXJ3OFnEhTi3wV55TYVBV576SzszPkvys Mxw5UNPRXpwbB+66ySdN3Oc= X-Received: by 10.202.187.132 with SMTP id l126mr485535oif.172.1518520924856; Tue, 13 Feb 2018 03:22:04 -0800 (PST) Received: from mordor.localdomain ([49.205.217.191]) by smtp.gmail.com with ESMTPSA id n189sm1653562oif.28.2018.02.13.03.22.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Feb 2018 03:22:04 -0800 (PST) Date: Tue, 13 Feb 2018 16:51:59 +0530 From: Aishwarya Pant To: Tejun Heo , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Corbet , Greg KH , Gwendal Grignou Cc: Julia Lawall Subject: [PATCH] libata: transport: cleanup documentation of sysfs interface Message-ID: <20180213112159.GA24306@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 Clean-up the documentation of sysfs interfaces to be in the same format as described in Documentation/ABI/README. This will be useful for tracking changes in the ABI. Attributes are grouped by function (device, link or port) and then by date added. This patch also adds documentation for one attribute - /sys/class/ata_port/ataX/port_no Signed-off-by: Aishwarya Pant --- Documentation/ABI/testing/sysfs-ata | 171 +++++++++++++++++++++--------------- 1 file changed, 100 insertions(+), 71 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-ata b/Documentation/ABI/testing/sysfs-ata index aa4296498859..9ab0ef1dd1c7 100644 --- a/Documentation/ABI/testing/sysfs-ata +++ b/Documentation/ABI/testing/sysfs-ata @@ -1,110 +1,139 @@ What: /sys/class/ata_... -Date: August 2008 -Contact: Gwendal Grignou Description: - -Provide a place in sysfs for storing the ATA topology of the system. This allows -retrieving various information about ATA objects. + Provide a place in sysfs for storing the ATA topology of the + system. This allows retrieving various information about ATA + objects. Files under /sys/class/ata_port ------------------------------- - For each port, a directory ataX is created where X is the ata_port_id of - the port. The device parent is the ata host device. +For each port, a directory ataX is created where X is the ata_port_id of the +port. The device parent is the ata host device. -idle_irq (read) - Number of IRQ received by the port while idle [some ata HBA only]. +What: /sys/class/ata_port/ataX/nr_pmp_links +What: /sys/class/ata_port/ataX/idle_irq +Date: May, 2010 +KernelVersion: v2.6.37 +Contact: Gwendal Grignou +Description: + nr_pmp_links: (RO) If a SATA Port Multiplier (PM) is + connected, the number of links behind it. -nr_pmp_links (read) + idle_irq: (RO) Number of IRQ received by the port while + idle [some ata HBA only]. - If a SATA Port Multiplier (PM) is connected, number of link behind it. + +What: /sys/class/ata_port/ataX/port_no +Date: May, 2013 +KernelVersion: v3.11 +Contact: Gwendal Grignou +Description: + (RO) Host local port number. While registering host controller, + port numbers are tracked based upon number of ports available on + the controller. This attribute is needed by udev for composing + persistent links in /dev/disk/by-path. Files under /sys/class/ata_link ------------------------------- - Behind each port, there is a ata_link. If there is a SATA PM in the - topology, 15 ata_link objects are created. - - If a link is behind a port, the directory name is linkX, where X is - ata_port_id of the port. - If a link is behind a PM, its name is linkX.Y where X is ata_port_id - of the parent port and Y the PM port. +Behind each port, there is a ata_link. If there is a SATA PM in the topology, 15 +ata_link objects are created. -hw_sata_spd_limit +If a link is behind a port, the directory name is linkX, where X is ata_port_id +of the port. If a link is behind a PM, its name is linkX.Y where X is +ata_port_id of the parent port and Y the PM port. - Maximum speed supported by the connected SATA device. -sata_spd_limit +What: /sys/class/ata_link/linkX[.Y]/hw_sata_spd_limit +What: /sys/class/ata_link/linkX[.Y]/sata_spd_limit +What: /sys/class/ata_link/linkX[.Y]/sata_spd +Date: May, 2010 +KernelVersion: v2.6.37 +Contact: Gwendal Grignou +Description: + hw_sata_spd_limit: (RO) Maximum speed supported by the + connected SATA device. - Maximum speed imposed by libata. + sata_spd_limit: (RO) Maximum speed imposed by libata. -sata_spd + sata_spd: (RO) Current speed of the link + eg. 1.5, 3 Gbps etc. - Current speed of the link [1.5, 3Gps,...]. Files under /sys/class/ata_device --------------------------------- - Behind each link, up to two ata device are created. - The name of the directory is devX[.Y].Z where: - - X is ata_port_id of the port where the device is connected, - - Y the port of the PM if any, and - - Z the device id: for PATA, there is usually 2 devices [0,1], - only 1 for SATA. - -class - Device class. Can be "ata" for disk, "atapi" for packet device, - "pmp" for PM, or "none" if no device was found behind the link. - -dma_mode +Behind each link, up to two ata devices are created. +The name of the directory is devX[.Y].Z where: +- X is ata_port_id of the port where the device is connected, +- Y the port of the PM if any, and +- Z the device id: for PATA, there is usually 2 devices [0,1], only 1 for SATA. + + +What: /sys/class/ata_device/devX[.Y].Z/spdn_cnt +What: /sys/class/ata_device/devX[.Y].Z/gscr +What: /sys/class/ata_device/devX[.Y].Z/ering +What: /sys/class/ata_device/devX[.Y].Z/id +What: /sys/class/ata_device/devX[.Y].Z/pio_mode +What: /sys/class/ata_device/devX[.Y].Z/xfer_mode +What: /sys/class/ata_device/devX[.Y].Z/dma_mode +What: /sys/class/ata_device/devX[.Y].Z/class +Date: May, 2010 +KernelVersion: v2.6.37 +Contact: Gwendal Grignou +Description: + spdn_cnt: (RO) Number of times libata decided to lower the + speed of link due to errors. - Transfer modes supported by the device when in DMA mode. - Mostly used by PATA device. + gscr: (RO) Cached result of the dump of PM GSCR + register. Valid registers are: -pio_mode + 0: SATA_PMP_GSCR_PROD_ID, + 1: SATA_PMP_GSCR_REV, + 2: SATA_PMP_GSCR_PORT_INFO, + 32: SATA_PMP_GSCR_ERROR, + 33: SATA_PMP_GSCR_ERROR_EN, + 64: SATA_PMP_GSCR_FEAT, + 96: SATA_PMP_GSCR_FEAT_EN, + 130: SATA_PMP_GSCR_SII_GPIO - Transfer modes supported by the device when in PIO mode. - Mostly used by PATA device. + Only valid if the device is a PM. -xfer_mode + ering: (RO) Formatted output of the error ring of the + device. - Current transfer mode. + id: (RO) Cached result of IDENTIFY command, as + described in ATA8 7.16 and 7.17. Only valid if + the device is not a PM. -id + pio_mode: (RO) Transfer modes supported by the device when + in PIO mode. Mostly used by PATA device. - Cached result of IDENTIFY command, as described in ATA8 7.16 and 7.17. - Only valid if the device is not a PM. + xfer_mode: (RO) Current transfer mode -gscr + dma_mode: (RO) Transfer modes supported by the device when + in DMA mode. Mostly used by PATA device. - Cached result of the dump of PM GSCR register. - Valid registers are: - 0: SATA_PMP_GSCR_PROD_ID, - 1: SATA_PMP_GSCR_REV, - 2: SATA_PMP_GSCR_PORT_INFO, - 32: SATA_PMP_GSCR_ERROR, - 33: SATA_PMP_GSCR_ERROR_EN, - 64: SATA_PMP_GSCR_FEAT, - 96: SATA_PMP_GSCR_FEAT_EN, - 130: SATA_PMP_GSCR_SII_GPIO - Only valid if the device is a PM. + class: (RO) Device class. Can be "ata" for disk, + "atapi" for packet device, "pmp" for PM, or + "none" if no device was found behind the link. -trim - Shows the DSM TRIM mode currently used by the device. Valid - values are: - unsupported: Drive does not support DSM TRIM - unqueued: Drive supports unqueued DSM TRIM only - queued: Drive supports queued DSM TRIM - forced_unqueued: Drive's queued DSM support is known to be - buggy and only unqueued TRIM commands - are sent +What: /sys/class/ata_device/devX[.Y].Z/trim +Date: May, 2015 +KernelVersion: v4.10 +Contact: Gwendal Grignou +Description: + (RO) Shows the DSM TRIM mode currently used by the device. Valid + values are: -spdn_cnt + unsupported: Drive does not support DSM TRIM - Number of time libata decided to lower the speed of link due to errors. + unqueued: Drive supports unqueued DSM TRIM only -ering + queued: Drive supports queued DSM TRIM - Formatted output of the error ring of the device. + forced_unqueued: Drive's queued DSM support is known to + be buggy and only unqueued TRIM commands + are sent -- 2.16.1