Skip to content

Commit 640b503

Browse files
committed
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()
2 parents 3e732eb + 55b0141 commit 640b503

6 files changed

Lines changed: 15 additions & 6 deletions

File tree

drivers/ata/Kconfig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,16 @@ config SATA_AHCI
115115

116116
If unsure, say N.
117117

118-
config SATA_LPM_POLICY
118+
config SATA_MOBILE_LPM_POLICY
119119
int "Default SATA Link Power Management policy for low power chipsets"
120120
range 0 4
121121
default 0
122122
depends on SATA_AHCI
123123
help
124124
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.
126128

127129
The value set has the following meanings:
128130
0 => Keep firmware settings

drivers/ata/ahci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1595,7 +1595,7 @@ static int ahci_init_msi(struct pci_dev *pdev, unsigned int n_ports,
15951595
static void ahci_update_initial_lpm_policy(struct ata_port *ap,
15961596
struct ahci_host_priv *hpriv)
15971597
{
1598-
int policy = CONFIG_SATA_LPM_POLICY;
1598+
int policy = CONFIG_SATA_MOBILE_LPM_POLICY;
15991599

16001600

16011601
/* Ignore processing for chipsets that don't use policy */

drivers/ata/ahci.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ enum {
236236
AHCI_HFLAG_NO_WRITE_TO_RO = (1 << 24), /* don't write to read
237237
only registers */
238238
AHCI_HFLAG_USE_LPM_POLICY = (1 << 25), /* chipset that should use
239-
SATA_LPM_POLICY
239+
SATA_MOBILE_LPM_POLICY
240240
as default lpm_policy */
241241
AHCI_HFLAG_SUSPEND_PHYS = (1 << 26), /* handle PHYs during
242242
suspend/resume */

drivers/ata/libata-core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4014,6 +4014,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
40144014
ATA_HORKAGE_ZERO_AFTER_TRIM, },
40154015
{ "Crucial_CT*MX100*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM |
40164016
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, },
40174020
{ "Samsung SSD 840*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
40184021
ATA_HORKAGE_ZERO_AFTER_TRIM, },
40194022
{ "Samsung SSD 850*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |

drivers/ata/libata-sff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1634,7 +1634,7 @@ EXPORT_SYMBOL_GPL(ata_sff_interrupt);
16341634

16351635
void ata_sff_lost_interrupt(struct ata_port *ap)
16361636
{
1637-
u8 status;
1637+
u8 status = 0;
16381638
struct ata_queued_cmd *qc;
16391639

16401640
/* Only one outstanding command per SFF channel */

drivers/ata/sata_dwc_460ex.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,11 @@ struct sata_dwc_device {
137137
#endif
138138
};
139139

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)
141145

142146
struct sata_dwc_device_port {
143147
struct sata_dwc_device *hsdev;

0 commit comments

Comments
 (0)