summaryrefslogtreecommitdiff
path: root/include/scsi/libsas.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@us.ibm.com>2007-01-12 01:15:43 +0300
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-01-14 01:21:53 +0300
commit6b0efb8516a5298e12033df61f9e0c376a306adb (patch)
tree3f63587167905e86de330fb28219dbfb309aad9a /include/scsi/libsas.h
parent980fa2f9d64b9be96107c89e165953ace311af54 (diff)
downloadlinux-6b0efb8516a5298e12033df61f9e0c376a306adb.tar.xz
[SCSI] libsas: Add SAS_HA state flags to avoid queueing events while unloading
Track sas_ha_struct state so that we ignore events that come in while we're shutting things down. Signed-off-by: Malahal Naineni <malahal@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi/libsas.h')
-rw-r--r--include/scsi/libsas.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index c83426344e8f..ca393929c10b 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -323,12 +323,20 @@ struct sas_ha_event {
struct sas_ha_struct *ha;
};
+enum sas_ha_state {
+ SAS_HA_REGISTERED,
+ SAS_HA_UNREGISTERED
+};
+
struct sas_ha_struct {
/* private: */
spinlock_t event_lock;
struct sas_ha_event ha_events[HA_NUM_EVENTS];
unsigned long pending;
+ enum sas_ha_state state;
+ spinlock_t state_lock;
+
struct scsi_core core;
/* public: */