hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/infiniband/hw/mthca/mthca_provider.h
....@@ -76,24 +76,6 @@
7676 struct mthca_mtt *mtt;
7777 };
7878
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
-
9779 struct mthca_pd {
9880 struct ib_pd ibpd;
9981 u32 pd_num;
....@@ -258,6 +240,16 @@
258240 __be32 *db;
259241 };
260242
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
+
261253 struct mthca_qp {
262254 struct ib_qp ibqp;
263255 int refcount;
....@@ -283,27 +275,12 @@
283275
284276 wait_queue_head_t wait;
285277 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;
297279 };
298280
299281 static inline struct mthca_ucontext *to_mucontext(struct ib_ucontext *ibucontext)
300282 {
301283 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);
307284 }
308285
309286 static inline struct mthca_mr *to_mmr(struct ib_mr *ibmr)
....@@ -334,11 +311,6 @@
334311 static inline struct mthca_qp *to_mqp(struct ib_qp *ibqp)
335312 {
336313 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);
342314 }
343315
344316 #endif /* MTHCA_PROVIDER_H */