提交 9a8b5a9e 编写于 作者: J Jiaxing Luo 提交者: Xie XiuQi

scsi: hisi_sas: use true/false as input parameter of sas_phy_reset()

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

When calling sas_phy_reset(), we need to specify whether the reset type
is hard reset or link reset. In the code we use two numbers: 0 and 1.
In fact, we can't immediately determine whether these two numbers is
a normal number or true/false.

Therefore, we use true/false to replace 1/0. When set true, it mean we
will run hardreset; When false, we don't run hardreset this time, which
mean that we will run linkreset.

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>
上级 552023dd
...@@ -1766,7 +1766,7 @@ static int hisi_sas_debug_I_T_nexus_reset(struct domain_device *device) ...@@ -1766,7 +1766,7 @@ static int hisi_sas_debug_I_T_nexus_reset(struct domain_device *device)
struct sas_phy *local_phy = sas_get_local_phy(device); struct sas_phy *local_phy = sas_get_local_phy(device);
struct hisi_sas_device *sas_dev = device->lldd_dev; struct hisi_sas_device *sas_dev = device->lldd_dev;
int rc, reset_type = (sas_dev->dev_status == HISI_SAS_DEV_INIT || int rc, reset_type = (sas_dev->dev_status == HISI_SAS_DEV_INIT ||
!dev_is_sata(device)) ? 1 : 0; !dev_is_sata(device)) ? true : false;
struct hisi_hba *hisi_hba = dev_to_hisi_hba(device); struct hisi_hba *hisi_hba = dev_to_hisi_hba(device);
struct sas_ha_struct *sas_ha = &hisi_hba->sha; struct sas_ha_struct *sas_ha = &hisi_hba->sha;
DECLARE_COMPLETION_ONSTACK(phyreset); DECLARE_COMPLETION_ONSTACK(phyreset);
...@@ -1856,7 +1856,7 @@ static int hisi_sas_lu_reset(struct domain_device *device, u8 *lun) ...@@ -1856,7 +1856,7 @@ static int hisi_sas_lu_reset(struct domain_device *device, u8 *lun)
phy = sas_get_local_phy(device); phy = sas_get_local_phy(device);
rc = sas_phy_reset(phy, 1); rc = sas_phy_reset(phy, true);
if (rc == 0) if (rc == 0)
hisi_sas_release_task(hisi_hba, device); hisi_sas_release_task(hisi_hba, device);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册