[SCSI] Make scsi_scan_host work for drivers which find their own targets
If a driver can find its own targets, it can now fill in scan_finished and (optionally) scan_start in the scsi_host_template. Then, when it calls scsi_scan_host(), it will be called back (from a thread if asynchronous discovery is enabled), first to start the scan, and then at intervals to check if the scan is completed. Also make scsi_prep_async_scan and scsi_finish_async_scan static. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
committed by
James Bottomley
parent
93b45af5c6
commit
1aa8fab2ac
@@ -240,6 +240,24 @@ struct scsi_host_template {
|
||||
*/
|
||||
void (* target_destroy)(struct scsi_target *);
|
||||
|
||||
/*
|
||||
* If a host has the ability to discover targets on its own instead
|
||||
* of scanning the entire bus, it can fill in this function and
|
||||
* call scsi_scan_host(). This function will be called periodically
|
||||
* until it returns 1 with the scsi_host and the elapsed time of
|
||||
* the scan in jiffies.
|
||||
*
|
||||
* Status: OPTIONAL
|
||||
*/
|
||||
int (* scan_finished)(struct Scsi_Host *, unsigned long);
|
||||
|
||||
/*
|
||||
* If the host wants to be called before the scan starts, but
|
||||
* after the midlayer has set up ready for the scan, it can fill
|
||||
* in this function.
|
||||
*/
|
||||
void (* scan_start)(struct Scsi_Host *);
|
||||
|
||||
/*
|
||||
* fill in this function to allow the queue depth of this host
|
||||
* to be changeable (on a per device basis). returns either
|
||||
|
Reference in New Issue
Block a user