diff options
author | Roland Dreier <rolandd@cisco.com> | 2008-12-01 19:11:50 +0100 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-12-01 19:11:50 +0100 |
commit | b0f43dcca8a1f46e17b26d10f3cb1b297ebfb44e (patch) | |
tree | b1e3ef2a96f22fe9848281d0ad2701b0c5fc6f7e /drivers/infiniband | |
parent | IB/ehca: Fix problem with generated flush work completions (diff) | |
parent | IB/mlx4: Fix MTT leakage in resize CQ (diff) | |
download | linux-b0f43dcca8a1f46e17b26d10f3cb1b297ebfb44e.tar.xz linux-b0f43dcca8a1f46e17b26d10f3cb1b297ebfb44e.zip |
Merge branches 'ehca' and 'mlx4' into for-linus
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/mlx4/cq.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx4/cq.c b/drivers/infiniband/hw/mlx4/cq.c index d0866a3636e2..18308494a195 100644 --- a/drivers/infiniband/hw/mlx4/cq.c +++ b/drivers/infiniband/hw/mlx4/cq.c @@ -343,6 +343,7 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata) { struct mlx4_ib_dev *dev = to_mdev(ibcq->device); struct mlx4_ib_cq *cq = to_mcq(ibcq); + struct mlx4_mtt mtt; int outst_cqe; int err; @@ -376,10 +377,13 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata) goto out; } + mtt = cq->buf.mtt; + err = mlx4_cq_resize(dev->dev, &cq->mcq, entries, &cq->resize_buf->buf.mtt); if (err) goto err_buf; + mlx4_mtt_cleanup(dev->dev, &mtt); if (ibcq->uobject) { cq->buf = cq->resize_buf->buf; cq->ibcq.cqe = cq->resize_buf->cqe; @@ -406,6 +410,7 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata) goto out; err_buf: + mlx4_mtt_cleanup(dev->dev, &cq->resize_buf->buf.mtt); if (!ibcq->uobject) mlx4_ib_free_cq_buf(dev, &cq->resize_buf->buf, cq->resize_buf->cqe); |