diff options
author | Darrick J. Wong <djwong@us.ibm.com> | 2007-01-11 17:15:46 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-01-13 17:23:40 -0500 |
commit | 02cd743bb3a37f27681c487608fb819493fa4010 (patch) | |
tree | 9641aa94df40d8b97aacca1fda9c054cd79491cf /drivers/scsi/libsas | |
parent | 6b0efb8516a5298e12033df61f9e0c376a306adb (diff) |
[SCSI] libsas: Start I_T recovery if ABORT TASK fails
The EH should fall into I_T recovery (and potentially stronger
remedies) if ABORT TASK fails.
Signed-off-by: Alexis Bruemmer <alexisb@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/libsas')
-rw-r--r-- | drivers/scsi/libsas/sas_scsi_host.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index 8a1b98e3943c..9ffe7605fb9d 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c | |||
@@ -281,6 +281,7 @@ enum task_disposition { | |||
281 | TASK_IS_ABORTED, | 281 | TASK_IS_ABORTED, |
282 | TASK_IS_AT_LU, | 282 | TASK_IS_AT_LU, |
283 | TASK_IS_NOT_AT_LU, | 283 | TASK_IS_NOT_AT_LU, |
284 | TASK_ABORT_FAILED, | ||
284 | }; | 285 | }; |
285 | 286 | ||
286 | static enum task_disposition sas_scsi_find_task(struct sas_task *task) | 287 | static enum task_disposition sas_scsi_find_task(struct sas_task *task) |
@@ -331,15 +332,21 @@ static enum task_disposition sas_scsi_find_task(struct sas_task *task) | |||
331 | SAS_DPRINTK("%s: querying task 0x%p\n", | 332 | SAS_DPRINTK("%s: querying task 0x%p\n", |
332 | __FUNCTION__, task); | 333 | __FUNCTION__, task); |
333 | res = si->dft->lldd_query_task(task); | 334 | res = si->dft->lldd_query_task(task); |
334 | if (res == TMF_RESP_FUNC_SUCC) { | 335 | switch (res) { |
336 | case TMF_RESP_FUNC_SUCC: | ||
335 | SAS_DPRINTK("%s: task 0x%p at LU\n", | 337 | SAS_DPRINTK("%s: task 0x%p at LU\n", |
336 | __FUNCTION__, task); | 338 | __FUNCTION__, task); |
337 | return TASK_IS_AT_LU; | 339 | return TASK_IS_AT_LU; |
338 | } else if (res == TMF_RESP_FUNC_COMPLETE) { | 340 | case TMF_RESP_FUNC_COMPLETE: |
339 | SAS_DPRINTK("%s: task 0x%p not at LU\n", | 341 | SAS_DPRINTK("%s: task 0x%p not at LU\n", |
340 | __FUNCTION__, task); | 342 | __FUNCTION__, task); |
341 | return TASK_IS_NOT_AT_LU; | 343 | return TASK_IS_NOT_AT_LU; |
342 | } | 344 | case TMF_RESP_FUNC_FAILED: |
345 | SAS_DPRINTK("%s: task 0x%p failed to abort\n", | ||
346 | __FUNCTION__, task); | ||
347 | return TASK_ABORT_FAILED; | ||
348 | } | ||
349 | |||
343 | } | 350 | } |
344 | } | 351 | } |
345 | return res; | 352 | return res; |
@@ -475,6 +482,7 @@ Again: | |||
475 | } | 482 | } |
476 | /* fallthrough */ | 483 | /* fallthrough */ |
477 | case TASK_IS_NOT_AT_LU: | 484 | case TASK_IS_NOT_AT_LU: |
485 | case TASK_ABORT_FAILED: | ||
478 | SAS_DPRINTK("task 0x%p is not at LU: I_T recover\n", | 486 | SAS_DPRINTK("task 0x%p is not at LU: I_T recover\n", |
479 | task); | 487 | task); |
480 | tmf_resp = sas_recover_I_T(task->dev); | 488 | tmf_resp = sas_recover_I_T(task->dev); |