diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-01-05 06:34:29 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-01-05 06:34:29 -0500 |
commit | ef0b8b9a521c65201bfca9747ee1bf374296133c (patch) | |
tree | 644c3390c07d06fb7807182a4935f7c3f675b157 /drivers/ata | |
parent | 5c12af0c41e3417e1939095325920463b5f8e726 (diff) | |
parent | d6e0a2dd12f4067a5bcefb8bbd8ddbeff800afbc (diff) |
Merge tag 'v3.13-rc7' into x86/efi-kexec to resolve conflicts
Conflicts:
arch/x86/platform/efi/efi.c
drivers/firmware/efi/Kconfig
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/ahci.c | 20 | ||||
-rw-r--r-- | drivers/ata/ahci_imx.c | 3 | ||||
-rw-r--r-- | drivers/ata/ahci_platform.c | 1 | ||||
-rw-r--r-- | drivers/ata/libata-core.c | 22 | ||||
-rw-r--r-- | drivers/ata/libata-scsi.c | 22 | ||||
-rw-r--r-- | drivers/ata/libata-zpodd.c | 4 | ||||
-rw-r--r-- | drivers/ata/pata_arasan_cf.c | 1 |
7 files changed, 56 insertions, 17 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index e2903d03180e..c0ed4f273cf2 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -435,6 +435,8 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
435 | .driver_data = board_ahci_yes_fbs }, /* 88se9172 on some Gigabyte */ | 435 | .driver_data = board_ahci_yes_fbs }, /* 88se9172 on some Gigabyte */ |
436 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x91a3), | 436 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x91a3), |
437 | .driver_data = board_ahci_yes_fbs }, | 437 | .driver_data = board_ahci_yes_fbs }, |
438 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9230), | ||
439 | .driver_data = board_ahci_yes_fbs }, | ||
438 | 440 | ||
439 | /* Promise */ | 441 | /* Promise */ |
440 | { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */ | 442 | { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */ |
@@ -1236,15 +1238,6 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1236 | if (rc) | 1238 | if (rc) |
1237 | return rc; | 1239 | return rc; |
1238 | 1240 | ||
1239 | /* AHCI controllers often implement SFF compatible interface. | ||
1240 | * Grab all PCI BARs just in case. | ||
1241 | */ | ||
1242 | rc = pcim_iomap_regions_request_all(pdev, 1 << ahci_pci_bar, DRV_NAME); | ||
1243 | if (rc == -EBUSY) | ||
1244 | pcim_pin_device(pdev); | ||
1245 | if (rc) | ||
1246 | return rc; | ||
1247 | |||
1248 | if (pdev->vendor == PCI_VENDOR_ID_INTEL && | 1241 | if (pdev->vendor == PCI_VENDOR_ID_INTEL && |
1249 | (pdev->device == 0x2652 || pdev->device == 0x2653)) { | 1242 | (pdev->device == 0x2652 || pdev->device == 0x2653)) { |
1250 | u8 map; | 1243 | u8 map; |
@@ -1261,6 +1254,15 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1261 | } | 1254 | } |
1262 | } | 1255 | } |
1263 | 1256 | ||
1257 | /* AHCI controllers often implement SFF compatible interface. | ||
1258 | * Grab all PCI BARs just in case. | ||
1259 | */ | ||
1260 | rc = pcim_iomap_regions_request_all(pdev, 1 << ahci_pci_bar, DRV_NAME); | ||
1261 | if (rc == -EBUSY) | ||
1262 | pcim_pin_device(pdev); | ||
1263 | if (rc) | ||
1264 | return rc; | ||
1265 | |||
1264 | hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL); | 1266 | hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL); |
1265 | if (!hpriv) | 1267 | if (!hpriv) |
1266 | return -ENOMEM; | 1268 | return -ENOMEM; |
diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c index ae2d73fe321e..3e23e9941dad 100644 --- a/drivers/ata/ahci_imx.c +++ b/drivers/ata/ahci_imx.c | |||
@@ -113,7 +113,7 @@ static int imx6q_sata_init(struct device *dev, void __iomem *mmio) | |||
113 | /* | 113 | /* |
114 | * set PHY Paremeters, two steps to configure the GPR13, | 114 | * set PHY Paremeters, two steps to configure the GPR13, |
115 | * one write for rest of parameters, mask of first write | 115 | * one write for rest of parameters, mask of first write |
116 | * is 0x07fffffd, and the other one write for setting | 116 | * is 0x07ffffff, and the other one write for setting |
117 | * the mpll_clk_en. | 117 | * the mpll_clk_en. |
118 | */ | 118 | */ |
119 | regmap_update_bits(imxpriv->gpr, 0x34, IMX6Q_GPR13_SATA_RX_EQ_VAL_MASK | 119 | regmap_update_bits(imxpriv->gpr, 0x34, IMX6Q_GPR13_SATA_RX_EQ_VAL_MASK |
@@ -124,6 +124,7 @@ static int imx6q_sata_init(struct device *dev, void __iomem *mmio) | |||
124 | | IMX6Q_GPR13_SATA_TX_ATTEN_MASK | 124 | | IMX6Q_GPR13_SATA_TX_ATTEN_MASK |
125 | | IMX6Q_GPR13_SATA_TX_BOOST_MASK | 125 | | IMX6Q_GPR13_SATA_TX_BOOST_MASK |
126 | | IMX6Q_GPR13_SATA_TX_LVL_MASK | 126 | | IMX6Q_GPR13_SATA_TX_LVL_MASK |
127 | | IMX6Q_GPR13_SATA_MPLL_CLK_EN | ||
127 | | IMX6Q_GPR13_SATA_TX_EDGE_RATE | 128 | | IMX6Q_GPR13_SATA_TX_EDGE_RATE |
128 | , IMX6Q_GPR13_SATA_RX_EQ_VAL_3_0_DB | 129 | , IMX6Q_GPR13_SATA_RX_EQ_VAL_3_0_DB |
129 | | IMX6Q_GPR13_SATA_RX_LOS_LVL_SATA2M | 130 | | IMX6Q_GPR13_SATA_RX_LOS_LVL_SATA2M |
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c index f9554318504f..4b231baceb09 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c | |||
@@ -329,6 +329,7 @@ static SIMPLE_DEV_PM_OPS(ahci_pm_ops, ahci_suspend, ahci_resume); | |||
329 | static const struct of_device_id ahci_of_match[] = { | 329 | static const struct of_device_id ahci_of_match[] = { |
330 | { .compatible = "snps,spear-ahci", }, | 330 | { .compatible = "snps,spear-ahci", }, |
331 | { .compatible = "snps,exynos5440-ahci", }, | 331 | { .compatible = "snps,exynos5440-ahci", }, |
332 | { .compatible = "ibm,476gtr-ahci", }, | ||
332 | {}, | 333 | {}, |
333 | }; | 334 | }; |
334 | MODULE_DEVICE_TABLE(of, ahci_of_match); | 335 | MODULE_DEVICE_TABLE(of, ahci_of_match); |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 81a94a3919db..1393a5890ed5 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -2149,9 +2149,16 @@ static int ata_dev_config_ncq(struct ata_device *dev, | |||
2149 | "failed to get NCQ Send/Recv Log Emask 0x%x\n", | 2149 | "failed to get NCQ Send/Recv Log Emask 0x%x\n", |
2150 | err_mask); | 2150 | err_mask); |
2151 | } else { | 2151 | } else { |
2152 | u8 *cmds = dev->ncq_send_recv_cmds; | ||
2153 | |||
2152 | dev->flags |= ATA_DFLAG_NCQ_SEND_RECV; | 2154 | dev->flags |= ATA_DFLAG_NCQ_SEND_RECV; |
2153 | memcpy(dev->ncq_send_recv_cmds, ap->sector_buf, | 2155 | memcpy(cmds, ap->sector_buf, ATA_LOG_NCQ_SEND_RECV_SIZE); |
2154 | ATA_LOG_NCQ_SEND_RECV_SIZE); | 2156 | |
2157 | if (dev->horkage & ATA_HORKAGE_NO_NCQ_TRIM) { | ||
2158 | ata_dev_dbg(dev, "disabling queued TRIM support\n"); | ||
2159 | cmds[ATA_LOG_NCQ_SEND_RECV_DSM_OFFSET] &= | ||
2160 | ~ATA_LOG_NCQ_SEND_RECV_DSM_TRIM; | ||
2161 | } | ||
2155 | } | 2162 | } |
2156 | } | 2163 | } |
2157 | 2164 | ||
@@ -4156,6 +4163,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { | |||
4156 | { "ST3320[68]13AS", "SD1[5-9]", ATA_HORKAGE_NONCQ | | 4163 | { "ST3320[68]13AS", "SD1[5-9]", ATA_HORKAGE_NONCQ | |
4157 | ATA_HORKAGE_FIRMWARE_WARN }, | 4164 | ATA_HORKAGE_FIRMWARE_WARN }, |
4158 | 4165 | ||
4166 | /* Seagate Momentus SpinPoint M8 seem to have FPMDA_AA issues */ | ||
4167 | { "ST1000LM024 HN-M101MBB", "2AR10001", ATA_HORKAGE_BROKEN_FPDMA_AA }, | ||
4168 | |||
4159 | /* Blacklist entries taken from Silicon Image 3124/3132 | 4169 | /* Blacklist entries taken from Silicon Image 3124/3132 |
4160 | Windows driver .inf file - also several Linux problem reports */ | 4170 | Windows driver .inf file - also several Linux problem reports */ |
4161 | { "HTS541060G9SA00", "MB3OC60D", ATA_HORKAGE_NONCQ, }, | 4171 | { "HTS541060G9SA00", "MB3OC60D", ATA_HORKAGE_NONCQ, }, |
@@ -4202,6 +4212,10 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { | |||
4202 | { "PIONEER DVD-RW DVR-212D", NULL, ATA_HORKAGE_NOSETXFER }, | 4212 | { "PIONEER DVD-RW DVR-212D", NULL, ATA_HORKAGE_NOSETXFER }, |
4203 | { "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER }, | 4213 | { "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER }, |
4204 | 4214 | ||
4215 | /* devices that don't properly handle queued TRIM commands */ | ||
4216 | { "Micron_M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, | ||
4217 | { "Crucial_CT???M500SSD1", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, | ||
4218 | |||
4205 | /* End Marker */ | 4219 | /* End Marker */ |
4206 | { } | 4220 | { } |
4207 | }; | 4221 | }; |
@@ -6304,10 +6318,9 @@ static void ata_port_detach(struct ata_port *ap) | |||
6304 | for (i = 0; i < SATA_PMP_MAX_PORTS; i++) | 6318 | for (i = 0; i < SATA_PMP_MAX_PORTS; i++) |
6305 | ata_tlink_delete(&ap->pmp_link[i]); | 6319 | ata_tlink_delete(&ap->pmp_link[i]); |
6306 | } | 6320 | } |
6307 | ata_tport_delete(ap); | ||
6308 | |||
6309 | /* remove the associated SCSI host */ | 6321 | /* remove the associated SCSI host */ |
6310 | scsi_remove_host(ap->scsi_host); | 6322 | scsi_remove_host(ap->scsi_host); |
6323 | ata_tport_delete(ap); | ||
6311 | } | 6324 | } |
6312 | 6325 | ||
6313 | /** | 6326 | /** |
@@ -6520,6 +6533,7 @@ static int __init ata_parse_force_one(char **cur, | |||
6520 | { "norst", .lflags = ATA_LFLAG_NO_HRST | ATA_LFLAG_NO_SRST }, | 6533 | { "norst", .lflags = ATA_LFLAG_NO_HRST | ATA_LFLAG_NO_SRST }, |
6521 | { "rstonce", .lflags = ATA_LFLAG_RST_ONCE }, | 6534 | { "rstonce", .lflags = ATA_LFLAG_RST_ONCE }, |
6522 | { "atapi_dmadir", .horkage_on = ATA_HORKAGE_ATAPI_DMADIR }, | 6535 | { "atapi_dmadir", .horkage_on = ATA_HORKAGE_ATAPI_DMADIR }, |
6536 | { "disable", .horkage_on = ATA_HORKAGE_DISABLE }, | ||
6523 | }; | 6537 | }; |
6524 | char *start = *cur, *p = *cur; | 6538 | char *start = *cur, *p = *cur; |
6525 | char *id, *val, *endp; | 6539 | char *id, *val, *endp; |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index db6dfcfa3e2e..377eb889f555 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -3625,6 +3625,7 @@ int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht) | |||
3625 | shost->max_lun = 1; | 3625 | shost->max_lun = 1; |
3626 | shost->max_channel = 1; | 3626 | shost->max_channel = 1; |
3627 | shost->max_cmd_len = 16; | 3627 | shost->max_cmd_len = 16; |
3628 | shost->no_write_same = 1; | ||
3628 | 3629 | ||
3629 | /* Schedule policy is determined by ->qc_defer() | 3630 | /* Schedule policy is determined by ->qc_defer() |
3630 | * callback and it needs to see every deferred qc. | 3631 | * callback and it needs to see every deferred qc. |
@@ -3871,6 +3872,27 @@ void ata_scsi_hotplug(struct work_struct *work) | |||
3871 | return; | 3872 | return; |
3872 | } | 3873 | } |
3873 | 3874 | ||
3875 | /* | ||
3876 | * XXX - UGLY HACK | ||
3877 | * | ||
3878 | * The block layer suspend/resume path is fundamentally broken due | ||
3879 | * to freezable kthreads and workqueue and may deadlock if a block | ||
3880 | * device gets removed while resume is in progress. I don't know | ||
3881 | * what the solution is short of removing freezable kthreads and | ||
3882 | * workqueues altogether. | ||
3883 | * | ||
3884 | * The following is an ugly hack to avoid kicking off device | ||
3885 | * removal while freezer is active. This is a joke but does avoid | ||
3886 | * this particular deadlock scenario. | ||
3887 | * | ||
3888 | * https://bugzilla.kernel.org/show_bug.cgi?id=62801 | ||
3889 | * http://marc.info/?l=linux-kernel&m=138695698516487 | ||
3890 | */ | ||
3891 | #ifdef CONFIG_FREEZER | ||
3892 | while (pm_freezing) | ||
3893 | msleep(10); | ||
3894 | #endif | ||
3895 | |||
3874 | DPRINTK("ENTER\n"); | 3896 | DPRINTK("ENTER\n"); |
3875 | mutex_lock(&ap->scsi_scan_mutex); | 3897 | mutex_lock(&ap->scsi_scan_mutex); |
3876 | 3898 | ||
diff --git a/drivers/ata/libata-zpodd.c b/drivers/ata/libata-zpodd.c index 68f9e3293e9c..88949c6d55dd 100644 --- a/drivers/ata/libata-zpodd.c +++ b/drivers/ata/libata-zpodd.c | |||
@@ -88,15 +88,13 @@ static enum odd_mech_type zpodd_get_mech_type(struct ata_device *dev) | |||
88 | static bool odd_can_poweroff(struct ata_device *ata_dev) | 88 | static bool odd_can_poweroff(struct ata_device *ata_dev) |
89 | { | 89 | { |
90 | acpi_handle handle; | 90 | acpi_handle handle; |
91 | acpi_status status; | ||
92 | struct acpi_device *acpi_dev; | 91 | struct acpi_device *acpi_dev; |
93 | 92 | ||
94 | handle = ata_dev_acpi_handle(ata_dev); | 93 | handle = ata_dev_acpi_handle(ata_dev); |
95 | if (!handle) | 94 | if (!handle) |
96 | return false; | 95 | return false; |
97 | 96 | ||
98 | status = acpi_bus_get_device(handle, &acpi_dev); | 97 | if (acpi_bus_get_device(handle, &acpi_dev)) |
99 | if (ACPI_FAILURE(status)) | ||
100 | return false; | 98 | return false; |
101 | 99 | ||
102 | return acpi_device_can_poweroff(acpi_dev); | 100 | return acpi_device_can_poweroff(acpi_dev); |
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c index e88690ebfd82..73492dd4a4bc 100644 --- a/drivers/ata/pata_arasan_cf.c +++ b/drivers/ata/pata_arasan_cf.c | |||
@@ -319,6 +319,7 @@ static int cf_init(struct arasan_cf_dev *acdev) | |||
319 | ret = clk_set_rate(acdev->clk, 166000000); | 319 | ret = clk_set_rate(acdev->clk, 166000000); |
320 | if (ret) { | 320 | if (ret) { |
321 | dev_warn(acdev->host->dev, "clock set rate failed"); | 321 | dev_warn(acdev->host->dev, "clock set rate failed"); |
322 | clk_disable_unprepare(acdev->clk); | ||
322 | return ret; | 323 | return ret; |
323 | } | 324 | } |
324 | 325 | ||