Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'ata-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux

Pull ata updates from Niklas Cassel:

- Fix an incorrect link_power_management_policy sysfs attribute value.

We were previously using the same attribute value for two different
LPM policies (me)

- Add a ASMedia ASM1166 quirk.

The SATA host controller always reports that it has 32 ports, even
though it only has six ports. Add a quirk that overrides the value
reported by the controller (Conrad)

- Add a ASMedia ASM1061 quirk.

The SATA host controller completely ignores the upper 21 bits of the
DMA address. This causes IOMMU error events when a (valid) DMA
address actually has any of the upper 21 bits set. Add a quirk that
limits the dma_mask to 43-bits (Lennert)

* tag 'ata-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
ahci: add 43-bit DMA address quirk for ASMedia ASM1061 controllers
ahci: asm1166: correct count of reported ports
ata: libata-sata: improve sysfs description for ATA_LPM_UNKNOWN

+31 -8
+28 -6
drivers/ata/ahci.c
··· 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, ··· 124 123 static const struct ata_port_info ahci_port_info[] = { 125 124 /* by features */ 126 125 [board_ahci] = { 126 + .flags = AHCI_FLAG_COMMON, 127 + .pio_mask = ATA_PIO4, 128 + .udma_mask = ATA_UDMA6, 129 + .port_ops = &ahci_ops, 130 + }, 131 + [board_ahci_43bit_dma] = { 132 + AHCI_HFLAGS (AHCI_HFLAG_43BIT_ONLY), 127 133 .flags = AHCI_FLAG_COMMON, 128 134 .pio_mask = ATA_PIO4, 129 135 .udma_mask = ATA_UDMA6, ··· 605 597 { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */ 606 598 { PCI_VDEVICE(PROMISE, 0x3781), board_ahci }, /* FastTrak TX8660 ahci-mode */ 607 599 608 - /* Asmedia */ 600 + /* ASMedia */ 609 601 { PCI_VDEVICE(ASMEDIA, 0x0601), board_ahci }, /* ASM1060 */ 610 602 { PCI_VDEVICE(ASMEDIA, 0x0602), board_ahci }, /* ASM1060 */ 611 - { PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci }, /* ASM1061 */ 612 - { PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */ 603 + { PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci_43bit_dma }, /* ASM1061 */ 604 + { PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci_43bit_dma }, /* ASM1061/1062 */ 613 605 { PCI_VDEVICE(ASMEDIA, 0x0621), board_ahci }, /* ASM1061R */ 614 606 { PCI_VDEVICE(ASMEDIA, 0x0622), board_ahci }, /* ASM1062R */ 615 607 { PCI_VDEVICE(ASMEDIA, 0x0624), board_ahci }, /* ASM1062+JMB575 */ ··· 671 663 static void ahci_pci_save_initial_config(struct pci_dev *pdev, 672 664 struct ahci_host_priv *hpriv) 673 665 { 666 + if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && pdev->device == 0x1166) { 667 + dev_info(&pdev->dev, "ASM1166 has only six ports\n"); 668 + hpriv->saved_port_map = 0x3f; 669 + } 670 + 674 671 if (pdev->vendor == PCI_VENDOR_ID_JMICRON && pdev->device == 0x2361) { 675 672 dev_info(&pdev->dev, "JMB361 has only one port\n"); 676 673 hpriv->saved_port_map = 1; ··· 962 949 963 950 #endif /* CONFIG_PM */ 964 951 965 - static int ahci_configure_dma_masks(struct pci_dev *pdev, int using_dac) 952 + static int ahci_configure_dma_masks(struct pci_dev *pdev, 953 + struct ahci_host_priv *hpriv) 966 954 { 967 - const int dma_bits = using_dac ? 64 : 32; 955 + int dma_bits; 968 956 int rc; 957 + 958 + if (hpriv->cap & HOST_CAP_64) { 959 + dma_bits = 64; 960 + if (hpriv->flags & AHCI_HFLAG_43BIT_ONLY) 961 + dma_bits = 43; 962 + } else { 963 + dma_bits = 32; 964 + } 969 965 970 966 /* 971 967 * If the device fixup already set the dma_mask to some non-standard ··· 1948 1926 ahci_gtf_filter_workaround(host); 1949 1927 1950 1928 /* initialize adapter */ 1951 - rc = ahci_configure_dma_masks(pdev, hpriv->cap & HOST_CAP_64); 1929 + rc = ahci_configure_dma_masks(pdev, hpriv); 1952 1930 if (rc) 1953 1931 return rc; 1954 1932
+1
drivers/ata/ahci.h
··· 247 247 AHCI_HFLAG_SUSPEND_PHYS = BIT(26), /* handle PHYs during 248 248 suspend/resume */ 249 249 AHCI_HFLAG_NO_SXS = BIT(28), /* SXS not supported */ 250 + AHCI_HFLAG_43BIT_ONLY = BIT(29), /* 43bit DMA addr limit */ 250 251 251 252 /* ap->flags bits */ 252 253
+1 -1
drivers/ata/libata-sata.c
··· 784 784 EXPORT_SYMBOL_GPL(sata_lpm_ignore_phy_events); 785 785 786 786 static const char *ata_lpm_policy_names[] = { 787 - [ATA_LPM_UNKNOWN] = "max_performance", 787 + [ATA_LPM_UNKNOWN] = "keep_firmware_settings", 788 788 [ATA_LPM_MAX_POWER] = "max_performance", 789 789 [ATA_LPM_MED_POWER] = "medium_power", 790 790 [ATA_LPM_MED_POWER_WITH_DIPM] = "med_power_with_dipm",
+1 -1
include/linux/libata.h
··· 471 471 472 472 /* 473 473 * Link power management policy: If you alter this, you also need to 474 - * alter libata-scsi.c (for the ascii descriptions) 474 + * alter libata-sata.c (for the ascii descriptions) 475 475 */ 476 476 enum ata_lpm_policy { 477 477 ATA_LPM_UNKNOWN,