mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
RDMA/bnxt_re: Restrict the max_gids to 256
Some adapters report more than 256 gid entries. Restrict it to 256 for
now.
Fixes: 1ac5a4047975("RDMA/bnxt_re: Add bnxt_re RoCE driver")
Link: https://lore.kernel.org/r/1598292876-26529-6-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Naresh Kumar PBS <nareshkumar.pbs@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
committed by
Jason Gunthorpe
parent
f86b31c6a2
commit
847b97887e
@@ -149,7 +149,7 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw,
|
|||||||
attr->max_inline_data = le32_to_cpu(sb->max_inline_data);
|
attr->max_inline_data = le32_to_cpu(sb->max_inline_data);
|
||||||
attr->l2_db_size = (sb->l2_db_space_size + 1) *
|
attr->l2_db_size = (sb->l2_db_space_size + 1) *
|
||||||
(0x01 << RCFW_DBR_BASE_PAGE_SHIFT);
|
(0x01 << RCFW_DBR_BASE_PAGE_SHIFT);
|
||||||
attr->max_sgid = le32_to_cpu(sb->max_gid);
|
attr->max_sgid = BNXT_QPLIB_NUM_GIDS_SUPPORTED;
|
||||||
|
|
||||||
bnxt_qplib_query_version(rcfw, attr->fw_ver);
|
bnxt_qplib_query_version(rcfw, attr->fw_ver);
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
struct bnxt_qplib_dev_attr {
|
struct bnxt_qplib_dev_attr {
|
||||||
#define FW_VER_ARR_LEN 4
|
#define FW_VER_ARR_LEN 4
|
||||||
u8 fw_ver[FW_VER_ARR_LEN];
|
u8 fw_ver[FW_VER_ARR_LEN];
|
||||||
|
#define BNXT_QPLIB_NUM_GIDS_SUPPORTED 256
|
||||||
u16 max_sgid;
|
u16 max_sgid;
|
||||||
u16 max_mrw;
|
u16 max_mrw;
|
||||||
u32 max_qp;
|
u32 max_qp;
|
||||||
|
|||||||
Reference in New Issue
Block a user