Commit 7788278f authored by Kalesh AP's avatar Kalesh AP Committed by Leon Romanovsky
Browse files

RDMA/bnxt_re: Use macro instead of hard coded value



1. Defined a macro for the hard coded value.
2. "access" field in the request structure is of type "u8".
   Updated the mask accordingly.

Signed-off-by: default avatarKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: default avatarShravya KN <shravya.k-n@broadcom.com>
Link: https://patch.msgid.link/20250704043857.19158-4-kalesh-anakkur.purayil@broadcom.com


Reviewed-by: default avatarHongguang Gao <hongguang.gao@broadcom.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent 0aed8173
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -674,7 +674,7 @@ int bnxt_qplib_reg_mr(struct bnxt_qplib_res *res, struct bnxt_qplib_mrw *mr,
	req.log2_pbl_pg_size = cpu_to_le16(((ilog2(PAGE_SIZE) <<
				 CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_SFT) &
				CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_MASK));
	req.access = (mr->access_flags & 0xFFFF);
	req.access = (mr->access_flags & BNXT_QPLIB_MR_ACCESS_MASK);
	req.va = cpu_to_le64(mr->va);
	req.key = cpu_to_le32(mr->lkey);
	if (_is_alloc_mr_unified(res->dattr->dev_cap_flags))
+1 −0
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ struct bnxt_qplib_mrw {
	struct bnxt_qplib_pd		*pd;
	int				type;
	u32				access_flags;
#define BNXT_QPLIB_MR_ACCESS_MASK	0xFF
#define BNXT_QPLIB_FR_PMR		0x80000000
	u32				lkey;
	u32				rkey;