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

Merge branch 'for-3.13-fixes' into for-3.14

A scheduled horkage patch will conflict with HORKAGE changes in
for-3.13-fixes. Pull in to avoid unnecessary merge conflicts.

Signed-off-by: Tejun Heo <tj@kernel.org>

Tejun Heo 6e1af697 a96cc303

+60 -11
+2
Documentation/kernel-parameters.txt
··· 1529 1529 1530 1530 * atapi_dmadir: Enable ATAPI DMADIR bridge support 1531 1531 1532 + * disable: Disable this device. 1533 + 1532 1534 If there are multiple matching configurations changing 1533 1535 the same attribute, the last one is used. 1534 1536
+12 -9
drivers/ata/ahci.c
··· 429 429 .driver_data = board_ahci_yes_fbs }, /* 88se9128 */ 430 430 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9125), 431 431 .driver_data = board_ahci_yes_fbs }, /* 88se9125 */ 432 + { PCI_DEVICE_SUB(PCI_VENDOR_ID_MARVELL_EXT, 0x9178, 433 + PCI_VENDOR_ID_MARVELL_EXT, 0x9170), 434 + .driver_data = board_ahci_yes_fbs }, /* 88se9170 */ 432 435 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x917a), 433 436 .driver_data = board_ahci_yes_fbs }, /* 88se9172 */ 434 437 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9172), ··· 1283 1280 if (rc) 1284 1281 return rc; 1285 1282 1286 - /* AHCI controllers often implement SFF compatible interface. 1287 - * Grab all PCI BARs just in case. 1288 - */ 1289 - rc = pcim_iomap_regions_request_all(pdev, 1 << ahci_pci_bar, DRV_NAME); 1290 - if (rc == -EBUSY) 1291 - pcim_pin_device(pdev); 1292 - if (rc) 1293 - return rc; 1294 - 1295 1283 if (pdev->vendor == PCI_VENDOR_ID_INTEL && 1296 1284 (pdev->device == 0x2652 || pdev->device == 0x2653)) { 1297 1285 u8 map; ··· 1298 1304 return -ENODEV; 1299 1305 } 1300 1306 } 1307 + 1308 + /* AHCI controllers often implement SFF compatible interface. 1309 + * Grab all PCI BARs just in case. 1310 + */ 1311 + rc = pcim_iomap_regions_request_all(pdev, 1 << ahci_pci_bar, DRV_NAME); 1312 + if (rc == -EBUSY) 1313 + pcim_pin_device(pdev); 1314 + if (rc) 1315 + return rc; 1301 1316 1302 1317 hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL); 1303 1318 if (!hpriv)
+14 -2
drivers/ata/libata-core.c
··· 2149 2149 "failed to get NCQ Send/Recv Log Emask 0x%x\n", 2150 2150 err_mask); 2151 2151 } else { 2152 + u8 *cmds = dev->ncq_send_recv_cmds; 2153 + 2152 2154 dev->flags |= ATA_DFLAG_NCQ_SEND_RECV; 2153 - memcpy(dev->ncq_send_recv_cmds, ap->sector_buf, 2154 - ATA_LOG_NCQ_SEND_RECV_SIZE); 2155 + memcpy(cmds, ap->sector_buf, 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 ··· 4211 4204 { "PIONEER DVD-RW DVR-215", NULL, ATA_HORKAGE_NOSETXFER }, 4212 4205 { "PIONEER DVD-RW DVR-212D", NULL, ATA_HORKAGE_NOSETXFER }, 4213 4206 { "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER }, 4207 + 4208 + /* devices that don't properly handle queued TRIM commands */ 4209 + { "Micron_M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, 4210 + { "Crucial_CT???M500SSD1", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, 4214 4211 4215 4212 /* End Marker */ 4216 4213 { } ··· 6533 6522 { "norst", .lflags = ATA_LFLAG_NO_HRST | ATA_LFLAG_NO_SRST }, 6534 6523 { "rstonce", .lflags = ATA_LFLAG_RST_ONCE }, 6535 6524 { "atapi_dmadir", .horkage_on = ATA_HORKAGE_ATAPI_DMADIR }, 6525 + { "disable", .horkage_on = ATA_HORKAGE_DISABLE }, 6536 6526 }; 6537 6527 char *start = *cur, *p = *cur; 6538 6528 char *id, *val, *endp;
+21
drivers/ata/libata-scsi.c
··· 3871 3871 return; 3872 3872 } 3873 3873 3874 + /* 3875 + * XXX - UGLY HACK 3876 + * 3877 + * The block layer suspend/resume path is fundamentally broken due 3878 + * to freezable kthreads and workqueue and may deadlock if a block 3879 + * device gets removed while resume is in progress. I don't know 3880 + * what the solution is short of removing freezable kthreads and 3881 + * workqueues altogether. 3882 + * 3883 + * The following is an ugly hack to avoid kicking off device 3884 + * removal while freezer is active. This is a joke but does avoid 3885 + * this particular deadlock scenario. 3886 + * 3887 + * https://bugzilla.kernel.org/show_bug.cgi?id=62801 3888 + * http://marc.info/?l=linux-kernel&m=138695698516487 3889 + */ 3890 + #ifdef CONFIG_FREEZER 3891 + while (pm_freezing) 3892 + msleep(10); 3893 + #endif 3894 + 3874 3895 DPRINTK("ENTER\n"); 3875 3896 mutex_lock(&ap->scsi_scan_mutex); 3876 3897
+4
drivers/ata/sata_sis.c
··· 83 83 .id_table = sis_pci_tbl, 84 84 .probe = sis_init_one, 85 85 .remove = ata_pci_remove_one, 86 + #ifdef CONFIG_PM 87 + .suspend = ata_pci_device_suspend, 88 + .resume = ata_pci_device_resume, 89 + #endif 86 90 }; 87 91 88 92 static struct scsi_host_template sis_sht = {
+1
include/linux/libata.h
··· 418 418 ATA_HORKAGE_DUMP_ID = (1 << 16), /* dump IDENTIFY data */ 419 419 ATA_HORKAGE_MAX_SEC_LBA48 = (1 << 17), /* Set max sects to 65535 */ 420 420 ATA_HORKAGE_ATAPI_DMADIR = (1 << 18), /* device requires dmadir */ 421 + ATA_HORKAGE_NO_NCQ_TRIM = (1 << 19), /* don't use queued TRIM */ 421 422 422 423 /* DMA mask for user DMA control: User visible values; DO NOT 423 424 renumber */
+6
kernel/freezer.c
··· 19 19 bool pm_freezing; 20 20 bool pm_nosig_freezing; 21 21 22 + /* 23 + * Temporary export for the deadlock workaround in ata_scsi_hotplug(). 24 + * Remove once the hack becomes unnecessary. 25 + */ 26 + EXPORT_SYMBOL_GPL(pm_freezing); 27 + 22 28 /* protects freezing and frozen transitions */ 23 29 static DEFINE_SPINLOCK(freezer_lock); 24 30