hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/drivers/infiniband/hw/i40iw/i40iw.h
....@@ -45,6 +45,7 @@
4545 #include <linux/slab.h>
4646 #include <linux/io.h>
4747 #include <linux/crc32c.h>
48
+#include <linux/net/intel/i40e_client.h>
4849 #include <rdma/ib_smi.h>
4950 #include <rdma/ib_verbs.h>
5051 #include <rdma/ib_pack.h>
....@@ -57,7 +58,6 @@
5758 #include "i40iw_d.h"
5859 #include "i40iw_hmc.h"
5960
60
-#include <i40e_client.h>
6161 #include "i40iw_type.h"
6262 #include "i40iw_p.h"
6363 #include <rdma/i40iw-abi.h>
....@@ -67,7 +67,7 @@
6767 #include "i40iw_user.h"
6868 #include "i40iw_puda.h"
6969
70
-#define I40IW_FW_VERSION 2
70
+#define I40IW_FW_VER_DEFAULT 2
7171 #define I40IW_HW_VERSION 2
7272
7373 #define I40IW_ARP_ADD 1
....@@ -326,6 +326,26 @@
326326 };
327327
328328 /**
329
+ * i40iw_fw_major_ver - get firmware major version
330
+ * @dev: iwarp device
331
+ **/
332
+static inline u64 i40iw_fw_major_ver(struct i40iw_sc_dev *dev)
333
+{
334
+ return RS_64(dev->feature_info[I40IW_FEATURE_FW_INFO],
335
+ I40IW_FW_VER_MAJOR);
336
+}
337
+
338
+/**
339
+ * i40iw_fw_minor_ver - get firmware minor version
340
+ * @dev: iwarp device
341
+ **/
342
+static inline u64 i40iw_fw_minor_ver(struct i40iw_sc_dev *dev)
343
+{
344
+ return RS_64(dev->feature_info[I40IW_FEATURE_FW_INFO],
345
+ I40IW_FW_VER_MINOR);
346
+}
347
+
348
+/**
329349 * to_iwdev - get device
330350 * @ibdev: ib device
331351 **/
....@@ -362,15 +382,6 @@
362382 }
363383
364384 /**
365
- * to_iwmr_from_ibfmr - get device memory region
366
- * @ibfmr: ib fmr
367
- **/
368
-static inline struct i40iw_mr *to_iwmr_from_ibfmr(struct ib_fmr *ibfmr)
369
-{
370
- return container_of(ibfmr, struct i40iw_mr, ibfmr);
371
-}
372
-
373
-/**
374385 * to_iwmw - get device memory window
375386 * @ibmw: ib memory window
376387 **/
....@@ -398,8 +409,8 @@
398409 }
399410
400411 /* i40iw.c */
401
-void i40iw_add_ref(struct ib_qp *);
402
-void i40iw_rem_ref(struct ib_qp *);
412
+void i40iw_qp_add_ref(struct ib_qp *ibqp);
413
+void i40iw_qp_rem_ref(struct ib_qp *ibqp);
403414 struct ib_qp *i40iw_get_qp(struct ib_device *, int);
404415
405416 void i40iw_flush_wqes(struct i40iw_device *iwdev,
....@@ -411,9 +422,8 @@
411422 bool ipv4,
412423 u32 action);
413424
414
-int i40iw_manage_apbvt(struct i40iw_device *iwdev,
415
- u16 accel_local_port,
416
- bool add_port);
425
+enum i40iw_status_code i40iw_manage_apbvt(struct i40iw_device *iwdev,
426
+ u16 accel_local_port, bool add_port);
417427
418428 struct i40iw_cqp_request *i40iw_get_cqp_request(struct i40iw_cqp *cqp, bool wait);
419429 void i40iw_free_cqp_request(struct i40iw_cqp *cqp, struct i40iw_cqp_request *cqp_request);
....@@ -543,16 +553,15 @@
543553 bool wait);
544554 void i40iw_receive_ilq(struct i40iw_sc_vsi *vsi, struct i40iw_puda_buf *rbuf);
545555 void i40iw_free_sqbuf(struct i40iw_sc_vsi *vsi, void *bufp);
546
-void i40iw_free_qp_resources(struct i40iw_device *iwdev,
547
- struct i40iw_qp *iwqp,
548
- u32 qp_num);
556
+void i40iw_free_qp_resources(struct i40iw_qp *iwqp);
557
+
549558 enum i40iw_status_code i40iw_obj_aligned_mem(struct i40iw_device *iwdev,
550559 struct i40iw_dma_mem *memptr,
551560 u32 size, u32 mask);
552561
553562 void i40iw_request_reset(struct i40iw_device *iwdev);
554563 void i40iw_destroy_rdma_device(struct i40iw_ib_device *iwibdev);
555
-void i40iw_setup_cm_core(struct i40iw_device *iwdev);
564
+int i40iw_setup_cm_core(struct i40iw_device *iwdev);
556565 void i40iw_cleanup_cm_core(struct i40iw_cm_core *cm_core);
557566 void i40iw_process_ceq(struct i40iw_device *, struct i40iw_ceq *iwceq);
558567 void i40iw_process_aeq(struct i40iw_device *);