]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] lpfc: don't free mempool if mailbox is busy
authorJames Smart <James.Smart@Emulex.Com>
Thu, 31 Aug 2006 16:27:57 +0000 (12:27 -0400)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Tue, 26 Sep 2006 16:23:15 +0000 (09:23 -0700)
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/lpfc/lpfc_init.c

index 4cdf3464267fd7decee3cfff83c9082d3050b8a8..a5723ad0a0992c9026e759c7a5899cac4f51ea96 100644 (file)
@@ -389,7 +389,8 @@ lpfc_config_port_post(struct lpfc_hba * phba)
 
        lpfc_init_link(phba, pmb, phba->cfg_topology, phba->cfg_link_speed);
        pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
-       if (lpfc_sli_issue_mbox(phba, pmb, MBX_NOWAIT) != MBX_SUCCESS) {
+       rc = lpfc_sli_issue_mbox(phba, pmb, MBX_NOWAIT);
+       if (rc != MBX_SUCCESS) {
                lpfc_printf_log(phba,
                                KERN_ERR,
                                LOG_INIT,
@@ -406,7 +407,8 @@ lpfc_config_port_post(struct lpfc_hba * phba)
                readl(phba->HAregaddr); /* flush */
 
                phba->hba_state = LPFC_HBA_ERROR;
-               mempool_free(pmb, phba->mbox_mem_pool);
+               if (rc != MBX_BUSY)
+                       mempool_free(pmb, phba->mbox_mem_pool);
                return -EIO;
        }
        /* MBOX buffer will be freed in mbox compl */