From 9a8b5a9ef800b49f04f717352dcd1685538abbf3 Mon Sep 17 00:00:00 2001 From: Jiaxing Luo Date: Fri, 9 Aug 2019 17:21:42 +0800 Subject: [PATCH] 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: Jiaxing Luo Signed-off-by: John Garry Signed-off-by: luojiaxing Reviewed-by: chenxiang Reviewed-by: Yang Yingliang Signed-off-by: Yang Yingliang --- drivers/scsi/hisi_sas/hisi_sas_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 9a8f492fc29e..4f3af6aaebef 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -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 hisi_sas_device *sas_dev = device->lldd_dev; 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 sas_ha_struct *sas_ha = &hisi_hba->sha; DECLARE_COMPLETION_ONSTACK(phyreset); @@ -1856,7 +1856,7 @@ static int hisi_sas_lu_reset(struct domain_device *device, u8 *lun) phy = sas_get_local_phy(device); - rc = sas_phy_reset(phy, 1); + rc = sas_phy_reset(phy, true); if (rc == 0) hisi_sas_release_task(hisi_hba, device); -- GitLab