]> git.hungrycats.org Git - linux/commitdiff
scsi: lpfc: FCoE VPort enable-disable does not bring up the VPort
authorJames Smart <james.smart@broadcom.com>
Mon, 19 Dec 2016 23:07:25 +0000 (15:07 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Nov 2017 08:21:20 +0000 (09:21 +0100)
[ Upstream commit 104450eb08ca662e6b1d02da11aca9598e978f3e ]

FCoE VPort enable-disable does not bring up the VPort.
VPI structure needed to be initialized before being re-registered.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/lpfc/lpfc_vport.c

index 769012663a8f53c2590234009fec7d7127e15f85..861c57bc4520a31b7e33ba42f8ef6a93f3dcb343 100644 (file)
@@ -528,6 +528,12 @@ enable_vport(struct fc_vport *fc_vport)
 
        spin_lock_irq(shost->host_lock);
        vport->load_flag |= FC_LOADING;
+       if (vport->fc_flag & FC_VPORT_NEEDS_INIT_VPI) {
+               spin_unlock_irq(shost->host_lock);
+               lpfc_issue_init_vpi(vport);
+               goto out;
+       }
+
        vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
        spin_unlock_irq(shost->host_lock);
 
@@ -548,6 +554,8 @@ enable_vport(struct fc_vport *fc_vport)
        } else {
                lpfc_vport_set_state(vport, FC_VPORT_FAILED);
        }
+
+out:
        lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
                         "1827 Vport Enabled.\n");
        return VPORT_OK;