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

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

Pull ata fixes from Damien Le Moal:

- Fix a compilation warning due to an uninitialized variable in
ata_sff_lost_interrupt(), from me.

- Fix invalid internal command tag handling in the sata_dwc_460ex
driver, from Christian.

- Disable READ LOG DMA EXT with Samsung 840 EVO SSDs as this command
causes the drives to hang, from Christian.

- Change the config option CONFIG_SATA_LPM_POLICY back to its original
name CONFIG_SATA_LPM_MOBILE_POLICY to avoid potential problems with
users losing their configuration (as discussed during the merge
window), from Mario.

* tag 'ata-5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
ata: ahci: Rename CONFIG_SATA_LPM_POLICY configuration item back
ata: libata-core: Disable READ LOG DMA EXT for Samsung 840 EVOs
ata: sata_dwc_460ex: Fix crash due to OOB write
ata: libata-sff: Fix compilation warning in ata_sff_lost_interrupt()

+15 -6
+4 -2
drivers/ata/Kconfig
··· 115 115 116 116 If unsure, say N. 117 117 118 - config SATA_LPM_POLICY 118 + config SATA_MOBILE_LPM_POLICY 119 119 int "Default SATA Link Power Management policy for low power chipsets" 120 120 range 0 4 121 121 default 0 122 122 depends on SATA_AHCI 123 123 help 124 124 Select the Default SATA Link Power Management (LPM) policy to use 125 - for chipsets / "South Bridges" designated as supporting low power. 125 + for chipsets / "South Bridges" supporting low-power modes. Such 126 + chipsets are typically found on most laptops but desktops and 127 + servers now also widely use chipsets supporting low power modes. 126 128 127 129 The value set has the following meanings: 128 130 0 => Keep firmware settings
+1 -1
drivers/ata/ahci.c
··· 1595 1595 static void ahci_update_initial_lpm_policy(struct ata_port *ap, 1596 1596 struct ahci_host_priv *hpriv) 1597 1597 { 1598 - int policy = CONFIG_SATA_LPM_POLICY; 1598 + int policy = CONFIG_SATA_MOBILE_LPM_POLICY; 1599 1599 1600 1600 1601 1601 /* Ignore processing for chipsets that don't use policy */
+1 -1
drivers/ata/ahci.h
··· 236 236 AHCI_HFLAG_NO_WRITE_TO_RO = (1 << 24), /* don't write to read 237 237 only registers */ 238 238 AHCI_HFLAG_USE_LPM_POLICY = (1 << 25), /* chipset that should use 239 - SATA_LPM_POLICY 239 + SATA_MOBILE_LPM_POLICY 240 240 as default lpm_policy */ 241 241 AHCI_HFLAG_SUSPEND_PHYS = (1 << 26), /* handle PHYs during 242 242 suspend/resume */
+3
drivers/ata/libata-core.c
··· 4014 4014 ATA_HORKAGE_ZERO_AFTER_TRIM, }, 4015 4015 { "Crucial_CT*MX100*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM | 4016 4016 ATA_HORKAGE_ZERO_AFTER_TRIM, }, 4017 + { "Samsung SSD 840 EVO*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | 4018 + ATA_HORKAGE_NO_DMA_LOG | 4019 + ATA_HORKAGE_ZERO_AFTER_TRIM, }, 4017 4020 { "Samsung SSD 840*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | 4018 4021 ATA_HORKAGE_ZERO_AFTER_TRIM, }, 4019 4022 { "Samsung SSD 850*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
+1 -1
drivers/ata/libata-sff.c
··· 1634 1634 1635 1635 void ata_sff_lost_interrupt(struct ata_port *ap) 1636 1636 { 1637 - u8 status; 1637 + u8 status = 0; 1638 1638 struct ata_queued_cmd *qc; 1639 1639 1640 1640 /* Only one outstanding command per SFF channel */
+5 -1
drivers/ata/sata_dwc_460ex.c
··· 137 137 #endif 138 138 }; 139 139 140 - #define SATA_DWC_QCMD_MAX 32 140 + /* 141 + * Allow one extra special slot for commands and DMA management 142 + * to account for libata internal commands. 143 + */ 144 + #define SATA_DWC_QCMD_MAX (ATA_MAX_QUEUE + 1) 141 145 142 146 struct sata_dwc_device_port { 143 147 struct sata_dwc_device *hsdev;