Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34d9a270 authored by Yonatan Cohen's avatar Yonatan Cohen Committed by Doug Ledford
Browse files

IB/mlx4: Exposing modify CQ callback to uverbs layer



Exposed mlx4_ib_modify_cq to be called from ib device
verb list.

Signed-off-by: default avatarYonatan Cohen <yonatanc@mellanox.com>
Reviewed-by: default avatarMajd Dibbiny <majd@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 869ddcf8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2750,6 +2750,9 @@ static void *mlx4_ib_add(struct mlx4_dev *dev)
	ibdev->ib_dev.get_dev_fw_str    = get_fw_ver_str;
	ibdev->ib_dev.disassociate_ucontext = mlx4_ib_disassociate_ucontext;

	ibdev->ib_dev.uverbs_ex_cmd_mask |=
		(1ull << IB_USER_VERBS_EX_CMD_MODIFY_CQ);

	if ((dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_RSS) &&
	    ((mlx4_ib_port_link_layer(&ibdev->ib_dev, 1) ==
	    IB_LINK_LAYER_ETHERNET) ||
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@
#include <linux/mlx4/device.h>
#include <linux/mlx4/doorbell.h>
#include <linux/mlx4/qp.h>
#include <linux/mlx4/cq.h>

#define MLX4_IB_DRV_NAME	"mlx4_ib"

+3 −0
Original line number Diff line number Diff line
@@ -136,6 +136,9 @@ enum {
	MLX4_CQE_BAD_FCS                 = 1 << 4,
};

#define MLX4_MAX_CQ_PERIOD (BIT(16) - 1)
#define MLX4_MAX_CQ_COUNT (BIT(16) - 1)

static inline void mlx4_cq_arm(struct mlx4_cq *cq, u32 cmd,
			       void __iomem *uar_page,
			       spinlock_t *doorbell_lock)