From 55f77c088c169fb09712f0abb0ae06a0696c401e Mon Sep 17 00:00:00 2001 From: Luo Jiaxing Date: Thu, 7 Mar 2019 20:49:00 +0800 Subject: [PATCH] scsi: hisi_sas: add softreset behind abort device at I_T_nexus_reset() to ensure decoupling of SATA device driver inclusion category: bugfix bugzilla: NA CVE: NA ------------------------------------------------- We found out that SATA disk can not be write but read only after system come up. No abnormal IO have come back between init, but when we try to write SATA disk, the IO can not return and timeout. We notice that one if-check is remove at sas_I_T_nexus(), and it cause internal_task_abort() will be allow to run besides error handle, and obviously softreset_ata() did not run after this condition, so it's clear that SATA disk is not decoupling. Fixes: 0de2941 ("scsi: hisi_sas: remove the check of sas_dev status in function hisi_sas_I_T_nexus_reset()") Signed-off-by: Luo Jiaxing Reviewed-by: Xiang Chen Signed-off-by: John Garry Reviewed-by: Xie XiuQi Signed-off-by: Yang Yingliang --- drivers/scsi/hisi_sas/hisi_sas_main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 89f11ad37b10..178b42da2213 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -1786,6 +1786,12 @@ static int hisi_sas_I_T_nexus_reset(struct domain_device *device) } hisi_sas_dereg_device(hisi_hba, device); + if (dev_is_sata(device)) { + rc = hisi_sas_softreset_ata_disk(device); + if (rc) + return TMF_RESP_FUNC_FAILED; + } + rc = hisi_sas_debug_I_T_nexus_reset(device); if ((rc == TMF_RESP_FUNC_COMPLETE) || (rc == -ENODEV)) -- GitLab