hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/include/linux/qed/common_hsi.h
....@@ -1,33 +1,7 @@
1
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
12 /* QLogic qed NIC Driver
23 * Copyright (c) 2015-2016 QLogic Corporation
3
- *
4
- * This software is available to you under a choice of one of two
5
- * licenses. You may choose to be licensed under the terms of the GNU
6
- * General Public License (GPL) Version 2, available from the file
7
- * COPYING in the main directory of this source tree, or the
8
- * OpenIB.org BSD license below:
9
- *
10
- * Redistribution and use in source and binary forms, with or
11
- * without modification, are permitted provided that the following
12
- * conditions are met:
13
- *
14
- * - Redistributions of source code must retain the above
15
- * copyright notice, this list of conditions and the following
16
- * disclaimer.
17
- *
18
- * - Redistributions in binary form must reproduce the above
19
- * copyright notice, this list of conditions and the following
20
- * disclaimer in the documentation and /or other materials
21
- * provided with the distribution.
22
- *
23
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
- * SOFTWARE.
4
+ * Copyright (c) 2019-2020 Marvell International Ltd.
315 */
326
337 #ifndef _COMMON_HSI_H
....@@ -76,7 +50,6 @@
7650
7751 #define FW_ASSERT_GENERAL_ATTN_IDX 32
7852
79
-#define MAX_PINNED_CCFC 32
8053
8154 /* Queue Zone sizes in bytes */
8255 #define TSTORM_QZONE_SIZE 8
....@@ -105,12 +78,19 @@
10578
10679 #define CORE_SPQE_PAGE_SIZE_BYTES 4096
10780
108
-#define MAX_NUM_LL2_RX_QUEUES 48
109
-#define MAX_NUM_LL2_TX_STATS_COUNTERS 48
81
+/* Number of LL2 RAM based queues */
82
+#define MAX_NUM_LL2_RX_RAM_QUEUES 32
83
+
84
+/* Number of LL2 context based queues */
85
+#define MAX_NUM_LL2_RX_CTX_QUEUES 208
86
+#define MAX_NUM_LL2_RX_QUEUES \
87
+ (MAX_NUM_LL2_RX_RAM_QUEUES + MAX_NUM_LL2_RX_CTX_QUEUES)
88
+
89
+#define MAX_NUM_LL2_TX_STATS_COUNTERS 48
11090
11191 #define FW_MAJOR_VERSION 8
112
-#define FW_MINOR_VERSION 37
113
-#define FW_REVISION_VERSION 2
92
+#define FW_MINOR_VERSION 42
93
+#define FW_REVISION_VERSION 2
11494 #define FW_ENGINEERING_VERSION 0
11595
11696 /***********************/
....@@ -132,10 +112,10 @@
132112 #define MAX_NUM_VFS (MAX_NUM_VFS_K2)
133113
134114 #define MAX_NUM_FUNCTIONS_BB (MAX_NUM_PFS_BB + MAX_NUM_VFS_BB)
135
-#define MAX_NUM_FUNCTIONS (MAX_NUM_PFS + MAX_NUM_VFS)
136115
137116 #define MAX_FUNCTION_NUMBER_BB (MAX_NUM_PFS + MAX_NUM_VFS_BB)
138
-#define MAX_FUNCTION_NUMBER (MAX_NUM_PFS + MAX_NUM_VFS)
117
+#define MAX_FUNCTION_NUMBER_K2 (MAX_NUM_PFS + MAX_NUM_VFS_K2)
118
+#define MAX_NUM_FUNCTIONS (MAX_FUNCTION_NUMBER_K2)
139119
140120 #define MAX_NUM_VPORTS_K2 (208)
141121 #define MAX_NUM_VPORTS_BB (160)
....@@ -222,6 +202,7 @@
222202 #define DQ_XCM_TOE_TX_BD_PROD_CMD DQ_XCM_AGG_VAL_SEL_WORD4
223203 #define DQ_XCM_TOE_MORE_TO_SEND_SEQ_CMD DQ_XCM_AGG_VAL_SEL_REG3
224204 #define DQ_XCM_TOE_LOCAL_ADV_WND_SEQ_CMD DQ_XCM_AGG_VAL_SEL_REG4
205
+#define DQ_XCM_ROCE_ACK_EDPM_DORQ_SEQ_CMD DQ_XCM_AGG_VAL_SEL_WORD5
225206
226207 /* UCM agg val selection (HW) */
227208 #define DQ_UCM_AGG_VAL_SEL_WORD0 0
....@@ -340,6 +321,10 @@
340321 #define DQ_PWM_OFFSET_TCM_ROCE_RQ_PROD (DQ_PWM_OFFSET_TCM16_BASE + 1)
341322 #define DQ_PWM_OFFSET_TCM_IWARP_RQ_PROD (DQ_PWM_OFFSET_TCM16_BASE + 3)
342323
324
+/* DQ_DEMS_AGG_VAL_BASE */
325
+#define DQ_PWM_OFFSET_TCM_LL2_PROD_UPDATE \
326
+ (DQ_PWM_OFFSET_TCM32_BASE + DQ_TCM_AGG_VAL_SEL_REG9 - 4)
327
+
343328 #define DQ_REGION_SHIFT (12)
344329
345330 /* DPM */
....@@ -395,6 +380,7 @@
395380
396381 /* Number of Protocol Indices per Status Block */
397382 #define PIS_PER_SB_E4 12
383
+#define MAX_PIS_PER_SB PIS_PER_SB
398384
399385 #define CAU_HC_STOPPED_STATE 3
400386 #define CAU_HC_DISABLE_STATE 4
....@@ -425,8 +411,6 @@
425411 #define IGU_MEM_PBA_MSIX_RESERVED_UPPER 0x03ff
426412
427413 #define IGU_CMD_INT_ACK_BASE 0x0400
428
-#define IGU_CMD_INT_ACK_UPPER (IGU_CMD_INT_ACK_BASE + \
429
- MAX_TOT_SB_PER_PATH - 1)
430414 #define IGU_CMD_INT_ACK_RESERVED_UPPER 0x05ff
431415
432416 #define IGU_CMD_ATTN_BIT_UPD_UPPER 0x05f0
....@@ -439,8 +423,6 @@
439423 #define IGU_REG_SISR_MDPC_WOMASK_UPPER 0x05f6
440424
441425 #define IGU_CMD_PROD_UPD_BASE 0x0600
442
-#define IGU_CMD_PROD_UPD_UPPER (IGU_CMD_PROD_UPD_BASE +\
443
- MAX_TOT_SB_PER_PATH - 1)
444426 #define IGU_CMD_PROD_UPD_RESERVED_UPPER 0x07ff
445427
446428 /*****************/
....@@ -652,8 +634,8 @@
652634 #define PBF_MAX_CMD_LINES 3328
653635
654636 /* Number of BTB blocks. Each block is 256B. */
655
-#define BTB_MAX_BLOCKS 1440
656
-
637
+#define BTB_MAX_BLOCKS_BB 1440
638
+#define BTB_MAX_BLOCKS_K2 1840
657639 /*****************/
658640 /* PRS CONSTANTS */
659641 /*****************/
....@@ -730,6 +712,8 @@
730712 PROTOCOLID_PREROCE,
731713 PROTOCOLID_COMMON,
732714 PROTOCOLID_RESERVED1,
715
+ PROTOCOLID_RDMA,
716
+ PROTOCOLID_SCSI,
733717 MAX_PROTOCOL_TYPE
734718 };
735719
....@@ -748,6 +732,10 @@
748732 union rdma_eqe_data {
749733 struct regpair async_handle;
750734 struct rdma_eqe_destroy_qp rdma_destroy_qp_data;
735
+};
736
+
737
+struct tstorm_queue_zone {
738
+ __le32 reserved[2];
751739 };
752740
753741 /* Ustorm Queue Zone */
....@@ -872,8 +860,8 @@
872860 #define DB_L2_DPM_DATA_RESERVED0_SHIFT 27
873861 #define DB_L2_DPM_DATA_SGE_NUM_MASK 0x7
874862 #define DB_L2_DPM_DATA_SGE_NUM_SHIFT 28
875
-#define DB_L2_DPM_DATA_GFS_SRC_EN_MASK 0x1
876
-#define DB_L2_DPM_DATA_GFS_SRC_EN_SHIFT 31
863
+#define DB_L2_DPM_DATA_TGFS_SRC_EN_MASK 0x1
864
+#define DB_L2_DPM_DATA_TGFS_SRC_EN_SHIFT 31
877865 };
878866
879867 /* Structure for SGE in a DPM doorbell of type DPM_L2_BD */
....@@ -931,12 +919,12 @@
931919 #define DB_RDMA_DPM_PARAMS_WQE_SIZE_SHIFT 16
932920 #define DB_RDMA_DPM_PARAMS_RESERVED0_MASK 0x1
933921 #define DB_RDMA_DPM_PARAMS_RESERVED0_SHIFT 27
934
-#define DB_RDMA_DPM_PARAMS_COMPLETION_FLG_MASK 0x1
935
-#define DB_RDMA_DPM_PARAMS_COMPLETION_FLG_SHIFT 28
922
+#define DB_RDMA_DPM_PARAMS_ACK_REQUEST_MASK 0x1
923
+#define DB_RDMA_DPM_PARAMS_ACK_REQUEST_SHIFT 28
936924 #define DB_RDMA_DPM_PARAMS_S_FLG_MASK 0x1
937925 #define DB_RDMA_DPM_PARAMS_S_FLG_SHIFT 29
938
-#define DB_RDMA_DPM_PARAMS_RESERVED1_MASK 0x1
939
-#define DB_RDMA_DPM_PARAMS_RESERVED1_SHIFT 30
926
+#define DB_RDMA_DPM_PARAMS_COMPLETION_FLG_MASK 0x1
927
+#define DB_RDMA_DPM_PARAMS_COMPLETION_FLG_SHIFT 30
940928 #define DB_RDMA_DPM_PARAMS_CONN_TYPE_IS_IWARP_MASK 0x1
941929 #define DB_RDMA_DPM_PARAMS_CONN_TYPE_IS_IWARP_SHIFT 31
942930 };