| .. | .. |
|---|
| 76 | 76 | struct mthca_mtt *mtt; |
|---|
| 77 | 77 | }; |
|---|
| 78 | 78 | |
|---|
| 79 | | -struct mthca_fmr { |
|---|
| 80 | | - struct ib_fmr ibmr; |
|---|
| 81 | | - struct ib_fmr_attr attr; |
|---|
| 82 | | - struct mthca_mtt *mtt; |
|---|
| 83 | | - int maps; |
|---|
| 84 | | - union { |
|---|
| 85 | | - struct { |
|---|
| 86 | | - struct mthca_mpt_entry __iomem *mpt; |
|---|
| 87 | | - u64 __iomem *mtts; |
|---|
| 88 | | - } tavor; |
|---|
| 89 | | - struct { |
|---|
| 90 | | - struct mthca_mpt_entry *mpt; |
|---|
| 91 | | - __be64 *mtts; |
|---|
| 92 | | - dma_addr_t dma_handle; |
|---|
| 93 | | - } arbel; |
|---|
| 94 | | - } mem; |
|---|
| 95 | | -}; |
|---|
| 96 | | - |
|---|
| 97 | 79 | struct mthca_pd { |
|---|
| 98 | 80 | struct ib_pd ibpd; |
|---|
| 99 | 81 | u32 pd_num; |
|---|
| .. | .. |
|---|
| 258 | 240 | __be32 *db; |
|---|
| 259 | 241 | }; |
|---|
| 260 | 242 | |
|---|
| 243 | +struct mthca_sqp { |
|---|
| 244 | + int pkey_index; |
|---|
| 245 | + u32 qkey; |
|---|
| 246 | + u32 send_psn; |
|---|
| 247 | + struct ib_ud_header ud_header; |
|---|
| 248 | + int header_buf_size; |
|---|
| 249 | + void *header_buf; |
|---|
| 250 | + dma_addr_t header_dma; |
|---|
| 251 | +}; |
|---|
| 252 | + |
|---|
| 261 | 253 | struct mthca_qp { |
|---|
| 262 | 254 | struct ib_qp ibqp; |
|---|
| 263 | 255 | int refcount; |
|---|
| .. | .. |
|---|
| 283 | 275 | |
|---|
| 284 | 276 | wait_queue_head_t wait; |
|---|
| 285 | 277 | struct mutex mutex; |
|---|
| 286 | | -}; |
|---|
| 287 | | - |
|---|
| 288 | | -struct mthca_sqp { |
|---|
| 289 | | - struct mthca_qp qp; |
|---|
| 290 | | - int pkey_index; |
|---|
| 291 | | - u32 qkey; |
|---|
| 292 | | - u32 send_psn; |
|---|
| 293 | | - struct ib_ud_header ud_header; |
|---|
| 294 | | - int header_buf_size; |
|---|
| 295 | | - void *header_buf; |
|---|
| 296 | | - dma_addr_t header_dma; |
|---|
| 278 | + struct mthca_sqp *sqp; |
|---|
| 297 | 279 | }; |
|---|
| 298 | 280 | |
|---|
| 299 | 281 | static inline struct mthca_ucontext *to_mucontext(struct ib_ucontext *ibucontext) |
|---|
| 300 | 282 | { |
|---|
| 301 | 283 | return container_of(ibucontext, struct mthca_ucontext, ibucontext); |
|---|
| 302 | | -} |
|---|
| 303 | | - |
|---|
| 304 | | -static inline struct mthca_fmr *to_mfmr(struct ib_fmr *ibmr) |
|---|
| 305 | | -{ |
|---|
| 306 | | - return container_of(ibmr, struct mthca_fmr, ibmr); |
|---|
| 307 | 284 | } |
|---|
| 308 | 285 | |
|---|
| 309 | 286 | static inline struct mthca_mr *to_mmr(struct ib_mr *ibmr) |
|---|
| .. | .. |
|---|
| 334 | 311 | static inline struct mthca_qp *to_mqp(struct ib_qp *ibqp) |
|---|
| 335 | 312 | { |
|---|
| 336 | 313 | return container_of(ibqp, struct mthca_qp, ibqp); |
|---|
| 337 | | -} |
|---|
| 338 | | - |
|---|
| 339 | | -static inline struct mthca_sqp *to_msqp(struct mthca_qp *qp) |
|---|
| 340 | | -{ |
|---|
| 341 | | - return container_of(qp, struct mthca_sqp, qp); |
|---|
| 342 | 314 | } |
|---|
| 343 | 315 | |
|---|
| 344 | 316 | #endif /* MTHCA_PROVIDER_H */ |
|---|