Commit 54dfffde authored by Linus Torvalds's avatar Linus Torvalds

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()
parents 6a4d07f8 67809f85
...@@ -247,6 +247,7 @@ config SATA_HIGHBANK ...@@ -247,6 +247,7 @@ config SATA_HIGHBANK
config SATA_MV config SATA_MV
tristate "Marvell SATA support" tristate "Marvell SATA support"
select GENERIC_PHY
help help
This option enables support for the Marvell Serial ATA family. This option enables support for the Marvell Serial ATA family.
Currently supports 88SX[56]0[48][01] PCI(-X) chips, Currently supports 88SX[56]0[48][01] PCI(-X) chips,
......
...@@ -61,6 +61,7 @@ enum board_ids { ...@@ -61,6 +61,7 @@ enum board_ids {
/* board IDs by feature in alphabetical order */ /* board IDs by feature in alphabetical order */
board_ahci, board_ahci,
board_ahci_ign_iferr, board_ahci_ign_iferr,
board_ahci_noncq,
board_ahci_nosntf, board_ahci_nosntf,
board_ahci_yes_fbs, board_ahci_yes_fbs,
...@@ -121,6 +122,13 @@ static const struct ata_port_info ahci_port_info[] = { ...@@ -121,6 +122,13 @@ static const struct ata_port_info ahci_port_info[] = {
.udma_mask = ATA_UDMA6, .udma_mask = ATA_UDMA6,
.port_ops = &ahci_ops, .port_ops = &ahci_ops,
}, },
[board_ahci_noncq] = {
AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ),
.flags = AHCI_FLAG_COMMON,
.pio_mask = ATA_PIO4,
.udma_mask = ATA_UDMA6,
.port_ops = &ahci_ops,
},
[board_ahci_nosntf] = { [board_ahci_nosntf] = {
AHCI_HFLAGS (AHCI_HFLAG_NO_SNTF), AHCI_HFLAGS (AHCI_HFLAG_NO_SNTF),
.flags = AHCI_FLAG_COMMON, .flags = AHCI_FLAG_COMMON,
...@@ -452,6 +460,12 @@ static const struct pci_device_id ahci_pci_tbl[] = { ...@@ -452,6 +460,12 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci }, /* ASM1061 */ { PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci }, /* ASM1061 */
{ PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */ { PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */
/*
* Samsung SSDs found on some macbooks. NCQ times out.
* https://bugzilla.kernel.org/show_bug.cgi?id=60731
*/
{ PCI_VDEVICE(SAMSUNG, 0x1600), board_ahci_noncq },
/* Enmotus */ /* Enmotus */
{ PCI_DEVICE(0x1c44, 0x8000), board_ahci }, { PCI_DEVICE(0x1c44, 0x8000), board_ahci },
......
...@@ -447,8 +447,11 @@ static void sata_pmp_quirks(struct ata_port *ap) ...@@ -447,8 +447,11 @@ static void sata_pmp_quirks(struct ata_port *ap)
* otherwise. Don't try hard to recover it. * otherwise. Don't try hard to recover it.
*/ */
ap->pmp_link[ap->nr_pmp_links - 1].flags |= ATA_LFLAG_NO_RETRY; ap->pmp_link[ap->nr_pmp_links - 1].flags |= ATA_LFLAG_NO_RETRY;
} else if (vendor == 0x197b && devid == 0x2352) { } else if (vendor == 0x197b && (devid == 0x2352 || devid == 0x0325)) {
/* chip found in Thermaltake BlackX Duet, jmicron JMB350? */ /*
* 0x2352: found in Thermaltake BlackX Duet, jmicron JMB350?
* 0x0325: jmicron JMB394.
*/
ata_for_each_link(link, ap, EDGE) { ata_for_each_link(link, ap, EDGE) {
/* SRST breaks detection and disks get misclassified /* SRST breaks detection and disks get misclassified
* LPM disabled to avoid potential problems * LPM disabled to avoid potential problems
......
...@@ -119,7 +119,9 @@ static int pata_imx_probe(struct platform_device *pdev) ...@@ -119,7 +119,9 @@ static int pata_imx_probe(struct platform_device *pdev)
return PTR_ERR(priv->clk); return PTR_ERR(priv->clk);
} }
clk_prepare_enable(priv->clk); ret = clk_prepare_enable(priv->clk);
if (ret)
return ret;
host = ata_host_alloc(&pdev->dev, 1); host = ata_host_alloc(&pdev->dev, 1);
if (!host) { if (!host) {
...@@ -212,7 +214,9 @@ static int pata_imx_resume(struct device *dev) ...@@ -212,7 +214,9 @@ static int pata_imx_resume(struct device *dev)
struct ata_host *host = dev_get_drvdata(dev); struct ata_host *host = dev_get_drvdata(dev);
struct pata_imx_priv *priv = host->private_data; struct pata_imx_priv *priv = host->private_data;
clk_prepare_enable(priv->clk); int ret = clk_prepare_enable(priv->clk);
if (ret)
return ret;
__raw_writel(priv->ata_ctl, priv->host_regs + PATA_IMX_ATA_CONTROL); __raw_writel(priv->ata_ctl, priv->host_regs + PATA_IMX_ATA_CONTROL);
......
...@@ -4104,7 +4104,6 @@ static int mv_platform_probe(struct platform_device *pdev) ...@@ -4104,7 +4104,6 @@ static int mv_platform_probe(struct platform_device *pdev)
if (!hpriv->port_phys) if (!hpriv->port_phys)
return -ENOMEM; return -ENOMEM;
host->private_data = hpriv; host->private_data = hpriv;
hpriv->n_ports = n_ports;
hpriv->board_idx = chip_soc; hpriv->board_idx = chip_soc;
host->iomap = NULL; host->iomap = NULL;
...@@ -4132,13 +4131,18 @@ static int mv_platform_probe(struct platform_device *pdev) ...@@ -4132,13 +4131,18 @@ static int mv_platform_probe(struct platform_device *pdev)
rc = PTR_ERR(hpriv->port_phys[port]); rc = PTR_ERR(hpriv->port_phys[port]);
hpriv->port_phys[port] = NULL; hpriv->port_phys[port] = NULL;
if (rc != -EPROBE_DEFER) if (rc != -EPROBE_DEFER)
dev_warn(&pdev->dev, "error getting phy %d", dev_warn(&pdev->dev, "error getting phy %d", rc);
rc);
/* Cleanup only the initialized ports */
hpriv->n_ports = port;
goto err; goto err;
} else } else
phy_power_on(hpriv->port_phys[port]); phy_power_on(hpriv->port_phys[port]);
} }
/* All the ports have been initialized */
hpriv->n_ports = n_ports;
/* /*
* (Re-)program MBUS remapping windows if we are asked to. * (Re-)program MBUS remapping windows if we are asked to.
*/ */
...@@ -4176,7 +4180,7 @@ static int mv_platform_probe(struct platform_device *pdev) ...@@ -4176,7 +4180,7 @@ static int mv_platform_probe(struct platform_device *pdev)
clk_disable_unprepare(hpriv->clk); clk_disable_unprepare(hpriv->clk);
clk_put(hpriv->clk); clk_put(hpriv->clk);
} }
for (port = 0; port < n_ports; port++) { for (port = 0; port < hpriv->n_ports; port++) {
if (!IS_ERR(hpriv->port_clks[port])) { if (!IS_ERR(hpriv->port_clks[port])) {
clk_disable_unprepare(hpriv->port_clks[port]); clk_disable_unprepare(hpriv->port_clks[port]);
clk_put(hpriv->port_clks[port]); clk_put(hpriv->port_clks[port]);
......
...@@ -157,6 +157,7 @@ static const struct sil_drivelist { ...@@ -157,6 +157,7 @@ static const struct sil_drivelist {
{ "ST380011ASL", SIL_QUIRK_MOD15WRITE }, { "ST380011ASL", SIL_QUIRK_MOD15WRITE },
{ "ST3120022ASL", SIL_QUIRK_MOD15WRITE }, { "ST3120022ASL", SIL_QUIRK_MOD15WRITE },
{ "ST3160021ASL", SIL_QUIRK_MOD15WRITE }, { "ST3160021ASL", SIL_QUIRK_MOD15WRITE },
{ "TOSHIBA MK2561GSYN", SIL_QUIRK_MOD15WRITE },
{ "Maxtor 4D060H3", SIL_QUIRK_UDMA5MAX }, { "Maxtor 4D060H3", SIL_QUIRK_UDMA5MAX },
{ } { }
}; };
......
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