aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_vport.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2007-10-27 13:37:43 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-11 19:22:33 -0500
commit87af33fe5f78c27cf9e43c6e586dd6efd4be3e40 (patch)
treee9960c6e95ed599672d5dcec0d3c4e428ae42799 /drivers/scsi/lpfc/lpfc_vport.c
parent98c9ea5c026ee47efe2a0f595078dbf199d08f50 (diff)
[SCSI] lpfc 8.2.3 : FC Discovery Fixes
FC Discovery Fixes: - Fix up lpfc_drop_node() vs lpfc_nlp_not_used() usage - Clear ADISC flag when unregistering RPI and REMOVE ndlps if in recovery. - Fix usage of UNUSED list and ndlps - Fix PLOGI race conditions - Reset link if NameServer PLOGI errors occur - Synchronize GID_FT queries with PLOGI receptions Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_vport.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_vport.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c
index fd07d9d7f507..378c01200b02 100644
--- a/drivers/scsi/lpfc/lpfc_vport.c
+++ b/drivers/scsi/lpfc/lpfc_vport.c
@@ -445,7 +445,6 @@ int
445lpfc_vport_delete(struct fc_vport *fc_vport) 445lpfc_vport_delete(struct fc_vport *fc_vport)
446{ 446{
447 struct lpfc_nodelist *ndlp = NULL; 447 struct lpfc_nodelist *ndlp = NULL;
448 struct lpfc_nodelist *next_ndlp;
449 struct Scsi_Host *shost = (struct Scsi_Host *) fc_vport->shost; 448 struct Scsi_Host *shost = (struct Scsi_Host *) fc_vport->shost;
450 struct lpfc_vport *vport = *(struct lpfc_vport **)fc_vport->dd_data; 449 struct lpfc_vport *vport = *(struct lpfc_vport **)fc_vport->dd_data;
451 struct lpfc_hba *phba = vport->phba; 450 struct lpfc_hba *phba = vport->phba;
@@ -531,23 +530,20 @@ lpfc_vport_delete(struct fc_vport *fc_vport)
531 } 530 }
532 531
533skip_logo: 532skip_logo:
533 lpfc_cleanup(vport);
534 lpfc_sli_host_down(vport); 534 lpfc_sli_host_down(vport);
535 535
536 list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, nlp_listp) {
537 lpfc_disc_state_machine(vport, ndlp, NULL,
538 NLP_EVT_DEVICE_RECOVERY);
539 lpfc_disc_state_machine(vport, ndlp, NULL,
540 NLP_EVT_DEVICE_RM);
541 }
542
543 lpfc_stop_vport_timers(vport); 536 lpfc_stop_vport_timers(vport);
544 lpfc_unreg_all_rpis(vport); 537 lpfc_unreg_all_rpis(vport);
545 lpfc_unreg_default_rpis(vport); 538
546 /* 539 if (!(phba->pport->load_flag & FC_UNLOADING)) {
547 * Completion of unreg_vpi (lpfc_mbx_cmpl_unreg_vpi) does the 540 lpfc_unreg_default_rpis(vport);
548 * scsi_host_put() to release the vport. 541 /*
549 */ 542 * Completion of unreg_vpi (lpfc_mbx_cmpl_unreg_vpi)
550 lpfc_mbx_unreg_vpi(vport); 543 * does the scsi_host_put() to release the vport.
544 */
545 lpfc_mbx_unreg_vpi(vport);
546 }
551 547
552 lpfc_free_vpi(phba, vport->vpi); 548 lpfc_free_vpi(phba, vport->vpi);
553 vport->work_port_events = 0; 549 vport->work_port_events = 0;