[SCSI] libsas: fix timeout vs completion race
[linux-block.git] / include / scsi / libsas.h
index 10eb2ea74431e7d3a37750d17ba43c9a9a78a7ab..aa7192ff4355d0157815fccdbbb02d6a80a7ac04 100644 (file)
@@ -178,6 +178,7 @@ enum {
 };
 
 struct domain_device {
+       spinlock_t done_lock;
         enum sas_dev_type dev_type;
 
         enum sas_linkrate linkrate;
@@ -321,6 +322,7 @@ struct asd_sas_phy {
 struct scsi_core {
        struct Scsi_Host *shost;
 
+       struct mutex      task_queue_flush;
        spinlock_t        task_queue_lock;
        struct list_head  task_queue;
        int               task_queue_size;
@@ -337,6 +339,7 @@ enum sas_ha_state {
        SAS_HA_REGISTERED,
        SAS_HA_DRAINING,
        SAS_HA_ATA_EH_ACTIVE,
+       SAS_HA_FROZEN,
 };
 
 struct sas_ha_struct {
@@ -452,7 +455,10 @@ enum service_response {
 };
 
 enum exec_status {
-       /* The SAM_STAT_.. codes fit in the lower 6 bits */
+       /* The SAM_STAT_.. codes fit in the lower 6 bits, alias some of
+        * them here to silence 'case value not in enumerated type' warnings
+        */
+       __SAM_STAT_CHECK_CONDITION = SAM_STAT_CHECK_CONDITION,
 
        SAS_DEV_NO_RESPONSE = 0x80,
        SAS_DATA_UNDERRUN,