Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 1 | What: /sys/class/ata_... |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 2 | Description: |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 3 | Provide a place in sysfs for storing the ATA topology of the |
| 4 | system. This allows retrieving various information about ATA |
| 5 | objects. |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 6 | |
| 7 | Files under /sys/class/ata_port |
| 8 | ------------------------------- |
| 9 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 10 | For each port, a directory ataX is created where X is the ata_port_id of the |
| 11 | port. The device parent is the ata host device. |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 12 | |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 13 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 14 | What: /sys/class/ata_port/ataX/nr_pmp_links |
| 15 | What: /sys/class/ata_port/ataX/idle_irq |
| 16 | Date: May, 2010 |
| 17 | KernelVersion: v2.6.37 |
| 18 | Contact: Gwendal Grignou <gwendal@chromium.org> |
| 19 | Description: |
| 20 | nr_pmp_links: (RO) If a SATA Port Multiplier (PM) is |
| 21 | connected, the number of links behind it. |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 22 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 23 | idle_irq: (RO) Number of IRQ received by the port while |
| 24 | idle [some ata HBA only]. |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 25 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 26 | |
| 27 | What: /sys/class/ata_port/ataX/port_no |
| 28 | Date: May, 2013 |
| 29 | KernelVersion: v3.11 |
| 30 | Contact: Gwendal Grignou <gwendal@chromium.org> |
| 31 | Description: |
| 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 Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 36 | |
| 37 | Files under /sys/class/ata_link |
| 38 | ------------------------------- |
| 39 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 40 | Behind each port, there is a ata_link. If there is a SATA PM in the topology, 15 |
| 41 | ata_link objects are created. |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 42 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 43 | If a link is behind a port, the directory name is linkX, where X is ata_port_id |
| 44 | of the port. If a link is behind a PM, its name is linkX.Y where X is |
| 45 | ata_port_id of the parent port and Y the PM port. |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 46 | |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 47 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 48 | What: /sys/class/ata_link/linkX[.Y]/hw_sata_spd_limit |
| 49 | What: /sys/class/ata_link/linkX[.Y]/sata_spd_limit |
| 50 | What: /sys/class/ata_link/linkX[.Y]/sata_spd |
| 51 | Date: May, 2010 |
| 52 | KernelVersion: v2.6.37 |
| 53 | Contact: Gwendal Grignou <gwendal@chromium.org> |
| 54 | Description: |
| 55 | hw_sata_spd_limit: (RO) Maximum speed supported by the |
| 56 | connected SATA device. |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 57 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 58 | sata_spd_limit: (RO) Maximum speed imposed by libata. |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 59 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 60 | sata_spd: (RO) Current speed of the link |
| 61 | eg. 1.5, 3 Gbps etc. |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 62 | |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 63 | |
| 64 | Files under /sys/class/ata_device |
| 65 | --------------------------------- |
| 66 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 67 | Behind each link, up to two ata devices are created. |
| 68 | The 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 Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 72 | |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 73 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 74 | What: /sys/class/ata_device/devX[.Y].Z/spdn_cnt |
| 75 | What: /sys/class/ata_device/devX[.Y].Z/gscr |
| 76 | What: /sys/class/ata_device/devX[.Y].Z/ering |
| 77 | What: /sys/class/ata_device/devX[.Y].Z/id |
| 78 | What: /sys/class/ata_device/devX[.Y].Z/pio_mode |
| 79 | What: /sys/class/ata_device/devX[.Y].Z/xfer_mode |
| 80 | What: /sys/class/ata_device/devX[.Y].Z/dma_mode |
| 81 | What: /sys/class/ata_device/devX[.Y].Z/class |
| 82 | Date: May, 2010 |
| 83 | KernelVersion: v2.6.37 |
| 84 | Contact: Gwendal Grignou <gwendal@chromium.org> |
| 85 | Description: |
| 86 | spdn_cnt: (RO) Number of times libata decided to lower the |
| 87 | speed of link due to errors. |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 88 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 89 | gscr: (RO) Cached result of the dump of PM GSCR |
| 90 | register. Valid registers are: |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 91 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 92 | 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 Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 100 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 101 | Only valid if the device is a PM. |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 102 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 103 | ering: (RO) Formatted output of the error ring of the |
| 104 | device. |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 105 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 106 | 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 Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 109 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 110 | pio_mode: (RO) Transfer modes supported by the device when |
| 111 | in PIO mode. Mostly used by PATA device. |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 112 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 113 | xfer_mode: (RO) Current transfer mode |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 114 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 115 | dma_mode: (RO) Transfer modes supported by the device when |
| 116 | in DMA mode. Mostly used by PATA device. |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 117 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 118 | 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 Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 121 | |
Martin K. Petersen | f303074 | 2015-05-04 21:54:19 -0400 | [diff] [blame] | 122 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 123 | What: /sys/class/ata_device/devX[.Y].Z/trim |
| 124 | Date: May, 2015 |
| 125 | KernelVersion: v4.10 |
| 126 | Contact: Gwendal Grignou <gwendal@chromium.org> |
| 127 | Description: |
| 128 | (RO) Shows the DSM TRIM mode currently used by the device. Valid |
| 129 | values are: |
Martin K. Petersen | f303074 | 2015-05-04 21:54:19 -0400 | [diff] [blame] | 130 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 131 | unsupported: Drive does not support DSM TRIM |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 132 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 133 | unqueued: Drive supports unqueued DSM TRIM only |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 134 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 135 | queued: Drive supports queued DSM TRIM |
Gwendal Grignou | d902747 | 2010-05-25 12:31:38 -0700 | [diff] [blame] | 136 | |
Aishwarya Pant | b1c7fe2 | 2018-02-13 16:51:59 +0530 | [diff] [blame] | 137 | forced_unqueued: Drive's queued DSM support is known to |
| 138 | be buggy and only unqueued TRIM commands |
| 139 | are sent |