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:
Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by:
John Garry <john.garry@huawei.com>
Signed-off-by:
luojiaxing <luojiaxing@huawei.com>
Reviewed-by:
chenxiang <chenxiang66@hisilicon.com>
Reviewed-by:
Xie XiuQi <xiexiuqi@huawei.com>
Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
Loading
Please sign in to comment