Loading Documentation/kernel-parameters.txt +2 −0 Original line number Diff line number Diff line Loading @@ -1529,6 +1529,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. * atapi_dmadir: Enable ATAPI DMADIR bridge support * disable: Disable this device. If there are multiple matching configurations changing the same attribute, the last one is used. Loading drivers/ata/ahci.c +12 −9 Original line number Diff line number Diff line Loading @@ -429,6 +429,9 @@ static const struct pci_device_id ahci_pci_tbl[] = { .driver_data = board_ahci_yes_fbs }, /* 88se9128 */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9125), .driver_data = board_ahci_yes_fbs }, /* 88se9125 */ { PCI_DEVICE_SUB(PCI_VENDOR_ID_MARVELL_EXT, 0x9178, PCI_VENDOR_ID_MARVELL_EXT, 0x9170), .driver_data = board_ahci_yes_fbs }, /* 88se9170 */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x917a), .driver_data = board_ahci_yes_fbs }, /* 88se9172 */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9172), Loading Loading @@ -1280,15 +1283,6 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (rc) return rc; /* AHCI controllers often implement SFF compatible interface. * Grab all PCI BARs just in case. */ rc = pcim_iomap_regions_request_all(pdev, 1 << ahci_pci_bar, DRV_NAME); if (rc == -EBUSY) pcim_pin_device(pdev); if (rc) return rc; if (pdev->vendor == PCI_VENDOR_ID_INTEL && (pdev->device == 0x2652 || pdev->device == 0x2653)) { u8 map; Loading @@ -1305,6 +1299,15 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) } } /* AHCI controllers often implement SFF compatible interface. * Grab all PCI BARs just in case. */ rc = pcim_iomap_regions_request_all(pdev, 1 << ahci_pci_bar, DRV_NAME); if (rc == -EBUSY) pcim_pin_device(pdev); if (rc) return rc; hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL); if (!hpriv) return -ENOMEM; Loading drivers/ata/libata-core.c +14 −2 Original line number Diff line number Diff line Loading @@ -2149,9 +2149,16 @@ static int ata_dev_config_ncq(struct ata_device *dev, "failed to get NCQ Send/Recv Log Emask 0x%x\n", err_mask); } else { u8 *cmds = dev->ncq_send_recv_cmds; dev->flags |= ATA_DFLAG_NCQ_SEND_RECV; memcpy(dev->ncq_send_recv_cmds, ap->sector_buf, ATA_LOG_NCQ_SEND_RECV_SIZE); memcpy(cmds, ap->sector_buf, ATA_LOG_NCQ_SEND_RECV_SIZE); if (dev->horkage & ATA_HORKAGE_NO_NCQ_TRIM) { ata_dev_dbg(dev, "disabling queued TRIM support\n"); cmds[ATA_LOG_NCQ_SEND_RECV_DSM_OFFSET] &= ~ATA_LOG_NCQ_SEND_RECV_DSM_TRIM; } } } Loading Loading @@ -4205,6 +4212,10 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { { "PIONEER DVD-RW DVR-212D", NULL, ATA_HORKAGE_NOSETXFER }, { "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER }, /* devices that don't properly handle queued TRIM commands */ { "Micron_M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, { "Crucial_CT???M500SSD1", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, /* End Marker */ { } }; Loading Loading @@ -6522,6 +6533,7 @@ static int __init ata_parse_force_one(char **cur, { "norst", .lflags = ATA_LFLAG_NO_HRST | ATA_LFLAG_NO_SRST }, { "rstonce", .lflags = ATA_LFLAG_RST_ONCE }, { "atapi_dmadir", .horkage_on = ATA_HORKAGE_ATAPI_DMADIR }, { "disable", .horkage_on = ATA_HORKAGE_DISABLE }, }; char *start = *cur, *p = *cur; char *id, *val, *endp; Loading drivers/ata/libata-scsi.c +21 −0 Original line number Diff line number Diff line Loading @@ -3871,6 +3871,27 @@ void ata_scsi_hotplug(struct work_struct *work) return; } /* * XXX - UGLY HACK * * The block layer suspend/resume path is fundamentally broken due * to freezable kthreads and workqueue and may deadlock if a block * device gets removed while resume is in progress. I don't know * what the solution is short of removing freezable kthreads and * workqueues altogether. * * The following is an ugly hack to avoid kicking off device * removal while freezer is active. This is a joke but does avoid * this particular deadlock scenario. * * https://bugzilla.kernel.org/show_bug.cgi?id=62801 * http://marc.info/?l=linux-kernel&m=138695698516487 */ #ifdef CONFIG_FREEZER while (pm_freezing) msleep(10); #endif DPRINTK("ENTER\n"); mutex_lock(&ap->scsi_scan_mutex); Loading drivers/ata/sata_sis.c +4 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,10 @@ static struct pci_driver sis_pci_driver = { .id_table = sis_pci_tbl, .probe = sis_init_one, .remove = ata_pci_remove_one, #ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, #endif }; static struct scsi_host_template sis_sht = { Loading Loading
Documentation/kernel-parameters.txt +2 −0 Original line number Diff line number Diff line Loading @@ -1529,6 +1529,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. * atapi_dmadir: Enable ATAPI DMADIR bridge support * disable: Disable this device. If there are multiple matching configurations changing the same attribute, the last one is used. Loading
drivers/ata/ahci.c +12 −9 Original line number Diff line number Diff line Loading @@ -429,6 +429,9 @@ static const struct pci_device_id ahci_pci_tbl[] = { .driver_data = board_ahci_yes_fbs }, /* 88se9128 */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9125), .driver_data = board_ahci_yes_fbs }, /* 88se9125 */ { PCI_DEVICE_SUB(PCI_VENDOR_ID_MARVELL_EXT, 0x9178, PCI_VENDOR_ID_MARVELL_EXT, 0x9170), .driver_data = board_ahci_yes_fbs }, /* 88se9170 */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x917a), .driver_data = board_ahci_yes_fbs }, /* 88se9172 */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9172), Loading Loading @@ -1280,15 +1283,6 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (rc) return rc; /* AHCI controllers often implement SFF compatible interface. * Grab all PCI BARs just in case. */ rc = pcim_iomap_regions_request_all(pdev, 1 << ahci_pci_bar, DRV_NAME); if (rc == -EBUSY) pcim_pin_device(pdev); if (rc) return rc; if (pdev->vendor == PCI_VENDOR_ID_INTEL && (pdev->device == 0x2652 || pdev->device == 0x2653)) { u8 map; Loading @@ -1305,6 +1299,15 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) } } /* AHCI controllers often implement SFF compatible interface. * Grab all PCI BARs just in case. */ rc = pcim_iomap_regions_request_all(pdev, 1 << ahci_pci_bar, DRV_NAME); if (rc == -EBUSY) pcim_pin_device(pdev); if (rc) return rc; hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL); if (!hpriv) return -ENOMEM; Loading
drivers/ata/libata-core.c +14 −2 Original line number Diff line number Diff line Loading @@ -2149,9 +2149,16 @@ static int ata_dev_config_ncq(struct ata_device *dev, "failed to get NCQ Send/Recv Log Emask 0x%x\n", err_mask); } else { u8 *cmds = dev->ncq_send_recv_cmds; dev->flags |= ATA_DFLAG_NCQ_SEND_RECV; memcpy(dev->ncq_send_recv_cmds, ap->sector_buf, ATA_LOG_NCQ_SEND_RECV_SIZE); memcpy(cmds, ap->sector_buf, ATA_LOG_NCQ_SEND_RECV_SIZE); if (dev->horkage & ATA_HORKAGE_NO_NCQ_TRIM) { ata_dev_dbg(dev, "disabling queued TRIM support\n"); cmds[ATA_LOG_NCQ_SEND_RECV_DSM_OFFSET] &= ~ATA_LOG_NCQ_SEND_RECV_DSM_TRIM; } } } Loading Loading @@ -4205,6 +4212,10 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { { "PIONEER DVD-RW DVR-212D", NULL, ATA_HORKAGE_NOSETXFER }, { "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER }, /* devices that don't properly handle queued TRIM commands */ { "Micron_M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, { "Crucial_CT???M500SSD1", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, /* End Marker */ { } }; Loading Loading @@ -6522,6 +6533,7 @@ static int __init ata_parse_force_one(char **cur, { "norst", .lflags = ATA_LFLAG_NO_HRST | ATA_LFLAG_NO_SRST }, { "rstonce", .lflags = ATA_LFLAG_RST_ONCE }, { "atapi_dmadir", .horkage_on = ATA_HORKAGE_ATAPI_DMADIR }, { "disable", .horkage_on = ATA_HORKAGE_DISABLE }, }; char *start = *cur, *p = *cur; char *id, *val, *endp; Loading
drivers/ata/libata-scsi.c +21 −0 Original line number Diff line number Diff line Loading @@ -3871,6 +3871,27 @@ void ata_scsi_hotplug(struct work_struct *work) return; } /* * XXX - UGLY HACK * * The block layer suspend/resume path is fundamentally broken due * to freezable kthreads and workqueue and may deadlock if a block * device gets removed while resume is in progress. I don't know * what the solution is short of removing freezable kthreads and * workqueues altogether. * * The following is an ugly hack to avoid kicking off device * removal while freezer is active. This is a joke but does avoid * this particular deadlock scenario. * * https://bugzilla.kernel.org/show_bug.cgi?id=62801 * http://marc.info/?l=linux-kernel&m=138695698516487 */ #ifdef CONFIG_FREEZER while (pm_freezing) msleep(10); #endif DPRINTK("ENTER\n"); mutex_lock(&ap->scsi_scan_mutex); Loading
drivers/ata/sata_sis.c +4 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,10 @@ static struct pci_driver sis_pci_driver = { .id_table = sis_pci_tbl, .probe = sis_init_one, .remove = ata_pci_remove_one, #ifdef CONFIG_PM .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, #endif }; static struct scsi_host_template sis_sht = { Loading