.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ |
---|
1 | 2 | /* QLogic qed NIC Driver |
---|
2 | 3 | * 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. |
---|
31 | 5 | */ |
---|
32 | 6 | |
---|
33 | 7 | #ifndef _COMMON_HSI_H |
---|
.. | .. |
---|
76 | 50 | |
---|
77 | 51 | #define FW_ASSERT_GENERAL_ATTN_IDX 32 |
---|
78 | 52 | |
---|
79 | | -#define MAX_PINNED_CCFC 32 |
---|
80 | 53 | |
---|
81 | 54 | /* Queue Zone sizes in bytes */ |
---|
82 | 55 | #define TSTORM_QZONE_SIZE 8 |
---|
.. | .. |
---|
105 | 78 | |
---|
106 | 79 | #define CORE_SPQE_PAGE_SIZE_BYTES 4096 |
---|
107 | 80 | |
---|
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 |
---|
110 | 90 | |
---|
111 | 91 | #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 |
---|
114 | 94 | #define FW_ENGINEERING_VERSION 0 |
---|
115 | 95 | |
---|
116 | 96 | /***********************/ |
---|
.. | .. |
---|
132 | 112 | #define MAX_NUM_VFS (MAX_NUM_VFS_K2) |
---|
133 | 113 | |
---|
134 | 114 | #define MAX_NUM_FUNCTIONS_BB (MAX_NUM_PFS_BB + MAX_NUM_VFS_BB) |
---|
135 | | -#define MAX_NUM_FUNCTIONS (MAX_NUM_PFS + MAX_NUM_VFS) |
---|
136 | 115 | |
---|
137 | 116 | #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) |
---|
139 | 119 | |
---|
140 | 120 | #define MAX_NUM_VPORTS_K2 (208) |
---|
141 | 121 | #define MAX_NUM_VPORTS_BB (160) |
---|
.. | .. |
---|
222 | 202 | #define DQ_XCM_TOE_TX_BD_PROD_CMD DQ_XCM_AGG_VAL_SEL_WORD4 |
---|
223 | 203 | #define DQ_XCM_TOE_MORE_TO_SEND_SEQ_CMD DQ_XCM_AGG_VAL_SEL_REG3 |
---|
224 | 204 | #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 |
---|
225 | 206 | |
---|
226 | 207 | /* UCM agg val selection (HW) */ |
---|
227 | 208 | #define DQ_UCM_AGG_VAL_SEL_WORD0 0 |
---|
.. | .. |
---|
340 | 321 | #define DQ_PWM_OFFSET_TCM_ROCE_RQ_PROD (DQ_PWM_OFFSET_TCM16_BASE + 1) |
---|
341 | 322 | #define DQ_PWM_OFFSET_TCM_IWARP_RQ_PROD (DQ_PWM_OFFSET_TCM16_BASE + 3) |
---|
342 | 323 | |
---|
| 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 | + |
---|
343 | 328 | #define DQ_REGION_SHIFT (12) |
---|
344 | 329 | |
---|
345 | 330 | /* DPM */ |
---|
.. | .. |
---|
395 | 380 | |
---|
396 | 381 | /* Number of Protocol Indices per Status Block */ |
---|
397 | 382 | #define PIS_PER_SB_E4 12 |
---|
| 383 | +#define MAX_PIS_PER_SB PIS_PER_SB |
---|
398 | 384 | |
---|
399 | 385 | #define CAU_HC_STOPPED_STATE 3 |
---|
400 | 386 | #define CAU_HC_DISABLE_STATE 4 |
---|
.. | .. |
---|
425 | 411 | #define IGU_MEM_PBA_MSIX_RESERVED_UPPER 0x03ff |
---|
426 | 412 | |
---|
427 | 413 | #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) |
---|
430 | 414 | #define IGU_CMD_INT_ACK_RESERVED_UPPER 0x05ff |
---|
431 | 415 | |
---|
432 | 416 | #define IGU_CMD_ATTN_BIT_UPD_UPPER 0x05f0 |
---|
.. | .. |
---|
439 | 423 | #define IGU_REG_SISR_MDPC_WOMASK_UPPER 0x05f6 |
---|
440 | 424 | |
---|
441 | 425 | #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) |
---|
444 | 426 | #define IGU_CMD_PROD_UPD_RESERVED_UPPER 0x07ff |
---|
445 | 427 | |
---|
446 | 428 | /*****************/ |
---|
.. | .. |
---|
652 | 634 | #define PBF_MAX_CMD_LINES 3328 |
---|
653 | 635 | |
---|
654 | 636 | /* 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 |
---|
657 | 639 | /*****************/ |
---|
658 | 640 | /* PRS CONSTANTS */ |
---|
659 | 641 | /*****************/ |
---|
.. | .. |
---|
730 | 712 | PROTOCOLID_PREROCE, |
---|
731 | 713 | PROTOCOLID_COMMON, |
---|
732 | 714 | PROTOCOLID_RESERVED1, |
---|
| 715 | + PROTOCOLID_RDMA, |
---|
| 716 | + PROTOCOLID_SCSI, |
---|
733 | 717 | MAX_PROTOCOL_TYPE |
---|
734 | 718 | }; |
---|
735 | 719 | |
---|
.. | .. |
---|
748 | 732 | union rdma_eqe_data { |
---|
749 | 733 | struct regpair async_handle; |
---|
750 | 734 | struct rdma_eqe_destroy_qp rdma_destroy_qp_data; |
---|
| 735 | +}; |
---|
| 736 | + |
---|
| 737 | +struct tstorm_queue_zone { |
---|
| 738 | + __le32 reserved[2]; |
---|
751 | 739 | }; |
---|
752 | 740 | |
---|
753 | 741 | /* Ustorm Queue Zone */ |
---|
.. | .. |
---|
872 | 860 | #define DB_L2_DPM_DATA_RESERVED0_SHIFT 27 |
---|
873 | 861 | #define DB_L2_DPM_DATA_SGE_NUM_MASK 0x7 |
---|
874 | 862 | #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 |
---|
877 | 865 | }; |
---|
878 | 866 | |
---|
879 | 867 | /* Structure for SGE in a DPM doorbell of type DPM_L2_BD */ |
---|
.. | .. |
---|
931 | 919 | #define DB_RDMA_DPM_PARAMS_WQE_SIZE_SHIFT 16 |
---|
932 | 920 | #define DB_RDMA_DPM_PARAMS_RESERVED0_MASK 0x1 |
---|
933 | 921 | #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 |
---|
936 | 924 | #define DB_RDMA_DPM_PARAMS_S_FLG_MASK 0x1 |
---|
937 | 925 | #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 |
---|
940 | 928 | #define DB_RDMA_DPM_PARAMS_CONN_TYPE_IS_IWARP_MASK 0x1 |
---|
941 | 929 | #define DB_RDMA_DPM_PARAMS_CONN_TYPE_IS_IWARP_SHIFT 31 |
---|
942 | 930 | }; |
---|