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 /drivers/scsi/libsas/sas_init.c | |
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 'drivers/scsi/libsas/sas_init.c')
-rw-r--r-- | drivers/scsi/libsas/sas_init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/libsas/sas_init.c b/drivers/scsi/libsas/sas_init.c index 6909fefa32c5..1bbab3d94a20 100644 --- a/drivers/scsi/libsas/sas_init.c +++ b/drivers/scsi/libsas/sas_init.c | |||
@@ -116,7 +116,9 @@ int sas_register_ha(struct sas_ha_struct *sas_ha) | |||
116 | set_bit(SAS_HA_REGISTERED, &sas_ha->state); | 116 | set_bit(SAS_HA_REGISTERED, &sas_ha->state); |
117 | spin_lock_init(&sas_ha->lock); | 117 | spin_lock_init(&sas_ha->lock); |
118 | mutex_init(&sas_ha->drain_mutex); | 118 | mutex_init(&sas_ha->drain_mutex); |
119 | init_waitqueue_head(&sas_ha->eh_wait_q); | ||
119 | INIT_LIST_HEAD(&sas_ha->defer_q); | 120 | INIT_LIST_HEAD(&sas_ha->defer_q); |
121 | INIT_LIST_HEAD(&sas_ha->eh_dev_q); | ||
120 | 122 | ||
121 | error = sas_register_phys(sas_ha); | 123 | error = sas_register_phys(sas_ha); |
122 | if (error) { | 124 | if (error) { |