diff options
author | Yevgeny Petrilin <yevgenyp@mellanox.co.il> | 2008-04-29 13:46:50 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-29 13:46:50 -0700 |
commit | e463c7b197dbe64b8a99b0612c65f286937e5bf1 (patch) | |
tree | aadd360d04b9cdf7eaf7d4eed1f79bd29a3b12df /drivers/net/mlx4 | |
parent | 7663c1e2792a9662b23dec6e19bfcd3d55360b8f (diff) | |
download | talos-op-linux-e463c7b197dbe64b8a99b0612c65f286937e5bf1.tar.gz talos-op-linux-e463c7b197dbe64b8a99b0612c65f286937e5bf1.zip |
mlx4_core: Add a way to set the "collapsed" CQ flag
Extend the mlx4_cq_resize() API with a way to set the "collapsed" flag
for the CQ being created.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/net/mlx4')
-rw-r--r-- | drivers/net/mlx4/cq.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/mlx4/cq.c b/drivers/net/mlx4/cq.c index 6fda0af9d0a6..95e87a2f8896 100644 --- a/drivers/net/mlx4/cq.c +++ b/drivers/net/mlx4/cq.c @@ -188,7 +188,8 @@ int mlx4_cq_resize(struct mlx4_dev *dev, struct mlx4_cq *cq, EXPORT_SYMBOL_GPL(mlx4_cq_resize); int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, struct mlx4_mtt *mtt, - struct mlx4_uar *uar, u64 db_rec, struct mlx4_cq *cq) + struct mlx4_uar *uar, u64 db_rec, struct mlx4_cq *cq, + int collapsed) { struct mlx4_priv *priv = mlx4_priv(dev); struct mlx4_cq_table *cq_table = &priv->cq_table; @@ -224,6 +225,7 @@ int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, struct mlx4_mtt *mtt, cq_context = mailbox->buf; memset(cq_context, 0, sizeof *cq_context); + cq_context->flags = cpu_to_be32(!!collapsed << 18); cq_context->logsize_usrpage = cpu_to_be32((ilog2(nent) << 24) | uar->index); cq_context->comp_eqn = priv->eq_table.eq[MLX4_EQ_COMP].eqn; cq_context->log_page_size = mtt->page_shift - MLX4_ICM_PAGE_SHIFT; |