diff options
| -rw-r--r-- | Documentation/ABI/testing/sysfs-ata | 171 | ||||
| -rw-r--r-- | Documentation/ABI/testing/sysfs-block-device | 58 | ||||
| -rw-r--r-- | Documentation/ABI/testing/sysfs-class-scsi_host | 89 | ||||
| -rw-r--r-- | drivers/ata/ahci.c | 4 | ||||
| -rw-r--r-- | drivers/ata/libahci.c | 10 | ||||
| -rw-r--r-- | drivers/ata/libahci_platform.c | 2 | ||||
| -rw-r--r-- | drivers/ata/libata-core.c | 26 | ||||
| -rw-r--r-- | drivers/ata/libata-eh.c | 3 | ||||
| -rw-r--r-- | drivers/ata/libata-scsi.c | 12 | ||||
| -rw-r--r-- | drivers/ata/sata_rcar.c | 62 | ||||
| -rw-r--r-- | drivers/pci/quirks.c | 2 |
11 files changed, 337 insertions, 102 deletions
diff --git a/Documentation/ABI/testing/sysfs-ata b/Documentation/ABI/testing/sysfs-ata index aa4296498859..9ab0ef1dd1c7 100644 --- a/Documentation/ABI/testing/sysfs-ata +++ b/Documentation/ABI/testing/sysfs-ata | |||
| @@ -1,110 +1,139 @@ | |||
| 1 | What: /sys/class/ata_... | 1 | What: /sys/class/ata_... |
| 2 | Date: August 2008 | ||
| 3 | Contact: Gwendal Grignou<gwendal@google.com> | ||
| 4 | Description: | 2 | Description: |
| 5 | 3 | Provide a place in sysfs for storing the ATA topology of the | |
| 6 | Provide a place in sysfs for storing the ATA topology of the system. This allows | 4 | system. This allows retrieving various information about ATA |
| 7 | retrieving various information about ATA objects. | 5 | objects. |
| 8 | 6 | ||
| 9 | Files under /sys/class/ata_port | 7 | Files under /sys/class/ata_port |
| 10 | ------------------------------- | 8 | ------------------------------- |
| 11 | 9 | ||
| 12 | For each port, a directory ataX is created where X is the ata_port_id of | 10 | For each port, a directory ataX is created where X is the ata_port_id of the |
| 13 | the port. The device parent is the ata host device. | 11 | port. The device parent is the ata host device. |
| 14 | 12 | ||
| 15 | idle_irq (read) | ||
| 16 | 13 | ||
| 17 | Number of IRQ received by the port while idle [some ata HBA only]. | 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. | ||
| 18 | 22 | ||
| 19 | nr_pmp_links (read) | 23 | idle_irq: (RO) Number of IRQ received by the port while |
| 24 | idle [some ata HBA only]. | ||
| 20 | 25 | ||
| 21 | If a SATA Port Multiplier (PM) is connected, number of link behind it. | 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. | ||
| 22 | 36 | ||
| 23 | Files under /sys/class/ata_link | 37 | Files under /sys/class/ata_link |
| 24 | ------------------------------- | 38 | ------------------------------- |
| 25 | 39 | ||
| 26 | Behind each port, there is a ata_link. If there is a SATA PM in the | 40 | Behind each port, there is a ata_link. If there is a SATA PM in the topology, 15 |
| 27 | topology, 15 ata_link objects are created. | 41 | ata_link objects are created. |
| 28 | |||
| 29 | If a link is behind a port, the directory name is linkX, where X is | ||
| 30 | ata_port_id of the port. | ||
| 31 | If a link is behind a PM, its name is linkX.Y where X is ata_port_id | ||
| 32 | of the parent port and Y the PM port. | ||
| 33 | 42 | ||
| 34 | hw_sata_spd_limit | 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. | ||
| 35 | 46 | ||
| 36 | Maximum speed supported by the connected SATA device. | ||
| 37 | 47 | ||
| 38 | sata_spd_limit | 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. | ||
| 39 | 57 | ||
| 40 | Maximum speed imposed by libata. | 58 | sata_spd_limit: (RO) Maximum speed imposed by libata. |
| 41 | 59 | ||
| 42 | sata_spd | 60 | sata_spd: (RO) Current speed of the link |
| 61 | eg. 1.5, 3 Gbps etc. | ||
| 43 | 62 | ||
| 44 | Current speed of the link [1.5, 3Gps,...]. | ||
| 45 | 63 | ||
| 46 | Files under /sys/class/ata_device | 64 | Files under /sys/class/ata_device |
| 47 | --------------------------------- | 65 | --------------------------------- |
| 48 | 66 | ||
| 49 | Behind each link, up to two ata device are created. | 67 | Behind each link, up to two ata devices are created. |
| 50 | The name of the directory is devX[.Y].Z where: | 68 | The name of the directory is devX[.Y].Z where: |
| 51 | - X is ata_port_id of the port where the device is connected, | 69 | - X is ata_port_id of the port where the device is connected, |
| 52 | - Y the port of the PM if any, and | 70 | - Y the port of the PM if any, and |
| 53 | - Z the device id: for PATA, there is usually 2 devices [0,1], | 71 | - Z the device id: for PATA, there is usually 2 devices [0,1], only 1 for SATA. |
| 54 | only 1 for SATA. | 72 | |
| 55 | 73 | ||
| 56 | class | 74 | What: /sys/class/ata_device/devX[.Y].Z/spdn_cnt |
| 57 | Device class. Can be "ata" for disk, "atapi" for packet device, | 75 | What: /sys/class/ata_device/devX[.Y].Z/gscr |
| 58 | "pmp" for PM, or "none" if no device was found behind the link. | 76 | What: /sys/class/ata_device/devX[.Y].Z/ering |
| 59 | 77 | What: /sys/class/ata_device/devX[.Y].Z/id | |
| 60 | dma_mode | 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. | ||
| 61 | 88 | ||
| 62 | Transfer modes supported by the device when in DMA mode. | 89 | gscr: (RO) Cached result of the dump of PM GSCR |
| 63 | Mostly used by PATA device. | 90 | register. Valid registers are: |
| 64 | 91 | ||
| 65 | pio_mode | 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 | ||
| 66 | 100 | ||
| 67 | Transfer modes supported by the device when in PIO mode. | 101 | Only valid if the device is a PM. |
| 68 | Mostly used by PATA device. | ||
| 69 | 102 | ||
| 70 | xfer_mode | 103 | ering: (RO) Formatted output of the error ring of the |
| 104 | device. | ||
| 71 | 105 | ||
| 72 | Current transfer mode. | 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. | ||
| 73 | 109 | ||
| 74 | id | 110 | pio_mode: (RO) Transfer modes supported by the device when |
| 111 | in PIO mode. Mostly used by PATA device. | ||
| 75 | 112 | ||
| 76 | Cached result of IDENTIFY command, as described in ATA8 7.16 and 7.17. | 113 | xfer_mode: (RO) Current transfer mode |
| 77 | Only valid if the device is not a PM. | ||
| 78 | 114 | ||
| 79 | gscr | 115 | dma_mode: (RO) Transfer modes supported by the device when |
| 116 | in DMA mode. Mostly used by PATA device. | ||
| 80 | 117 | ||
| 81 | Cached result of the dump of PM GSCR register. | 118 | class: (RO) Device class. Can be "ata" for disk, |
| 82 | Valid registers are: | 119 | "atapi" for packet device, "pmp" for PM, or |
| 83 | 0: SATA_PMP_GSCR_PROD_ID, | 120 | "none" if no device was found behind the link. |
| 84 | 1: SATA_PMP_GSCR_REV, | ||
| 85 | 2: SATA_PMP_GSCR_PORT_INFO, | ||
| 86 | 32: SATA_PMP_GSCR_ERROR, | ||
| 87 | 33: SATA_PMP_GSCR_ERROR_EN, | ||
| 88 | 64: SATA_PMP_GSCR_FEAT, | ||
| 89 | 96: SATA_PMP_GSCR_FEAT_EN, | ||
| 90 | 130: SATA_PMP_GSCR_SII_GPIO | ||
| 91 | Only valid if the device is a PM. | ||
| 92 | 121 | ||
