[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1567774537-20003-4-git-send-email-john.garry@huawei.com>
Date: Fri, 6 Sep 2019 20:55:27 +0800
From: John Garry <john.garry@...wei.com>
To: <jejb@...ux.vnet.ibm.com>, <martin.petersen@...cle.com>
CC: <linux-scsi@...r.kernel.org>, <linuxarm@...wei.com>,
<linux-kernel@...r.kernel.org>,
Luo Jiaxing <luojiaxing@...wei.com>,
"John Garry" <john.garry@...wei.com>
Subject: [PATCH 03/13] scsi: hisi_sas: Directly return when running I_T_nexus reset if phy disabled
From: Luo Jiaxing <luojiaxing@...wei.com>
At hisi_sas_debug_I_T_nexus_reset(), we call sas_phy_reset() to reset a
phy. 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.
Signed-off-by: Luo Jiaxing <luojiaxing@...wei.com>
Signed-off-by: John Garry <john.garry@...wei.com>
---
drivers/scsi/hisi_sas/hisi_sas_main.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 47faa283312e..5642c53cccae 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -1752,6 +1752,11 @@ static int hisi_sas_debug_I_T_nexus_reset(struct domain_device *device)
DECLARE_COMPLETION_ONSTACK(phyreset);
int rc, reset_type;
+ 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];
--
2.17.1
Powered by blists - more mailing lists