summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas
diff options
context:
space:
mode:
authorJohn Garry <john.garry@huawei.com>2022-03-11 20:23:52 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2022-03-14 23:33:24 -0400
commit095478a6e5bf590f2bbf341569eb25173c9c5f32 (patch)
treef2a6990932bb529e6ef1db58fc93544d38a8d517 /drivers/scsi/libsas
parent2cbbf489778eb9dde51392ec5f74ae2868e4b857 (diff)
downloadlinux-stable-095478a6e5bf590f2bbf341569eb25173c9c5f32.tar.gz
linux-stable-095478a6e5bf590f2bbf341569eb25173c9c5f32.tar.bz2
linux-stable-095478a6e5bf590f2bbf341569eb25173c9c5f32.zip
scsi: hisi_sas: Use libsas internal abort support
Use the common libsas internal abort functionality. In addition, this driver has special handling for internal abort timeouts - specifically whether to reset the controller in that instance, so extend the API for that. Timeout is now increased to 20 * Hz from 6 * Hz. We also retry for failure now, but this should not make a difference. Link: https://lore.kernel.org/r/1647001432-239276-5-git-send-email-john.garry@huawei.com Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Acked-by: Jack Wang <jinpu.wang@ionos.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/libsas')
-rw-r--r--drivers/scsi/libsas/sas_scsi_host.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
index 13142ec97f1d..9c82e5dc4fcc 100644
--- a/drivers/scsi/libsas/sas_scsi_host.c
+++ b/drivers/scsi/libsas/sas_scsi_host.c
@@ -943,6 +943,7 @@ static int sas_execute_internal_abort(struct domain_device *device,
task->abort_task.tag = tag;
task->abort_task.type = type;
+ task->abort_task.qid = qid;
res = i->dft->lldd_execute_task(task, GFP_KERNEL);
if (res) {
@@ -957,10 +958,16 @@ static int sas_execute_internal_abort(struct domain_device *device,
/* Even if the internal abort timed out, return direct. */
if (task->task_state_flags & SAS_TASK_STATE_ABORTED) {
- pr_err("Internal abort: timeout %016llx\n",
- SAS_ADDR(device->sas_addr));
+ bool quit = true;
+
+ if (i->dft->lldd_abort_timeout)
+ quit = i->dft->lldd_abort_timeout(task, data);
+ else
+ pr_err("Internal abort: timeout %016llx\n",
+ SAS_ADDR(device->sas_addr));
res = -EIO;
- break;
+ if (quit)
+ break;
}
if (task->task_status.resp == SAS_TASK_COMPLETE &&