blob: 9ab0ef1dd1c72d2be0c3d68f8000b225f79df963 [file] [log] [blame]
Gwendal Grignoud9027472010-05-25 12:31:38 -07001What: /sys/class/ata_...
Gwendal Grignoud9027472010-05-25 12:31:38 -07002Description:
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +05303 Provide a place in sysfs for storing the ATA topology of the
4 system. This allows retrieving various information about ATA
5 objects.
Gwendal Grignoud9027472010-05-25 12:31:38 -07006
7Files under /sys/class/ata_port
8-------------------------------
9
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +053010For each port, a directory ataX is created where X is the ata_port_id of the
11port. The device parent is the ata host device.
Gwendal Grignoud9027472010-05-25 12:31:38 -070012
Gwendal Grignoud9027472010-05-25 12:31:38 -070013
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +053014What: /sys/class/ata_port/ataX/nr_pmp_links
15What: /sys/class/ata_port/ataX/idle_irq
16Date: May, 2010
17KernelVersion: v2.6.37
18Contact: Gwendal Grignou <gwendal@chromium.org>
19Description:
20 nr_pmp_links: (RO) If a SATA Port Multiplier (PM) is
21 connected, the number of links behind it.
Gwendal Grignoud9027472010-05-25 12:31:38 -070022
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +053023 idle_irq: (RO) Number of IRQ received by the port while
24 idle [some ata HBA only].
Gwendal Grignoud9027472010-05-25 12:31:38 -070025
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +053026
27What: /sys/class/ata_port/ataX/port_no
28Date: May, 2013
29KernelVersion: v3.11
30Contact: Gwendal Grignou <gwendal@chromium.org>
31Description:
32 (RO) Host local port number. While registering host controller,
33 port numbers are tracked based upon number of ports available on
34 the controller. This attribute is needed by udev for composing
35 persistent links in /dev/disk/by-path.
Gwendal Grignoud9027472010-05-25 12:31:38 -070036
37Files under /sys/class/ata_link
38-------------------------------
39
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +053040Behind each port, there is a ata_link. If there is a SATA PM in the topology, 15
41ata_link objects are created.
Gwendal Grignoud9027472010-05-25 12:31:38 -070042
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +053043If a link is behind a port, the directory name is linkX, where X is ata_port_id
44of the port. If a link is behind a PM, its name is linkX.Y where X is
45ata_port_id of the parent port and Y the PM port.
Gwendal Grignoud9027472010-05-25 12:31:38 -070046
Gwendal Grignoud9027472010-05-25 12:31:38 -070047
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +053048What: /sys/class/ata_link/linkX[.Y]/hw_sata_spd_limit
49What: /sys/class/ata_link/linkX[.Y]/sata_spd_limit
50What: /sys/class/ata_link/linkX[.Y]/sata_spd
51Date: May, 2010
52KernelVersion: v2.6.37
53Contact: Gwendal Grignou <gwendal@chromium.org>
54Description:
55 hw_sata_spd_limit: (RO) Maximum speed supported by the
56 connected SATA device.
Gwendal Grignoud9027472010-05-25 12:31:38 -070057
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +053058 sata_spd_limit: (RO) Maximum speed imposed by libata.
Gwendal Grignoud9027472010-05-25 12:31:38 -070059
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +053060 sata_spd: (RO) Current speed of the link
61 eg. 1.5, 3 Gbps etc.
Gwendal Grignoud9027472010-05-25 12:31:38 -070062
Gwendal Grignoud9027472010-05-25 12:31:38 -070063
64Files under /sys/class/ata_device
65---------------------------------
66
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +053067Behind each link, up to two ata devices are created.
68The name of the directory is devX[.Y].Z where:
69- X is ata_port_id of the port where the device is connected,
70- Y the port of the PM if any, and
71- Z the device id: for PATA, there is usually 2 devices [0,1], only 1 for SATA.
Gwendal Grignoud9027472010-05-25 12:31:38 -070072
Gwendal Grignoud9027472010-05-25 12:31:38 -070073
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +053074What: /sys/class/ata_device/devX[.Y].Z/spdn_cnt
75What: /sys/class/ata_device/devX[.Y].Z/gscr
76What: /sys/class/ata_device/devX[.Y].Z/ering
77What: /sys/class/ata_device/devX[.Y].Z/id
78What: /sys/class/ata_device/devX[.Y].Z/pio_mode
79What: /sys/class/ata_device/devX[.Y].Z/xfer_mode
80What: /sys/class/ata_device/devX[.Y].Z/dma_mode
81What: /sys/class/ata_device/devX[.Y].Z/class
82Date: May, 2010
83KernelVersion: v2.6.37
84Contact: Gwendal Grignou <gwendal@chromium.org>
85Description:
86 spdn_cnt: (RO) Number of times libata decided to lower the
87 speed of link due to errors.
Gwendal Grignoud9027472010-05-25 12:31:38 -070088
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +053089 gscr: (RO) Cached result of the dump of PM GSCR
90 register. Valid registers are:
Gwendal Grignoud9027472010-05-25 12:31:38 -070091
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +053092 0: SATA_PMP_GSCR_PROD_ID,
93 1: SATA_PMP_GSCR_REV,
94 2: SATA_PMP_GSCR_PORT_INFO,
95 32: SATA_PMP_GSCR_ERROR,
96 33: SATA_PMP_GSCR_ERROR_EN,
97 64: SATA_PMP_GSCR_FEAT,
98 96: SATA_PMP_GSCR_FEAT_EN,
99 130: SATA_PMP_GSCR_SII_GPIO
Gwendal Grignoud9027472010-05-25 12:31:38 -0700100
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +0530101 Only valid if the device is a PM.
Gwendal Grignoud9027472010-05-25 12:31:38 -0700102
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +0530103 ering: (RO) Formatted output of the error ring of the
104 device.
Gwendal Grignoud9027472010-05-25 12:31:38 -0700105
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +0530106 id: (RO) Cached result of IDENTIFY command, as
107 described in ATA8 7.16 and 7.17. Only valid if
108 the device is not a PM.
Gwendal Grignoud9027472010-05-25 12:31:38 -0700109
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +0530110 pio_mode: (RO) Transfer modes supported by the device when
111 in PIO mode. Mostly used by PATA device.
Gwendal Grignoud9027472010-05-25 12:31:38 -0700112
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +0530113 xfer_mode: (RO) Current transfer mode
Gwendal Grignoud9027472010-05-25 12:31:38 -0700114
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +0530115 dma_mode: (RO) Transfer modes supported by the device when
116 in DMA mode. Mostly used by PATA device.
Gwendal Grignoud9027472010-05-25 12:31:38 -0700117
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +0530118 class: (RO) Device class. Can be "ata" for disk,
119 "atapi" for packet device, "pmp" for PM, or
120 "none" if no device was found behind the link.
Gwendal Grignoud9027472010-05-25 12:31:38 -0700121
Martin K. Petersenf3030742015-05-04 21:54:19 -0400122
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +0530123What: /sys/class/ata_device/devX[.Y].Z/trim
124Date: May, 2015
125KernelVersion: v4.10
126Contact: Gwendal Grignou <gwendal@chromium.org>
127Description:
128 (RO) Shows the DSM TRIM mode currently used by the device. Valid
129 values are:
Martin K. Petersenf3030742015-05-04 21:54:19 -0400130
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +0530131 unsupported: Drive does not support DSM TRIM
Gwendal Grignoud9027472010-05-25 12:31:38 -0700132
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +0530133 unqueued: Drive supports unqueued DSM TRIM only
Gwendal Grignoud9027472010-05-25 12:31:38 -0700134
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +0530135 queued: Drive supports queued DSM TRIM
Gwendal Grignoud9027472010-05-25 12:31:38 -0700136
Aishwarya Pantb1c7fe22018-02-13 16:51:59 +0530137 forced_unqueued: Drive's queued DSM support is known to
138 be buggy and only unqueued TRIM commands
139 are sent