aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/genhd.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 9a289d7c84bb..33a3b38aa4b2 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1565,7 +1565,14 @@ unsigned int disk_clear_events(struct gendisk *disk, unsigned int mask)
1565 1565
1566 /* uncondtionally schedule event check and wait for it to finish */ 1566 /* uncondtionally schedule event check and wait for it to finish */
1567 disk_block_events(disk); 1567 disk_block_events(disk);
1568 queue_delayed_work(system_freezable_wq, &ev->dwork, 0); 1568 /*
1569 * We need to put the work on system_nrt_wq here since there is a
1570 * deadlock that happens while probing a usb device while suspending. If
1571 * we put work on a freezable workqueue here, a usb probe will wait here
1572 * until the workqueue is unfrozen during suspend. Since suspend waits
1573 * on all probes to complete, we have a deadlock
1574 */
1575 queue_delayed_work(system_nrt_wq, &ev->dwork, 0);
1569 flush_delayed_work(&ev->dwork); 1576 flush_delayed_work(&ev->dwork);
1570 __disk_unblock_events(disk, false); 1577 __disk_unblock_events(disk, false);
1571 1578