Broadcom's roce driver bug fixes
Subsystems (2)
v3 cover Broadcom's roce driver bug fixes
This submission for for-next branch contains 3 patches, first two patches are important urgent fixes for Gen P5 device. The first patch deals with device detection in device open. While second patch fixes hardware counters.
The third patch fixes few sparse warnings from main.c.
changes from V2 to V3
- moved the series from for-rc to for-next
- added back the sparse warning fix patch.
changes from V1 to V2
- dropped patch related to sparse warnings.
- updated patch description to report the motivation for submission to for-rc branch.
changes for V0 to V1
- originally this series had only 1 patch which is the first patch.
- Added Fixes tag on the first patch.
- added two more patches to fix other quick bug fixes.
Devesh Sharma (2):
RDMA/bnxt_re: fix stat push into dma buffer on gen p5 devices RDMA/bnxt_re: fix sparse warnings
Luke Starrett (1):
RDMA/bnxt_re: Fix chip number validation Broadcom's Gen P5 series
drivers/infiniband/hw/bnxt_re/main.c | 9 +++++---- drivers/infiniband/hw/bnxt_re/qplib_res.h | 8 ++++++-- 2 files changed, 11 insertions(+), 6 deletions(-)
Signature · 1 line
1.8.3.1
PATCH v3 1/3 RDMA/bnxt_re: Fix chip number validation Broadcom's Gen P5 series
From: Luke Starrett <[email protected]>
In the first version of Gen P5 ASIC, chip-id was always set to 0x1750 for all adaptor port configurations. This has been fixed in the new chip rev.
Due to this missing fix the end customer are not able to use adaptors based on latest chip rev of Broadcom's Gen P5 adaptors.
Making a change in chip-number validation check to honor other chip-ids as well.
--- drivers/infiniband/hw/bnxt_re/qplib_res.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/infiniband/hw/bnxt_re/qplib_res.h +6 -2
@@ -186,7 +186,9 @@ struct bnxt_qplib_chip_ctx {u8 chip_metal; }; -#define CHIP_NUM_57500 0x1750 +#define CHIP_NUM_57508 0x1750 +#define CHIP_NUM_57504 0x1751 +#define CHIP_NUM_57502 0x1752struct bnxt_qplib_res {struct pci_dev *pdev;
@@ -203,7 +205,9 @@ struct bnxt_qplib_res {static inline bool bnxt_qplib_is_chip_gen_p5 (struct bnxt_qplib_chip_ctx *cctx) { -return (cctx->chip_num ==CHIP_NUM_57500 ); +return (cctx->chip_num ==CHIP_NUM_57508 || + cctx->chip_num ==CHIP_NUM_57504 || + cctx->chip_num ==CHIP_NUM_57502 ); }static inline u8 bnxt_qplib_get_hwq_type (struct bnxt_qplib_res *res)
Signature · 1 line
1.8.3.1
PATCH v3 2/3 RDMA/bnxt_re: fix stat push into dma buffer on gen p5 devices
In reply to Devesh SharmaDue to recent advances in the firmware for Broadcom's gen p5 series of adaptors the driver code to report hardware counters has been broken w.r.t. roce devices.
Making a change to match the expectaion of newer firmware version when stat dma buffer is created. The new firmware command expects dma length to be specified during stat dma buffer allocation.
--- drivers/infiniband/hw/bnxt_re/main.c | 1 + 1 file changed, 1 insertion(+)
drivers/infiniband/hw/bnxt_re/main.c +1 -0
@@ -494,6 +494,7 @@ static int bnxt_re_net_stats_ctx_alloc(struct bnxt_re_dev *rdev,bnxt_re_init_hwrm_hdr (rdev, (void *)&req,HWRM_STAT_CTX_ALLOC ,-1 ,-1 ); req.update_period_ms =cpu_to_le32 (1000 ); req.stats_dma_addr =cpu_to_le64 (dma_map); + req.stats_dma_length =cpu_to_le16 (sizeof (struct ctx_hw_stats_ext )); req.stat_ctx_flags =STAT_CTX_ALLOC_REQ_STAT_CTX_FLAGS_ROCE ;bnxt_re_fill_fw_msg (&fw_msg, (void *)&req,sizeof (req), (void *)&resp,sizeof (resp),DFLT_HWRM_CMD_TIMEOUT );
Signature · 1 line
1.8.3.1
PATCH v3 3/3 RDMA/bnxt_re: fix sparse warnings
In reply to Devesh SharmaMaking a change to fix following sparse warnings
CHECK drivers/infiniband/hw/bnxt_re/main.cdrivers/infiniband/hw/bnxt_re/main.c:1274:18: warning: cast from restricted __le16 drivers/infiniband/hw/bnxt_re/main.c:1275:18: warning: cast from restricted __le16 drivers/infiniband/hw/bnxt_re/main.c:1276:18: warning: cast from restricted __le16 drivers/infiniband/hw/bnxt_re/main.c:1277:21: warning: restricted __le16 degrades to integer
--- drivers/infiniband/hw/bnxt_re/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/infiniband/hw/bnxt_re/main.c +4 -4
@@ -1291,10 +1291,10 @@ static void bnxt_re_query_hwrm_intf_version(struct bnxt_re_dev *rdev)return ; } rdev->qplib_ctx.hwrm_intf_ver = - (u64 )resp.hwrm_intf_major <<48 | - (u64 )resp.hwrm_intf_minor <<32 | - (u64 )resp.hwrm_intf_build <<16 | - resp.hwrm_intf_patch; + (u64 )le16_to_cpu (resp.hwrm_intf_major) <<48 | + (u64 )le16_to_cpu (resp.hwrm_intf_minor) <<32 | + (u64 )le16_to_cpu (resp.hwrm_intf_build) <<16 | +le16_to_cpu (resp.hwrm_intf_patch); }static void bnxt_re_ib_unreg (struct bnxt_re_dev *rdev)
Signature · 1 line
1.8.3.1
Jason Gunthorpe
AppliedQuoted 5 lines · Devesh Sharma
This submission for for-next branch contains 3 patches, first two patches are important urgent fixes for Gen P5 device. The first patch deals with device detection in device open. While second patch fixes hardware counters.
Quoted 8 lines
The third patch fixes few sparse warnings from
main.c.Devesh Sharma (2):
RDMA/bnxt_re: fix stat push into dma buffer on gen p5 devices RDMA/bnxt_re: fix sparse warningsLuke Starrett (1):
RDMA/bnxt_re: Fix chip number validation Broadcom's Gen P5 series
Applied to for-next, thanks
Jason