Commit bc065588 authored by luojiaxing's avatar luojiaxing Committed by Xie XiuQi
Browse files

scsi: hisi_sas: fix bug brought by immediately call softreset_ata_disk() after sas_phy_reset()



driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

We found out that several abnormal IO have returned when we run
init_device(), because we didn't delay some times to wait SATA
disk to recover after calling sas_phy_reset().

We know that ops->hardreset() call I_T_nexus_reset() to run linkreset.
if we set a flag to have hardreset run at I_T_nexus_reset() when init
sata disk, it can clear the previous affiliation too.So we conside to
use ops->hardreset() to replace sas_phy_reset here.

Also, we can use the flag metioned before to shield a 2s delay at the
end of I_T_nexus_reset() for it alread own some other delay after
I_T_nexus_reset() return.

Before at commit 96935ddb288b("scsi: hisi_sas: add 2s delay after hardreset"),
 we have fix this
issue, but it cost 2s delay when init a SATA disk. Acutually, it's
not a suitable method, so we give a new solution here.

And some time we found out that some SATA disk will stay at
[STP PENDING] when unplug and plug, ops->hardreset() can wait
for SATA disk to recover form [STP PENDING] before move on. So
this patch can fix that issue too.

Fix: commit b5144e4670d51 ("{topost} scsi: hisi_sas: send HARD RESET
to clear the previous affiliation of STP target port when init device")

Signed-off-by: default avatarLuo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>

Signed-off-by: default avatarluojiaxing <luojiaxing@huawei.com>
Reviewed-by: default avatarchenxiang <chenxiang66@hisilicon.com>
Reviewed-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 7ce8c1e9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment