driver inclusion
category: bugfix
bugzilla: NA
DTS: NA
-----------------------------------------------------------------------
We used timeout mechanism of scsi layer to trigger some IO's error handle,
this type of abnormal IO require driver to enter error handle to clear the
residue in the hardware.
But timeout mechanism caught error handle time to be longer, some threads
need to wait for tens of seconds when IO failed and enter error handle, so
we try to trigger error handling directly.
Signed-off-by: Luo Jiaxing <luojiaxing(a)huawei.com>
---
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 4 +++-
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 4 +++-
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 4 +++-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
index 031091e..49ea3b7 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
@@ -1263,8 +1263,10 @@ static int 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 ts->stat;
+ }
goto out;
}
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
index 6568e20..8ebddf5 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
@@ -2406,8 +2406,10 @@ slot_complete_v2_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot)
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 ts->stat;
+ }
goto out;
}
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
index 5b80856..7fd067c 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
@@ -2408,8 +2408,10 @@ slot_complete_v3_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot)
dev_info(dev, "data underflow without sense, rsp_code:0x%x, rc:%d.\n",
iu->resp_data[0], rc);
}
- if (unlikely(slot->abort))
+ if (unlikely(slot->abort)) {
+ sas_task_abort(task);
return ts->stat;
+ }
goto out;
}
--
2.7.4