aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_nportdisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_nportdisc.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_nportdisc.c40
1 files changed, 23 insertions, 17 deletions
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
index d513813f6697..d08c4c890744 100644
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
@@ -451,7 +451,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
451 spin_unlock_irq(shost->host_lock); 451 spin_unlock_irq(shost->host_lock);
452 452
453 if ((ndlp->nlp_flag & NLP_ADISC_SND) && 453 if ((ndlp->nlp_flag & NLP_ADISC_SND) &&
454 (vport->num_disc_nodes)) { 454 (vport->num_disc_nodes)) {
455 /* Check to see if there are more 455 /* Check to see if there are more
456 * ADISCs to be sent 456 * ADISCs to be sent
457 */ 457 */
@@ -469,20 +469,23 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
469 lpfc_end_rscn(vport); 469 lpfc_end_rscn(vport);
470 } 470 }
471 } 471 }
472 else if (vport->num_disc_nodes) { 472 }
473 /* Check to see if there are more 473 } else if ((ndlp->nlp_state == NLP_STE_PLOGI_ISSUE) &&
474 * PLOGIs to be sent 474 (ndlp->nlp_flag & NLP_NPR_2B_DISC) &&
475 */ 475 (vport->num_disc_nodes)) {
476 lpfc_more_plogi(vport); 476 spin_lock_irq(shost->host_lock);
477 477 ndlp->nlp_flag &= ~NLP_NPR_2B_DISC;
478 if (vport->num_disc_nodes == 0) { 478 spin_unlock_irq(shost->host_lock);
479 spin_lock_irq(shost->host_lock); 479 /* Check to see if there are more
480 vport->fc_flag &= ~FC_NDISC_ACTIVE; 480 * PLOGIs to be sent
481 spin_unlock_irq(shost->host_lock); 481 */
482 lpfc_can_disctmo(vport); 482 lpfc_more_plogi(vport);
483 lpfc_end_rscn(vport); 483 if (vport->num_disc_nodes == 0) {
484 } 484 spin_lock_irq(shost->host_lock);
485 } 485 vport->fc_flag &= ~FC_NDISC_ACTIVE;
486 spin_unlock_irq(shost->host_lock);
487 lpfc_can_disctmo(vport);
488 lpfc_end_rscn(vport);
486 } 489 }
487 } 490 }
488 491
@@ -869,8 +872,11 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport,
869 872
870 lp = (uint32_t *) prsp->virt; 873 lp = (uint32_t *) prsp->virt;
871 sp = (struct serv_parm *) ((uint8_t *) lp + sizeof (uint32_t)); 874 sp = (struct serv_parm *) ((uint8_t *) lp + sizeof (uint32_t));
872 if (wwn_to_u64(sp->portName.u.wwn) == 0 || 875
873 wwn_to_u64(sp->nodeName.u.wwn) == 0) { 876 /* Some switches have FDMI servers returning 0 for WWN */
877 if ((ndlp->nlp_DID != FDMI_DID) &&
878 (wwn_to_u64(sp->portName.u.wwn) == 0 ||
879 wwn_to_u64(sp->nodeName.u.wwn) == 0)) {
874 lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, 880 lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
875 "0142 PLOGI RSP: Invalid WWN.\n"); 881 "0142 PLOGI RSP: Invalid WWN.\n");
876 goto out; 882 goto out;