diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-06-20 15:51:24 +0100 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-06-20 15:51:24 +0100 |
commit | df5179854bca84ac5be500849b12dd33ce03f03f (patch) | |
tree | 78cf16415489e70f34c58f2c7f5c2e63696e9761 /include/scsi/scsi_host.h | |
parent | 0f45aa18e65cf3d768082d7d86054a0d2a20bb18 (diff) | |
parent | 8b22c249e7de453961e4d253b19fc2a0bdd65d53 (diff) | |
download | kernel-crypto-df5179854bca84ac5be500849b12dd33ce03f03f.tar.gz kernel-crypto-df5179854bca84ac5be500849b12dd33ce03f03f.tar.xz kernel-crypto-df5179854bca84ac5be500849b12dd33ce03f03f.zip |
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'include/scsi/scsi_host.h')
-rw-r--r-- | include/scsi/scsi_host.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 1cee1e10094..db9914adeac 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -10,6 +10,7 @@ struct block_device; struct module; struct scsi_cmnd; struct scsi_device; +struct scsi_target; struct Scsi_Host; struct scsi_host_cmd_pool; struct scsi_transport_template; @@ -228,6 +229,30 @@ struct scsi_host_template { void (* slave_destroy)(struct scsi_device *); /* + * Before the mid layer attempts to scan for a new device attached + * to a target where no target currently exists, it will call this + * entry in your driver. Should your driver need to allocate any + * structs or perform any other init items in order to send commands + * to a currently unused target, then this is where you can perform + * those allocations. + * + * Return values: 0 on success, non-0 on failure + * + * Status: OPTIONAL + */ + int (* target_alloc)(struct scsi_target *); + + /* + * Immediately prior to deallocating the target structure, and + * after all activity to attached scsi devices has ceased, the + * midlayer calls this point so that the driver may deallocate + * and terminate any references to the target. + * + * Status: OPTIONAL + */ + void (* target_destroy)(struct scsi_target *); + + /* * fill in this function to allow the queue depth of this host * to be changeable (on a per device basis). returns either * the current queue depth setting (may be different from what |