18c2ecf20Sopenharmony_ciWhat:		/sys/class/ata_...
28c2ecf20Sopenharmony_ciDescription:
38c2ecf20Sopenharmony_ci		Provide a place in sysfs for storing the ATA topology of the
48c2ecf20Sopenharmony_ci		system. This allows retrieving various information about ATA
58c2ecf20Sopenharmony_ci		objects.
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciFiles under /sys/class/ata_port
88c2ecf20Sopenharmony_ci-------------------------------
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciFor each port, a directory ataX is created where X is the ata_port_id of the
118c2ecf20Sopenharmony_ciport. The device parent is the ata host device.
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciWhat:		/sys/class/ata_port/ataX/nr_pmp_links
158c2ecf20Sopenharmony_ciWhat:		/sys/class/ata_port/ataX/idle_irq
168c2ecf20Sopenharmony_ciDate:		May, 2010
178c2ecf20Sopenharmony_ciKernelVersion:	v2.6.37
188c2ecf20Sopenharmony_ciContact:	Gwendal Grignou <gwendal@chromium.org>
198c2ecf20Sopenharmony_ciDescription:
208c2ecf20Sopenharmony_ci		nr_pmp_links:	(RO) If a SATA Port Multiplier (PM) is
218c2ecf20Sopenharmony_ci				connected, the number of links behind it.
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci		idle_irq:	(RO) Number of IRQ received by the port while
248c2ecf20Sopenharmony_ci				idle [some ata HBA only].
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ciWhat:		/sys/class/ata_port/ataX/port_no
288c2ecf20Sopenharmony_ciDate:		May, 2013
298c2ecf20Sopenharmony_ciKernelVersion:	v3.11
308c2ecf20Sopenharmony_ciContact:	Gwendal Grignou <gwendal@chromium.org>
318c2ecf20Sopenharmony_ciDescription:
328c2ecf20Sopenharmony_ci		(RO) Host local port number. While registering host controller,
338c2ecf20Sopenharmony_ci		port numbers are tracked based upon number of ports available on
348c2ecf20Sopenharmony_ci		the controller. This attribute is needed by udev for composing
358c2ecf20Sopenharmony_ci		persistent links in /dev/disk/by-path.
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ciFiles under /sys/class/ata_link
388c2ecf20Sopenharmony_ci-------------------------------
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ciBehind each port, there is a ata_link. If there is a SATA PM in the topology, 15
418c2ecf20Sopenharmony_ciata_link objects are created.
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ciIf a link is behind a port, the directory name is linkX, where X is ata_port_id
448c2ecf20Sopenharmony_ciof the port. If a link is behind a PM, its name is linkX.Y where X is
458c2ecf20Sopenharmony_ciata_port_id of the parent port and Y the PM port.
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ciWhat:		/sys/class/ata_link/linkX[.Y]/hw_sata_spd_limit
498c2ecf20Sopenharmony_ciWhat:		/sys/class/ata_link/linkX[.Y]/sata_spd_limit
508c2ecf20Sopenharmony_ciWhat:		/sys/class/ata_link/linkX[.Y]/sata_spd
518c2ecf20Sopenharmony_ciDate:		May, 2010
528c2ecf20Sopenharmony_ciKernelVersion:	v2.6.37
538c2ecf20Sopenharmony_ciContact:	Gwendal Grignou <gwendal@chromium.org>
548c2ecf20Sopenharmony_ciDescription:
558c2ecf20Sopenharmony_ci		hw_sata_spd_limit:	(RO) Maximum speed supported by the
568c2ecf20Sopenharmony_ci					connected SATA device.
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci		sata_spd_limit:		(RO) Maximum speed imposed by libata.
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci		sata_spd:		(RO) Current speed of the link
618c2ecf20Sopenharmony_ci					eg. 1.5, 3 Gbps etc.
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ciFiles under /sys/class/ata_device
658c2ecf20Sopenharmony_ci---------------------------------
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ciBehind each link, up to two ata devices are created.
688c2ecf20Sopenharmony_ciThe name of the directory is devX[.Y].Z where:
698c2ecf20Sopenharmony_ci- X is ata_port_id of the port where the device is connected,
708c2ecf20Sopenharmony_ci- Y the port of the PM if any, and
718c2ecf20Sopenharmony_ci- Z the device id: for PATA, there is usually 2 devices [0,1], only 1 for SATA.
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ciWhat:		/sys/class/ata_device/devX[.Y].Z/spdn_cnt
758c2ecf20Sopenharmony_ciWhat:		/sys/class/ata_device/devX[.Y].Z/gscr
768c2ecf20Sopenharmony_ciWhat:		/sys/class/ata_device/devX[.Y].Z/ering
778c2ecf20Sopenharmony_ciWhat:		/sys/class/ata_device/devX[.Y].Z/id
788c2ecf20Sopenharmony_ciWhat:		/sys/class/ata_device/devX[.Y].Z/pio_mode
798c2ecf20Sopenharmony_ciWhat:		/sys/class/ata_device/devX[.Y].Z/xfer_mode
808c2ecf20Sopenharmony_ciWhat:		/sys/class/ata_device/devX[.Y].Z/dma_mode
818c2ecf20Sopenharmony_ciWhat:		/sys/class/ata_device/devX[.Y].Z/class
828c2ecf20Sopenharmony_ciDate:		May, 2010
838c2ecf20Sopenharmony_ciKernelVersion:	v2.6.37
848c2ecf20Sopenharmony_ciContact:	Gwendal Grignou <gwendal@chromium.org>
858c2ecf20Sopenharmony_ciDescription:
868c2ecf20Sopenharmony_ci		spdn_cnt:	(RO) Number of times libata decided to lower the
878c2ecf20Sopenharmony_ci				speed of link due to errors.
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ci		gscr:		(RO) Cached result of the dump of PM GSCR
908c2ecf20Sopenharmony_ci				register. Valid registers are:
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ci				0:      SATA_PMP_GSCR_PROD_ID,
938c2ecf20Sopenharmony_ci				1:	SATA_PMP_GSCR_REV,
948c2ecf20Sopenharmony_ci				2:      SATA_PMP_GSCR_PORT_INFO,
958c2ecf20Sopenharmony_ci				32:     SATA_PMP_GSCR_ERROR,
968c2ecf20Sopenharmony_ci				33:     SATA_PMP_GSCR_ERROR_EN,
978c2ecf20Sopenharmony_ci				64:     SATA_PMP_GSCR_FEAT,
988c2ecf20Sopenharmony_ci				96:     SATA_PMP_GSCR_FEAT_EN,
998c2ecf20Sopenharmony_ci				130:    SATA_PMP_GSCR_SII_GPIO
1008c2ecf20Sopenharmony_ci
1018c2ecf20Sopenharmony_ci				Only valid if the device is a PM.
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ci		ering:		(RO) Formatted output of the error ring of the
1048c2ecf20Sopenharmony_ci				device.
1058c2ecf20Sopenharmony_ci
1068c2ecf20Sopenharmony_ci		id:		(RO) Cached result of IDENTIFY command, as
1078c2ecf20Sopenharmony_ci				described in ATA8 7.16 and 7.17. Only valid if
1088c2ecf20Sopenharmony_ci				the device is not a PM.
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_ci		pio_mode:	(RO) PIO transfer mode used by the device.
1118c2ecf20Sopenharmony_ci				Mostly used by PATA devices.
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ci		xfer_mode:	(RO) Current transfer mode. Mostly used by
1148c2ecf20Sopenharmony_ci				PATA devices.
1158c2ecf20Sopenharmony_ci
1168c2ecf20Sopenharmony_ci		dma_mode:	(RO) DMA transfer mode used by the device.
1178c2ecf20Sopenharmony_ci				Mostly used by PATA devices.
1188c2ecf20Sopenharmony_ci
1198c2ecf20Sopenharmony_ci		class:		(RO) Device class. Can be "ata" for disk,
1208c2ecf20Sopenharmony_ci				"atapi" for packet device, "pmp" for PM, or
1218c2ecf20Sopenharmony_ci				"none" if no device was found behind the link.
1228c2ecf20Sopenharmony_ci
1238c2ecf20Sopenharmony_ci
1248c2ecf20Sopenharmony_ciWhat:		/sys/class/ata_device/devX[.Y].Z/trim
1258c2ecf20Sopenharmony_ciDate:		May, 2015
1268c2ecf20Sopenharmony_ciKernelVersion:	v4.10
1278c2ecf20Sopenharmony_ciContact:	Gwendal Grignou <gwendal@chromium.org>
1288c2ecf20Sopenharmony_ciDescription:
1298c2ecf20Sopenharmony_ci		(RO) Shows the DSM TRIM mode currently used by the device. Valid
1308c2ecf20Sopenharmony_ci		values are:
1318c2ecf20Sopenharmony_ci
1328c2ecf20Sopenharmony_ci		unsupported:		Drive does not support DSM TRIM
1338c2ecf20Sopenharmony_ci
1348c2ecf20Sopenharmony_ci		unqueued:               Drive supports unqueued DSM TRIM only
1358c2ecf20Sopenharmony_ci
1368c2ecf20Sopenharmony_ci		queued:                 Drive supports queued DSM TRIM
1378c2ecf20Sopenharmony_ci
1388c2ecf20Sopenharmony_ci		forced_unqueued:	Drive's queued DSM support is known to
1398c2ecf20Sopenharmony_ci					be buggy and only unqueued TRIM commands
1408c2ecf20Sopenharmony_ci					are sent
141