aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@us.ibm.com>2007-01-11 17:15:43 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-01-13 17:21:53 -0500
commit6b0efb8516a5298e12033df61f9e0c376a306adb (patch)
tree3f63587167905e86de330fb28219dbfb309aad9a /include/scsi
parent980fa2f9d64b9be96107c89e165953ace311af54 (diff)
[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')
-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 {
323 struct sas_ha_struct *ha; 323 struct sas_ha_struct *ha;
324}; 324};
325 325
326enum sas_ha_state {
327 SAS_HA_REGISTERED,
328 SAS_HA_UNREGISTERED
329};
330
326struct sas_ha_struct { 331struct sas_ha_struct {
327/* private: */ 332/* private: */
328 spinlock_t event_lock; 333 spinlock_t event_lock;
329 struct sas_ha_event ha_events[HA_NUM_EVENTS]; 334 struct sas_ha_event ha_events[HA_NUM_EVENTS];
330 unsigned long pending; 335 unsigned long pending;
331 336
337 enum sas_ha_state state;
338 spinlock_t state_lock;
339
332 struct scsi_core core; 340 struct scsi_core core;
333 341
334/* public: */ 342/* public: */