diff options
author | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-12-04 23:27:43 -0500 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-12-04 23:27:43 -0500 |
commit | 14d676f56fad26fd3c31eeff5d4ef8ea4a163571 (patch) | |
tree | 5e740c5931daecf44a6e74c230f2deb291290f4b /drivers/infiniband/hw/mlx4/cq.c | |
parent | 797eaed40e1df4a3b9ece6894a71ce2b568bca38 (diff) | |
parent | feaf3848a813a106f163013af6fcf6c4bfec92d9 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/infiniband/hw/mlx4/cq.c')
-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); |