Commit 640b5037 authored by Linus Torvalds's avatar Linus Torvalds

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()
parents 3e732ebf 55b01415
...@@ -115,14 +115,16 @@ config SATA_AHCI ...@@ -115,14 +115,16 @@ config SATA_AHCI
If unsure, say N. If unsure, say N.
config SATA_LPM_POLICY config SATA_MOBILE_LPM_POLICY
int "Default SATA Link Power Management policy for low power chipsets" int "Default SATA Link Power Management policy for low power chipsets"
range 0 4 range 0 4
default 0 default 0
depends on SATA_AHCI depends on SATA_AHCI
help help
Select the Default SATA Link Power Management (LPM) policy to use Select the Default SATA Link Power Management (LPM) policy to use
for chipsets / "South Bridges" designated as supporting low power. for chipsets / "South Bridges" supporting low-power modes. Such
chipsets are typically found on most laptops but desktops and
servers now also widely use chipsets supporting low power modes.
The value set has the following meanings: The value set has the following meanings:
0 => Keep firmware settings 0 => Keep firmware settings
......
...@@ -1595,7 +1595,7 @@ static int ahci_init_msi(struct pci_dev *pdev, unsigned int n_ports, ...@@ -1595,7 +1595,7 @@ static int ahci_init_msi(struct pci_dev *pdev, unsigned int n_ports,
static void ahci_update_initial_lpm_policy(struct ata_port *ap, static void ahci_update_initial_lpm_policy(struct ata_port *ap,
struct ahci_host_priv *hpriv) struct ahci_host_priv *hpriv)
{ {
int policy = CONFIG_SATA_LPM_POLICY; int policy = CONFIG_SATA_MOBILE_LPM_POLICY;
/* Ignore processing for chipsets that don't use policy */ /* Ignore processing for chipsets that don't use policy */
......
...@@ -236,7 +236,7 @@ enum { ...@@ -236,7 +236,7 @@ enum {
AHCI_HFLAG_NO_WRITE_TO_RO = (1 << 24), /* don't write to read AHCI_HFLAG_NO_WRITE_TO_RO = (1 << 24), /* don't write to read
only registers */ only registers */
AHCI_HFLAG_USE_LPM_POLICY = (1 << 25), /* chipset that should use AHCI_HFLAG_USE_LPM_POLICY = (1 << 25), /* chipset that should use
SATA_LPM_POLICY SATA_MOBILE_LPM_POLICY
as default lpm_policy */ as default lpm_policy */
AHCI_HFLAG_SUSPEND_PHYS = (1 << 26), /* handle PHYs during AHCI_HFLAG_SUSPEND_PHYS = (1 << 26), /* handle PHYs during
suspend/resume */ suspend/resume */
......
...@@ -4014,6 +4014,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { ...@@ -4014,6 +4014,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
ATA_HORKAGE_ZERO_AFTER_TRIM, }, ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "Crucial_CT*MX100*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM | { "Crucial_CT*MX100*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM |
ATA_HORKAGE_ZERO_AFTER_TRIM, }, ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "Samsung SSD 840 EVO*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
ATA_HORKAGE_NO_DMA_LOG |
ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "Samsung SSD 840*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | { "Samsung SSD 840*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
ATA_HORKAGE_ZERO_AFTER_TRIM, }, ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "Samsung SSD 850*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | { "Samsung SSD 850*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
......
...@@ -1634,7 +1634,7 @@ EXPORT_SYMBOL_GPL(ata_sff_interrupt); ...@@ -1634,7 +1634,7 @@ EXPORT_SYMBOL_GPL(ata_sff_interrupt);
void ata_sff_lost_interrupt(struct ata_port *ap) void ata_sff_lost_interrupt(struct ata_port *ap)
{ {
u8 status; u8 status = 0;
struct ata_queued_cmd *qc; struct ata_queued_cmd *qc;
/* Only one outstanding command per SFF channel */ /* Only one outstanding command per SFF channel */
......
...@@ -137,7 +137,11 @@ struct sata_dwc_device { ...@@ -137,7 +137,11 @@ struct sata_dwc_device {
#endif #endif
}; };
#define SATA_DWC_QCMD_MAX 32 /*
* Allow one extra special slot for commands and DMA management
* to account for libata internal commands.
*/
#define SATA_DWC_QCMD_MAX (ATA_MAX_QUEUE + 1)
struct sata_dwc_device_port { struct sata_dwc_device_port {
struct sata_dwc_device *hsdev; struct sata_dwc_device *hsdev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment