diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 17:02:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 17:02:48 -0400 |
commit | f12c03722045882a50c270f6332cf2c7b16a83d2 (patch) | |
tree | 91744cede0a86272abd34fd5946a06e486abc2bc /drivers/net/mlx4 | |
parent | eeb85d0b0e312ab9a6c3476f18308409913ab369 (diff) | |
parent | 7495ab6837ea4660f5e14ad49e5bfc558d6862e7 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
RDMA/nes: Formatting cleanup
RDMA/nes: Add support for SFP+ PHY
RDMA/nes: Use LRO
IPoIB: Copy child MTU from parent
IB/mthca: Avoid changing userspace ABI to handle DMA write barrier attribute
IB/mthca: Avoid recycling old FMR R_Keys too soon
mlx4_core: Avoid recycling old FMR R_Keys too soon
IB/ehca: Allocate event queue size depending on max number of CQs and QPs
IPoIB: Use separate CQ for UD send completions
IB/iser: Count FMR alignment violations per session
IB/iser: Move high-volume debug output to higher debug level
IB/ehca: handle negative return value from ibmebus_request_irq() properly
RDMA/cxgb3: Support peer-2-peer connection setup
RDMA/cxgb3: Set the max_mr_size device attribute correctly
RDMA/cxgb3: Correctly serialize peer abort path
mlx4_core: Add a way to set the "collapsed" CQ flag
Diffstat (limited to 'drivers/net/mlx4')
-rw-r--r-- | drivers/net/mlx4/cq.c | 4 | ||||
-rw-r--r-- | drivers/net/mlx4/mr.c | 6 |
2 files changed, 3 insertions, 7 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, | |||
188 | EXPORT_SYMBOL_GPL(mlx4_cq_resize); | 188 | EXPORT_SYMBOL_GPL(mlx4_cq_resize); |
189 | 189 | ||
190 | int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, struct mlx4_mtt *mtt, | 190 | int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, struct mlx4_mtt *mtt, |
191 | struct mlx4_uar *uar, u64 db_rec, struct mlx4_cq *cq) | 191 | struct mlx4_uar *uar, u64 db_rec, struct mlx4_cq *cq, |
192 | int collapsed) | ||
192 | { | 193 | { |
193 | struct mlx4_priv *priv = mlx4_priv(dev); | 194 | struct mlx4_priv *priv = mlx4_priv(dev); |
194 | struct mlx4_cq_table *cq_table = &priv->cq_table; | 195 | 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, | |||
224 | cq_context = mailbox->buf; | 225 | cq_context = mailbox->buf; |
225 | memset(cq_context, 0, sizeof *cq_context); | 226 | memset(cq_context, 0, sizeof *cq_context); |
226 | 227 | ||
228 | cq_context->flags = cpu_to_be32(!!collapsed << 18); | ||
227 | cq_context->logsize_usrpage = cpu_to_be32((ilog2(nent) << 24) | uar->index); | 229 | cq_context->logsize_usrpage = cpu_to_be32((ilog2(nent) << 24) | uar->index); |
228 | cq_context->comp_eqn = priv->eq_table.eq[MLX4_EQ_COMP].eqn; | 230 | cq_context->comp_eqn = priv->eq_table.eq[MLX4_EQ_COMP].eqn; |
229 | cq_context->log_page_size = mtt->page_shift - MLX4_ICM_PAGE_SHIFT; | 231 | cq_context->log_page_size = mtt->page_shift - MLX4_ICM_PAGE_SHIFT; |
diff --git a/drivers/net/mlx4/mr.c b/drivers/net/mlx4/mr.c index 79b317b88c86..cb46446b2691 100644 --- a/drivers/net/mlx4/mr.c +++ b/drivers/net/mlx4/mr.c | |||
@@ -607,15 +607,9 @@ EXPORT_SYMBOL_GPL(mlx4_fmr_enable); | |||
607 | void mlx4_fmr_unmap(struct mlx4_dev *dev, struct mlx4_fmr *fmr, | 607 | void mlx4_fmr_unmap(struct mlx4_dev *dev, struct mlx4_fmr *fmr, |
608 | u32 *lkey, u32 *rkey) | 608 | u32 *lkey, u32 *rkey) |
609 | { | 609 | { |
610 | u32 key; | ||
611 | |||
612 | if (!fmr->maps) | 610 | if (!fmr->maps) |
613 | return; | 611 | return; |
614 | 612 | ||
615 | key = key_to_hw_index(fmr->mr.key); | ||
616 | key &= dev->caps.num_mpts - 1; | ||
617 | *lkey = *rkey = fmr->mr.key = hw_index_to_key(key); | ||
618 | |||
619 | fmr->maps = 0; | 613 | fmr->maps = 0; |
620 | 614 | ||
621 | *(u8 *) fmr->mpt = MLX4_MPT_STATUS_SW; | 615 | *(u8 *) fmr->mpt = MLX4_MPT_STATUS_SW; |