summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/ata')
-rw-r--r--kernel/drivers/ata/ahci_platform.c3
-rw-r--r--kernel/drivers/ata/ahci_xgene.c4
-rw-r--r--kernel/drivers/ata/libahci.c1
-rw-r--r--kernel/drivers/ata/libata-core.c6
-rw-r--r--kernel/drivers/ata/libata-eh.c2
-rw-r--r--kernel/drivers/ata/sata_mv.c3
6 files changed, 16 insertions, 3 deletions
diff --git a/kernel/drivers/ata/ahci_platform.c b/kernel/drivers/ata/ahci_platform.c
index 04975b851..639adb1f8 100644
--- a/kernel/drivers/ata/ahci_platform.c
+++ b/kernel/drivers/ata/ahci_platform.c
@@ -51,6 +51,9 @@ static int ahci_probe(struct platform_device *pdev)
if (rc)
return rc;
+ of_property_read_u32(dev->of_node,
+ "ports-implemented", &hpriv->force_port_map);
+
if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci"))
hpriv->flags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ;
diff --git a/kernel/drivers/ata/ahci_xgene.c b/kernel/drivers/ata/ahci_xgene.c
index e2c6d9e0c..e916bff6c 100644
--- a/kernel/drivers/ata/ahci_xgene.c
+++ b/kernel/drivers/ata/ahci_xgene.c
@@ -739,9 +739,9 @@ static int xgene_ahci_probe(struct platform_device *pdev)
dev_warn(&pdev->dev, "%s: Error reading device info. Assume version1\n",
__func__);
version = XGENE_AHCI_V1;
- }
- if (info->valid & ACPI_VALID_CID)
+ } else if (info->valid & ACPI_VALID_CID) {
version = XGENE_AHCI_V2;
+ }
}
}
#endif
diff --git a/kernel/drivers/ata/libahci.c b/kernel/drivers/ata/libahci.c
index 998c6a85a..9628fa131 100644
--- a/kernel/drivers/ata/libahci.c
+++ b/kernel/drivers/ata/libahci.c
@@ -467,6 +467,7 @@ void ahci_save_initial_config(struct device *dev, struct ahci_host_priv *hpriv)
dev_info(dev, "forcing port_map 0x%x -> 0x%x\n",
port_map, hpriv->force_port_map);
port_map = hpriv->force_port_map;
+ hpriv->saved_port_map = port_map;
}
if (hpriv->mask_port_map) {
diff --git a/kernel/drivers/ata/libata-core.c b/kernel/drivers/ata/libata-core.c
index b79cb10e2..b0b77b61c 100644
--- a/kernel/drivers/ata/libata-core.c
+++ b/kernel/drivers/ata/libata-core.c
@@ -4138,6 +4138,12 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
*/
{ "ST380013AS", "3.20", ATA_HORKAGE_MAX_SEC_1024 },
+ /*
+ * These devices time out with higher max sects.
+ * https://bugzilla.kernel.org/show_bug.cgi?id=121671
+ */
+ { "LITEON CX1-JB*-HP", NULL, ATA_HORKAGE_MAX_SEC_1024 },
+
/* Devices we expect to fail diagnostics */
/* Devices where NCQ should be avoided */
diff --git a/kernel/drivers/ata/libata-eh.c b/kernel/drivers/ata/libata-eh.c
index 961acc788..91a9e6af2 100644
--- a/kernel/drivers/ata/libata-eh.c
+++ b/kernel/drivers/ata/libata-eh.c
@@ -606,7 +606,7 @@ void ata_scsi_error(struct Scsi_Host *host)
ata_scsi_port_error_handler(host, ap);
/* finish or retry handled scmd's and clean up */
- WARN_ON(host->host_failed || !list_empty(&eh_work_q));
+ WARN_ON(!list_empty(&eh_work_q));
DPRINTK("EXIT\n");
}
diff --git a/kernel/drivers/ata/sata_mv.c b/kernel/drivers/ata/sata_mv.c
index bd74ee555..729f26322 100644
--- a/kernel/drivers/ata/sata_mv.c
+++ b/kernel/drivers/ata/sata_mv.c
@@ -4121,6 +4121,9 @@ static int mv_platform_probe(struct platform_device *pdev)
host->iomap = NULL;
hpriv->base = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
+ if (!hpriv->base)
+ return -ENOMEM;
+
hpriv->base -= SATAHC0_REG_BASE;
hpriv->clk = clk_get(&pdev->dev, NULL);