[SCSI] lpfc 8.3.0 : Fix some memory handling issues
- Fix mailbox buffer leak on dump mailbox completion
- Fix mbuf leak in lpfc_pci_probe_one() SLI-2 mode error path
- Don't allocate HBQs in interrupt context
- Use correct size for FCP response buffer so that all available sense
data is copied
- Fix jiffies calculation to prevent crash when collecting statistical
data
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index e07f12a..7a216d4 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -255,8 +255,10 @@
/* character array used for decoding dist type. */
char dist_char[] = "nabx";
- if (pmboxq->mb.mbxStatus != MBX_SUCCESS)
+ if (pmboxq->mb.mbxStatus != MBX_SUCCESS) {
+ mempool_free(pmboxq, phba->mbox_mem_pool);
return;
+ }
prg = (struct prog_id *) &prog_id_word;
@@ -274,6 +276,7 @@
sprintf(phba->OptionROMVersion, "%d.%d%d%c%d",
prg->ver, prg->rev, prg->lev,
dist, prg->num);
+ mempool_free(pmboxq, phba->mbox_mem_pool);
return;
}
@@ -2889,6 +2892,8 @@
lpfc_stop_phba_timers(phba);
phba->pport->work_port_events = 0;
lpfc_disable_intr(phba);
+ lpfc_sli_hba_down(phba);
+ lpfc_sli_brdrestart(phba);
out_free_sysfs_attr:
lpfc_free_sysfs_attr(vport);
out_destroy_port: