@@ -4188,7 +4188,11 @@ static const struct ata_dev_quirks_entry __ata_dev_quirks[] = {
41884188 { "ST3320[68]13AS" , "SD1[5-9]" , ATA_QUIRK_NONCQ |
41894189 ATA_QUIRK_FIRMWARE_WARN },
41904190
4191+ /* ADATA devices with LPM issues. */
4192+ { "ADATA SU680" , NULL , ATA_QUIRK_NOLPM },
4193+
41914194 /* Seagate disks with LPM issues */
4195+ { "ST1000DM010-2EP102" , NULL , ATA_QUIRK_NOLPM },
41924196 { "ST2000DM008-2FR102" , NULL , ATA_QUIRK_NOLPM },
41934197
41944198 /* drives which fail FPDMA_AA activation (some may freeze afterwards)
@@ -4231,6 +4235,7 @@ static const struct ata_dev_quirks_entry __ata_dev_quirks[] = {
42314235 /* Devices that do not need bridging limits applied */
42324236 { "MTRON MSP-SATA*" , NULL , ATA_QUIRK_BRIDGE_OK },
42334237 { "BUFFALO HD-QSU2/R5" , NULL , ATA_QUIRK_BRIDGE_OK },
4238+ { "QEMU HARDDISK" , "2.5+" , ATA_QUIRK_BRIDGE_OK },
42344239
42354240 /* Devices which aren't very happy with higher link speeds */
42364241 { "WD My Book" , NULL , ATA_QUIRK_1_5_GBPS },
@@ -6274,10 +6279,6 @@ static void ata_port_detach(struct ata_port *ap)
62746279 }
62756280 }
62766281
6277- /* Make sure the deferred qc work finished. */
6278- cancel_work_sync (& ap -> deferred_qc_work );
6279- WARN_ON (ap -> deferred_qc );
6280-
62816282 /* Tell EH to disable all devices */
62826283 ap -> pflags |= ATA_PFLAG_UNLOADING ;
62836284 ata_port_schedule_eh (ap );
@@ -6288,9 +6289,11 @@ static void ata_port_detach(struct ata_port *ap)
62886289 /* wait till EH commits suicide */
62896290 ata_port_wait_eh (ap );
62906291
6291- /* it better be dead now */
6292+ /* It better be dead now and not have any remaining deferred qc. */
62926293 WARN_ON (!(ap -> pflags & ATA_PFLAG_UNLOADED ));
6294+ WARN_ON (ap -> deferred_qc );
62936295
6296+ cancel_work_sync (& ap -> deferred_qc_work );
62946297 cancel_delayed_work_sync (& ap -> hotplug_task );
62956298 cancel_delayed_work_sync (& ap -> scsi_rescan_task );
62966299
0 commit comments