Skip to content

Commit

Permalink
scsi: hisi_sas: Directly trigger SCSI error handling for completion e…
Browse files Browse the repository at this point in the history
…rrors

Abort failed commands in completion path. This avoids having to wait for
block layer timeouts and triggering the SCSI error handling thread.

Link: https://lore.kernel.org/r/1594627471-235395-2-git-send-email-john.garry@huawei.com
Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Luo Jiaxing authored and Martin K. Petersen committed Jul 14, 2020
1 parent 4642655 commit 05d91b5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1258,8 +1258,10 @@ static void slot_complete_v1_hw(struct hisi_hba *hisi_hba,
!(cmplt_hdr_data & CMPLT_HDR_RSPNS_XFRD_MSK)) {

slot_err_v1_hw(hisi_hba, task, slot);
if (unlikely(slot->abort))
if (unlikely(slot->abort)) {
sas_task_abort(task);
return;
}
goto out;
}

Expand Down
4 changes: 3 additions & 1 deletion drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2404,8 +2404,10 @@ static void slot_complete_v2_hw(struct hisi_hba *hisi_hba,
error_info[0], error_info[1],
error_info[2], error_info[3]);

if (unlikely(slot->abort))
if (unlikely(slot->abort)) {
sas_task_abort(task);
return;
}
goto out;
}

Expand Down
4 changes: 3 additions & 1 deletion drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2235,8 +2235,10 @@ static void slot_complete_v3_hw(struct hisi_hba *hisi_hba,
dw0, dw1, complete_hdr->act, dw3,
error_info[0], error_info[1],
error_info[2], error_info[3]);
if (unlikely(slot->abort))
if (unlikely(slot->abort)) {
sas_task_abort(task);
return;
}
goto out;
}

Expand Down

0 comments on commit 05d91b5

Please sign in to comment.