[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1490203539-228029-20-git-send-email-john.garry@huawei.com>
Date: Thu, 23 Mar 2017 01:25:35 +0800
From: John Garry <john.garry@...wei.com>
To: <jejb@...ux.vnet.ibm.com>, <martin.petersen@...cle.com>
CC: <linuxarm@...wei.com>, <john.garry2@...l.dcu.ie>,
<linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<zhangfei.gao@...aro.org>, John Garry <john.garry@...wei.com>,
Xiang Chen <chenxiang66@...ilicon.com>
Subject: [PATCH 19/23] scsi: hisi_sas: add hisi_sas_clear_nexus_ha()
Add function for upper-layer to reset controller
when all else fails.
Signed-off-by: John Garry <john.garry@...wei.com>
Signed-off-by: Xiang Chen <chenxiang66@...ilicon.com>
---
drivers/scsi/hisi_sas/hisi_sas_main.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 3d63a24..f86263b 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -1070,6 +1070,13 @@ static int hisi_sas_lu_reset(struct domain_device *device, u8 *lun)
return rc;
}
+static int hisi_sas_clear_nexus_ha(struct sas_ha_struct *sas_ha)
+{
+ struct hisi_hba *hisi_hba = sas_ha->lldd_ha;
+
+ return hisi_sas_controller_reset(hisi_hba);
+}
+
static int hisi_sas_query_task(struct sas_task *task)
{
struct scsi_lun lun;
@@ -1368,6 +1375,7 @@ void hisi_sas_rescan_topology(struct hisi_hba *hisi_hba, u32 old_state,
.lldd_I_T_nexus_reset = hisi_sas_I_T_nexus_reset,
.lldd_lu_reset = hisi_sas_lu_reset,
.lldd_query_task = hisi_sas_query_task,
+ .lldd_clear_nexus_ha = hisi_sas_clear_nexus_ha,
.lldd_port_formed = hisi_sas_port_formed,
};
--
1.9.1
Powered by blists - more mailing lists