diff options
author | James Smart <jsmart2021@gmail.com> | 2018-03-05 23:04:08 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-03-13 04:55:24 +0300 |
commit | f44ac12f1dcccf4a6315cbe34129adb7aa8497ba (patch) | |
tree | c81b606ea31477bdc25215184574b587aeda078e /drivers/scsi/lpfc/lpfc_attr.c | |
parent | e29d74f8eb1450b0b6c4736210d76cb56ef40e1d (diff) | |
download | linux-f44ac12f1dcccf4a6315cbe34129adb7aa8497ba.tar.xz |
scsi: lpfc: Memory allocation error during driver start-up on power8
The driver fails to allocate command buffers in the routine
lpfc_new_scsi_buf_s4
There is an inconsistency between lpfc_mem_alloc(), where the
phba->lpfc_sg_dma_buf_pool is created, and lpfc_new_scsi_buf_s4(),
when we allocate a buffer from the pool and check the alignment. The
alignment should be on a page boundary, based on LPFC_SLI3_BG_ENABLED in
sli3_options, for both cases.
Fix by explicitly tracking sli4 vs sli3 and BG options. The result is that
phba->cfg_sg_dma_buf_size is now set correctly for SLI-4.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_attr.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_attr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 46f6d97d21d6..2ac1d21c553f 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -6344,6 +6344,10 @@ lpfc_get_cfgparam(struct lpfc_hba *phba) phba->cfg_poll = 0; else phba->cfg_poll = lpfc_poll; + + if (phba->cfg_enable_bg) + phba->sli3_options |= LPFC_SLI3_BG_ENABLED; + lpfc_suppress_rsp_init(phba, lpfc_suppress_rsp); lpfc_enable_fc4_type_init(phba, lpfc_enable_fc4_type); |