diff options
author | Dan Williams <dan.j.williams@intel.com> | 2012-06-22 02:30:48 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-07-20 03:58:50 -0400 |
commit | 5db45bdc87ce4f503947adf7896586d60c63322c (patch) | |
tree | f939bbcf1e6fc2664c54b46949eb8e5af8aa070b /include/scsi/libsas.h | |
parent | b9d5c6b7ef570bea0d22746944d7b58fa7f17b13 (diff) |
[SCSI] libsas: enforce eh strategy handlers only in eh context
The strategy handlers may be called in places that are problematic for
libsas (i.e. sata resets outside of domain revalidation filtering /
libata link recovery), or problematic for userspace (non-blocking ioctl
to sleeping reset functions). However, these routines are also called
for eh escalations and recovery of scsi_eh_prep_cmnd(), so permit them
as long as we are running in the host's error handler, otherwise arrange
for them to be triggered in eh_context.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include/scsi/libsas.h')
-rw-r--r-- | include/scsi/libsas.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 814d8cb592ad..df9cefdf2a8e 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -176,10 +176,17 @@ struct sata_device { | |||
176 | u8 fis[ATA_RESP_FIS_SIZE]; | 176 | u8 fis[ATA_RESP_FIS_SIZE]; |
177 | }; | 177 | }; |
178 | 178 | ||
179 | struct ssp_device { | ||
180 | struct list_head eh_list_node; /* pending a user requested eh action */ | ||
181 | struct scsi_lun reset_lun; | ||
182 | }; | ||
183 | |||
179 | enum { | 184 | enum { |
180 | SAS_DEV_GONE, | 185 | SAS_DEV_GONE, |
181 | SAS_DEV_DESTROY, | 186 | SAS_DEV_DESTROY, |
182 | SAS_DEV_EH_PENDING, | 187 | SAS_DEV_EH_PENDING, |
188 | SAS_DEV_LU_RESET, | ||
189 | SAS_DEV_RESET, | ||
183 | }; | 190 | }; |
184 | 191 | ||
185 | struct domain_device { | 192 | struct domain_device { |
@@ -213,6 +220,7 @@ struct domain_device { | |||
213 | union { | 220 | union { |
214 | struct expander_device ex_dev; | 221 | struct expander_device ex_dev; |
215 | struct sata_device sata_dev; /* STP & directly attached */ | 222 | struct sata_device sata_dev; /* STP & directly attached */ |
223 | struct ssp_device ssp_dev; | ||
216 | }; | 224 | }; |
217 | 225 | ||
218 | void *lldd_dev; | 226 | void *lldd_dev; |
@@ -389,6 +397,8 @@ struct sas_ha_struct { | |||
389 | unsigned long state; | 397 | unsigned long state; |
390 | spinlock_t lock; | 398 | spinlock_t lock; |
391 | int eh_active; | 399 | int eh_active; |
400 | wait_queue_head_t eh_wait_q; | ||
401 | struct list_head eh_dev_q; | ||
392 | 402 | ||
393 | struct mutex disco_mutex; | 403 | struct mutex disco_mutex; |
394 | 404 | ||