Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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()

+35 -8
+1
drivers/ata/Kconfig
··· 247 247 248 248 config SATA_MV 249 249 tristate "Marvell SATA support" 250 + select GENERIC_PHY 250 251 help 251 252 This option enables support for the Marvell Serial ATA family. 252 253 Currently supports 88SX[56]0[48][01] PCI(-X) chips,
+14
drivers/ata/ahci.c
··· 61 61 /* board IDs by feature in alphabetical order */ 62 62 board_ahci, 63 63 board_ahci_ign_iferr, 64 + board_ahci_noncq, 64 65 board_ahci_nosntf, 65 66 board_ahci_yes_fbs, 66 67 ··· 117 116 }, 118 117 [board_ahci_ign_iferr] = { 119 118 AHCI_HFLAGS (AHCI_HFLAG_IGN_IRQ_IF_ERR), 119 + .flags = AHCI_FLAG_COMMON, 120 + .pio_mask = ATA_PIO4, 121 + .udma_mask = ATA_UDMA6, 122 + .port_ops = &ahci_ops, 123 + }, 124 + [board_ahci_noncq] = { 125 + AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ), 120 126 .flags = AHCI_FLAG_COMMON, 121 127 .pio_mask = ATA_PIO4, 122 128 .udma_mask = ATA_UDMA6, ··· 459 451 { PCI_VDEVICE(ASMEDIA, 0x0602), board_ahci }, /* ASM1060 */ 460 452 { PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci }, /* ASM1061 */ 461 453 { PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */ 454 + 455 + /* 456 + * Samsung SSDs found on some macbooks. NCQ times out. 457 + * https://bugzilla.kernel.org/show_bug.cgi?id=60731 458 + */ 459 + { PCI_VDEVICE(SAMSUNG, 0x1600), board_ahci_noncq }, 462 460 463 461 /* Enmotus */ 464 462 { PCI_DEVICE(0x1c44, 0x8000), board_ahci },
+5 -2
drivers/ata/libata-pmp.c
··· 447 447 * otherwise. Don't try hard to recover it. 448 448 */ 449 449 ap->pmp_link[ap->nr_pmp_links - 1].flags |= ATA_LFLAG_NO_RETRY; 450 - } else if (vendor == 0x197b && devid == 0x2352) { 451 - /* chip found in Thermaltake BlackX Duet, jmicron JMB350? */ 450 + } else if (vendor == 0x197b && (devid == 0x2352 || devid == 0x0325)) { 451 + /* 452 + * 0x2352: found in Thermaltake BlackX Duet, jmicron JMB350? 453 + * 0x0325: jmicron JMB394. 454 + */ 452 455 ata_for_each_link(link, ap, EDGE) { 453 456 /* SRST breaks detection and disks get misclassified 454 457 * LPM disabled to avoid potential problems
+6 -2
drivers/ata/pata_imx.c
··· 119 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 126 host = ata_host_alloc(&pdev->dev, 1); 125 127 if (!host) { ··· 214 212 struct ata_host *host = dev_get_drvdata(dev); 215 213 struct pata_imx_priv *priv = host->private_data; 216 214 217 - clk_prepare_enable(priv->clk); 215 + int ret = clk_prepare_enable(priv->clk); 216 + if (ret) 217 + return ret; 218 218 219 219 __raw_writel(priv->ata_ctl, priv->host_regs + PATA_IMX_ATA_CONTROL); 220 220
+8 -4
drivers/ata/sata_mv.c
··· 4104 4104 if (!hpriv->port_phys) 4105 4105 return -ENOMEM; 4106 4106 host->private_data = hpriv; 4107 - hpriv->n_ports = n_ports; 4108 4107 hpriv->board_idx = chip_soc; 4109 4108 4110 4109 host->iomap = NULL; ··· 4131 4132 rc = PTR_ERR(hpriv->port_phys[port]); 4132 4133 hpriv->port_phys[port] = NULL; 4133 4134 if (rc != -EPROBE_DEFER) 4134 - dev_warn(&pdev->dev, "error getting phy %d", 4135 - rc); 4135 + dev_warn(&pdev->dev, "error getting phy %d", rc); 4136 + 4137 + /* Cleanup only the initialized ports */ 4138 + hpriv->n_ports = port; 4136 4139 goto err; 4137 4140 } else 4138 4141 phy_power_on(hpriv->port_phys[port]); 4139 4142 } 4143 + 4144 + /* All the ports have been initialized */ 4145 + hpriv->n_ports = n_ports; 4140 4146 4141 4147 /* 4142 4148 * (Re-)program MBUS remapping windows if we are asked to. ··· 4180 4176 clk_disable_unprepare(hpriv->clk); 4181 4177 clk_put(hpriv->clk); 4182 4178 } 4183 - for (port = 0; port < n_ports; port++) { 4179 + for (port = 0; port < hpriv->n_ports; port++) { 4184 4180 if (!IS_ERR(hpriv->port_clks[port])) { 4185 4181 clk_disable_unprepare(hpriv->port_clks[port]); 4186 4182 clk_put(hpriv->port_clks[port]);
+1
drivers/ata/sata_sil.c
··· 157 157 { "ST380011ASL", SIL_QUIRK_MOD15WRITE }, 158 158 { "ST3120022ASL", SIL_QUIRK_MOD15WRITE }, 159 159 { "ST3160021ASL", SIL_QUIRK_MOD15WRITE }, 160 + { "TOSHIBA MK2561GSYN", SIL_QUIRK_MOD15WRITE }, 160 161 { "Maxtor 4D060H3", SIL_QUIRK_UDMA5MAX }, 161 162 { } 162 163 };