[SCSI] libsas: Delay issuing ABORT TASK TMF until the error handler

sas_task_abort() should simply abort the upper-level SCSI command and wait
until the error handler to send the actual ABORT TASK command.  By
deferring things to the EH we simplify the concurrency coordination and
eliminate some race conditions.  Note that sas_task_abort has a few hooks
to handle libsas internal commands properly too.

Also rename do_sas_task_abort to __sas_task_abort just in case we really
want to abort the task *right now* and we don't have a scsi_cmnd attached
to the command.  This is a hook for libata internal commands to abort.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
Darrick J. Wong
2007-01-11 14:15:20 -08:00
committed by James Bottomley
parent 3ebf6922b0
commit 396819fba8
2 changed files with 31 additions and 23 deletions

View File

@@ -650,6 +650,7 @@ void sas_unregister_dev(struct domain_device *);
void sas_init_dev(struct domain_device *);
void sas_task_abort(struct work_struct *);
void sas_task_abort(struct sas_task *);
int __sas_task_abort(struct sas_task *);
#endif /* _SASLIB_H_ */