aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-02-20 15:04:15 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-02-20 15:04:15 -0500
commit54dfffde22ee5ac5a6f912eb451b52683ef3ea7f (patch)
treeeeeaf1034152482456a5fcd3f1f1662e6599284c /drivers/ata
parent6a4d07f85ba9da5b6eab6e60a493d459c4296176 (diff)
parent67809f85d31eac600f6b28defa5386c9d2a13b1d (diff)
Merge branch 'for-3.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
Pull libata fixes from Tejun Heo: "Various device specific fixes. Nothing too interesting" * 'for-3.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: ahci: disable NCQ on Samsung pci-e SSDs on macbooks ata: sata_mv: Cleanup only the initialized ports sata_sil: apply MOD15WRITE quirk to TOSHIBA MK2561GSYN ata: enable quirk from jmicron JMB350 for JMB394 ATA: SATA_MV: Add missing Kconfig select statememnt ata: pata_imx: Check the return value from clk_prepare_enable()
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/Kconfig1
-rw-r--r--drivers/ata/ahci.c14
-rw-r--r--drivers/ata/libata-pmp.c7
-rw-r--r--drivers/ata/pata_imx.c8
-rw-r--r--drivers/ata/sata_mv.c12
-rw-r--r--drivers/ata/sata_sil.c1
6 files changed, 35 insertions, 8 deletions
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 4e737728aee2..868429a47be4 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -247,6 +247,7 @@ config SATA_HIGHBANK
247 247
248config SATA_MV 248config SATA_MV
249 tristate "Marvell SATA support" 249 tristate "Marvell SATA support"
250 select GENERIC_PHY
250 help 251 help
251 This option enables support for the Marvell Serial ATA family. 252 This option enables support for the Marvell Serial ATA family.
252 Currently supports 88SX[56]0[48][01] PCI(-X) chips, 253 Currently supports 88SX[56]0[48][01] PCI(-X) chips,
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index dc2756fb6f33..7df81576a489 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -61,6 +61,7 @@ enum board_ids {
61 /* board IDs by feature in alphabetical order */ 61 /* board IDs by feature in alphabetical order */
62 board_ahci, 62 board_ahci,
63 board_ahci_ign_iferr, 63 board_ahci_ign_iferr,
64 board_ahci_noncq,
64 board_ahci_nosntf, 65 board_ahci_nosntf,
65 board_ahci_yes_fbs, 66 board_ahci_yes_fbs,
66 67
@@ -121,6 +122,13 @@ static const struct ata_port_info ahci_port_info[] = {
121 .udma_mask = ATA_UDMA6, 122 .udma_mask = ATA_UDMA6,
122 .port_ops = &ahci_ops, 123 .port_ops = &ahci_ops,
123 }, 124 },
125 [board_ahci_noncq] = {
126 AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ),
127 .flags = AHCI_FLAG_COMMON,
128 .pio_mask = ATA_PIO4,
129 .udma_mask = ATA_UDMA6,
130 .port_ops = &ahci_ops,
131 },
124 [board_ahci_nosntf] = { 132 [board_ahci_nosntf] = {
125 AHCI_HFLAGS (AHCI_HFLAG_NO_SNTF), 133 AHCI_HFLAGS (AHCI_HFLAG_NO_SNTF),
126 .flags = AHCI_FLAG_COMMON, 134 .flags = AHCI_FLAG_COMMON,
@@ -452,6 +460,12 @@ static const struct pci_device_id ahci_pci_tbl[] = {
452 { PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci }, /* ASM1061 */ 460 { PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci }, /* ASM1061 */
453 { PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */ 461 { PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */
454 462
463 /*
464 * Samsung SSDs found on some macbooks. NCQ times out.
465 * https://bugzilla.kernel.org/show_bug.cgi?id=60731
466 */
467 { PCI_VDEVICE(SAMSUNG, 0x1600), board_ahci_noncq },
468
455 /* Enmotus */ 469 /* Enmotus */
456 { PCI_DEVICE(0x1c44, 0x8000), board_ahci }, 470 { PCI_DEVICE(0x1c44, 0x8000), board_ahci },
457 471
diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c
index 20fd337a5731..7ccc084bf1df 100644
--- a/drivers/ata/libata-pmp.c
+++ b/drivers/ata/libata-pmp.c
@@ -447,8 +447,11 @@ static void sata_pmp_quirks(struct ata_port *ap)
447 * otherwise. Don't try hard to recover it. 447 * otherwise. Don't try hard to recover it.
448 */ 448 */
449 ap->pmp_link[ap->nr_pmp_links - 1].flags |= ATA_LFLAG_NO_RETRY; 449 ap->pmp_link[ap->nr_pmp_links - 1].flags |= ATA_LFLAG_NO_RETRY;
450 } else if (vendor == 0x197b && devid == 0x2352) { 450 } else if (vendor == 0x197b && (devid == 0x2352 || devid == 0x0325)) {
451 /* chip found in Thermaltake BlackX Duet, jmicron JMB350? */ 451 /*
452 * 0x2352: found in Thermaltake BlackX Duet, jmicron JMB350?
453 * 0x0325: jmicron JMB394.
454 */
452 ata_for_each_link(link, ap, EDGE) { 455 ata_for_each_link(link, ap, EDGE) {
453 /* SRST breaks detection and disks get misclassified 456 /* SRST breaks detection and disks get misclassified
454 * LPM disabled to avoid potential problems 457 * LPM disabled to avoid potential problems
diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c
index 26386f0b89a8..b0b18ec5465f 100644
--- a/drivers/ata/pata_imx.c
+++ b/drivers/ata/pata_imx.c
@@ -119,7 +119,9 @@ static int pata_imx_probe(struct platform_device *pdev)
119 return PTR_ERR(priv->clk); 119 return PTR_ERR(priv->clk);
120 } 120 }
121 121
122 clk_prepare_enable(priv->clk); 122 ret = clk_prepare_enable(priv->clk);
123 if (ret)
124 return ret;
123 125
124 host = ata_host_alloc(&pdev->dev, 1); 126 host = ata_host_alloc(&pdev->dev, 1);
125 if (!host) { 127 if (!host) {
@@ -212,7 +214,9 @@ static int pata_imx_resume(struct device *dev)
212 struct ata_host *host = dev_get_drvdata(dev); 214 struct ata_host *host = dev_get_drvdata(dev);
213 struct pata_imx_priv *priv = host->private_data; 215 struct pata_imx_priv *priv = host->private_data;
214 216
215 clk_prepare_enable(priv->clk); 217 int ret = clk_prepare_enable(priv->clk);
218 if (ret)
219 return ret;
216 220
217 __raw_writel(priv->ata_ctl, priv->host_regs + PATA_IMX_ATA_CONTROL); 221 __raw_writel(priv->ata_ctl, priv->host_regs + PATA_IMX_ATA_CONTROL);
218 222
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 52b8181ddafd..05c8a44adf8e 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -4104,7 +4104,6 @@ static int mv_platform_probe(struct platform_device *pdev)
4104 if (!hpriv->port_phys) 4104 if (!hpriv->port_phys)
4105 return -ENOMEM; 4105 return -ENOMEM;
4106 host->private_data = hpriv; 4106 host->private_data = hpriv;
4107 hpriv->n_ports = n_ports;
4108 hpriv->board_idx = chip_soc; 4107 hpriv->board_idx = chip_soc;
4109 4108
4110 host->iomap = NULL; 4109 host->iomap = NULL;
@@ -4132,13 +4131,18 @@ static int mv_platform_probe(struct platform_device *pdev)
4132 rc = PTR_ERR(hpriv->port_phys[port]); 4131 rc = PTR_ERR(hpriv->port_phys[port]);
4133 hpriv->port_phys[port] = NULL; 4132 hpriv->port_phys[port] = NULL;
4134 if (rc != -EPROBE_DEFER) 4133 if (rc != -EPROBE_DEFER)
4135 dev_warn(&pdev->dev, "error getting phy %d", 4134 dev_warn(&pdev->dev, "error getting phy %d", rc);
4136 rc); 4135
4136 /* Cleanup only the initialized ports */
4137 hpriv->n_ports = port;
4137 goto err; 4138 goto err;
4138 } else 4139 } else
4139 phy_power_on(hpriv->port_phys[port]); 4140 phy_power_on(hpriv->port_phys[port]);
4140 } 4141 }
4141 4142
4143 /* All the ports have been initialized */
4144 hpriv->n_ports = n_ports;
4145
4142 /* 4146 /*
4143 * (Re-)program MBUS remapping windows if we are asked to. 4147 * (Re-)program MBUS remapping windows if we are asked to.
4144 */ 4148 */
@@ -4176,7 +4180,7 @@ err:
4176 clk_disable_unprepare(hpriv->clk); 4180 clk_disable_unprepare(hpriv->clk);
4177 clk_put(hpriv->clk); 4181 clk_put(hpriv->clk);
4178 } 4182 }
4179 for (port = 0; port < n_ports; port++) { 4183 for (port = 0; port < hpriv->n_ports; port++) {
4180 if (!IS_ERR(hpriv->port_clks[port])) { 4184 if (!IS_ERR(hpriv->port_clks[port])) {
4181 clk_disable_unprepare(hpriv->port_clks[port]); 4185 clk_disable_unprepare(hpriv->port_clks[port]);
4182 clk_put(hpriv->port_clks[port]); 4186 clk_put(hpriv->port_clks[port]);
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index d67fc351343c..b7695e804635 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -157,6 +157,7 @@ static const struct sil_drivelist {
157 { "ST380011ASL", SIL_QUIRK_MOD15WRITE }, 157 { "ST380011ASL", SIL_QUIRK_MOD15WRITE },
158 { "ST3120022ASL", SIL_QUIRK_MOD15WRITE }, 158 { "ST3120022ASL", SIL_QUIRK_MOD15WRITE },
159 { "ST3160021ASL", SIL_QUIRK_MOD15WRITE }, 159 { "ST3160021ASL", SIL_QUIRK_MOD15WRITE },
160 { "TOSHIBA MK2561GSYN", SIL_QUIRK_MOD15WRITE },
160 { "Maxtor 4D060H3", SIL_QUIRK_UDMA5MAX }, 161 { "Maxtor 4D060H3", SIL_QUIRK_UDMA5MAX },
161 { } 162 { }
162}; 163};