mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Acked-by: Arjan van de Ven <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
7b11428d37
commit
c751085943
5 changed files with 29 additions and 4 deletions
11
include/scsi/scsi_scan.h
Normal file
11
include/scsi/scsi_scan.h
Normal file
|
|
@ -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 */
|
||||
Loading…
Reference in a new issue