summaryrefslogtreecommitdiff
path: root/include/scsi/scsi_scan.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-04-12 20:06:56 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-13 11:37:07 -0700
commitc751085943362143f84346d274e0011419c84202 (patch)
tree5323da4e3eba8126bf44e5107960ee2323d28a16 /include/scsi/scsi_scan.h
parent7b11428d37fe65643172feff66cd0a4d72d1932a (diff)
downloadlwn-c751085943362143f84346d274e0011419c84202.tar.gz
lwn-c751085943362143f84346d274e0011419c84202.zip
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 'include/scsi/scsi_scan.h')
-rw-r--r--include/scsi/scsi_scan.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/scsi/scsi_scan.h b/include/scsi/scsi_scan.h
new file mode 100644
index 000000000000..78898889243d
--- /dev/null
+++ b/include/scsi/scsi_scan.h
@@ -0,0 +1,11 @@
+#ifndef _SCSI_SCSI_SCAN_H
+#define _SCSI_SCSI_SCAN_H
+
+#ifdef CONFIG_SCSI
+/* drivers/scsi/scsi_scan.c */
+extern int scsi_complete_async_scans(void);
+#else
+static inline int scsi_complete_async_scans(void) { return 0; }
+#endif
+
+#endif /* _SCSI_SCSI_SCAN_H */