bnxt_en: Bug fixes for 57500 chips.
Michael Chan
maintainercover bnxt_en: Bug fixes for 57500 chips.
Two small bug fixes for ring checking and context memory allocation that affect the new 57500 chips.
Michael Chan (2):
bnxt_en: Fix ring checking logic on 57500 chips.
bnxt_en: Fix context memory allocation.
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 12 ++++++++---- drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 5 +++-- 2 files changed, 11 insertions(+), 6 deletions(-)
Signature · 1 line
2.5.1
Michael Chan
maintainerPATCH 1/2 bnxt_en: Fix ring checking logic on 57500 chips.
In bnxt_hwrm_check_pf_rings(), add the proper flag to test the NQ resources. Without the proper flag, the firmware will change the NQ resource allocation and remap the IRQ, causing missing IRQs. This issue shows up when adding MQPRIO TX queues, for example.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 ++- drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +2 -1
@@ -5601,7 +5601,8 @@ static int bnxt_hwrm_check_pf_rings(struct bnxt *bp, int tx_rings, int rx_rings,FUNC_CFG_REQ_FLAGS_STAT_CTX_ASSETS_TEST |FUNC_CFG_REQ_FLAGS_VNIC_ASSETS_TEST ;if (bp->flags &BNXT_FLAG_CHIP_P5 ) - flags |=FUNC_CFG_REQ_FLAGS_RSSCOS_CTX_ASSETS_TEST ; + flags |=FUNC_CFG_REQ_FLAGS_RSSCOS_CTX_ASSETS_TEST | +FUNC_CFG_REQ_FLAGS_NQ_ASSETS_TEST ;else flags |=FUNC_CFG_REQ_FLAGS_RING_GRP_ASSETS_TEST ; }
drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h +3 -2
@@ -386,8 +386,8 @@ struct hwrm_err_output {#define HWRM_VERSION_MAJOR 1#define HWRM_VERSION_MINOR 10#define HWRM_VERSION_UPDATE 0 -#define HWRM_VERSION_RSVD 33 -#define HWRM_VERSION_STR "1.10.0.33" +#define HWRM_VERSION_RSVD 35 +#define HWRM_VERSION_STR "1.10.0.35"/* hwrm_ver_get_input (size:192b/24B) */ struct hwrm_ver_get_input {
@@ -1184,6 +1184,7 @@ struct hwrm_func_cfg_input {#define FUNC_CFG_REQ_FLAGS_L2_CTX_ASSETS_TEST 0x100000UL#define FUNC_CFG_REQ_FLAGS_TRUSTED_VF_ENABLE 0x200000UL#define FUNC_CFG_REQ_FLAGS_DYNAMIC_TX_RING_ALLOC 0x400000UL +#define FUNC_CFG_REQ_FLAGS_NQ_ASSETS_TEST 0x800000UL__le32 enables;#define FUNC_CFG_REQ_ENABLES_MTU 0x1UL#define FUNC_CFG_REQ_ENABLES_MRU 0x2UL
Signature · 1 line
2.5.1
Michael Chan
maintainerPATCH 2/2 bnxt_en: Fix context memory allocation.
In reply to Michael ChanWhen allocating memory pages for context memory, if the last page table should be fully populated, the current code will set nr_pages to 0 when calling bnxt_alloc_ctx_mem_blk(). This will cause the last page table to be completely blank and causing some RDMA failures.
Fix it by setting the last page table's nr_pages to the remainder only if it is non-zero.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +6 -3
@@ -6222,9 +6222,12 @@ static int bnxt_alloc_ctx_pg_tbls(struct bnxt *bp, rmem->pg_tbl_map = ctx_pg->ctx_dma_arr[i]; rmem->depth =1 ; rmem->nr_pages =MAX_CTX_PAGES ; -if (i == (nr_tbls -1 )) - rmem->nr_pages = ctx_pg->nr_pages % -MAX_CTX_PAGES ; +if (i == (nr_tbls -1 )) { +int rem = ctx_pg->nr_pages %MAX_CTX_PAGES ; + +if (rem) + rmem->nr_pages = rem; + } rc =bnxt_alloc_ctx_mem_blk (bp, pg_tbl);if (rc)break ;
Signature · 1 line
2.5.1
David Miller
maintainerFrom: Michael Chan <[email protected]>
Date: Sat, 12 Jan 2019 00:13:03 -0500
Quoted 2 lines
Two small bug fixes for ring checking and context memory allocation that affect the new 57500 chips.
Series applied, thanks Michael.
Should I queue these up for -stable?
Michael Chan
maintainerQuoted 10 lines · David Miller
From: Michael Chan <[email protected]>
Date: Sat, 12 Jan 2019 00:13:03 -0500Quoted 2 lines
Two small bug fixes for ring checking and context memory allocation that affect the new 57500 chips.
Series applied, thanks Michael.
Should I queue these up for -stable?
No, the patches are relevant for the current net tree only. Thanks.