diff options
author | James Smart <James.Smart@Emulex.Com> | 2006-08-31 12:27:57 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-09-26 12:23:15 -0400 |
commit | 8aee918a1cff2a3722ce76fc6fa5abe09aa98d1b (patch) | |
tree | bec1aefd8598c3e840789661a54343e4ce803d59 /drivers/scsi/lpfc | |
parent | e8216dee838c09776680a6f1a2e54d81f3cdfa14 (diff) |
[SCSI] lpfc: don't free mempool if mailbox is busy
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 4cdf3464267f..a5723ad0a099 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -389,7 +389,8 @@ lpfc_config_port_post(struct lpfc_hba * phba) | |||
389 | 389 | ||
390 | lpfc_init_link(phba, pmb, phba->cfg_topology, phba->cfg_link_speed); | 390 | lpfc_init_link(phba, pmb, phba->cfg_topology, phba->cfg_link_speed); |
391 | pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl; | 391 | pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl; |
392 | if (lpfc_sli_issue_mbox(phba, pmb, MBX_NOWAIT) != MBX_SUCCESS) { | 392 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_NOWAIT); |
393 | if (rc != MBX_SUCCESS) { | ||
393 | lpfc_printf_log(phba, | 394 | lpfc_printf_log(phba, |
394 | KERN_ERR, | 395 | KERN_ERR, |
395 | LOG_INIT, | 396 | LOG_INIT, |
@@ -406,7 +407,8 @@ lpfc_config_port_post(struct lpfc_hba * phba) | |||
406 | readl(phba->HAregaddr); /* flush */ | 407 | readl(phba->HAregaddr); /* flush */ |
407 | 408 | ||
408 | phba->hba_state = LPFC_HBA_ERROR; | 409 | phba->hba_state = LPFC_HBA_ERROR; |
409 | mempool_free(pmb, phba->mbox_mem_pool); | 410 | if (rc != MBX_BUSY) |
411 | mempool_free(pmb, phba->mbox_mem_pool); | ||
410 | return -EIO; | 412 | return -EIO; |
411 | } | 413 | } |
412 | /* MBOX buffer will be freed in mbox compl */ | 414 | /* MBOX buffer will be freed in mbox compl */ |