summaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorMike Anderson <andmike@us.ibm.com>2005-06-16 11:14:33 -0700
committerJames Bottomley <jejb@mulgrave.(none)>2005-07-30 11:13:01 -0500
commit82f29467a025f6a2192d281e97fca0be46e905cc (patch)
tree5cf356ece53caf2936ca85803676b326094f7c38 /include/scsi
parentd2c9d9eafa03dbd08a8a439e6c5addb8b1f03b9b (diff)
downloadblackbird-obmc-linux-82f29467a025f6a2192d281e97fca0be46e905cc.tar.gz
blackbird-obmc-linux-82f29467a025f6a2192d281e97fca0be46e905cc.zip
[SCSI] host state model update: mediate host add/remove race
Add support to not allow additions to a host when it is being removed. Signed-off-by: Mike Anderson <andmike@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi_host.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 0b1e275b2699..1ea5b51d1749 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -650,6 +650,15 @@ static inline struct device *scsi_get_device(struct Scsi_Host *shost)
return shost->shost_gendev.parent;
}
+/**
+ * scsi_host_scan_allowed - Is scanning of this host allowed
+ * @shost: Pointer to Scsi_Host.
+ **/
+static inline int scsi_host_scan_allowed(struct Scsi_Host *shost)
+{
+ return shost->shost_state == SHOST_RUNNING;
+}
+
extern void scsi_unblock_requests(struct Scsi_Host *);
extern void scsi_block_requests(struct Scsi_Host *);
OpenPOWER on IntegriCloud