diff options
author | Roland Dreier <rolandd@cisco.com> | 2008-12-01 13:11:50 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-12-01 13:11:50 -0500 |
commit | b0f43dcca8a1f46e17b26d10f3cb1b297ebfb44e (patch) | |
tree | b1e3ef2a96f22fe9848281d0ad2701b0c5fc6f7e /drivers/infiniband | |
parent | 7ec4f4634a4326c1f8fd172c80c8f59c9b3e90a4 (diff) | |
parent | 42ab01c31526ac1d06d193f81a498bf3cf2acfe4 (diff) |
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) | |||
343 | { | 343 | { |
344 | struct mlx4_ib_dev *dev = to_mdev(ibcq->device); | 344 | struct mlx4_ib_dev *dev = to_mdev(ibcq->device); |
345 | struct mlx4_ib_cq *cq = to_mcq(ibcq); | 345 | struct mlx4_ib_cq *cq = to_mcq(ibcq); |
346 | struct mlx4_mtt mtt; | ||
346 | int outst_cqe; | 347 | int outst_cqe; |
347 | int err; | 348 | int err; |
348 | 349 | ||
@@ -376,10 +377,13 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata) | |||
376 | goto out; | 377 | goto out; |
377 | } | 378 | } |
378 | 379 | ||
380 | mtt = cq->buf.mtt; | ||
381 | |||
379 | err = mlx4_cq_resize(dev->dev, &cq->mcq, entries, &cq->resize_buf->buf.mtt); | 382 | err = mlx4_cq_resize(dev->dev, &cq->mcq, entries, &cq->resize_buf->buf.mtt); |
380 | if (err) | 383 | if (err) |
381 | goto err_buf; | 384 | goto err_buf; |
382 | 385 | ||
386 | mlx4_mtt_cleanup(dev->dev, &mtt); | ||
383 | if (ibcq->uobject) { | 387 | if (ibcq->uobject) { |
384 | cq->buf = cq->resize_buf->buf; | 388 | cq->buf = cq->resize_buf->buf; |
385 | cq->ibcq.cqe = cq->resize_buf->cqe; | 389 | 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) | |||
406 | goto out; | 410 | goto out; |
407 | 411 | ||
408 | err_buf: | 412 | err_buf: |
413 | mlx4_mtt_cleanup(dev->dev, &cq->resize_buf->buf.mtt); | ||
409 | if (!ibcq->uobject) | 414 | if (!ibcq->uobject) |
410 | mlx4_ib_free_cq_buf(dev, &cq->resize_buf->buf, | 415 | mlx4_ib_free_cq_buf(dev, &cq->resize_buf->buf, |
411 | cq->resize_buf->cqe); | 416 | cq->resize_buf->cqe); |