aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/ahci.c
diff options
context:
space:
mode:
authorJacob Pan <jacob.jun.pan@linux.intel.com>2014-04-16 01:27:11 -0400
committerTejun Heo <tj@kernel.org>2014-04-24 10:26:26 -0400
commit0cf4a7d6cf23715276fcd0f1cd1cabc6a9b46942 (patch)
tree5fe2093fe6dca045f7c068fb5f39548b6b419b4f /drivers/ata/ahci.c
parent8a4aeec8d2d6a3edeffbdfae451cdf05cbf0fefd (diff)
ahci: disable DEVSLP for Intel Valleyview
On Intel Valleyview SoC, SATA device sleep is not reliable. When DEVSLP is attempted on certain SSDs, port_devslp write would fail and result in malfunction of AHCI controller. AHCI controller may be not shown in PCI enumeration after reset. Complete power source removal may be required to recover from this failure. So we blacklist this device and override host device reported capabilities such that device LPM will only attempt slumber but not DEVSLP. Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Acked-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r--drivers/ata/ahci.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 71e15b73513d..60707814a84b 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1115,6 +1115,17 @@ static bool ahci_broken_online(struct pci_dev *pdev)
1115 return pdev->bus->number == (val >> 8) && pdev->devfn == (val & 0xff); 1115 return pdev->bus->number == (val >> 8) && pdev->devfn == (val & 0xff);
1116} 1116}
1117 1117
1118static bool ahci_broken_devslp(struct pci_dev *pdev)
1119{
1120 /* device with broken DEVSLP but still showing SDS capability */
1121 static const struct pci_device_id ids[] = {
1122 { PCI_VDEVICE(INTEL, 0x0f23)}, /* Valleyview SoC */
1123 {}
1124 };
1125
1126 return pci_match_id(ids, pdev);
1127}
1128
1118#ifdef CONFIG_ATA_ACPI 1129#ifdef CONFIG_ATA_ACPI
1119static void ahci_gtf_filter_workaround(struct ata_host *host) 1130static void ahci_gtf_filter_workaround(struct ata_host *host)
1120{ 1131{
@@ -1364,6 +1375,10 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1364 1375
1365 hpriv->mmio = pcim_iomap_table(pdev)[ahci_pci_bar]; 1376 hpriv->mmio = pcim_iomap_table(pdev)[ahci_pci_bar];
1366 1377
1378 /* must set flag prior to save config in order to take effect */
1379 if (ahci_broken_devslp(pdev))
1380 hpriv->flags |= AHCI_HFLAG_NO_DEVSLP;
1381
1367 /* save initial config */ 1382 /* save initial config */
1368 ahci_pci_save_initial_config(pdev, hpriv); 1383 ahci_pci_save_initial_config(pdev, hpriv);
1369 1384