diff options
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_cmd.h')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_cmd.h | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.h b/drivers/infiniband/hw/mthca/mthca_cmd.h index a8d4231e886a..ed517f175dd6 100644 --- a/drivers/infiniband/hw/mthca/mthca_cmd.h +++ b/drivers/infiniband/hw/mthca/mthca_cmd.h | |||
@@ -37,8 +37,7 @@ | |||
37 | 37 | ||
38 | #include <ib_verbs.h> | 38 | #include <ib_verbs.h> |
39 | 39 | ||
40 | #define MTHCA_CMD_MAILBOX_ALIGN 16UL | 40 | #define MTHCA_MAILBOX_SIZE 4096 |
41 | #define MTHCA_CMD_MAILBOX_EXTRA (MTHCA_CMD_MAILBOX_ALIGN - 1) | ||
42 | 41 | ||
43 | enum { | 42 | enum { |
44 | /* command completed successfully: */ | 43 | /* command completed successfully: */ |
@@ -112,6 +111,11 @@ enum { | |||
112 | DEV_LIM_FLAG_UD_MULTI = 1 << 21, | 111 | DEV_LIM_FLAG_UD_MULTI = 1 << 21, |
113 | }; | 112 | }; |
114 | 113 | ||
114 | struct mthca_mailbox { | ||
115 | dma_addr_t dma; | ||
116 | void *buf; | ||
117 | }; | ||
118 | |||
115 | struct mthca_dev_lim { | 119 | struct mthca_dev_lim { |
116 | int max_srq_sz; | 120 | int max_srq_sz; |
117 | int max_qp_sz; | 121 | int max_qp_sz; |
@@ -242,6 +246,10 @@ void mthca_cmd_use_polling(struct mthca_dev *dev); | |||
242 | void mthca_cmd_event(struct mthca_dev *dev, u16 token, | 246 | void mthca_cmd_event(struct mthca_dev *dev, u16 token, |
243 | u8 status, u64 out_param); | 247 | u8 status, u64 out_param); |
244 | 248 | ||
249 | struct mthca_mailbox *mthca_alloc_mailbox(struct mthca_dev *dev, | ||
250 | unsigned int gfp_mask); | ||
251 | void mthca_free_mailbox(struct mthca_dev *dev, struct mthca_mailbox *mailbox); | ||
252 | |||
245 | int mthca_SYS_EN(struct mthca_dev *dev, u8 *status); | 253 | int mthca_SYS_EN(struct mthca_dev *dev, u8 *status); |
246 | int mthca_SYS_DIS(struct mthca_dev *dev, u8 *status); | 254 | int mthca_SYS_DIS(struct mthca_dev *dev, u8 *status); |
247 | int mthca_MAP_FA(struct mthca_dev *dev, struct mthca_icm *icm, u8 *status); | 255 | int mthca_MAP_FA(struct mthca_dev *dev, struct mthca_icm *icm, u8 *status); |
@@ -272,41 +280,39 @@ int mthca_MAP_ICM_AUX(struct mthca_dev *dev, struct mthca_icm *icm, u8 *status); | |||
272 | int mthca_UNMAP_ICM_AUX(struct mthca_dev *dev, u8 *status); | 280 | int mthca_UNMAP_ICM_AUX(struct mthca_dev *dev, u8 *status); |
273 | int mthca_SET_ICM_SIZE(struct mthca_dev *dev, u64 icm_size, u64 *aux_pages, | 281 | int mthca_SET_ICM_SIZE(struct mthca_dev *dev, u64 icm_size, u64 *aux_pages, |
274 | u8 *status); | 282 | u8 *status); |
275 | int mthca_SW2HW_MPT(struct mthca_dev *dev, void *mpt_entry, | 283 | int mthca_SW2HW_MPT(struct mthca_dev *dev, struct mthca_mailbox *mailbox, |
276 | int mpt_index, u8 *status); | 284 | int mpt_index, u8 *status); |
277 | int mthca_HW2SW_MPT(struct mthca_dev *dev, void *mpt_entry, | 285 | int mthca_HW2SW_MPT(struct mthca_dev *dev, struct mthca_mailbox *mailbox, |
278 | int mpt_index, u8 *status); | 286 | int mpt_index, u8 *status); |
279 | int mthca_WRITE_MTT(struct mthca_dev *dev, u64 *mtt_entry, | 287 | int mthca_WRITE_MTT(struct mthca_dev *dev, struct mthca_mailbox *mailbox, |
280 | int num_mtt, u8 *status); | 288 | int num_mtt, u8 *status); |
281 | int mthca_SYNC_TPT(struct mthca_dev *dev, u8 *status); | 289 | int mthca_SYNC_TPT(struct mthca_dev *dev, u8 *status); |
282 | int mthca_MAP_EQ(struct mthca_dev *dev, u64 event_mask, int unmap, | 290 | int mthca_MAP_EQ(struct mthca_dev *dev, u64 event_mask, int unmap, |
283 | int eq_num, u8 *status); | 291 | int eq_num, u8 *status); |
284 | int mthca_SW2HW_EQ(struct mthca_dev *dev, void *eq_context, | 292 | int mthca_SW2HW_EQ(struct mthca_dev *dev, struct mthca_mailbox *mailbox, |
285 | int eq_num, u8 *status); | 293 | int eq_num, u8 *status); |
286 | int mthca_HW2SW_EQ(struct mthca_dev *dev, void *eq_context, | 294 | int mthca_HW2SW_EQ(struct mthca_dev *dev, struct mthca_mailbox *mailbox, |
287 | int eq_num, u8 *status); | 295 | int eq_num, u8 *status); |
288 | int mthca_SW2HW_CQ(struct mthca_dev *dev, void *cq_context, | 296 | int mthca_SW2HW_CQ(struct mthca_dev *dev, struct mthca_mailbox *mailbox, |
289 | int cq_num, u8 *status); | 297 | int cq_num, u8 *status); |
290 | int mthca_HW2SW_CQ(struct mthca_dev *dev, void *cq_context, | 298 | int mthca_HW2SW_CQ(struct mthca_dev *dev, struct mthca_mailbox *mailbox, |
291 | int cq_num, u8 *status); | 299 | int cq_num, u8 *status); |
292 | int mthca_MODIFY_QP(struct mthca_dev *dev, int trans, u32 num, | 300 | int mthca_MODIFY_QP(struct mthca_dev *dev, int trans, u32 num, |
293 | int is_ee, void *qp_context, u32 optmask, | 301 | int is_ee, struct mthca_mailbox *mailbox, u32 optmask, |
294 | u8 *status); | 302 | u8 *status); |
295 | int mthca_QUERY_QP(struct mthca_dev *dev, u32 num, int is_ee, | 303 | int mthca_QUERY_QP(struct mthca_dev *dev, u32 num, int is_ee, |
296 | void *qp_context, u8 *status); | 304 | struct mthca_mailbox *mailbox, u8 *status); |
297 | int mthca_CONF_SPECIAL_QP(struct mthca_dev *dev, int type, u32 qpn, | 305 | int mthca_CONF_SPECIAL_QP(struct mthca_dev *dev, int type, u32 qpn, |
298 | u8 *status); | 306 | u8 *status); |
299 | int mthca_MAD_IFC(struct mthca_dev *dev, int ignore_mkey, int ignore_bkey, | 307 | int mthca_MAD_IFC(struct mthca_dev *dev, int ignore_mkey, int ignore_bkey, |
300 | int port, struct ib_wc* in_wc, struct ib_grh* in_grh, | 308 | int port, struct ib_wc *in_wc, struct ib_grh *in_grh, |
301 | void *in_mad, void *response_mad, u8 *status); | 309 | void *in_mad, void *response_mad, u8 *status); |
302 | int mthca_READ_MGM(struct mthca_dev *dev, int index, void *mgm, | 310 | int mthca_READ_MGM(struct mthca_dev *dev, int index, |
303 | u8 *status); | 311 | struct mthca_mailbox *mailbox, u8 *status); |
304 | int mthca_WRITE_MGM(struct mthca_dev *dev, int index, void *mgm, | 312 | int mthca_WRITE_MGM(struct mthca_dev *dev, int index, |
305 | u8 *status); | 313 | struct mthca_mailbox *mailbox, u8 *status); |
306 | int mthca_MGID_HASH(struct mthca_dev *dev, void *gid, u16 *hash, | 314 | int mthca_MGID_HASH(struct mthca_dev *dev, struct mthca_mailbox *mailbox, |
307 | u8 *status); | 315 | u16 *hash, u8 *status); |
308 | int mthca_NOP(struct mthca_dev *dev, u8 *status); | 316 | int mthca_NOP(struct mthca_dev *dev, u8 *status); |
309 | 317 | ||
310 | #define MAILBOX_ALIGN(x) ((void *) ALIGN((unsigned long) (x), MTHCA_CMD_MAILBOX_ALIGN)) | ||
311 | |||
312 | #endif /* MTHCA_CMD_H */ | 318 | #endif /* MTHCA_CMD_H */ |