Commit 137ddf03 authored by James Smart's avatar James Smart Committed by Martin K. Petersen

scsi: lpfc: Use PBDE feature enabled bit to determine PBDE support

The SLI4 interface changed the manner used to indicate PBDE support.
Rework the driver to check for PBDE support via the PBDE feature bit in
COMMON_GET_SLI4_PARAMETERS.

Link: https://lore.kernel.org/r/20210707184351.67872-14-jsmart2021@gmail.comCo-developed-by: default avatarJustin Tee <justin.tee@broadcom.com>
Signed-off-by: default avatarJustin Tee <justin.tee@broadcom.com>
Signed-off-by: default avatarJames Smart <jsmart2021@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent a9978e39
......@@ -3334,17 +3334,20 @@ struct lpfc_sli4_parameters {
#define cfg_nosr_SHIFT 9
#define cfg_nosr_MASK 0x00000001
#define cfg_nosr_WORD word19
#define cfg_bv1s_SHIFT 10
#define cfg_bv1s_MASK 0x00000001
#define cfg_bv1s_WORD word19
#define cfg_pvl_SHIFT 13
#define cfg_pvl_MASK 0x00000001
#define cfg_pvl_WORD word19
#define cfg_nsler_SHIFT 12
#define cfg_nsler_MASK 0x00000001
#define cfg_nsler_WORD word19
#define cfg_pvl_SHIFT 13
#define cfg_pvl_MASK 0x00000001
#define cfg_pvl_WORD word19
#define cfg_pbde_SHIFT 20
#define cfg_pbde_MASK 0x00000001
#define cfg_pbde_WORD word19
uint32_t word20;
#define cfg_max_tow_xri_SHIFT 0
......
......@@ -12268,9 +12268,10 @@ lpfc_get_sli4_parameters(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
if (phba->cfg_enable_fc4_type & LPFC_ENABLE_NVME)
phba->cfg_sg_seg_cnt = LPFC_MAX_NVME_SEG_CNT;
/* Only embed PBDE for if_type 6, PBDE support requires xib be set */
if ((bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) !=
LPFC_SLI_INTF_IF_TYPE_6) || (!bf_get(cfg_xib, mbx_sli4_parameters)))
/* Enable embedded Payload BDE if support is indicated */
if (bf_get(cfg_pbde, mbx_sli4_parameters))
phba->cfg_enable_pbde = 1;
else
phba->cfg_enable_pbde = 0;
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment