fastboot: make scsi probes asynchronous

This patch makes part of the scsi probe (which is mostly device spin up and the
partition scan) asynchronous. Only the part that runs after getting the device
number allocated is asynchronous, ensuring that device numbering remains stable.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
This commit is contained in:
Arjan van de Ven
2009-01-04 05:32:28 -08:00
parent 22a9d64567
commit 4ace92fc11
2 changed files with 70 additions and 42 deletions

View File

@@ -32,6 +32,7 @@
#include <linux/delay.h>
#include <linux/kthread.h>
#include <linux/spinlock.h>
#include <linux/async.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
@@ -179,6 +180,8 @@ int scsi_complete_async_scans(void)
spin_unlock(&async_scan_lock);
kfree(data);
/* Synchronize async operations globally */
async_synchronize_full();
return 0;
}