[patch 173/198] IB/mthca: only free doorbell records in mem-free mode

From: akpm
Date: Tue Apr 12 2005 - 12:48:55 EST



From: Roland Dreier <roland@xxxxxxxxxxx>

On error path, only free doorbell records if we're in mem-free mode.

Signed-off-by: Roland Dreier <roland@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

25-akpm/drivers/infiniband/hw/mthca/mthca_cq.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff -puN drivers/infiniband/hw/mthca/mthca_cq.c~ib-mthca-only-free-doorbell-records-in-mem-free-mode drivers/infiniband/hw/mthca/mthca_cq.c
--- 25/drivers/infiniband/hw/mthca/mthca_cq.c~ib-mthca-only-free-doorbell-records-in-mem-free-mode 2005-04-12 03:21:44.685343696 -0700
+++ 25-akpm/drivers/infiniband/hw/mthca/mthca_cq.c 2005-04-12 03:21:44.688343240 -0700
@@ -817,10 +817,12 @@ err_out_free_mr:
err_out_mailbox:
kfree(mailbox);

- mthca_free_db(dev, MTHCA_DB_TYPE_CQ_ARM, cq->arm_db_index);
+ if (dev->hca_type == ARBEL_NATIVE)
+ mthca_free_db(dev, MTHCA_DB_TYPE_CQ_ARM, cq->arm_db_index);

err_out_ci:
- mthca_free_db(dev, MTHCA_DB_TYPE_CQ_SET_CI, cq->set_ci_db_index);
+ if (dev->hca_type == ARBEL_NATIVE)
+ mthca_free_db(dev, MTHCA_DB_TYPE_CQ_SET_CI, cq->set_ci_db_index);

err_out_icm:
mthca_table_put(dev, dev->cq_table.table, cq->cqn);
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/