diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_vport.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_vport.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c index e3c7fa642306..dc86e873102a 100644 --- a/drivers/scsi/lpfc/lpfc_vport.c +++ b/drivers/scsi/lpfc/lpfc_vport.c | |||
@@ -389,7 +389,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) | |||
389 | * by the port. | 389 | * by the port. |
390 | */ | 390 | */ |
391 | if ((phba->sli_rev == LPFC_SLI_REV4) && | 391 | if ((phba->sli_rev == LPFC_SLI_REV4) && |
392 | (pport->vpi_state & LPFC_VPI_REGISTERED)) { | 392 | (pport->fc_flag & FC_VFI_REGISTERED)) { |
393 | rc = lpfc_sli4_init_vpi(phba, vpi); | 393 | rc = lpfc_sli4_init_vpi(phba, vpi); |
394 | if (rc) { | 394 | if (rc) { |
395 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, | 395 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, |
@@ -505,6 +505,7 @@ enable_vport(struct fc_vport *fc_vport) | |||
505 | struct lpfc_vport *vport = *(struct lpfc_vport **)fc_vport->dd_data; | 505 | struct lpfc_vport *vport = *(struct lpfc_vport **)fc_vport->dd_data; |
506 | struct lpfc_hba *phba = vport->phba; | 506 | struct lpfc_hba *phba = vport->phba; |
507 | struct lpfc_nodelist *ndlp = NULL; | 507 | struct lpfc_nodelist *ndlp = NULL; |
508 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); | ||
508 | 509 | ||
509 | if ((phba->link_state < LPFC_LINK_UP) || | 510 | if ((phba->link_state < LPFC_LINK_UP) || |
510 | (phba->fc_topology == TOPOLOGY_LOOP)) { | 511 | (phba->fc_topology == TOPOLOGY_LOOP)) { |
@@ -512,10 +513,10 @@ enable_vport(struct fc_vport *fc_vport) | |||
512 | return VPORT_OK; | 513 | return VPORT_OK; |
513 | } | 514 | } |
514 | 515 | ||
515 | spin_lock_irq(&phba->hbalock); | 516 | spin_lock_irq(shost->host_lock); |
516 | vport->load_flag |= FC_LOADING; | 517 | vport->load_flag |= FC_LOADING; |
517 | vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI; | 518 | vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI; |
518 | spin_unlock_irq(&phba->hbalock); | 519 | spin_unlock_irq(shost->host_lock); |
519 | 520 | ||
520 | /* Use the Physical nodes Fabric NDLP to determine if the link is | 521 | /* Use the Physical nodes Fabric NDLP to determine if the link is |
521 | * up and ready to FDISC. | 522 | * up and ready to FDISC. |