提交 30bc07bf 编写于 作者: J Jiaxing Luo 提交者: Xie XiuQi

scsi: hisi_sas: directly return when running I_T_nexus reset if phy disabled

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

At hisi_sas_debug_I_T_nexus_reset(), we call sas_phy_reset() to have phy
reset. But if the phy is disabled, sas_phy_reset() will directly return
-ENODEV without issue a phy reset request.

If so, We can directly return -ENODEV to libsas before issue a phy
reset.

Feature or Bugfix: Bugfix
Signed-off-by: NJiaxing Luo <luojiaxing@huawei.com>
Signed-off-by: NJohn Garry <john.garry@huawei.com>
Signed-off-by: Nluojiaxing <luojiaxing@huawei.com>
Reviewed-by: Nchenxiang <chenxiang66@hisilicon.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 a714d679
......@@ -1771,6 +1771,11 @@ static int hisi_sas_debug_I_T_nexus_reset(struct domain_device *device)
struct sas_ha_struct *sas_ha = &hisi_hba->sha;
DECLARE_COMPLETION_ONSTACK(phyreset);
if (!local_phy->enabled) {
sas_put_local_phy(local_phy);
return -ENODEV;
}
if (scsi_is_sas_phy_local(local_phy)) {
struct asd_sas_phy *sas_phy =
sas_ha->sas_phy[local_phy->number];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册