Commit 0d2836cb authored by Yihang Li's avatar Yihang Li Committed by JiangShui
Browse files

scsi: hisi_sas: Rollback some operations if FLR failed

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8IL6H


CVE: NA

----------------------------------------------------------------------

We obtain the semaphore and set HISI_SAS_RESETTING_BIT in
hisi_sas_reset_prepare_v3_hw(), block the scsi host and set
HISI_SAS_REJECT_CMD_BIT in hisi_sas_controller_reset_prepare(),
released them in hisi_sas_controller_reset_done(). However, if the HW
reset failure in FLR results in early return, the semaphore and flag bits
will not be release.

Rollback some operations including clearing flags / releasing semaphore
when FLR is failed.

Fixes: e5ea4801 ("scsi: hisi_sas: Implement handlers of PCIe FLR for v3 hw")
Signed-off-by: default avatarYihang Li <liyihang9@huawei.com>
Signed-off-by: default avatarXiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: default avatarxiabing <xiabing12@h-partners.com>
parent 85bbe13b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment