PM/Hibernate: Wait for SCSI devices scan to complete during resume
commitc751085943362143f84346d274e0011419c84202
authorRafael J. Wysocki <rjw@sisk.pl>
Sun, 12 Apr 2009 18:06:56 +0000 (12 20:06 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 13 Apr 2009 18:37:07 +0000 (13 11:37 -0700)
tree5323da4e3eba8126bf44e5107960ee2323d28a16
parent7b11428d37fe65643172feff66cd0a4d72d1932a
PM/Hibernate: Wait for SCSI devices scan to complete during resume

There is a race between resume from hibernation and the asynchronous
scanning of SCSI devices and to prevent it from happening we need to
call scsi_complete_async_scans() during resume from hibernation.

In addition, if the resume from hibernation is userland-driven, it's
better to wait for all device probes in the kernel to complete before
attempting to open the resume device.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/scsi/scsi_priv.h
drivers/scsi/scsi_wait_scan.c
include/scsi/scsi_scan.h [new file with mode: 0644]
kernel/power/disk.c
kernel/power/user.c