diff options
author | Roland Dreier <roland@eddore.topspincom.com> | 2005-08-18 16:39:31 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-08-26 23:37:37 -0400 |
commit | 87b816706bb2b79fbaff8e0b8e279e783273383e (patch) | |
tree | 94e9a87fd5cbf1f069cba4e8a766ef718d18e5e4 /drivers/infiniband/hw/mthca/mthca_dev.h | |
parent | f520ba5aa48e2891c3fb3e364eeaaab4212c7c45 (diff) |
[PATCH] IB/mthca: Factor out common queue alloc code
Clean up the allocation of memory for queues by factoring out the
common code into mthca_buf_alloc() and mthca_buf_free(). Now CQs and
QPs share the same queue allocation code, which we'll also use for SRQs.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_dev.h')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_dev.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_dev.h b/drivers/infiniband/hw/mthca/mthca_dev.h index 0f90a173ecee..cb78b5d07201 100644 --- a/drivers/infiniband/hw/mthca/mthca_dev.h +++ b/drivers/infiniband/hw/mthca/mthca_dev.h | |||
@@ -361,6 +361,11 @@ int mthca_array_set(struct mthca_array *array, int index, void *value); | |||
361 | void mthca_array_clear(struct mthca_array *array, int index); | 361 | void mthca_array_clear(struct mthca_array *array, int index); |
362 | int mthca_array_init(struct mthca_array *array, int nent); | 362 | int mthca_array_init(struct mthca_array *array, int nent); |
363 | void mthca_array_cleanup(struct mthca_array *array, int nent); | 363 | void mthca_array_cleanup(struct mthca_array *array, int nent); |
364 | int mthca_buf_alloc(struct mthca_dev *dev, int size, int max_direct, | ||
365 | union mthca_buf *buf, int *is_direct, struct mthca_pd *pd, | ||
366 | int hca_write, struct mthca_mr *mr); | ||
367 | void mthca_buf_free(struct mthca_dev *dev, int size, union mthca_buf *buf, | ||
368 | int is_direct, struct mthca_mr *mr); | ||
364 | 369 | ||
365 | int mthca_init_uar_table(struct mthca_dev *dev); | 370 | int mthca_init_uar_table(struct mthca_dev *dev); |
366 | int mthca_init_pd_table(struct mthca_dev *dev); | 371 | int mthca_init_pd_table(struct mthca_dev *dev); |