mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 08:02:59 -04:00
RDMA/bnxt_re: Add support for modify_device hook
Adds support for modify_device in the driver for node desc changes. Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Link: https://patch.msgid.link/1729065346-1364-5-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
committed by
Leon Romanovsky
parent
9c4927cacc
commit
9a420bb2b4
@@ -211,6 +211,22 @@ int bnxt_re_query_device(struct ib_device *ibdev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int bnxt_re_modify_device(struct ib_device *ibdev,
|
||||
int device_modify_mask,
|
||||
struct ib_device_modify *device_modify)
|
||||
{
|
||||
ibdev_dbg(ibdev, "Modify device with mask 0x%x", device_modify_mask);
|
||||
|
||||
if (device_modify_mask & ~IB_DEVICE_MODIFY_NODE_DESC)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (!(device_modify_mask & IB_DEVICE_MODIFY_NODE_DESC))
|
||||
return 0;
|
||||
|
||||
memcpy(ibdev->node_desc, device_modify->node_desc, IB_DEVICE_NODE_DESC_MAX);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Port */
|
||||
int bnxt_re_query_port(struct ib_device *ibdev, u32 port_num,
|
||||
struct ib_port_attr *port_attr)
|
||||
|
||||
@@ -196,6 +196,9 @@ static inline bool bnxt_re_is_var_size_supported(struct bnxt_re_dev *rdev,
|
||||
int bnxt_re_query_device(struct ib_device *ibdev,
|
||||
struct ib_device_attr *ib_attr,
|
||||
struct ib_udata *udata);
|
||||
int bnxt_re_modify_device(struct ib_device *ibdev,
|
||||
int device_modify_mask,
|
||||
struct ib_device_modify *device_modify);
|
||||
int bnxt_re_query_port(struct ib_device *ibdev, u32 port_num,
|
||||
struct ib_port_attr *port_attr);
|
||||
int bnxt_re_get_port_immutable(struct ib_device *ibdev, u32 port_num,
|
||||
|
||||
@@ -911,6 +911,7 @@ static const struct ib_device_ops bnxt_re_dev_ops = {
|
||||
.post_srq_recv = bnxt_re_post_srq_recv,
|
||||
.query_ah = bnxt_re_query_ah,
|
||||
.query_device = bnxt_re_query_device,
|
||||
.modify_device = bnxt_re_modify_device,
|
||||
.query_pkey = bnxt_re_query_pkey,
|
||||
.query_port = bnxt_re_query_port,
|
||||
.query_qp = bnxt_re_query_qp,
|
||||
|
||||
Reference in New Issue
Block a user