Commit 47a693cb authored by Wang Chao's avatar Wang Chao Committed by Yang Yingliang
Browse files

scsi: hisi_sas: use wait_for_completion_timeout() when clearing ITCT

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

When injecting 2bit ecc errors, it will cause confusion inside SAS
controller which needs host reset to recover it. If a device is gone at the
same times inject 2bit ecc errors, we may not receive the ITCT interrupt so
it will wait for completion in clear_itct_v3_hw() all the time. And host
reset will also not occur because it can't require hisi_hba->sem, so the
system will be suspended.

To solve the issue, use wait_for_completion_timeout() instead of
wait_for_completion(), and also don't mark the gone device as
SAS_PHY_UNUSED when device gone.

Link: https://lore.kernel.org/r/1571926105-74636-4-git-send-email-john.garry@huawei.com


Signed-off-by: default avatarWang Chao <wangchao342@hisilicon.com>
Reviewed-by: default avatarZhu Xiongxiong <zhuxiongxiong@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 5e0f6f4b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment