aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-04-12 14:06:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-13 14:37:07 -0400
commitc751085943362143f84346d274e0011419c84202 (patch)
tree5323da4e3eba8126bf44e5107960ee2323d28a16 /drivers/scsi
parent7b11428d37fe65643172feff66cd0a4d72d1932a (diff)
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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/scsi_priv.h3
-rw-r--r--drivers/scsi/scsi_wait_scan.c2
2 files changed, 1 insertions, 4 deletions
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h
index e1850904ff73..fbc83bebdd8e 100644
--- a/drivers/scsi/scsi_priv.h
+++ b/drivers/scsi/scsi_priv.h
@@ -38,9 +38,6 @@ static inline void scsi_log_completion(struct scsi_cmnd *cmd, int disposition)
38 { }; 38 { };
39#endif 39#endif
40 40
41/* scsi_scan.c */
42int scsi_complete_async_scans(void);
43
44/* scsi_devinfo.c */ 41/* scsi_devinfo.c */
45extern int scsi_get_device_flags(struct scsi_device *sdev, 42extern int scsi_get_device_flags(struct scsi_device *sdev,
46 const unsigned char *vendor, 43 const unsigned char *vendor,
diff --git a/drivers/scsi/scsi_wait_scan.c b/drivers/scsi/scsi_wait_scan.c
index 8a636103083d..2f21af21269a 100644
--- a/drivers/scsi/scsi_wait_scan.c
+++ b/drivers/scsi/scsi_wait_scan.c
@@ -11,7 +11,7 @@
11 */ 11 */
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14#include "scsi_priv.h" 14#include <scsi/scsi_scan.h>
15 15
16static int __init wait_scan_init(void) 16static int __init wait_scan_init(void)
17{ 17{