| .. | .. |
|---|
| 68 | 68 | #define HNS_ROCE_V1_COMP_EQE_NUM 0x8000 |
|---|
| 69 | 69 | #define HNS_ROCE_V1_ASYNC_EQE_NUM 0x400 |
|---|
| 70 | 70 | |
|---|
| 71 | | -#define HNS_ROCE_V1_QPC_ENTRY_SIZE 256 |
|---|
| 71 | +#define HNS_ROCE_V1_QPC_SIZE 256 |
|---|
| 72 | 72 | #define HNS_ROCE_V1_IRRL_ENTRY_SIZE 8 |
|---|
| 73 | 73 | #define HNS_ROCE_V1_CQC_ENTRY_SIZE 64 |
|---|
| 74 | 74 | #define HNS_ROCE_V1_MTPT_ENTRY_SIZE 64 |
|---|
| 75 | 75 | #define HNS_ROCE_V1_MTT_ENTRY_SIZE 64 |
|---|
| 76 | 76 | |
|---|
| 77 | | -#define HNS_ROCE_V1_CQE_ENTRY_SIZE 32 |
|---|
| 77 | +#define HNS_ROCE_V1_CQE_SIZE 32 |
|---|
| 78 | 78 | #define HNS_ROCE_V1_PAGE_SIZE_SUPPORT 0xFFFFF000 |
|---|
| 79 | 79 | |
|---|
| 80 | 80 | #define HNS_ROCE_V1_TABLE_CHUNK_SIZE (1 << 17) |
|---|
| .. | .. |
|---|
| 110 | 110 | #define HNS_ROCE_V1_EXT_ODB_ALFUL \ |
|---|
| 111 | 111 | (HNS_ROCE_V1_EXT_ODB_DEPTH - HNS_ROCE_V1_DB_RSVD) |
|---|
| 112 | 112 | |
|---|
| 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 |
|---|
| 118 | 113 | #define HNS_ROCE_V1_FREE_MR_TIMEOUT_MSECS 50000 |
|---|
| 119 | 114 | #define HNS_ROCE_V1_RECREATE_LP_QP_TIMEOUT_MSECS 10000 |
|---|
| 120 | 115 | #define HNS_ROCE_V1_FREE_MR_WAIT_VALUE 5 |
|---|
| .. | .. |
|---|
| 162 | 157 | #define SQ_PSN_SHIFT 8 |
|---|
| 163 | 158 | #define QKEY_VAL 0x80010000 |
|---|
| 164 | 159 | #define SDB_INV_CNT_OFFSET 8 |
|---|
| 165 | | -#define SDB_ST_CMP_VAL 8 |
|---|
| 166 | 160 | |
|---|
| 167 | 161 | #define HNS_ROCE_CEQ_DEFAULT_INTERVAL 0x10 |
|---|
| 168 | 162 | #define HNS_ROCE_CEQ_DEFAULT_BURST_NUM 0x10 |
|---|
| .. | .. |
|---|
| 425 | 419 | |
|---|
| 426 | 420 | struct hns_roce_wqe_raddr_seg { |
|---|
| 427 | 421 | __le32 rkey; |
|---|
| 428 | | - __le32 len;/* reserved */ |
|---|
| 422 | + __le32 len; /* reserved */ |
|---|
| 429 | 423 | __le64 raddr; |
|---|
| 430 | 424 | }; |
|---|
| 431 | 425 | |
|---|
| .. | .. |
|---|
| 1048 | 1042 | struct hns_roce_ext_db *ext_db; |
|---|
| 1049 | 1043 | }; |
|---|
| 1050 | 1044 | |
|---|
| 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 | + |
|---|
| 1051 | 1050 | struct hns_roce_bt_table { |
|---|
| 1052 | 1051 | struct hns_roce_buf_list qpc_buf; |
|---|
| 1053 | 1052 | struct hns_roce_buf_list mtpt_buf; |
|---|
| .. | .. |
|---|
| 1066 | 1065 | u32 sdb_issue_ptr; |
|---|
| 1067 | 1066 | u32 sdb_inv_cnt; |
|---|
| 1068 | 1067 | u32 sche_cnt; |
|---|
| 1069 | | -}; |
|---|
| 1070 | | - |
|---|
| 1071 | | -struct hns_roce_des_qp { |
|---|
| 1072 | | - struct workqueue_struct *qp_wq; |
|---|
| 1073 | | - int requeue_flag; |
|---|
| 1074 | 1068 | }; |
|---|
| 1075 | 1069 | |
|---|
| 1076 | 1070 | struct hns_roce_mr_free_work { |
|---|
| .. | .. |
|---|
| 1100 | 1094 | struct hns_roce_raq_table raq_table; |
|---|
| 1101 | 1095 | struct hns_roce_bt_table bt_table; |
|---|
| 1102 | 1096 | struct hns_roce_tptr_table tptr_table; |
|---|
| 1103 | | - struct hns_roce_des_qp des_qp; |
|---|
| 1104 | 1097 | struct hns_roce_free_mr free_mr; |
|---|
| 1105 | 1098 | }; |
|---|
| 1106 | 1099 | |
|---|
| 1107 | 1100 | int hns_dsaf_roce_reset(struct fwnode_handle *dsaf_fwnode, bool dereset); |
|---|
| 1108 | 1101 | 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); |
|---|
| 1110 | 1103 | |
|---|
| 1111 | 1104 | #endif |
|---|