diff options
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_provider.h')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_provider.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.h b/drivers/infiniband/hw/mthca/mthca_provider.h index 0598f3905d9a..619710f95a87 100644 --- a/drivers/infiniband/hw/mthca/mthca_provider.h +++ b/drivers/infiniband/hw/mthca/mthca_provider.h | |||
@@ -60,6 +60,24 @@ struct mthca_mr { | |||
60 | u32 first_seg; | 60 | u32 first_seg; |
61 | }; | 61 | }; |
62 | 62 | ||
63 | struct mthca_fmr { | ||
64 | struct ib_fmr ibmr; | ||
65 | struct ib_fmr_attr attr; | ||
66 | int order; | ||
67 | u32 first_seg; | ||
68 | int maps; | ||
69 | union { | ||
70 | struct { | ||
71 | struct mthca_mpt_entry __iomem *mpt; | ||
72 | u64 __iomem *mtts; | ||
73 | } tavor; | ||
74 | struct { | ||
75 | struct mthca_mpt_entry *mpt; | ||
76 | __be64 *mtts; | ||
77 | } arbel; | ||
78 | } mem; | ||
79 | }; | ||
80 | |||
63 | struct mthca_pd { | 81 | struct mthca_pd { |
64 | struct ib_pd ibpd; | 82 | struct ib_pd ibpd; |
65 | u32 pd_num; | 83 | u32 pd_num; |
@@ -218,6 +236,11 @@ struct mthca_sqp { | |||
218 | dma_addr_t header_dma; | 236 | dma_addr_t header_dma; |
219 | }; | 237 | }; |
220 | 238 | ||
239 | static inline struct mthca_fmr *to_mfmr(struct ib_fmr *ibmr) | ||
240 | { | ||
241 | return container_of(ibmr, struct mthca_fmr, ibmr); | ||
242 | } | ||
243 | |||
221 | static inline struct mthca_mr *to_mmr(struct ib_mr *ibmr) | 244 | static inline struct mthca_mr *to_mmr(struct ib_mr *ibmr) |
222 | { | 245 | { |
223 | return container_of(ibmr, struct mthca_mr, ibmr); | 246 | return container_of(ibmr, struct mthca_mr, ibmr); |