Commit 246ea3c0 authored by Luo Jiaxing's avatar Luo Jiaxing Committed by Martin K. Petersen

scsi: hisi_sas: Don't fail IT nexus reset for Open Reject timeout

Currently we call hisi_sas_softreset_ata_disk() in
hisi_sas_I_T_nexus_reset().

If this fails for open reject reason, there is no reason to fail the IT
nexus reset, so only fail for TMF_RESP_FUNC_FAILED.

Some other strings spilled over multiple lines are reunited.
Signed-off-by: default avatarLuo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent a3115700
...@@ -1287,8 +1287,7 @@ static int hisi_sas_exec_internal_tmf_task(struct domain_device *device, ...@@ -1287,8 +1287,7 @@ static int hisi_sas_exec_internal_tmf_task(struct domain_device *device,
/* no error, but return the number of bytes of /* no error, but return the number of bytes of
* underrun * underrun
*/ */
dev_warn(dev, "abort tmf: task to dev %016llx " dev_warn(dev, "abort tmf: task to dev %016llx resp: 0x%x sts 0x%x underrun\n",
"resp: 0x%x sts 0x%x underrun\n",
SAS_ADDR(device->sas_addr), SAS_ADDR(device->sas_addr),
task->task_status.resp, task->task_status.resp,
task->task_status.stat); task->task_status.stat);
...@@ -1303,10 +1302,16 @@ static int hisi_sas_exec_internal_tmf_task(struct domain_device *device, ...@@ -1303,10 +1302,16 @@ static int hisi_sas_exec_internal_tmf_task(struct domain_device *device,
break; break;
} }
dev_warn(dev, "abort tmf: task to dev " if (task->task_status.resp == SAS_TASK_COMPLETE &&
"%016llx resp: 0x%x status 0x%x\n", task->task_status.stat == SAS_OPEN_REJECT) {
SAS_ADDR(device->sas_addr), task->task_status.resp, dev_warn(dev, "abort tmf: open reject failed\n");
task->task_status.stat); res = -EIO;
} else {
dev_warn(dev, "abort tmf: task to dev %016llx resp: 0x%x status 0x%x\n",
SAS_ADDR(device->sas_addr),
task->task_status.resp,
task->task_status.stat);
}
sas_free_task(task); sas_free_task(task);
task = NULL; task = NULL;
} }
...@@ -1826,7 +1831,7 @@ static int hisi_sas_I_T_nexus_reset(struct domain_device *device) ...@@ -1826,7 +1831,7 @@ static int hisi_sas_I_T_nexus_reset(struct domain_device *device)
if (dev_is_sata(device)) { if (dev_is_sata(device)) {
rc = hisi_sas_softreset_ata_disk(device); rc = hisi_sas_softreset_ata_disk(device);
if (rc) if (rc == TMF_RESP_FUNC_FAILED)
return TMF_RESP_FUNC_FAILED; return TMF_RESP_FUNC_FAILED;
} }
...@@ -2123,10 +2128,8 @@ _hisi_sas_internal_task_abort(struct hisi_hba *hisi_hba, ...@@ -2123,10 +2128,8 @@ _hisi_sas_internal_task_abort(struct hisi_hba *hisi_hba,
} }
exit: exit:
dev_dbg(dev, "internal task abort: task to dev %016llx task=%p " dev_dbg(dev, "internal task abort: task to dev %016llx task=%p resp: 0x%x sts 0x%x\n",
"resp: 0x%x sts 0x%x\n", SAS_ADDR(device->sas_addr), task,
SAS_ADDR(device->sas_addr),
task,
task->task_status.resp, /* 0 is complete, -1 is undelivered */ task->task_status.resp, /* 0 is complete, -1 is undelivered */
task->task_status.stat); task->task_status.stat);
sas_free_task(task); sas_free_task(task);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment