aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx4/device.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mlx4/device.h')
-rw-r--r--include/linux/mlx4/device.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index cfb78fb2c046..222815d91c40 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -49,6 +49,10 @@ enum {
49}; 49};
50 50
51enum { 51enum {
52 MLX4_BOARD_ID_LEN = 64
53};
54
55enum {
52 MLX4_DEV_CAP_FLAG_RC = 1 << 0, 56 MLX4_DEV_CAP_FLAG_RC = 1 << 0,
53 MLX4_DEV_CAP_FLAG_UC = 1 << 1, 57 MLX4_DEV_CAP_FLAG_UC = 1 << 1,
54 MLX4_DEV_CAP_FLAG_UD = 1 << 2, 58 MLX4_DEV_CAP_FLAG_UD = 1 << 2,
@@ -210,6 +214,17 @@ struct mlx4_mr {
210 int enabled; 214 int enabled;
211}; 215};
212 216
217struct mlx4_fmr {
218 struct mlx4_mr mr;
219 struct mlx4_mpt_entry *mpt;
220 __be64 *mtts;
221 dma_addr_t dma_handle;
222 int max_pages;
223 int max_maps;
224 int maps;
225 u8 page_shift;
226};
227
213struct mlx4_uar { 228struct mlx4_uar {
214 unsigned long pfn; 229 unsigned long pfn;
215 int index; 230 int index;
@@ -272,6 +287,8 @@ struct mlx4_dev {
272 unsigned long flags; 287 unsigned long flags;
273 struct mlx4_caps caps; 288 struct mlx4_caps caps;
274 struct radix_tree_root qp_table_tree; 289 struct radix_tree_root qp_table_tree;
290 u32 rev_id;
291 char board_id[MLX4_BOARD_ID_LEN];
275}; 292};
276 293
277struct mlx4_init_port_param { 294struct mlx4_init_port_param {
@@ -331,4 +348,14 @@ int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port);
331int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]); 348int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]);
332int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]); 349int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]);
333 350
351int mlx4_map_phys_fmr(struct mlx4_dev *dev, struct mlx4_fmr *fmr, u64 *page_list,
352 int npages, u64 iova, u32 *lkey, u32 *rkey);
353int mlx4_fmr_alloc(struct mlx4_dev *dev, u32 pd, u32 access, int max_pages,
354 int max_maps, u8 page_shift, struct mlx4_fmr *fmr);
355int mlx4_fmr_enable(struct mlx4_dev *dev, struct mlx4_fmr *fmr);
356void mlx4_fmr_unmap(struct mlx4_dev *dev, struct mlx4_fmr *fmr,
357 u32 *lkey, u32 *rkey);
358int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr);
359int mlx4_SYNC_TPT(struct mlx4_dev *dev);
360
334#endif /* MLX4_DEVICE_H */ 361#endif /* MLX4_DEVICE_H */