hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/infiniband/hw/hns/hns_roce_hw_v1.h
....@@ -68,13 +68,13 @@
6868 #define HNS_ROCE_V1_COMP_EQE_NUM 0x8000
6969 #define HNS_ROCE_V1_ASYNC_EQE_NUM 0x400
7070
71
-#define HNS_ROCE_V1_QPC_ENTRY_SIZE 256
71
+#define HNS_ROCE_V1_QPC_SIZE 256
7272 #define HNS_ROCE_V1_IRRL_ENTRY_SIZE 8
7373 #define HNS_ROCE_V1_CQC_ENTRY_SIZE 64
7474 #define HNS_ROCE_V1_MTPT_ENTRY_SIZE 64
7575 #define HNS_ROCE_V1_MTT_ENTRY_SIZE 64
7676
77
-#define HNS_ROCE_V1_CQE_ENTRY_SIZE 32
77
+#define HNS_ROCE_V1_CQE_SIZE 32
7878 #define HNS_ROCE_V1_PAGE_SIZE_SUPPORT 0xFFFFF000
7979
8080 #define HNS_ROCE_V1_TABLE_CHUNK_SIZE (1 << 17)
....@@ -110,11 +110,6 @@
110110 #define HNS_ROCE_V1_EXT_ODB_ALFUL \
111111 (HNS_ROCE_V1_EXT_ODB_DEPTH - HNS_ROCE_V1_DB_RSVD)
112112
113
-#define HNS_ROCE_V1_DB_WAIT_OK 0
114
-#define HNS_ROCE_V1_DB_STAGE1 1
115
-#define HNS_ROCE_V1_DB_STAGE2 2
116
-#define HNS_ROCE_V1_CHECK_DB_TIMEOUT_MSECS 10000
117
-#define HNS_ROCE_V1_CHECK_DB_SLEEP_MSECS 20
118113 #define HNS_ROCE_V1_FREE_MR_TIMEOUT_MSECS 50000
119114 #define HNS_ROCE_V1_RECREATE_LP_QP_TIMEOUT_MSECS 10000
120115 #define HNS_ROCE_V1_FREE_MR_WAIT_VALUE 5
....@@ -162,7 +157,6 @@
162157 #define SQ_PSN_SHIFT 8
163158 #define QKEY_VAL 0x80010000
164159 #define SDB_INV_CNT_OFFSET 8
165
-#define SDB_ST_CMP_VAL 8
166160
167161 #define HNS_ROCE_CEQ_DEFAULT_INTERVAL 0x10
168162 #define HNS_ROCE_CEQ_DEFAULT_BURST_NUM 0x10
....@@ -425,7 +419,7 @@
425419
426420 struct hns_roce_wqe_raddr_seg {
427421 __le32 rkey;
428
- __le32 len;/* reserved */
422
+ __le32 len; /* reserved */
429423 __le64 raddr;
430424 };
431425
....@@ -1048,6 +1042,11 @@
10481042 struct hns_roce_ext_db *ext_db;
10491043 };
10501044
1045
+#define HW_SYNC_SLEEP_TIME_INTERVAL 20
1046
+#define HW_SYNC_TIMEOUT_MSECS (25 * HW_SYNC_SLEEP_TIME_INTERVAL)
1047
+#define BT_CMD_SYNC_SHIFT 31
1048
+#define HNS_ROCE_BA_SIZE (32 * 4096)
1049
+
10511050 struct hns_roce_bt_table {
10521051 struct hns_roce_buf_list qpc_buf;
10531052 struct hns_roce_buf_list mtpt_buf;
....@@ -1066,11 +1065,6 @@
10661065 u32 sdb_issue_ptr;
10671066 u32 sdb_inv_cnt;
10681067 u32 sche_cnt;
1069
-};
1070
-
1071
-struct hns_roce_des_qp {
1072
- struct workqueue_struct *qp_wq;
1073
- int requeue_flag;
10741068 };
10751069
10761070 struct hns_roce_mr_free_work {
....@@ -1100,12 +1094,11 @@
11001094 struct hns_roce_raq_table raq_table;
11011095 struct hns_roce_bt_table bt_table;
11021096 struct hns_roce_tptr_table tptr_table;
1103
- struct hns_roce_des_qp des_qp;
11041097 struct hns_roce_free_mr free_mr;
11051098 };
11061099
11071100 int hns_dsaf_roce_reset(struct fwnode_handle *dsaf_fwnode, bool dereset);
11081101 int hns_roce_v1_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc);
1109
-int hns_roce_v1_destroy_qp(struct ib_qp *ibqp);
1102
+int hns_roce_v1_destroy_qp(struct ib_qp *ibqp, struct ib_udata *udata);
11101103
11111104 #endif