diff options
author | Yevgeny Petrilin <yevgenyp@mellanox.co.il> | 2008-04-25 17:27:08 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-25 17:27:08 -0400 |
commit | 38ae6a535470b959df67ded6798fc542bb212e19 (patch) | |
tree | 35ee1d5450f0b0f491764ebd22babceb9cbf8f1d /include/linux/mlx4/device.h | |
parent | 31d1e340f0e8d53804d737571b2f2bb28a74ecc5 (diff) |
mlx4_core: Add HW queues allocation helpers
Wrap doorbell, buffer and MTT allocation in helper functions for
ethernet and FC modules to use.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'include/linux/mlx4/device.h')
-rw-r--r-- | include/linux/mlx4/device.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 0a47457931ac..9fa1a8002ce2 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -234,6 +234,12 @@ struct mlx4_db { | |||
234 | int order; | 234 | int order; |
235 | }; | 235 | }; |
236 | 236 | ||
237 | struct mlx4_hwq_resources { | ||
238 | struct mlx4_db db; | ||
239 | struct mlx4_mtt mtt; | ||
240 | struct mlx4_buf buf; | ||
241 | }; | ||
242 | |||
237 | struct mlx4_mr { | 243 | struct mlx4_mr { |
238 | struct mlx4_mtt mtt; | 244 | struct mlx4_mtt mtt; |
239 | u64 iova; | 245 | u64 iova; |
@@ -370,6 +376,11 @@ int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, | |||
370 | int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order); | 376 | int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order); |
371 | void mlx4_db_free(struct mlx4_dev *dev, struct mlx4_db *db); | 377 | void mlx4_db_free(struct mlx4_dev *dev, struct mlx4_db *db); |
372 | 378 | ||
379 | int mlx4_alloc_hwq_res(struct mlx4_dev *dev, struct mlx4_hwq_resources *wqres, | ||
380 | int size, int max_direct); | ||
381 | void mlx4_free_hwq_res(struct mlx4_dev *mdev, struct mlx4_hwq_resources *wqres, | ||
382 | int size); | ||
383 | |||
373 | int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, struct mlx4_mtt *mtt, | 384 | int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, struct mlx4_mtt *mtt, |
374 | struct mlx4_uar *uar, u64 db_rec, struct mlx4_cq *cq); | 385 | struct mlx4_uar *uar, u64 db_rec, struct mlx4_cq *cq); |
375 | void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq); | 386 | void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq); |