1*4882a593SmuzhiyunWhat: /sys/class/ata_... 2*4882a593SmuzhiyunDescription: 3*4882a593Smuzhiyun Provide a place in sysfs for storing the ATA topology of the 4*4882a593Smuzhiyun system. This allows retrieving various information about ATA 5*4882a593Smuzhiyun objects. 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunFiles under /sys/class/ata_port 8*4882a593Smuzhiyun------------------------------- 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunFor each port, a directory ataX is created where X is the ata_port_id of the 11*4882a593Smuzhiyunport. The device parent is the ata host device. 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun 14*4882a593SmuzhiyunWhat: /sys/class/ata_port/ataX/nr_pmp_links 15*4882a593SmuzhiyunWhat: /sys/class/ata_port/ataX/idle_irq 16*4882a593SmuzhiyunDate: May, 2010 17*4882a593SmuzhiyunKernelVersion: v2.6.37 18*4882a593SmuzhiyunContact: Gwendal Grignou <gwendal@chromium.org> 19*4882a593SmuzhiyunDescription: 20*4882a593Smuzhiyun nr_pmp_links: (RO) If a SATA Port Multiplier (PM) is 21*4882a593Smuzhiyun connected, the number of links behind it. 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun idle_irq: (RO) Number of IRQ received by the port while 24*4882a593Smuzhiyun idle [some ata HBA only]. 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun 27*4882a593SmuzhiyunWhat: /sys/class/ata_port/ataX/port_no 28*4882a593SmuzhiyunDate: May, 2013 29*4882a593SmuzhiyunKernelVersion: v3.11 30*4882a593SmuzhiyunContact: Gwendal Grignou <gwendal@chromium.org> 31*4882a593SmuzhiyunDescription: 32*4882a593Smuzhiyun (RO) Host local port number. While registering host controller, 33*4882a593Smuzhiyun port numbers are tracked based upon number of ports available on 34*4882a593Smuzhiyun the controller. This attribute is needed by udev for composing 35*4882a593Smuzhiyun persistent links in /dev/disk/by-path. 36*4882a593Smuzhiyun 37*4882a593SmuzhiyunFiles under /sys/class/ata_link 38*4882a593Smuzhiyun------------------------------- 39*4882a593Smuzhiyun 40*4882a593SmuzhiyunBehind each port, there is a ata_link. If there is a SATA PM in the topology, 15 41*4882a593Smuzhiyunata_link objects are created. 42*4882a593Smuzhiyun 43*4882a593SmuzhiyunIf a link is behind a port, the directory name is linkX, where X is ata_port_id 44*4882a593Smuzhiyunof the port. If a link is behind a PM, its name is linkX.Y where X is 45*4882a593Smuzhiyunata_port_id of the parent port and Y the PM port. 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun 48*4882a593SmuzhiyunWhat: /sys/class/ata_link/linkX[.Y]/hw_sata_spd_limit 49*4882a593SmuzhiyunWhat: /sys/class/ata_link/linkX[.Y]/sata_spd_limit 50*4882a593SmuzhiyunWhat: /sys/class/ata_link/linkX[.Y]/sata_spd 51*4882a593SmuzhiyunDate: May, 2010 52*4882a593SmuzhiyunKernelVersion: v2.6.37 53*4882a593SmuzhiyunContact: Gwendal Grignou <gwendal@chromium.org> 54*4882a593SmuzhiyunDescription: 55*4882a593Smuzhiyun hw_sata_spd_limit: (RO) Maximum speed supported by the 56*4882a593Smuzhiyun connected SATA device. 57*4882a593Smuzhiyun 58*4882a593Smuzhiyun sata_spd_limit: (RO) Maximum speed imposed by libata. 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun sata_spd: (RO) Current speed of the link 61*4882a593Smuzhiyun eg. 1.5, 3 Gbps etc. 62*4882a593Smuzhiyun 63*4882a593Smuzhiyun 64*4882a593SmuzhiyunFiles under /sys/class/ata_device 65*4882a593Smuzhiyun--------------------------------- 66*4882a593Smuzhiyun 67*4882a593SmuzhiyunBehind each link, up to two ata devices are created. 68*4882a593SmuzhiyunThe name of the directory is devX[.Y].Z where: 69*4882a593Smuzhiyun- X is ata_port_id of the port where the device is connected, 70*4882a593Smuzhiyun- Y the port of the PM if any, and 71*4882a593Smuzhiyun- Z the device id: for PATA, there is usually 2 devices [0,1], only 1 for SATA. 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun 74*4882a593SmuzhiyunWhat: /sys/class/ata_device/devX[.Y].Z/spdn_cnt 75*4882a593SmuzhiyunWhat: /sys/class/ata_device/devX[.Y].Z/gscr 76*4882a593SmuzhiyunWhat: /sys/class/ata_device/devX[.Y].Z/ering 77*4882a593SmuzhiyunWhat: /sys/class/ata_device/devX[.Y].Z/id 78*4882a593SmuzhiyunWhat: /sys/class/ata_device/devX[.Y].Z/pio_mode 79*4882a593SmuzhiyunWhat: /sys/class/ata_device/devX[.Y].Z/xfer_mode 80*4882a593SmuzhiyunWhat: /sys/class/ata_device/devX[.Y].Z/dma_mode 81*4882a593SmuzhiyunWhat: /sys/class/ata_device/devX[.Y].Z/class 82*4882a593SmuzhiyunDate: May, 2010 83*4882a593SmuzhiyunKernelVersion: v2.6.37 84*4882a593SmuzhiyunContact: Gwendal Grignou <gwendal@chromium.org> 85*4882a593SmuzhiyunDescription: 86*4882a593Smuzhiyun spdn_cnt: (RO) Number of times libata decided to lower the 87*4882a593Smuzhiyun speed of link due to errors. 88*4882a593Smuzhiyun 89*4882a593Smuzhiyun gscr: (RO) Cached result of the dump of PM GSCR 90*4882a593Smuzhiyun register. Valid registers are: 91*4882a593Smuzhiyun 92*4882a593Smuzhiyun 0: SATA_PMP_GSCR_PROD_ID, 93*4882a593Smuzhiyun 1: SATA_PMP_GSCR_REV, 94*4882a593Smuzhiyun 2: SATA_PMP_GSCR_PORT_INFO, 95*4882a593Smuzhiyun 32: SATA_PMP_GSCR_ERROR, 96*4882a593Smuzhiyun 33: SATA_PMP_GSCR_ERROR_EN, 97*4882a593Smuzhiyun 64: SATA_PMP_GSCR_FEAT, 98*4882a593Smuzhiyun 96: SATA_PMP_GSCR_FEAT_EN, 99*4882a593Smuzhiyun 130: SATA_PMP_GSCR_SII_GPIO 100*4882a593Smuzhiyun 101*4882a593Smuzhiyun Only valid if the device is a PM. 102*4882a593Smuzhiyun 103*4882a593Smuzhiyun ering: (RO) Formatted output of the error ring of the 104*4882a593Smuzhiyun device. 105*4882a593Smuzhiyun 106*4882a593Smuzhiyun id: (RO) Cached result of IDENTIFY command, as 107*4882a593Smuzhiyun described in ATA8 7.16 and 7.17. Only valid if 108*4882a593Smuzhiyun the device is not a PM. 109*4882a593Smuzhiyun 110*4882a593Smuzhiyun pio_mode: (RO) PIO transfer mode used by the device. 111*4882a593Smuzhiyun Mostly used by PATA devices. 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun xfer_mode: (RO) Current transfer mode. Mostly used by 114*4882a593Smuzhiyun PATA devices. 115*4882a593Smuzhiyun 116*4882a593Smuzhiyun dma_mode: (RO) DMA transfer mode used by the device. 117*4882a593Smuzhiyun Mostly used by PATA devices. 118*4882a593Smuzhiyun 119*4882a593Smuzhiyun class: (RO) Device class. Can be "ata" for disk, 120*4882a593Smuzhiyun "atapi" for packet device, "pmp" for PM, or 121*4882a593Smuzhiyun "none" if no device was found behind the link. 122*4882a593Smuzhiyun 123*4882a593Smuzhiyun 124*4882a593SmuzhiyunWhat: /sys/class/ata_device/devX[.Y].Z/trim 125*4882a593SmuzhiyunDate: May, 2015 126*4882a593SmuzhiyunKernelVersion: v4.10 127*4882a593SmuzhiyunContact: Gwendal Grignou <gwendal@chromium.org> 128*4882a593SmuzhiyunDescription: 129*4882a593Smuzhiyun (RO) Shows the DSM TRIM mode currently used by the device. Valid 130*4882a593Smuzhiyun values are: 131*4882a593Smuzhiyun 132*4882a593Smuzhiyun unsupported: Drive does not support DSM TRIM 133*4882a593Smuzhiyun 134*4882a593Smuzhiyun unqueued: Drive supports unqueued DSM TRIM only 135*4882a593Smuzhiyun 136*4882a593Smuzhiyun queued: Drive supports queued DSM TRIM 137*4882a593Smuzhiyun 138*4882a593Smuzhiyun forced_unqueued: Drive's queued DSM support is known to 139*4882a593Smuzhiyun be buggy and only unqueued TRIM commands 140*4882a593Smuzhiyun are sent 141