|
48 | 48 | enum board_ids {
|
49 | 49 | /* board IDs by feature in alphabetical order */
|
50 | 50 | board_ahci,
|
| 51 | + board_ahci_43bit_dma, |
51 | 52 | board_ahci_ign_iferr,
|
52 | 53 | board_ahci_low_power,
|
53 | 54 | board_ahci_no_debounce_delay,
|
@@ -128,6 +129,13 @@ static const struct ata_port_info ahci_port_info[] = {
|
128 | 129 | .udma_mask = ATA_UDMA6,
|
129 | 130 | .port_ops = &ahci_ops,
|
130 | 131 | },
|
| 132 | + [board_ahci_43bit_dma] = { |
| 133 | + AHCI_HFLAGS (AHCI_HFLAG_43BIT_ONLY), |
| 134 | + .flags = AHCI_FLAG_COMMON, |
| 135 | + .pio_mask = ATA_PIO4, |
| 136 | + .udma_mask = ATA_UDMA6, |
| 137 | + .port_ops = &ahci_ops, |
| 138 | + }, |
131 | 139 | [board_ahci_ign_iferr] = {
|
132 | 140 | AHCI_HFLAGS (AHCI_HFLAG_IGN_IRQ_IF_ERR),
|
133 | 141 | .flags = AHCI_FLAG_COMMON,
|
@@ -597,11 +605,11 @@ static const struct pci_device_id ahci_pci_tbl[] = {
|
597 | 605 | { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */
|
598 | 606 | { PCI_VDEVICE(PROMISE, 0x3781), board_ahci }, /* FastTrak TX8660 ahci-mode */
|
599 | 607 |
|
600 |
| - /* Asmedia */ |
| 608 | + /* ASMedia */ |
601 | 609 | { PCI_VDEVICE(ASMEDIA, 0x0601), board_ahci }, /* ASM1060 */
|
602 | 610 | { PCI_VDEVICE(ASMEDIA, 0x0602), board_ahci }, /* ASM1060 */
|
603 |
| - { PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci }, /* ASM1061 */ |
604 |
| - { PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */ |
| 611 | + { PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci_43bit_dma }, /* ASM1061 */ |
| 612 | + { PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci_43bit_dma }, /* ASM1061/1062 */ |
605 | 613 | { PCI_VDEVICE(ASMEDIA, 0x0621), board_ahci }, /* ASM1061R */
|
606 | 614 | { PCI_VDEVICE(ASMEDIA, 0x0622), board_ahci }, /* ASM1062R */
|
607 | 615 | { PCI_VDEVICE(ASMEDIA, 0x0624), board_ahci }, /* ASM1062+JMB575 */
|
@@ -954,11 +962,20 @@ static int ahci_pci_device_resume(struct device *dev)
|
954 | 962 |
|
955 | 963 | #endif /* CONFIG_PM */
|
956 | 964 |
|
957 |
| -static int ahci_configure_dma_masks(struct pci_dev *pdev, int using_dac) |
| 965 | +static int ahci_configure_dma_masks(struct pci_dev *pdev, |
| 966 | + struct ahci_host_priv *hpriv) |
958 | 967 | {
|
959 |
| - const int dma_bits = using_dac ? 64 : 32; |
| 968 | + int dma_bits; |
960 | 969 | int rc;
|
961 | 970 |
|
| 971 | + if (hpriv->cap & HOST_CAP_64) { |
| 972 | + dma_bits = 64; |
| 973 | + if (hpriv->flags & AHCI_HFLAG_43BIT_ONLY) |
| 974 | + dma_bits = 43; |
| 975 | + } else { |
| 976 | + dma_bits = 32; |
| 977 | + } |
| 978 | + |
962 | 979 | /*
|
963 | 980 | * If the device fixup already set the dma_mask to some non-standard
|
964 | 981 | * value, don't extend it here. This happens on STA2X11, for example.
|
@@ -1931,7 +1948,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
1931 | 1948 | ahci_gtf_filter_workaround(host);
|
1932 | 1949 |
|
1933 | 1950 | /* initialize adapter */
|
1934 |
| - rc = ahci_configure_dma_masks(pdev, hpriv->cap & HOST_CAP_64); |
| 1951 | + rc = ahci_configure_dma_masks(pdev, hpriv); |
1935 | 1952 | if (rc)
|
1936 | 1953 | return rc;
|
1937 | 1954 |
|
|
0 commit comments