Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

/sys/class/ata_link

FieldValue
Subsystemlibata ATA link class (ABI doc section “Files under /sys/class/ata_link”); implementation file not in cached tree
Config gatenot verifiable from the cached tree: no ATA Kconfig or Makefile is cached, and the ABI entry names no config symbol (not verified)
ABI documentationDocumentation/ABI/testing/sysfs-ata, section “Files under /sys/class/ata_link”
Since2.6.37 (all three attributes; entries dated May 2010)
Live (5.10.134 host)class absent: no ata_link row in the cached live enumeration of 46 classes
Ledger IDSYSC-ata_link

What it represents

One directory per SATA link. Behind each ata port there is an ata_link; when a SATA Port Multiplier is in the topology, 15 ata_link objects are created. Naming is positional: a link directly behind a port is linkX (X = ata_port_id of the port); a link behind a PM port is linkX.Y (X = parent port id, Y = PM port). The three attributes report the SATA link speed negotiation state: what the hardware supports, what libata permits, and what was actually negotiated.

Relationship to the device model

The link is the layer between port and device in the libata topology described by the ABI doc: ata_port/ataX -> ata_link/linkX[.Y] -> ata_device/devX[.Y].Z. Links are not bus devices and have no driver binding; they are kernel-created children of the port-side devices under /sys/devices/..., surfaced through this class for speed inspection. The sata_spd value complements the transfer-mode attributes on the device level (pio_mode, dma_mode, xfer_mode on ata_device).

Attributes

All three documented attributes are read-only.

AttributeR/WUnit/formatConditional?Source
linkX[.Y]/hw_sata_spd_limitROspeed limit of the connected SATA devicealwaysABI testing sysfs-ata
linkX[.Y]/sata_spd_limitROmaximum speed imposed by libataalwaysABI testing sysfs-ata
linkX[.Y]/sata_spdROcurrent link speed, e.g. “1.5, 3 Gbps etc.”alwaysABI testing sysfs-ata

Safety and writes

All documented attributes are read-only; the ABI file defines no write interface for links. (Speed limiting through sysfs is not offered here; the ABI documents only the limit and current-speed views.) Reads are safe and do not touch the hardware beyond reporting cached libata state. On hosts with a PM, the 15 linkX.Y directories appear alongside the port’s own linkX, which is expected layout, not duplication.

References