aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_ct.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_ct.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_ct.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
index 26dae8bae2d1..896c7b0351e5 100644
--- a/drivers/scsi/lpfc/lpfc_ct.c
+++ b/drivers/scsi/lpfc/lpfc_ct.c
@@ -560,18 +560,25 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
560 irsp->ulpStatus, irsp->un.ulpWord[4], vport->fc_ns_retry); 560 irsp->ulpStatus, irsp->un.ulpWord[4], vport->fc_ns_retry);
561 561
562 /* Don't bother processing response if vport is being torn down. */ 562 /* Don't bother processing response if vport is being torn down. */
563 if (vport->load_flag & FC_UNLOADING) 563 if (vport->load_flag & FC_UNLOADING) {
564 if (vport->fc_flag & FC_RSCN_MODE)
565 lpfc_els_flush_rscn(vport);
564 goto out; 566 goto out;
567 }
565 568
566 if (lpfc_els_chk_latt(vport)) { 569 if (lpfc_els_chk_latt(vport)) {
567 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, 570 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
568 "0216 Link event during NS query\n"); 571 "0216 Link event during NS query\n");
572 if (vport->fc_flag & FC_RSCN_MODE)
573 lpfc_els_flush_rscn(vport);
569 lpfc_vport_set_state(vport, FC_VPORT_FAILED); 574 lpfc_vport_set_state(vport, FC_VPORT_FAILED);
570 goto out; 575 goto out;
571 } 576 }
572 if (lpfc_error_lost_link(irsp)) { 577 if (lpfc_error_lost_link(irsp)) {
573 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, 578 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
574 "0226 NS query failed due to link event\n"); 579 "0226 NS query failed due to link event\n");
580 if (vport->fc_flag & FC_RSCN_MODE)
581 lpfc_els_flush_rscn(vport);
575 goto out; 582 goto out;
576 } 583 }
577 if (irsp->ulpStatus) { 584 if (irsp->ulpStatus) {
@@ -587,6 +594,8 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
587 if (rc == 0) 594 if (rc == 0)
588 goto out; 595 goto out;
589 } 596 }
597 if (vport->fc_flag & FC_RSCN_MODE)
598 lpfc_els_flush_rscn(vport);
590 lpfc_vport_set_state(vport, FC_VPORT_FAILED); 599 lpfc_vport_set_state(vport, FC_VPORT_FAILED);
591 lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, 600 lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
592 "0257 GID_FT Query error: 0x%x 0x%x\n", 601 "0257 GID_FT Query error: 0x%x 0x%x\n",
@@ -1008,8 +1017,10 @@ lpfc_vport_symbolic_port_name(struct lpfc_vport *vport, char *symbol,
1008 if (n < size) 1017 if (n < size)
1009 n += snprintf(symbol + n, size - n, " VPort-%d", vport->vpi); 1018 n += snprintf(symbol + n, size - n, " VPort-%d", vport->vpi);
1010 1019
1011 if (n < size && vport->vname) 1020 if (n < size &&
1012 n += snprintf(symbol + n, size - n, " VName-%s", vport->vname); 1021 strlen(vport->fc_vport->symbolic_name))
1022 n += snprintf(symbol + n, size - n, " VName-%s",
1023 vport->fc_vport->symbolic_name);
1013 return n; 1024 return n;
1014} 1025}
1015 1026