[SCSI] libsas: modify error handler to use scsi_eh_* functions
This patch adds an EH done queue to sas_ha, converts the error handling strategy function and the sas_scsi_task_done functions in libsas to use the scsi_eh_* commands for error'd commands, and adds checks for the INITIATOR_ABORTED flag so that we do the right thing if a sas_task has been aborted by the initiator. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
committed by
James Bottomley
parent
b4d38e38e6
commit
f456393e19
@@ -338,6 +338,8 @@ struct sas_ha_struct {
|
||||
void (*notify_phy_event)(struct asd_sas_phy *, enum phy_event);
|
||||
|
||||
void *lldd_ha; /* not touched by sas class code */
|
||||
|
||||
struct list_head eh_done_q;
|
||||
};
|
||||
|
||||
#define SHOST_TO_SAS_HA(_shost) (*(struct sas_ha_struct **)(_shost)->hostdata)
|
||||
@@ -530,9 +532,10 @@ struct sas_task {
|
||||
|
||||
|
||||
|
||||
#define SAS_TASK_STATE_PENDING 1
|
||||
#define SAS_TASK_STATE_DONE 2
|
||||
#define SAS_TASK_STATE_ABORTED 4
|
||||
#define SAS_TASK_STATE_PENDING 1
|
||||
#define SAS_TASK_STATE_DONE 2
|
||||
#define SAS_TASK_STATE_ABORTED 4
|
||||
#define SAS_TASK_INITIATOR_ABORTED 8
|
||||
|
||||
static inline struct sas_task *sas_alloc_task(gfp_t flags)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user