aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_init.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2008-02-08 18:49:39 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-02-11 18:52:57 -0500
commit1b32f6aa9935ab88eac0d608a4b06369f5d9064a (patch)
treedfca777d4fcd442d33643536963c259a15d67662 /drivers/scsi/lpfc/lpfc_init.c
parente47c9093531d3406a8ae38acca4ce207ef70cc0e (diff)
[SCSI] lpfc 8.2.5 : Miscellaneous Fixes
Miscellaneous fixes: - Fix ERRATT flag which was overlapping - Allow RESTART mbx commands through when stopped. - Accept incoming PLOGI when connected to an N_Port. - Fix NPort to NPort pt2pt problems: ADISC and reg_vpi issues - Fix vport unloading error that erroneously cleaned up RSCN buffers - Fix memory leak during repeated unloads - in mbox handling - Fix link bounce vs FLOGI race conditions 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_init.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index e0363bef6d29..99141545c25e 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -461,12 +461,21 @@ lpfc_config_port_post(struct lpfc_hba *phba)
461int 461int
462lpfc_hba_down_prep(struct lpfc_hba *phba) 462lpfc_hba_down_prep(struct lpfc_hba *phba)
463{ 463{
464 struct lpfc_vport **vports;
465 int i;
464 /* Disable interrupts */ 466 /* Disable interrupts */
465 writel(0, phba->HCregaddr); 467 writel(0, phba->HCregaddr);
466 readl(phba->HCregaddr); /* flush */ 468 readl(phba->HCregaddr); /* flush */
467 469
468 lpfc_cleanup_discovery_resources(phba->pport); 470 if (phba->pport->load_flag & FC_UNLOADING)
469 return 0; 471 lpfc_cleanup_discovery_resources(phba->pport);
472 else {
473 vports = lpfc_create_vport_work_array(phba);
474 if (vports != NULL)
475 for(i = 0; i <= phba->max_vpi && vports[i] != NULL; i++)
476 lpfc_cleanup_discovery_resources(vports[i]);
477 lpfc_destroy_vport_work_array(phba, vports);
478 } return 0;
470} 479}
471 480
472/************************************************************************/ 481/************************************************************************/