]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
scsi: hisi_sas: add hisi_sas_clear_nexus_ha()
authorJohn Garry <john.garry@huawei.com>
Wed, 22 Mar 2017 17:25:35 +0000 (01:25 +0800)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 28 Jun 2017 14:24:05 +0000 (11:24 -0300)
BugLink: https://bugs.launchpad.net/bugs/1695999
Add function for upper-layer to reset controller when all else fails.

Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 8b05ad6a9dbc4306c8eaf0f5269206647ed1ad7e)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/scsi/hisi_sas/hisi_sas_main.c

index 3d63a24fea5426bbe1faf139ea90e6a4336ab614..f86263b3bf1cadef8fa17830849372b038a635a5 100644 (file)
@@ -1070,6 +1070,13 @@ out:
        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 @@ static struct sas_domain_function_template hisi_sas_transport_ops = {
        .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,
 };