summaryrefslogtreecommitdiff
path: root/drivers/scsi/lpfc/lpfc_init.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2010-06-07 15:24:12 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 12:01:32 -0500
commitb92938b41ee84b83347b62baa6daa0d06a742e94 (patch)
tree6418e92113a9b779aec03e1fc4f94cfe849afe0f /drivers/scsi/lpfc/lpfc_init.c
parent6e7288d9a4b6691bf13fb07e3593d70d725d0737 (diff)
[SCSI] lpfc 8.3.13: SCSI specific changes
- Fix hba_queue_depth to reflect actual available XRIs - Add support for new SLER specific firmware status codes. - Free SCSI buffer when iotag allocation fails. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 8da8fc69227f..62585870f083 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -5563,9 +5563,12 @@ lpfc_sli4_read_config(struct lpfc_hba *phba)
mempool_free(pmb, phba->mbox_mem_pool);
/* Reset the DFT_HBA_Q_DEPTH to the max xri */
- if (phba->cfg_hba_queue_depth > (phba->sli4_hba.max_cfg_param.max_xri))
+ if (phba->cfg_hba_queue_depth >
+ (phba->sli4_hba.max_cfg_param.max_xri -
+ lpfc_sli4_get_els_iocb_cnt(phba)))
phba->cfg_hba_queue_depth =
- phba->sli4_hba.max_cfg_param.max_xri;
+ phba->sli4_hba.max_cfg_param.max_xri -
+ lpfc_sli4_get_els_iocb_cnt(phba);
return rc;
}