aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2012-01-18 16:25:38 -0500
committerJames Bottomley <JBottomley@Parallels.com>2012-02-19 09:08:53 -0500
commit728599090a9bf3aefb1226cc063295886525cd0e (patch)
tree2328f85b1cc3c69261ee2e418abf68bd358feb47 /drivers
parenteff4a01b6e9f8cee3c541ab7f2ad18b5bbffd124 (diff)
[SCSI] lpfc 8.3.29: Locking fix and Memory leak Fixes
Locking fix and Memory leak Fixes - Fix Locking code raises IRQ twice (NA) - Fix mailbox and vpi memory leaks (126818) Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/lpfc/lpfc_hbadisc.c8
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c6
-rw-r--r--drivers/scsi/lpfc/lpfc_nportdisc.c1
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c3
4 files changed, 13 insertions, 5 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 2cadb8271f10..343d87ba4df8 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -2977,9 +2977,9 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, struct lpfc_mbx_read_top *la)
2977 "topology\n"); 2977 "topology\n");
2978 /* Get Loop Map information */ 2978 /* Get Loop Map information */
2979 if (bf_get(lpfc_mbx_read_top_il, la)) { 2979 if (bf_get(lpfc_mbx_read_top_il, la)) {
2980 spin_lock_irq(shost->host_lock); 2980 spin_lock(shost->host_lock);
2981 vport->fc_flag |= FC_LBIT; 2981 vport->fc_flag |= FC_LBIT;
2982 spin_unlock_irq(shost->host_lock); 2982 spin_unlock(shost->host_lock);
2983 } 2983 }
2984 2984
2985 vport->fc_myDID = bf_get(lpfc_mbx_read_top_alpa_granted, la); 2985 vport->fc_myDID = bf_get(lpfc_mbx_read_top_alpa_granted, la);
@@ -3029,9 +3029,9 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, struct lpfc_mbx_read_top *la)
3029 phba->sli3_options |= LPFC_SLI3_NPIV_ENABLED; 3029 phba->sli3_options |= LPFC_SLI3_NPIV_ENABLED;
3030 } 3030 }
3031 vport->fc_myDID = phba->fc_pref_DID; 3031 vport->fc_myDID = phba->fc_pref_DID;
3032 spin_lock_irq(shost->host_lock); 3032 spin_lock(shost->host_lock);
3033 vport->fc_flag |= FC_LBIT; 3033 vport->fc_flag |= FC_LBIT;
3034 spin_unlock_irq(shost->host_lock); 3034 spin_unlock(shost->host_lock);
3035 } 3035 }
3036 spin_unlock_irq(&phba->hbalock); 3036 spin_unlock_irq(&phba->hbalock);
3037 3037
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index a91914968cbb..b38f99f3be32 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -8178,6 +8178,9 @@ lpfc_unset_hba(struct lpfc_hba *phba)
8178 vport->load_flag |= FC_UNLOADING; 8178 vport->load_flag |= FC_UNLOADING;
8179 spin_unlock_irq(shost->host_lock); 8179 spin_unlock_irq(shost->host_lock);
8180 8180
8181 kfree(phba->vpi_bmask);
8182 kfree(phba->vpi_ids);
8183
8181 lpfc_stop_hba_timers(phba); 8184 lpfc_stop_hba_timers(phba);
8182 8185
8183 phba->pport->work_port_events = 0; 8186 phba->pport->work_port_events = 0;
@@ -8710,6 +8713,9 @@ lpfc_pci_remove_one_s3(struct pci_dev *pdev)
8710 /* Final cleanup of txcmplq and reset the HBA */ 8713 /* Final cleanup of txcmplq and reset the HBA */
8711 lpfc_sli_brdrestart(phba); 8714 lpfc_sli_brdrestart(phba);
8712 8715
8716 kfree(phba->vpi_bmask);
8717 kfree(phba->vpi_ids);
8718
8713 lpfc_stop_hba_timers(phba); 8719 lpfc_stop_hba_timers(phba);
8714 spin_lock_irq(&phba->hbalock); 8720 spin_lock_irq(&phba->hbalock);
8715 list_del_init(&vport->listentry); 8721 list_del_init(&vport->listentry);
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
index 32b6d72cd98d..7b6b2aa5795a 100644
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
@@ -481,6 +481,7 @@ lpfc_mbx_cmpl_resume_rpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
481 ndlp, NULL); 481 ndlp, NULL);
482 } 482 }
483 kfree(elsiocb); 483 kfree(elsiocb);
484 mempool_free(mboxq, phba->mbox_mem_pool);
484} 485}
485 486
486static int 487static int
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 73da1c039b9d..e5d22b10ff2f 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -14840,7 +14840,8 @@ lpfc_sli4_resume_rpi(struct lpfc_nodelist *ndlp,
14840 mboxq->mbox_cmpl = cmpl; 14840 mboxq->mbox_cmpl = cmpl;
14841 mboxq->context1 = arg; 14841 mboxq->context1 = arg;
14842 mboxq->context2 = ndlp; 14842 mboxq->context2 = ndlp;
14843 } 14843 } else
14844 mboxq->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
14844 mboxq->vport = ndlp->vport; 14845 mboxq->vport = ndlp->vport;
14845 rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_NOWAIT); 14846 rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_NOWAIT);
14846 if (rc == MBX_NOT_FINISHED) { 14847 if (rc == MBX_NOT_FINISHED) {