aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
authorEli Cohen <eli@dev.mellanox.co.il>2008-04-17 00:09:33 -0400
committerRoland Dreier <rolandd@cisco.com>2008-04-17 00:09:33 -0400
commit3fdcb97f0b8d8a29117dc36acd0b15965d2a2160 (patch)
treea8bad6e48e9654f10e1b8ebfde3b086d83d2756e /drivers/infiniband/hw
parent28d52b3cd8d48ef0ff77d4a8a7a21fc2816bb0a5 (diff)
IB/mlx4: Add support for modifying CQ moderation parameters
Signed-off-by: Eli Cohen <eli@mellnaox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/mlx4/cq.c8
-rw-r--r--drivers/infiniband/hw/mlx4/main.c1
-rw-r--r--drivers/infiniband/hw/mlx4/mlx4_ib.h1
3 files changed, 10 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx4/cq.c b/drivers/infiniband/hw/mlx4/cq.c
index 7d70af7952b0..e4fb64b118e3 100644
--- a/drivers/infiniband/hw/mlx4/cq.c
+++ b/drivers/infiniband/hw/mlx4/cq.c
@@ -85,6 +85,14 @@ static struct mlx4_cqe *next_cqe_sw(struct mlx4_ib_cq *cq)
85 return get_sw_cqe(cq, cq->mcq.cons_index); 85 return get_sw_cqe(cq, cq->mcq.cons_index);
86} 86}
87 87
88int mlx4_ib_modify_cq(struct ib_cq *cq, u16 cq_count, u16 cq_period)
89{
90 struct mlx4_ib_cq *mcq = to_mcq(cq);
91 struct mlx4_ib_dev *dev = to_mdev(cq->device);
92
93 return mlx4_cq_modify(dev->dev, &mcq->mcq, cq_count, cq_period);
94}
95
88struct ib_cq *mlx4_ib_create_cq(struct ib_device *ibdev, int entries, int vector, 96struct ib_cq *mlx4_ib_create_cq(struct ib_device *ibdev, int entries, int vector,
89 struct ib_ucontext *context, 97 struct ib_ucontext *context,
90 struct ib_udata *udata) 98 struct ib_udata *udata)
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
index e9330a0d6c03..76dd45c764b4 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -609,6 +609,7 @@ static void *mlx4_ib_add(struct mlx4_dev *dev)
609 ibdev->ib_dev.post_send = mlx4_ib_post_send; 609 ibdev->ib_dev.post_send = mlx4_ib_post_send;
610 ibdev->ib_dev.post_recv = mlx4_ib_post_recv; 610 ibdev->ib_dev.post_recv = mlx4_ib_post_recv;
611 ibdev->ib_dev.create_cq = mlx4_ib_create_cq; 611 ibdev->ib_dev.create_cq = mlx4_ib_create_cq;
612 ibdev->ib_dev.modify_cq = mlx4_ib_modify_cq;
612 ibdev->ib_dev.destroy_cq = mlx4_ib_destroy_cq; 613 ibdev->ib_dev.destroy_cq = mlx4_ib_destroy_cq;
613 ibdev->ib_dev.poll_cq = mlx4_ib_poll_cq; 614 ibdev->ib_dev.poll_cq = mlx4_ib_poll_cq;
614 ibdev->ib_dev.req_notify_cq = mlx4_ib_arm_cq; 615 ibdev->ib_dev.req_notify_cq = mlx4_ib_arm_cq;
diff --git a/drivers/infiniband/hw/mlx4/mlx4_ib.h b/drivers/infiniband/hw/mlx4/mlx4_ib.h
index 3f8bd0a37b96..ef8ad96e1432 100644
--- a/drivers/infiniband/hw/mlx4/mlx4_ib.h
+++ b/drivers/infiniband/hw/mlx4/mlx4_ib.h
@@ -254,6 +254,7 @@ struct ib_mr *mlx4_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
254 struct ib_udata *udata); 254 struct ib_udata *udata);
255int mlx4_ib_dereg_mr(struct ib_mr *mr); 255int mlx4_ib_dereg_mr(struct ib_mr *mr);
256 256
257int mlx4_ib_modify_cq(struct ib_cq *cq, u16 cq_count, u16 cq_period);
257struct ib_cq *mlx4_ib_create_cq(struct ib_device *ibdev, int entries, int vector, 258struct ib_cq *mlx4_ib_create_cq(struct ib_device *ibdev, int entries, int vector,
258 struct ib_ucontext *context, 259 struct ib_ucontext *context,
259 struct ib_udata *udata); 260 struct ib_udata *udata);