mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
[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>
This commit is contained in:
parent
b9d5c6b7ef
commit
5db45bdc87
4 changed files with 140 additions and 4 deletions
|
@ -176,10 +176,17 @@ struct sata_device {
|
|||
u8 fis[ATA_RESP_FIS_SIZE];
|
||||
};
|
||||
|
||||
struct ssp_device {
|
||||
struct list_head eh_list_node; /* pending a user requested eh action */
|
||||
struct scsi_lun reset_lun;
|
||||
};
|
||||
|
||||
enum {
|
||||
SAS_DEV_GONE,
|
||||
SAS_DEV_DESTROY,
|
||||
SAS_DEV_EH_PENDING,
|
||||
SAS_DEV_LU_RESET,
|
||||
SAS_DEV_RESET,
|
||||
};
|
||||
|
||||
struct domain_device {
|
||||
|
@ -213,6 +220,7 @@ struct domain_device {
|
|||
union {
|
||||
struct expander_device ex_dev;
|
||||
struct sata_device sata_dev; /* STP & directly attached */
|
||||
struct ssp_device ssp_dev;
|
||||
};
|
||||
|
||||
void *lldd_dev;
|
||||
|
@ -389,6 +397,8 @@ struct sas_ha_struct {
|
|||
unsigned long state;
|
||||
spinlock_t lock;
|
||||
int eh_active;
|
||||
wait_queue_head_t eh_wait_q;
|
||||
struct list_head eh_dev_q;
|
||||
|
||||
struct mutex disco_mutex;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue