1 /* QLogic qed NIC Driver 2 * Copyright (c) 2015-2017 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. 31 */ 32 33 #ifndef _QED_HSI_H 34 #define _QED_HSI_H 35 36 #include <linux/types.h> 37 #include <linux/io.h> 38 #include <linux/bitops.h> 39 #include <linux/delay.h> 40 #include <linux/kernel.h> 41 #include <linux/list.h> 42 #include <linux/slab.h> 43 #include <linux/qed/common_hsi.h> 44 #include <linux/qed/storage_common.h> 45 #include <linux/qed/tcp_common.h> 46 #include <linux/qed/fcoe_common.h> 47 #include <linux/qed/eth_common.h> 48 #include <linux/qed/iscsi_common.h> 49 #include <linux/qed/rdma_common.h> 50 #include <linux/qed/roce_common.h> 51 #include <linux/qed/qed_fcoe_if.h> 52 53 struct qed_hwfn; 54 struct qed_ptt; 55 56 /* opcodes for the event ring */ 57 enum common_event_opcode { 58 COMMON_EVENT_PF_START, 59 COMMON_EVENT_PF_STOP, 60 COMMON_EVENT_VF_START, 61 COMMON_EVENT_VF_STOP, 62 COMMON_EVENT_VF_PF_CHANNEL, 63 COMMON_EVENT_VF_FLR, 64 COMMON_EVENT_PF_UPDATE, 65 COMMON_EVENT_MALICIOUS_VF, 66 COMMON_EVENT_RL_UPDATE, 67 COMMON_EVENT_EMPTY, 68 MAX_COMMON_EVENT_OPCODE 69 }; 70 71 /* Common Ramrod Command IDs */ 72 enum common_ramrod_cmd_id { 73 COMMON_RAMROD_UNUSED, 74 COMMON_RAMROD_PF_START, 75 COMMON_RAMROD_PF_STOP, 76 COMMON_RAMROD_VF_START, 77 COMMON_RAMROD_VF_STOP, 78 COMMON_RAMROD_PF_UPDATE, 79 COMMON_RAMROD_RL_UPDATE, 80 COMMON_RAMROD_EMPTY, 81 MAX_COMMON_RAMROD_CMD_ID 82 }; 83 84 /* The core storm context for the Ystorm */ 85 struct ystorm_core_conn_st_ctx { 86 __le32 reserved[4]; 87 }; 88 89 /* The core storm context for the Pstorm */ 90 struct pstorm_core_conn_st_ctx { 91 __le32 reserved[4]; 92 }; 93 94 /* Core Slowpath Connection storm context of Xstorm */ 95 struct xstorm_core_conn_st_ctx { 96 __le32 spq_base_lo; 97 __le32 spq_base_hi; 98 struct regpair consolid_base_addr; 99 __le16 spq_cons; 100 __le16 consolid_cons; 101 __le32 reserved0[55]; 102 }; 103 104 struct xstorm_core_conn_ag_ctx { 105 u8 reserved0; 106 u8 core_state; 107 u8 flags0; 108 #define XSTORM_CORE_CONN_AG_CTX_EXIST_IN_QM0_MASK 0x1 109 #define XSTORM_CORE_CONN_AG_CTX_EXIST_IN_QM0_SHIFT 0 110 #define XSTORM_CORE_CONN_AG_CTX_RESERVED1_MASK 0x1 111 #define XSTORM_CORE_CONN_AG_CTX_RESERVED1_SHIFT 1 112 #define XSTORM_CORE_CONN_AG_CTX_RESERVED2_MASK 0x1 113 #define XSTORM_CORE_CONN_AG_CTX_RESERVED2_SHIFT 2 114 #define XSTORM_CORE_CONN_AG_CTX_EXIST_IN_QM3_MASK 0x1 115 #define XSTORM_CORE_CONN_AG_CTX_EXIST_IN_QM3_SHIFT 3 116 #define XSTORM_CORE_CONN_AG_CTX_RESERVED3_MASK 0x1 117 #define XSTORM_CORE_CONN_AG_CTX_RESERVED3_SHIFT 4 118 #define XSTORM_CORE_CONN_AG_CTX_RESERVED4_MASK 0x1 119 #define XSTORM_CORE_CONN_AG_CTX_RESERVED4_SHIFT 5 120 #define XSTORM_CORE_CONN_AG_CTX_RESERVED5_MASK 0x1 121 #define XSTORM_CORE_CONN_AG_CTX_RESERVED5_SHIFT 6 122 #define XSTORM_CORE_CONN_AG_CTX_RESERVED6_MASK 0x1 123 #define XSTORM_CORE_CONN_AG_CTX_RESERVED6_SHIFT 7 124 u8 flags1; 125 #define XSTORM_CORE_CONN_AG_CTX_RESERVED7_MASK 0x1 126 #define XSTORM_CORE_CONN_AG_CTX_RESERVED7_SHIFT 0 127 #define XSTORM_CORE_CONN_AG_CTX_RESERVED8_MASK 0x1 128 #define XSTORM_CORE_CONN_AG_CTX_RESERVED8_SHIFT 1 129 #define XSTORM_CORE_CONN_AG_CTX_RESERVED9_MASK 0x1 130 #define XSTORM_CORE_CONN_AG_CTX_RESERVED9_SHIFT 2 131 #define XSTORM_CORE_CONN_AG_CTX_BIT11_MASK 0x1 132 #define XSTORM_CORE_CONN_AG_CTX_BIT11_SHIFT 3 133 #define XSTORM_CORE_CONN_AG_CTX_BIT12_MASK 0x1 134 #define XSTORM_CORE_CONN_AG_CTX_BIT12_SHIFT 4 135 #define XSTORM_CORE_CONN_AG_CTX_BIT13_MASK 0x1 136 #define XSTORM_CORE_CONN_AG_CTX_BIT13_SHIFT 5 137 #define XSTORM_CORE_CONN_AG_CTX_TX_RULE_ACTIVE_MASK 0x1 138 #define XSTORM_CORE_CONN_AG_CTX_TX_RULE_ACTIVE_SHIFT 6 139 #define XSTORM_CORE_CONN_AG_CTX_DQ_CF_ACTIVE_MASK 0x1 140 #define XSTORM_CORE_CONN_AG_CTX_DQ_CF_ACTIVE_SHIFT 7 141 u8 flags2; 142 #define XSTORM_CORE_CONN_AG_CTX_CF0_MASK 0x3 143 #define XSTORM_CORE_CONN_AG_CTX_CF0_SHIFT 0 144 #define XSTORM_CORE_CONN_AG_CTX_CF1_MASK 0x3 145 #define XSTORM_CORE_CONN_AG_CTX_CF1_SHIFT 2 146 #define XSTORM_CORE_CONN_AG_CTX_CF2_MASK 0x3 147 #define XSTORM_CORE_CONN_AG_CTX_CF2_SHIFT 4 148 #define XSTORM_CORE_CONN_AG_CTX_CF3_MASK 0x3 149 #define XSTORM_CORE_CONN_AG_CTX_CF3_SHIFT 6 150 u8 flags3; 151 #define XSTORM_CORE_CONN_AG_CTX_CF4_MASK 0x3 152 #define XSTORM_CORE_CONN_AG_CTX_CF4_SHIFT 0 153 #define XSTORM_CORE_CONN_AG_CTX_CF5_MASK 0x3 154 #define XSTORM_CORE_CONN_AG_CTX_CF5_SHIFT 2 155 #define XSTORM_CORE_CONN_AG_CTX_CF6_MASK 0x3 156 #define XSTORM_CORE_CONN_AG_CTX_CF6_SHIFT 4 157 #define XSTORM_CORE_CONN_AG_CTX_CF7_MASK 0x3 158 #define XSTORM_CORE_CONN_AG_CTX_CF7_SHIFT 6 159 u8 flags4; 160 #define XSTORM_CORE_CONN_AG_CTX_CF8_MASK 0x3 161 #define XSTORM_CORE_CONN_AG_CTX_CF8_SHIFT 0 162 #define XSTORM_CORE_CONN_AG_CTX_CF9_MASK 0x3 163 #define XSTORM_CORE_CONN_AG_CTX_CF9_SHIFT 2 164 #define XSTORM_CORE_CONN_AG_CTX_CF10_MASK 0x3 165 #define XSTORM_CORE_CONN_AG_CTX_CF10_SHIFT 4 166 #define XSTORM_CORE_CONN_AG_CTX_CF11_MASK 0x3 167 #define XSTORM_CORE_CONN_AG_CTX_CF11_SHIFT 6 168 u8 flags5; 169 #define XSTORM_CORE_CONN_AG_CTX_CF12_MASK 0x3 170 #define XSTORM_CORE_CONN_AG_CTX_CF12_SHIFT 0 171 #define XSTORM_CORE_CONN_AG_CTX_CF13_MASK 0x3 172 #define XSTORM_CORE_CONN_AG_CTX_CF13_SHIFT 2 173 #define XSTORM_CORE_CONN_AG_CTX_CF14_MASK 0x3 174 #define XSTORM_CORE_CONN_AG_CTX_CF14_SHIFT 4 175 #define XSTORM_CORE_CONN_AG_CTX_CF15_MASK 0x3 176 #define XSTORM_CORE_CONN_AG_CTX_CF15_SHIFT 6 177 u8 flags6; 178 #define XSTORM_CORE_CONN_AG_CTX_CONSOLID_PROD_CF_MASK 0x3 179 #define XSTORM_CORE_CONN_AG_CTX_CONSOLID_PROD_CF_SHIFT 0 180 #define XSTORM_CORE_CONN_AG_CTX_CF17_MASK 0x3 181 #define XSTORM_CORE_CONN_AG_CTX_CF17_SHIFT 2 182 #define XSTORM_CORE_CONN_AG_CTX_DQ_CF_MASK 0x3 183 #define XSTORM_CORE_CONN_AG_CTX_DQ_CF_SHIFT 4 184 #define XSTORM_CORE_CONN_AG_CTX_TERMINATE_CF_MASK 0x3 185 #define XSTORM_CORE_CONN_AG_CTX_TERMINATE_CF_SHIFT 6 186 u8 flags7; 187 #define XSTORM_CORE_CONN_AG_CTX_FLUSH_Q0_MASK 0x3 188 #define XSTORM_CORE_CONN_AG_CTX_FLUSH_Q0_SHIFT 0 189 #define XSTORM_CORE_CONN_AG_CTX_RESERVED10_MASK 0x3 190 #define XSTORM_CORE_CONN_AG_CTX_RESERVED10_SHIFT 2 191 #define XSTORM_CORE_CONN_AG_CTX_SLOW_PATH_MASK 0x3 192 #define XSTORM_CORE_CONN_AG_CTX_SLOW_PATH_SHIFT 4 193 #define XSTORM_CORE_CONN_AG_CTX_CF0EN_MASK 0x1 194 #define XSTORM_CORE_CONN_AG_CTX_CF0EN_SHIFT 6 195 #define XSTORM_CORE_CONN_AG_CTX_CF1EN_MASK 0x1 196 #define XSTORM_CORE_CONN_AG_CTX_CF1EN_SHIFT 7 197 u8 flags8; 198 #define XSTORM_CORE_CONN_AG_CTX_CF2EN_MASK 0x1 199 #define XSTORM_CORE_CONN_AG_CTX_CF2EN_SHIFT 0 200 #define XSTORM_CORE_CONN_AG_CTX_CF3EN_MASK 0x1 201 #define XSTORM_CORE_CONN_AG_CTX_CF3EN_SHIFT 1 202 #define XSTORM_CORE_CONN_AG_CTX_CF4EN_MASK 0x1 203 #define XSTORM_CORE_CONN_AG_CTX_CF4EN_SHIFT 2 204 #define XSTORM_CORE_CONN_AG_CTX_CF5EN_MASK 0x1 205 #define XSTORM_CORE_CONN_AG_CTX_CF5EN_SHIFT 3 206 #define XSTORM_CORE_CONN_AG_CTX_CF6EN_MASK 0x1 207 #define XSTORM_CORE_CONN_AG_CTX_CF6EN_SHIFT 4 208 #define XSTORM_CORE_CONN_AG_CTX_CF7EN_MASK 0x1 209 #define XSTORM_CORE_CONN_AG_CTX_CF7EN_SHIFT 5 210 #define XSTORM_CORE_CONN_AG_CTX_CF8EN_MASK 0x1 211 #define XSTORM_CORE_CONN_AG_CTX_CF8EN_SHIFT 6 212 #define XSTORM_CORE_CONN_AG_CTX_CF9EN_MASK 0x1 213 #define XSTORM_CORE_CONN_AG_CTX_CF9EN_SHIFT 7 214 u8 flags9; 215 #define XSTORM_CORE_CONN_AG_CTX_CF10EN_MASK 0x1 216 #define XSTORM_CORE_CONN_AG_CTX_CF10EN_SHIFT 0 217 #define XSTORM_CORE_CONN_AG_CTX_CF11EN_MASK 0x1 218 #define XSTORM_CORE_CONN_AG_CTX_CF11EN_SHIFT 1 219 #define XSTORM_CORE_CONN_AG_CTX_CF12EN_MASK 0x1 220 #define XSTORM_CORE_CONN_AG_CTX_CF12EN_SHIFT 2 221 #define XSTORM_CORE_CONN_AG_CTX_CF13EN_MASK 0x1 222 #define XSTORM_CORE_CONN_AG_CTX_CF13EN_SHIFT 3 223 #define XSTORM_CORE_CONN_AG_CTX_CF14EN_MASK 0x1 224 #define XSTORM_CORE_CONN_AG_CTX_CF14EN_SHIFT 4 225 #define XSTORM_CORE_CONN_AG_CTX_CF15EN_MASK 0x1 226 #define XSTORM_CORE_CONN_AG_CTX_CF15EN_SHIFT 5 227 #define XSTORM_CORE_CONN_AG_CTX_CONSOLID_PROD_CF_EN_MASK 0x1 228 #define XSTORM_CORE_CONN_AG_CTX_CONSOLID_PROD_CF_EN_SHIFT 6 229 #define XSTORM_CORE_CONN_AG_CTX_CF17EN_MASK 0x1 230 #define XSTORM_CORE_CONN_AG_CTX_CF17EN_SHIFT 7 231 u8 flags10; 232 #define XSTORM_CORE_CONN_AG_CTX_DQ_CF_EN_MASK 0x1 233 #define XSTORM_CORE_CONN_AG_CTX_DQ_CF_EN_SHIFT 0 234 #define XSTORM_CORE_CONN_AG_CTX_TERMINATE_CF_EN_MASK 0x1 235 #define XSTORM_CORE_CONN_AG_CTX_TERMINATE_CF_EN_SHIFT 1 236 #define XSTORM_CORE_CONN_AG_CTX_FLUSH_Q0_EN_MASK 0x1 237 #define XSTORM_CORE_CONN_AG_CTX_FLUSH_Q0_EN_SHIFT 2 238 #define XSTORM_CORE_CONN_AG_CTX_RESERVED11_MASK 0x1 239 #define XSTORM_CORE_CONN_AG_CTX_RESERVED11_SHIFT 3 240 #define XSTORM_CORE_CONN_AG_CTX_SLOW_PATH_EN_MASK 0x1 241 #define XSTORM_CORE_CONN_AG_CTX_SLOW_PATH_EN_SHIFT 4 242 #define XSTORM_CORE_CONN_AG_CTX_CF23EN_MASK 0x1 243 #define XSTORM_CORE_CONN_AG_CTX_CF23EN_SHIFT 5 244 #define XSTORM_CORE_CONN_AG_CTX_RESERVED12_MASK 0x1 245 #define XSTORM_CORE_CONN_AG_CTX_RESERVED12_SHIFT 6 246 #define XSTORM_CORE_CONN_AG_CTX_RESERVED13_MASK 0x1 247 #define XSTORM_CORE_CONN_AG_CTX_RESERVED13_SHIFT 7 248 u8 flags11; 249 #define XSTORM_CORE_CONN_AG_CTX_RESERVED14_MASK 0x1 250 #define XSTORM_CORE_CONN_AG_CTX_RESERVED14_SHIFT 0 251 #define XSTORM_CORE_CONN_AG_CTX_RESERVED15_MASK 0x1 252 #define XSTORM_CORE_CONN_AG_CTX_RESERVED15_SHIFT 1 253 #define XSTORM_CORE_CONN_AG_CTX_TX_DEC_RULE_EN_MASK 0x1 254 #define XSTORM_CORE_CONN_AG_CTX_TX_DEC_RULE_EN_SHIFT 2 255 #define XSTORM_CORE_CONN_AG_CTX_RULE5EN_MASK 0x1 256 #define XSTORM_CORE_CONN_AG_CTX_RULE5EN_SHIFT 3 257 #define XSTORM_CORE_CONN_AG_CTX_RULE6EN_MASK 0x1 258 #define XSTORM_CORE_CONN_AG_CTX_RULE6EN_SHIFT 4 259 #define XSTORM_CORE_CONN_AG_CTX_RULE7EN_MASK 0x1 260 #define XSTORM_CORE_CONN_AG_CTX_RULE7EN_SHIFT 5 261 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED1_MASK 0x1 262 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED1_SHIFT 6 263 #define XSTORM_CORE_CONN_AG_CTX_RULE9EN_MASK 0x1 264 #define XSTORM_CORE_CONN_AG_CTX_RULE9EN_SHIFT 7 265 u8 flags12; 266 #define XSTORM_CORE_CONN_AG_CTX_RULE10EN_MASK 0x1 267 #define XSTORM_CORE_CONN_AG_CTX_RULE10EN_SHIFT 0 268 #define XSTORM_CORE_CONN_AG_CTX_RULE11EN_MASK 0x1 269 #define XSTORM_CORE_CONN_AG_CTX_RULE11EN_SHIFT 1 270 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED2_MASK 0x1 271 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED2_SHIFT 2 272 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED3_MASK 0x1 273 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED3_SHIFT 3 274 #define XSTORM_CORE_CONN_AG_CTX_RULE14EN_MASK 0x1 275 #define XSTORM_CORE_CONN_AG_CTX_RULE14EN_SHIFT 4 276 #define XSTORM_CORE_CONN_AG_CTX_RULE15EN_MASK 0x1 277 #define XSTORM_CORE_CONN_AG_CTX_RULE15EN_SHIFT 5 278 #define XSTORM_CORE_CONN_AG_CTX_RULE16EN_MASK 0x1 279 #define XSTORM_CORE_CONN_AG_CTX_RULE16EN_SHIFT 6 280 #define XSTORM_CORE_CONN_AG_CTX_RULE17EN_MASK 0x1 281 #define XSTORM_CORE_CONN_AG_CTX_RULE17EN_SHIFT 7 282 u8 flags13; 283 #define XSTORM_CORE_CONN_AG_CTX_RULE18EN_MASK 0x1 284 #define XSTORM_CORE_CONN_AG_CTX_RULE18EN_SHIFT 0 285 #define XSTORM_CORE_CONN_AG_CTX_RULE19EN_MASK 0x1 286 #define XSTORM_CORE_CONN_AG_CTX_RULE19EN_SHIFT 1 287 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED4_MASK 0x1 288 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED4_SHIFT 2 289 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED5_MASK 0x1 290 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED5_SHIFT 3 291 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED6_MASK 0x1 292 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED6_SHIFT 4 293 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED7_MASK 0x1 294 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED7_SHIFT 5 295 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED8_MASK 0x1 296 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED8_SHIFT 6 297 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED9_MASK 0x1 298 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED9_SHIFT 7 299 u8 flags14; 300 #define XSTORM_CORE_CONN_AG_CTX_BIT16_MASK 0x1 301 #define XSTORM_CORE_CONN_AG_CTX_BIT16_SHIFT 0 302 #define XSTORM_CORE_CONN_AG_CTX_BIT17_MASK 0x1 303 #define XSTORM_CORE_CONN_AG_CTX_BIT17_SHIFT 1 304 #define XSTORM_CORE_CONN_AG_CTX_BIT18_MASK 0x1 305 #define XSTORM_CORE_CONN_AG_CTX_BIT18_SHIFT 2 306 #define XSTORM_CORE_CONN_AG_CTX_BIT19_MASK 0x1 307 #define XSTORM_CORE_CONN_AG_CTX_BIT19_SHIFT 3 308 #define XSTORM_CORE_CONN_AG_CTX_BIT20_MASK 0x1 309 #define XSTORM_CORE_CONN_AG_CTX_BIT20_SHIFT 4 310 #define XSTORM_CORE_CONN_AG_CTX_BIT21_MASK 0x1 311 #define XSTORM_CORE_CONN_AG_CTX_BIT21_SHIFT 5 312 #define XSTORM_CORE_CONN_AG_CTX_CF23_MASK 0x3 313 #define XSTORM_CORE_CONN_AG_CTX_CF23_SHIFT 6 314 u8 byte2; 315 __le16 physical_q0; 316 __le16 consolid_prod; 317 __le16 reserved16; 318 __le16 tx_bd_cons; 319 __le16 tx_bd_or_spq_prod; 320 __le16 word5; 321 __le16 conn_dpi; 322 u8 byte3; 323 u8 byte4; 324 u8 byte5; 325 u8 byte6; 326 __le32 reg0; 327 __le32 reg1; 328 __le32 reg2; 329 __le32 reg3; 330 __le32 reg4; 331 __le32 reg5; 332 __le32 reg6; 333 __le16 word7; 334 __le16 word8; 335 __le16 word9; 336 __le16 word10; 337 __le32 reg7; 338 __le32 reg8; 339 __le32 reg9; 340 u8 byte7; 341 u8 byte8; 342 u8 byte9; 343 u8 byte10; 344 u8 byte11; 345 u8 byte12; 346 u8 byte13; 347 u8 byte14; 348 u8 byte15; 349 u8 byte16; 350 __le16 word11; 351 __le32 reg10; 352 __le32 reg11; 353 __le32 reg12; 354 __le32 reg13; 355 __le32 reg14; 356 __le32 reg15; 357 __le32 reg16; 358 __le32 reg17; 359 __le32 reg18; 360 __le32 reg19; 361 __le16 word12; 362 __le16 word13; 363 __le16 word14; 364 __le16 word15; 365 }; 366 367 struct tstorm_core_conn_ag_ctx { 368 u8 byte0; 369 u8 byte1; 370 u8 flags0; 371 #define TSTORM_CORE_CONN_AG_CTX_BIT0_MASK 0x1 372 #define TSTORM_CORE_CONN_AG_CTX_BIT0_SHIFT 0 373 #define TSTORM_CORE_CONN_AG_CTX_BIT1_MASK 0x1 374 #define TSTORM_CORE_CONN_AG_CTX_BIT1_SHIFT 1 375 #define TSTORM_CORE_CONN_AG_CTX_BIT2_MASK 0x1 376 #define TSTORM_CORE_CONN_AG_CTX_BIT2_SHIFT 2 377 #define TSTORM_CORE_CONN_AG_CTX_BIT3_MASK 0x1 378 #define TSTORM_CORE_CONN_AG_CTX_BIT3_SHIFT 3 379 #define TSTORM_CORE_CONN_AG_CTX_BIT4_MASK 0x1 380 #define TSTORM_CORE_CONN_AG_CTX_BIT4_SHIFT 4 381 #define TSTORM_CORE_CONN_AG_CTX_BIT5_MASK 0x1 382 #define TSTORM_CORE_CONN_AG_CTX_BIT5_SHIFT 5 383 #define TSTORM_CORE_CONN_AG_CTX_CF0_MASK 0x3 384 #define TSTORM_CORE_CONN_AG_CTX_CF0_SHIFT 6 385 u8 flags1; 386 #define TSTORM_CORE_CONN_AG_CTX_CF1_MASK 0x3 387 #define TSTORM_CORE_CONN_AG_CTX_CF1_SHIFT 0 388 #define TSTORM_CORE_CONN_AG_CTX_CF2_MASK 0x3 389 #define TSTORM_CORE_CONN_AG_CTX_CF2_SHIFT 2 390 #define TSTORM_CORE_CONN_AG_CTX_CF3_MASK 0x3 391 #define TSTORM_CORE_CONN_AG_CTX_CF3_SHIFT 4 392 #define TSTORM_CORE_CONN_AG_CTX_CF4_MASK 0x3 393 #define TSTORM_CORE_CONN_AG_CTX_CF4_SHIFT 6 394 u8 flags2; 395 #define TSTORM_CORE_CONN_AG_CTX_CF5_MASK 0x3 396 #define TSTORM_CORE_CONN_AG_CTX_CF5_SHIFT 0 397 #define TSTORM_CORE_CONN_AG_CTX_CF6_MASK 0x3 398 #define TSTORM_CORE_CONN_AG_CTX_CF6_SHIFT 2 399 #define TSTORM_CORE_CONN_AG_CTX_CF7_MASK 0x3 400 #define TSTORM_CORE_CONN_AG_CTX_CF7_SHIFT 4 401 #define TSTORM_CORE_CONN_AG_CTX_CF8_MASK 0x3 402 #define TSTORM_CORE_CONN_AG_CTX_CF8_SHIFT 6 403 u8 flags3; 404 #define TSTORM_CORE_CONN_AG_CTX_CF9_MASK 0x3 405 #define TSTORM_CORE_CONN_AG_CTX_CF9_SHIFT 0 406 #define TSTORM_CORE_CONN_AG_CTX_CF10_MASK 0x3 407 #define TSTORM_CORE_CONN_AG_CTX_CF10_SHIFT 2 408 #define TSTORM_CORE_CONN_AG_CTX_CF0EN_MASK 0x1 409 #define TSTORM_CORE_CONN_AG_CTX_CF0EN_SHIFT 4 410 #define TSTORM_CORE_CONN_AG_CTX_CF1EN_MASK 0x1 411 #define TSTORM_CORE_CONN_AG_CTX_CF1EN_SHIFT 5 412 #define TSTORM_CORE_CONN_AG_CTX_CF2EN_MASK 0x1 413 #define TSTORM_CORE_CONN_AG_CTX_CF2EN_SHIFT 6 414 #define TSTORM_CORE_CONN_AG_CTX_CF3EN_MASK 0x1 415 #define TSTORM_CORE_CONN_AG_CTX_CF3EN_SHIFT 7 416 u8 flags4; 417 #define TSTORM_CORE_CONN_AG_CTX_CF4EN_MASK 0x1 418 #define TSTORM_CORE_CONN_AG_CTX_CF4EN_SHIFT 0 419 #define TSTORM_CORE_CONN_AG_CTX_CF5EN_MASK 0x1 420 #define TSTORM_CORE_CONN_AG_CTX_CF5EN_SHIFT 1 421 #define TSTORM_CORE_CONN_AG_CTX_CF6EN_MASK 0x1 422 #define TSTORM_CORE_CONN_AG_CTX_CF6EN_SHIFT 2 423 #define TSTORM_CORE_CONN_AG_CTX_CF7EN_MASK 0x1 424 #define TSTORM_CORE_CONN_AG_CTX_CF7EN_SHIFT 3 425 #define TSTORM_CORE_CONN_AG_CTX_CF8EN_MASK 0x1 426 #define TSTORM_CORE_CONN_AG_CTX_CF8EN_SHIFT 4 427 #define TSTORM_CORE_CONN_AG_CTX_CF9EN_MASK 0x1 428 #define TSTORM_CORE_CONN_AG_CTX_CF9EN_SHIFT 5 429 #define TSTORM_CORE_CONN_AG_CTX_CF10EN_MASK 0x1 430 #define TSTORM_CORE_CONN_AG_CTX_CF10EN_SHIFT 6 431 #define TSTORM_CORE_CONN_AG_CTX_RULE0EN_MASK 0x1 432 #define TSTORM_CORE_CONN_AG_CTX_RULE0EN_SHIFT 7 433 u8 flags5; 434 #define TSTORM_CORE_CONN_AG_CTX_RULE1EN_MASK 0x1 435 #define TSTORM_CORE_CONN_AG_CTX_RULE1EN_SHIFT 0 436 #define TSTORM_CORE_CONN_AG_CTX_RULE2EN_MASK 0x1 437 #define TSTORM_CORE_CONN_AG_CTX_RULE2EN_SHIFT 1 438 #define TSTORM_CORE_CONN_AG_CTX_RULE3EN_MASK 0x1 439 #define TSTORM_CORE_CONN_AG_CTX_RULE3EN_SHIFT 2 440 #define TSTORM_CORE_CONN_AG_CTX_RULE4EN_MASK 0x1 441 #define TSTORM_CORE_CONN_AG_CTX_RULE4EN_SHIFT 3 442 #define TSTORM_CORE_CONN_AG_CTX_RULE5EN_MASK 0x1 443 #define TSTORM_CORE_CONN_AG_CTX_RULE5EN_SHIFT 4 444 #define TSTORM_CORE_CONN_AG_CTX_RULE6EN_MASK 0x1 445 #define TSTORM_CORE_CONN_AG_CTX_RULE6EN_SHIFT 5 446 #define TSTORM_CORE_CONN_AG_CTX_RULE7EN_MASK 0x1 447 #define TSTORM_CORE_CONN_AG_CTX_RULE7EN_SHIFT 6 448 #define TSTORM_CORE_CONN_AG_CTX_RULE8EN_MASK 0x1 449 #define TSTORM_CORE_CONN_AG_CTX_RULE8EN_SHIFT 7 450 __le32 reg0; 451 __le32 reg1; 452 __le32 reg2; 453 __le32 reg3; 454 __le32 reg4; 455 __le32 reg5; 456 __le32 reg6; 457 __le32 reg7; 458 __le32 reg8; 459 u8 byte2; 460 u8 byte3; 461 __le16 word0; 462 u8 byte4; 463 u8 byte5; 464 __le16 word1; 465 __le16 word2; 466 __le16 word3; 467 __le32 reg9; 468 __le32 reg10; 469 }; 470 471 struct ustorm_core_conn_ag_ctx { 472 u8 reserved; 473 u8 byte1; 474 u8 flags0; 475 #define USTORM_CORE_CONN_AG_CTX_BIT0_MASK 0x1 476 #define USTORM_CORE_CONN_AG_CTX_BIT0_SHIFT 0 477 #define USTORM_CORE_CONN_AG_CTX_BIT1_MASK 0x1 478 #define USTORM_CORE_CONN_AG_CTX_BIT1_SHIFT 1 479 #define USTORM_CORE_CONN_AG_CTX_CF0_MASK 0x3 480 #define USTORM_CORE_CONN_AG_CTX_CF0_SHIFT 2 481 #define USTORM_CORE_CONN_AG_CTX_CF1_MASK 0x3 482 #define USTORM_CORE_CONN_AG_CTX_CF1_SHIFT 4 483 #define USTORM_CORE_CONN_AG_CTX_CF2_MASK 0x3 484 #define USTORM_CORE_CONN_AG_CTX_CF2_SHIFT 6 485 u8 flags1; 486 #define USTORM_CORE_CONN_AG_CTX_CF3_MASK 0x3 487 #define USTORM_CORE_CONN_AG_CTX_CF3_SHIFT 0 488 #define USTORM_CORE_CONN_AG_CTX_CF4_MASK 0x3 489 #define USTORM_CORE_CONN_AG_CTX_CF4_SHIFT 2 490 #define USTORM_CORE_CONN_AG_CTX_CF5_MASK 0x3 491 #define USTORM_CORE_CONN_AG_CTX_CF5_SHIFT 4 492 #define USTORM_CORE_CONN_AG_CTX_CF6_MASK 0x3 493 #define USTORM_CORE_CONN_AG_CTX_CF6_SHIFT 6 494 u8 flags2; 495 #define USTORM_CORE_CONN_AG_CTX_CF0EN_MASK 0x1 496 #define USTORM_CORE_CONN_AG_CTX_CF0EN_SHIFT 0 497 #define USTORM_CORE_CONN_AG_CTX_CF1EN_MASK 0x1 498 #define USTORM_CORE_CONN_AG_CTX_CF1EN_SHIFT 1 499 #define USTORM_CORE_CONN_AG_CTX_CF2EN_MASK 0x1 500 #define USTORM_CORE_CONN_AG_CTX_CF2EN_SHIFT 2 501 #define USTORM_CORE_CONN_AG_CTX_CF3EN_MASK 0x1 502 #define USTORM_CORE_CONN_AG_CTX_CF3EN_SHIFT 3 503 #define USTORM_CORE_CONN_AG_CTX_CF4EN_MASK 0x1 504 #define USTORM_CORE_CONN_AG_CTX_CF4EN_SHIFT 4 505 #define USTORM_CORE_CONN_AG_CTX_CF5EN_MASK 0x1 506 #define USTORM_CORE_CONN_AG_CTX_CF5EN_SHIFT 5 507 #define USTORM_CORE_CONN_AG_CTX_CF6EN_MASK 0x1 508 #define USTORM_CORE_CONN_AG_CTX_CF6EN_SHIFT 6 509 #define USTORM_CORE_CONN_AG_CTX_RULE0EN_MASK 0x1 510 #define USTORM_CORE_CONN_AG_CTX_RULE0EN_SHIFT 7 511 u8 flags3; 512 #define USTORM_CORE_CONN_AG_CTX_RULE1EN_MASK 0x1 513 #define USTORM_CORE_CONN_AG_CTX_RULE1EN_SHIFT 0 514 #define USTORM_CORE_CONN_AG_CTX_RULE2EN_MASK 0x1 515 #define USTORM_CORE_CONN_AG_CTX_RULE2EN_SHIFT 1 516 #define USTORM_CORE_CONN_AG_CTX_RULE3EN_MASK 0x1 517 #define USTORM_CORE_CONN_AG_CTX_RULE3EN_SHIFT 2 518 #define USTORM_CORE_CONN_AG_CTX_RULE4EN_MASK 0x1 519 #define USTORM_CORE_CONN_AG_CTX_RULE4EN_SHIFT 3 520 #define USTORM_CORE_CONN_AG_CTX_RULE5EN_MASK 0x1 521 #define USTORM_CORE_CONN_AG_CTX_RULE5EN_SHIFT 4 522 #define USTORM_CORE_CONN_AG_CTX_RULE6EN_MASK 0x1 523 #define USTORM_CORE_CONN_AG_CTX_RULE6EN_SHIFT 5 524 #define USTORM_CORE_CONN_AG_CTX_RULE7EN_MASK 0x1 525 #define USTORM_CORE_CONN_AG_CTX_RULE7EN_SHIFT 6 526 #define USTORM_CORE_CONN_AG_CTX_RULE8EN_MASK 0x1 527 #define USTORM_CORE_CONN_AG_CTX_RULE8EN_SHIFT 7 528 u8 byte2; 529 u8 byte3; 530 __le16 word0; 531 __le16 word1; 532 __le32 rx_producers; 533 __le32 reg1; 534 __le32 reg2; 535 __le32 reg3; 536 __le16 word2; 537 __le16 word3; 538 }; 539 540 /* The core storm context for the Mstorm */ 541 struct mstorm_core_conn_st_ctx { 542 __le32 reserved[24]; 543 }; 544 545 /* The core storm context for the Ustorm */ 546 struct ustorm_core_conn_st_ctx { 547 __le32 reserved[4]; 548 }; 549 550 /* core connection context */ 551 struct core_conn_context { 552 struct ystorm_core_conn_st_ctx ystorm_st_context; 553 struct regpair ystorm_st_padding[2]; 554 struct pstorm_core_conn_st_ctx pstorm_st_context; 555 struct regpair pstorm_st_padding[2]; 556 struct xstorm_core_conn_st_ctx xstorm_st_context; 557 struct xstorm_core_conn_ag_ctx xstorm_ag_context; 558 struct tstorm_core_conn_ag_ctx tstorm_ag_context; 559 struct ustorm_core_conn_ag_ctx ustorm_ag_context; 560 struct mstorm_core_conn_st_ctx mstorm_st_context; 561 struct ustorm_core_conn_st_ctx ustorm_st_context; 562 struct regpair ustorm_st_padding[2]; 563 }; 564 565 enum core_error_handle { 566 LL2_DROP_PACKET, 567 LL2_DO_NOTHING, 568 LL2_ASSERT, 569 MAX_CORE_ERROR_HANDLE 570 }; 571 572 enum core_event_opcode { 573 CORE_EVENT_TX_QUEUE_START, 574 CORE_EVENT_TX_QUEUE_STOP, 575 CORE_EVENT_RX_QUEUE_START, 576 CORE_EVENT_RX_QUEUE_STOP, 577 MAX_CORE_EVENT_OPCODE 578 }; 579 580 enum core_l4_pseudo_checksum_mode { 581 CORE_L4_PSEUDO_CSUM_CORRECT_LENGTH, 582 CORE_L4_PSEUDO_CSUM_ZERO_LENGTH, 583 MAX_CORE_L4_PSEUDO_CHECKSUM_MODE 584 }; 585 586 struct core_ll2_port_stats { 587 struct regpair gsi_invalid_hdr; 588 struct regpair gsi_invalid_pkt_length; 589 struct regpair gsi_unsupported_pkt_typ; 590 struct regpair gsi_crcchksm_error; 591 }; 592 593 struct core_ll2_pstorm_per_queue_stat { 594 struct regpair sent_ucast_bytes; 595 struct regpair sent_mcast_bytes; 596 struct regpair sent_bcast_bytes; 597 struct regpair sent_ucast_pkts; 598 struct regpair sent_mcast_pkts; 599 struct regpair sent_bcast_pkts; 600 }; 601 602 struct core_ll2_rx_prod { 603 __le16 bd_prod; 604 __le16 cqe_prod; 605 __le32 reserved; 606 }; 607 608 struct core_ll2_tstorm_per_queue_stat { 609 struct regpair packet_too_big_discard; 610 struct regpair no_buff_discard; 611 }; 612 613 struct core_ll2_ustorm_per_queue_stat { 614 struct regpair rcv_ucast_bytes; 615 struct regpair rcv_mcast_bytes; 616 struct regpair rcv_bcast_bytes; 617 struct regpair rcv_ucast_pkts; 618 struct regpair rcv_mcast_pkts; 619 struct regpair rcv_bcast_pkts; 620 }; 621 622 enum core_ramrod_cmd_id { 623 CORE_RAMROD_UNUSED, 624 CORE_RAMROD_RX_QUEUE_START, 625 CORE_RAMROD_TX_QUEUE_START, 626 CORE_RAMROD_RX_QUEUE_STOP, 627 CORE_RAMROD_TX_QUEUE_STOP, 628 MAX_CORE_RAMROD_CMD_ID 629 }; 630 631 enum core_roce_flavor_type { 632 CORE_ROCE, 633 CORE_RROCE, 634 MAX_CORE_ROCE_FLAVOR_TYPE 635 }; 636 637 struct core_rx_action_on_error { 638 u8 error_type; 639 #define CORE_RX_ACTION_ON_ERROR_PACKET_TOO_BIG_MASK 0x3 640 #define CORE_RX_ACTION_ON_ERROR_PACKET_TOO_BIG_SHIFT 0 641 #define CORE_RX_ACTION_ON_ERROR_NO_BUFF_MASK 0x3 642 #define CORE_RX_ACTION_ON_ERROR_NO_BUFF_SHIFT 2 643 #define CORE_RX_ACTION_ON_ERROR_RESERVED_MASK 0xF 644 #define CORE_RX_ACTION_ON_ERROR_RESERVED_SHIFT 4 645 }; 646 647 struct core_rx_bd { 648 struct regpair addr; 649 __le16 reserved[4]; 650 }; 651 652 struct core_rx_bd_with_buff_len { 653 struct regpair addr; 654 __le16 buff_length; 655 __le16 reserved[3]; 656 }; 657 658 union core_rx_bd_union { 659 struct core_rx_bd rx_bd; 660 struct core_rx_bd_with_buff_len rx_bd_with_len; 661 }; 662 663 struct core_rx_cqe_opaque_data { 664 __le32 data[2]; 665 }; 666 667 enum core_rx_cqe_type { 668 CORE_RX_CQE_ILLIGAL_TYPE, 669 CORE_RX_CQE_TYPE_REGULAR, 670 CORE_RX_CQE_TYPE_GSI_OFFLOAD, 671 CORE_RX_CQE_TYPE_SLOW_PATH, 672 MAX_CORE_RX_CQE_TYPE 673 }; 674 675 struct core_rx_fast_path_cqe { 676 u8 type; 677 u8 placement_offset; 678 struct parsing_and_err_flags parse_flags; 679 __le16 packet_length; 680 __le16 vlan; 681 struct core_rx_cqe_opaque_data opaque_data; 682 __le32 reserved[4]; 683 }; 684 685 struct core_rx_gsi_offload_cqe { 686 u8 type; 687 u8 data_length_error; 688 struct parsing_and_err_flags parse_flags; 689 __le16 data_length; 690 __le16 vlan; 691 __le32 src_mac_addrhi; 692 __le16 src_mac_addrlo; 693 u8 reserved1[2]; 694 __le32 gid_dst[4]; 695 }; 696 697 struct core_rx_slow_path_cqe { 698 u8 type; 699 u8 ramrod_cmd_id; 700 __le16 echo; 701 __le32 reserved1[7]; 702 }; 703 704 union core_rx_cqe_union { 705 struct core_rx_fast_path_cqe rx_cqe_fp; 706 struct core_rx_gsi_offload_cqe rx_cqe_gsi; 707 struct core_rx_slow_path_cqe rx_cqe_sp; 708 }; 709 710 struct core_rx_start_ramrod_data { 711 struct regpair bd_base; 712 struct regpair cqe_pbl_addr; 713 __le16 mtu; 714 __le16 sb_id; 715 u8 sb_index; 716 u8 complete_cqe_flg; 717 u8 complete_event_flg; 718 u8 drop_ttl0_flg; 719 __le16 num_of_pbl_pages; 720 u8 inner_vlan_removal_en; 721 u8 queue_id; 722 u8 main_func_queue; 723 u8 mf_si_bcast_accept_all; 724 u8 mf_si_mcast_accept_all; 725 struct core_rx_action_on_error action_on_error; 726 u8 gsi_offload_flag; 727 u8 reserved[7]; 728 }; 729 730 struct core_rx_stop_ramrod_data { 731 u8 complete_cqe_flg; 732 u8 complete_event_flg; 733 u8 queue_id; 734 u8 reserved1; 735 __le16 reserved2[2]; 736 }; 737 738 struct core_tx_bd_flags { 739 u8 as_bitfield; 740 #define CORE_TX_BD_FLAGS_FORCE_VLAN_MODE_MASK 0x1 741 #define CORE_TX_BD_FLAGS_FORCE_VLAN_MODE_SHIFT 0 742 #define CORE_TX_BD_FLAGS_VLAN_INSERTION_MASK 0x1 743 #define CORE_TX_BD_FLAGS_VLAN_INSERTION_SHIFT 1 744 #define CORE_TX_BD_FLAGS_START_BD_MASK 0x1 745 #define CORE_TX_BD_FLAGS_START_BD_SHIFT 2 746 #define CORE_TX_BD_FLAGS_IP_CSUM_MASK 0x1 747 #define CORE_TX_BD_FLAGS_IP_CSUM_SHIFT 3 748 #define CORE_TX_BD_FLAGS_L4_CSUM_MASK 0x1 749 #define CORE_TX_BD_FLAGS_L4_CSUM_SHIFT 4 750 #define CORE_TX_BD_FLAGS_IPV6_EXT_MASK 0x1 751 #define CORE_TX_BD_FLAGS_IPV6_EXT_SHIFT 5 752 #define CORE_TX_BD_FLAGS_L4_PROTOCOL_MASK 0x1 753 #define CORE_TX_BD_FLAGS_L4_PROTOCOL_SHIFT 6 754 #define CORE_TX_BD_FLAGS_L4_PSEUDO_CSUM_MODE_MASK 0x1 755 #define CORE_TX_BD_FLAGS_L4_PSEUDO_CSUM_MODE_SHIFT 7 756 }; 757 758 struct core_tx_bd { 759 struct regpair addr; 760 __le16 nbytes; 761 __le16 nw_vlan_or_lb_echo; 762 u8 bitfield0; 763 #define CORE_TX_BD_NBDS_MASK 0xF 764 #define CORE_TX_BD_NBDS_SHIFT 0 765 #define CORE_TX_BD_ROCE_FLAV_MASK 0x1 766 #define CORE_TX_BD_ROCE_FLAV_SHIFT 4 767 #define CORE_TX_BD_RESERVED0_MASK 0x7 768 #define CORE_TX_BD_RESERVED0_SHIFT 5 769 struct core_tx_bd_flags bd_flags; 770 __le16 bitfield1; 771 #define CORE_TX_BD_L4_HDR_OFFSET_W_MASK 0x3FFF 772 #define CORE_TX_BD_L4_HDR_OFFSET_W_SHIFT 0 773 #define CORE_TX_BD_TX_DST_MASK 0x1 774 #define CORE_TX_BD_TX_DST_SHIFT 14 775 #define CORE_TX_BD_RESERVED1_MASK 0x1 776 #define CORE_TX_BD_RESERVED1_SHIFT 15 777 }; 778 779 enum core_tx_dest { 780 CORE_TX_DEST_NW, 781 CORE_TX_DEST_LB, 782 MAX_CORE_TX_DEST 783 }; 784 785 struct core_tx_start_ramrod_data { 786 struct regpair pbl_base_addr; 787 __le16 mtu; 788 __le16 sb_id; 789 u8 sb_index; 790 u8 stats_en; 791 u8 stats_id; 792 u8 conn_type; 793 __le16 pbl_size; 794 __le16 qm_pq_id; 795 u8 gsi_offload_flag; 796 u8 resrved[3]; 797 }; 798 799 struct core_tx_stop_ramrod_data { 800 __le32 reserved0[2]; 801 }; 802 803 struct eth_mstorm_per_pf_stat { 804 struct regpair gre_discard_pkts; 805 struct regpair vxlan_discard_pkts; 806 struct regpair geneve_discard_pkts; 807 struct regpair lb_discard_pkts; 808 }; 809 810 struct eth_mstorm_per_queue_stat { 811 struct regpair ttl0_discard; 812 struct regpair packet_too_big_discard; 813 struct regpair no_buff_discard; 814 struct regpair not_active_discard; 815 struct regpair tpa_coalesced_pkts; 816 struct regpair tpa_coalesced_events; 817 struct regpair tpa_aborts_num; 818 struct regpair tpa_coalesced_bytes; 819 }; 820 821 /* Ethernet TX Per PF */ 822 struct eth_pstorm_per_pf_stat { 823 struct regpair sent_lb_ucast_bytes; 824 struct regpair sent_lb_mcast_bytes; 825 struct regpair sent_lb_bcast_bytes; 826 struct regpair sent_lb_ucast_pkts; 827 struct regpair sent_lb_mcast_pkts; 828 struct regpair sent_lb_bcast_pkts; 829 struct regpair sent_gre_bytes; 830 struct regpair sent_vxlan_bytes; 831 struct regpair sent_geneve_bytes; 832 struct regpair sent_gre_pkts; 833 struct regpair sent_vxlan_pkts; 834 struct regpair sent_geneve_pkts; 835 struct regpair gre_drop_pkts; 836 struct regpair vxlan_drop_pkts; 837 struct regpair geneve_drop_pkts; 838 }; 839 840 /* Ethernet TX Per Queue Stats */ 841 struct eth_pstorm_per_queue_stat { 842 struct regpair sent_ucast_bytes; 843 struct regpair sent_mcast_bytes; 844 struct regpair sent_bcast_bytes; 845 struct regpair sent_ucast_pkts; 846 struct regpair sent_mcast_pkts; 847 struct regpair sent_bcast_pkts; 848 struct regpair error_drop_pkts; 849 }; 850 851 /* ETH Rx producers data */ 852 struct eth_rx_rate_limit { 853 __le16 mult; 854 __le16 cnst; 855 u8 add_sub_cnst; 856 u8 reserved0; 857 __le16 reserved1; 858 }; 859 860 struct eth_ustorm_per_pf_stat { 861 struct regpair rcv_lb_ucast_bytes; 862 struct regpair rcv_lb_mcast_bytes; 863 struct regpair rcv_lb_bcast_bytes; 864 struct regpair rcv_lb_ucast_pkts; 865 struct regpair rcv_lb_mcast_pkts; 866 struct regpair rcv_lb_bcast_pkts; 867 struct regpair rcv_gre_bytes; 868 struct regpair rcv_vxlan_bytes; 869 struct regpair rcv_geneve_bytes; 870 struct regpair rcv_gre_pkts; 871 struct regpair rcv_vxlan_pkts; 872 struct regpair rcv_geneve_pkts; 873 }; 874 875 struct eth_ustorm_per_queue_stat { 876 struct regpair rcv_ucast_bytes; 877 struct regpair rcv_mcast_bytes; 878 struct regpair rcv_bcast_bytes; 879 struct regpair rcv_ucast_pkts; 880 struct regpair rcv_mcast_pkts; 881 struct regpair rcv_bcast_pkts; 882 }; 883 884 /* Event Ring Next Page Address */ 885 struct event_ring_next_addr { 886 struct regpair addr; 887 __le32 reserved[2]; 888 }; 889 890 /* Event Ring Element */ 891 union event_ring_element { 892 struct event_ring_entry entry; 893 struct event_ring_next_addr next_addr; 894 }; 895 896 /* Major and Minor hsi Versions */ 897 struct hsi_fp_ver_struct { 898 u8 minor_ver_arr[2]; 899 u8 major_ver_arr[2]; 900 }; 901 902 /* Mstorm non-triggering VF zone */ 903 enum malicious_vf_error_id { 904 MALICIOUS_VF_NO_ERROR, 905 VF_PF_CHANNEL_NOT_READY, 906 VF_ZONE_MSG_NOT_VALID, 907 VF_ZONE_FUNC_NOT_ENABLED, 908 ETH_PACKET_TOO_SMALL, 909 ETH_ILLEGAL_VLAN_MODE, 910 ETH_MTU_VIOLATION, 911 ETH_ILLEGAL_INBAND_TAGS, 912 ETH_VLAN_INSERT_AND_INBAND_VLAN, 913 ETH_ILLEGAL_NBDS, 914 ETH_FIRST_BD_WO_SOP, 915 ETH_INSUFFICIENT_BDS, 916 ETH_ILLEGAL_LSO_HDR_NBDS, 917 ETH_ILLEGAL_LSO_MSS, 918 ETH_ZERO_SIZE_BD, 919 ETH_ILLEGAL_LSO_HDR_LEN, 920 ETH_INSUFFICIENT_PAYLOAD, 921 ETH_EDPM_OUT_OF_SYNC, 922 ETH_TUNN_IPV6_EXT_NBD_ERR, 923 ETH_CONTROL_PACKET_VIOLATION, 924 MAX_MALICIOUS_VF_ERROR_ID 925 }; 926 927 struct mstorm_non_trigger_vf_zone { 928 struct eth_mstorm_per_queue_stat eth_queue_stat; 929 struct eth_rx_prod_data eth_rx_queue_producers[ETH_MAX_NUM_RX_QUEUES_PER_VF_QUAD]; 930 }; 931 932 /* Mstorm VF zone */ 933 struct mstorm_vf_zone { 934 struct mstorm_non_trigger_vf_zone non_trigger; 935 936 }; 937 938 /* personality per PF */ 939 enum personality_type { 940 BAD_PERSONALITY_TYP, 941 PERSONALITY_ISCSI, 942 PERSONALITY_FCOE, 943 PERSONALITY_RDMA_AND_ETH, 944 PERSONALITY_RESERVED3, 945 PERSONALITY_CORE, 946 PERSONALITY_ETH, 947 PERSONALITY_RESERVED4, 948 MAX_PERSONALITY_TYPE 949 }; 950 951 /* tunnel configuration */ 952 struct pf_start_tunnel_config { 953 u8 set_vxlan_udp_port_flg; 954 u8 set_geneve_udp_port_flg; 955 u8 tx_enable_vxlan; 956 u8 tx_enable_l2geneve; 957 u8 tx_enable_ipgeneve; 958 u8 tx_enable_l2gre; 959 u8 tx_enable_ipgre; 960 u8 tunnel_clss_vxlan; 961 u8 tunnel_clss_l2geneve; 962 u8 tunnel_clss_ipgeneve; 963 u8 tunnel_clss_l2gre; 964 u8 tunnel_clss_ipgre; 965 __le16 vxlan_udp_port; 966 __le16 geneve_udp_port; 967 }; 968 969 /* Ramrod data for PF start ramrod */ 970 struct pf_start_ramrod_data { 971 struct regpair event_ring_pbl_addr; 972 struct regpair consolid_q_pbl_addr; 973 struct pf_start_tunnel_config tunnel_config; 974 __le16 event_ring_sb_id; 975 u8 base_vf_id; 976 u8 num_vfs; 977 u8 event_ring_num_pages; 978 u8 event_ring_sb_index; 979 u8 path_id; 980 u8 warning_as_error; 981 u8 dont_log_ramrods; 982 u8 personality; 983 __le16 log_type_mask; 984 u8 mf_mode; 985 u8 integ_phase; 986 u8 allow_npar_tx_switching; 987 u8 inner_to_outer_pri_map[8]; 988 u8 pri_map_valid; 989 __le32 outer_tag; 990 struct hsi_fp_ver_struct hsi_fp_ver; 991 992 }; 993 994 struct protocol_dcb_data { 995 u8 dcb_enable_flag; 996 u8 reserved_a; 997 u8 dcb_priority; 998 u8 dcb_tc; 999 u8 reserved_b; 1000 u8 reserved0; 1001 }; 1002 1003 struct pf_update_tunnel_config { 1004 u8 update_rx_pf_clss; 1005 u8 update_rx_def_ucast_clss; 1006 u8 update_rx_def_non_ucast_clss; 1007 u8 update_tx_pf_clss; 1008 u8 set_vxlan_udp_port_flg; 1009 u8 set_geneve_udp_port_flg; 1010 u8 tx_enable_vxlan; 1011 u8 tx_enable_l2geneve; 1012 u8 tx_enable_ipgeneve; 1013 u8 tx_enable_l2gre; 1014 u8 tx_enable_ipgre; 1015 u8 tunnel_clss_vxlan; 1016 u8 tunnel_clss_l2geneve; 1017 u8 tunnel_clss_ipgeneve; 1018 u8 tunnel_clss_l2gre; 1019 u8 tunnel_clss_ipgre; 1020 __le16 vxlan_udp_port; 1021 __le16 geneve_udp_port; 1022 __le16 reserved[2]; 1023 }; 1024 1025 struct pf_update_ramrod_data { 1026 u8 pf_id; 1027 u8 update_eth_dcb_data_flag; 1028 u8 update_fcoe_dcb_data_flag; 1029 u8 update_iscsi_dcb_data_flag; 1030 u8 update_roce_dcb_data_flag; 1031 u8 update_rroce_dcb_data_flag; 1032 u8 update_iwarp_dcb_data_flag; 1033 u8 update_mf_vlan_flag; 1034 struct protocol_dcb_data eth_dcb_data; 1035 struct protocol_dcb_data fcoe_dcb_data; 1036 struct protocol_dcb_data iscsi_dcb_data; 1037 struct protocol_dcb_data roce_dcb_data; 1038 struct protocol_dcb_data rroce_dcb_data; 1039 struct protocol_dcb_data iwarp_dcb_data; 1040 __le16 mf_vlan; 1041 __le16 reserved; 1042 struct pf_update_tunnel_config tunnel_config; 1043 }; 1044 1045 /* Ports mode */ 1046 enum ports_mode { 1047 ENGX2_PORTX1, 1048 ENGX2_PORTX2, 1049 ENGX1_PORTX1, 1050 ENGX1_PORTX2, 1051 ENGX1_PORTX4, 1052 MAX_PORTS_MODE 1053 }; 1054 1055 /* use to index in hsi_fp_[major|minor]_ver_arr per protocol */ 1056 enum protocol_version_array_key { 1057 ETH_VER_KEY = 0, 1058 ROCE_VER_KEY, 1059 MAX_PROTOCOL_VERSION_ARRAY_KEY 1060 }; 1061 1062 struct rdma_sent_stats { 1063 struct regpair sent_bytes; 1064 struct regpair sent_pkts; 1065 }; 1066 1067 struct pstorm_non_trigger_vf_zone { 1068 struct eth_pstorm_per_queue_stat eth_queue_stat; 1069 struct rdma_sent_stats rdma_stats; 1070 }; 1071 1072 /* Pstorm VF zone */ 1073 struct pstorm_vf_zone { 1074 struct pstorm_non_trigger_vf_zone non_trigger; 1075 struct regpair reserved[7]; 1076 }; 1077 1078 /* Ramrod Header of SPQE */ 1079 struct ramrod_header { 1080 __le32 cid; 1081 u8 cmd_id; 1082 u8 protocol_id; 1083 __le16 echo; 1084 }; 1085 1086 struct rdma_rcv_stats { 1087 struct regpair rcv_bytes; 1088 struct regpair rcv_pkts; 1089 }; 1090 1091 struct slow_path_element { 1092 struct ramrod_header hdr; 1093 struct regpair data_ptr; 1094 }; 1095 1096 /* Tstorm non-triggering VF zone */ 1097 struct tstorm_non_trigger_vf_zone { 1098 struct rdma_rcv_stats rdma_stats; 1099 }; 1100 1101 struct tstorm_per_port_stat { 1102 struct regpair trunc_error_discard; 1103 struct regpair mac_error_discard; 1104 struct regpair mftag_filter_discard; 1105 struct regpair eth_mac_filter_discard; 1106 struct regpair ll2_mac_filter_discard; 1107 struct regpair ll2_conn_disabled_discard; 1108 struct regpair iscsi_irregular_pkt; 1109 struct regpair reserved; 1110 struct regpair roce_irregular_pkt; 1111 struct regpair eth_irregular_pkt; 1112 struct regpair reserved1; 1113 struct regpair preroce_irregular_pkt; 1114 struct regpair eth_gre_tunn_filter_discard; 1115 struct regpair eth_vxlan_tunn_filter_discard; 1116 struct regpair eth_geneve_tunn_filter_discard; 1117 }; 1118 1119 /* Tstorm VF zone */ 1120 struct tstorm_vf_zone { 1121 struct tstorm_non_trigger_vf_zone non_trigger; 1122 }; 1123 1124 /* Tunnel classification scheme */ 1125 enum tunnel_clss { 1126 TUNNEL_CLSS_MAC_VLAN = 0, 1127 TUNNEL_CLSS_MAC_VNI, 1128 TUNNEL_CLSS_INNER_MAC_VLAN, 1129 TUNNEL_CLSS_INNER_MAC_VNI, 1130 TUNNEL_CLSS_MAC_VLAN_DUAL_STAGE, 1131 MAX_TUNNEL_CLSS 1132 }; 1133 1134 /* Ustorm non-triggering VF zone */ 1135 struct ustorm_non_trigger_vf_zone { 1136 struct eth_ustorm_per_queue_stat eth_queue_stat; 1137 struct regpair vf_pf_msg_addr; 1138 }; 1139 1140 /* Ustorm triggering VF zone */ 1141 struct ustorm_trigger_vf_zone { 1142 u8 vf_pf_msg_valid; 1143 u8 reserved[7]; 1144 }; 1145 1146 /* Ustorm VF zone */ 1147 struct ustorm_vf_zone { 1148 struct ustorm_non_trigger_vf_zone non_trigger; 1149 struct ustorm_trigger_vf_zone trigger; 1150 }; 1151 1152 /* VF-PF channel data */ 1153 struct vf_pf_channel_data { 1154 __le32 ready; 1155 u8 valid; 1156 u8 reserved0; 1157 __le16 reserved1; 1158 }; 1159 1160 /* Ramrod data for VF start ramrod */ 1161 struct vf_start_ramrod_data { 1162 u8 vf_id; 1163 u8 enable_flr_ack; 1164 __le16 opaque_fid; 1165 u8 personality; 1166 u8 reserved[7]; 1167 struct hsi_fp_ver_struct hsi_fp_ver; 1168 1169 }; 1170 1171 /* Ramrod data for VF start ramrod */ 1172 struct vf_stop_ramrod_data { 1173 u8 vf_id; 1174 u8 reserved0; 1175 __le16 reserved1; 1176 __le32 reserved2; 1177 }; 1178 1179 enum vf_zone_size_mode { 1180 VF_ZONE_SIZE_MODE_DEFAULT, 1181 VF_ZONE_SIZE_MODE_DOUBLE, 1182 VF_ZONE_SIZE_MODE_QUAD, 1183 MAX_VF_ZONE_SIZE_MODE 1184 }; 1185 1186 struct atten_status_block { 1187 __le32 atten_bits; 1188 __le32 atten_ack; 1189 __le16 reserved0; 1190 __le16 sb_index; 1191 __le32 reserved1; 1192 }; 1193 1194 enum command_type_bit { 1195 IGU_COMMAND_TYPE_NOP = 0, 1196 IGU_COMMAND_TYPE_SET = 1, 1197 MAX_COMMAND_TYPE_BIT 1198 }; 1199 1200 /* DMAE command */ 1201 struct dmae_cmd { 1202 __le32 opcode; 1203 #define DMAE_CMD_SRC_MASK 0x1 1204 #define DMAE_CMD_SRC_SHIFT 0 1205 #define DMAE_CMD_DST_MASK 0x3 1206 #define DMAE_CMD_DST_SHIFT 1 1207 #define DMAE_CMD_C_DST_MASK 0x1 1208 #define DMAE_CMD_C_DST_SHIFT 3 1209 #define DMAE_CMD_CRC_RESET_MASK 0x1 1210 #define DMAE_CMD_CRC_RESET_SHIFT 4 1211 #define DMAE_CMD_SRC_ADDR_RESET_MASK 0x1 1212 #define DMAE_CMD_SRC_ADDR_RESET_SHIFT 5 1213 #define DMAE_CMD_DST_ADDR_RESET_MASK 0x1 1214 #define DMAE_CMD_DST_ADDR_RESET_SHIFT 6 1215 #define DMAE_CMD_COMP_FUNC_MASK 0x1 1216 #define DMAE_CMD_COMP_FUNC_SHIFT 7 1217 #define DMAE_CMD_COMP_WORD_EN_MASK 0x1 1218 #define DMAE_CMD_COMP_WORD_EN_SHIFT 8 1219 #define DMAE_CMD_COMP_CRC_EN_MASK 0x1 1220 #define DMAE_CMD_COMP_CRC_EN_SHIFT 9 1221 #define DMAE_CMD_COMP_CRC_OFFSET_MASK 0x7 1222 #define DMAE_CMD_COMP_CRC_OFFSET_SHIFT 10 1223 #define DMAE_CMD_RESERVED1_MASK 0x1 1224 #define DMAE_CMD_RESERVED1_SHIFT 13 1225 #define DMAE_CMD_ENDIANITY_MODE_MASK 0x3 1226 #define DMAE_CMD_ENDIANITY_MODE_SHIFT 14 1227 #define DMAE_CMD_ERR_HANDLING_MASK 0x3 1228 #define DMAE_CMD_ERR_HANDLING_SHIFT 16 1229 #define DMAE_CMD_PORT_ID_MASK 0x3 1230 #define DMAE_CMD_PORT_ID_SHIFT 18 1231 #define DMAE_CMD_SRC_PF_ID_MASK 0xF 1232 #define DMAE_CMD_SRC_PF_ID_SHIFT 20 1233 #define DMAE_CMD_DST_PF_ID_MASK 0xF 1234 #define DMAE_CMD_DST_PF_ID_SHIFT 24 1235 #define DMAE_CMD_SRC_VF_ID_VALID_MASK 0x1 1236 #define DMAE_CMD_SRC_VF_ID_VALID_SHIFT 28 1237 #define DMAE_CMD_DST_VF_ID_VALID_MASK 0x1 1238 #define DMAE_CMD_DST_VF_ID_VALID_SHIFT 29 1239 #define DMAE_CMD_RESERVED2_MASK 0x3 1240 #define DMAE_CMD_RESERVED2_SHIFT 30 1241 __le32 src_addr_lo; 1242 __le32 src_addr_hi; 1243 __le32 dst_addr_lo; 1244 __le32 dst_addr_hi; 1245 __le16 length_dw; 1246 __le16 opcode_b; 1247 #define DMAE_CMD_SRC_VF_ID_MASK 0xFF 1248 #define DMAE_CMD_SRC_VF_ID_SHIFT 0 1249 #define DMAE_CMD_DST_VF_ID_MASK 0xFF 1250 #define DMAE_CMD_DST_VF_ID_SHIFT 8 1251 __le32 comp_addr_lo; 1252 __le32 comp_addr_hi; 1253 __le32 comp_val; 1254 __le32 crc32; 1255 __le32 crc_32_c; 1256 __le16 crc16; 1257 __le16 crc16_c; 1258 __le16 crc10; 1259 __le16 reserved; 1260 __le16 xsum16; 1261 __le16 xsum8; 1262 }; 1263 1264 enum dmae_cmd_comp_crc_en_enum { 1265 dmae_cmd_comp_crc_disabled, 1266 dmae_cmd_comp_crc_enabled, 1267 MAX_DMAE_CMD_COMP_CRC_EN_ENUM 1268 }; 1269 1270 enum dmae_cmd_comp_func_enum { 1271 dmae_cmd_comp_func_to_src, 1272 dmae_cmd_comp_func_to_dst, 1273 MAX_DMAE_CMD_COMP_FUNC_ENUM 1274 }; 1275 1276 enum dmae_cmd_comp_word_en_enum { 1277 dmae_cmd_comp_word_disabled, 1278 dmae_cmd_comp_word_enabled, 1279 MAX_DMAE_CMD_COMP_WORD_EN_ENUM 1280 }; 1281 1282 enum dmae_cmd_c_dst_enum { 1283 dmae_cmd_c_dst_pcie, 1284 dmae_cmd_c_dst_grc, 1285 MAX_DMAE_CMD_C_DST_ENUM 1286 }; 1287 1288 enum dmae_cmd_dst_enum { 1289 dmae_cmd_dst_none_0, 1290 dmae_cmd_dst_pcie, 1291 dmae_cmd_dst_grc, 1292 dmae_cmd_dst_none_3, 1293 MAX_DMAE_CMD_DST_ENUM 1294 }; 1295 1296 enum dmae_cmd_error_handling_enum { 1297 dmae_cmd_error_handling_send_regular_comp, 1298 dmae_cmd_error_handling_send_comp_with_err, 1299 dmae_cmd_error_handling_dont_send_comp, 1300 MAX_DMAE_CMD_ERROR_HANDLING_ENUM 1301 }; 1302 1303 enum dmae_cmd_src_enum { 1304 dmae_cmd_src_pcie, 1305 dmae_cmd_src_grc, 1306 MAX_DMAE_CMD_SRC_ENUM 1307 }; 1308 1309 /* IGU cleanup command */ 1310 struct igu_cleanup { 1311 __le32 sb_id_and_flags; 1312 #define IGU_CLEANUP_RESERVED0_MASK 0x7FFFFFF 1313 #define IGU_CLEANUP_RESERVED0_SHIFT 0 1314 #define IGU_CLEANUP_CLEANUP_SET_MASK 0x1 1315 #define IGU_CLEANUP_CLEANUP_SET_SHIFT 27 1316 #define IGU_CLEANUP_CLEANUP_TYPE_MASK 0x7 1317 #define IGU_CLEANUP_CLEANUP_TYPE_SHIFT 28 1318 #define IGU_CLEANUP_COMMAND_TYPE_MASK 0x1 1319 #define IGU_CLEANUP_COMMAND_TYPE_SHIFT 31 1320 __le32 reserved1; 1321 }; 1322 1323 /* IGU firmware driver command */ 1324 union igu_command { 1325 struct igu_prod_cons_update prod_cons_update; 1326 struct igu_cleanup cleanup; 1327 }; 1328 1329 /* IGU firmware driver command */ 1330 struct igu_command_reg_ctrl { 1331 __le16 opaque_fid; 1332 __le16 igu_command_reg_ctrl_fields; 1333 #define IGU_COMMAND_REG_CTRL_PXP_BAR_ADDR_MASK 0xFFF 1334 #define IGU_COMMAND_REG_CTRL_PXP_BAR_ADDR_SHIFT 0 1335 #define IGU_COMMAND_REG_CTRL_RESERVED_MASK 0x7 1336 #define IGU_COMMAND_REG_CTRL_RESERVED_SHIFT 12 1337 #define IGU_COMMAND_REG_CTRL_COMMAND_TYPE_MASK 0x1 1338 #define IGU_COMMAND_REG_CTRL_COMMAND_TYPE_SHIFT 15 1339 }; 1340 1341 /* IGU mapping line structure */ 1342 struct igu_mapping_line { 1343 __le32 igu_mapping_line_fields; 1344 #define IGU_MAPPING_LINE_VALID_MASK 0x1 1345 #define IGU_MAPPING_LINE_VALID_SHIFT 0 1346 #define IGU_MAPPING_LINE_VECTOR_NUMBER_MASK 0xFF 1347 #define IGU_MAPPING_LINE_VECTOR_NUMBER_SHIFT 1 1348 #define IGU_MAPPING_LINE_FUNCTION_NUMBER_MASK 0xFF 1349 #define IGU_MAPPING_LINE_FUNCTION_NUMBER_SHIFT 9 1350 #define IGU_MAPPING_LINE_PF_VALID_MASK 0x1 1351 #define IGU_MAPPING_LINE_PF_VALID_SHIFT 17 1352 #define IGU_MAPPING_LINE_IPS_GROUP_MASK 0x3F 1353 #define IGU_MAPPING_LINE_IPS_GROUP_SHIFT 18 1354 #define IGU_MAPPING_LINE_RESERVED_MASK 0xFF 1355 #define IGU_MAPPING_LINE_RESERVED_SHIFT 24 1356 }; 1357 1358 /* IGU MSIX line structure */ 1359 struct igu_msix_vector { 1360 struct regpair address; 1361 __le32 data; 1362 __le32 msix_vector_fields; 1363 #define IGU_MSIX_VECTOR_MASK_BIT_MASK 0x1 1364 #define IGU_MSIX_VECTOR_MASK_BIT_SHIFT 0 1365 #define IGU_MSIX_VECTOR_RESERVED0_MASK 0x7FFF 1366 #define IGU_MSIX_VECTOR_RESERVED0_SHIFT 1 1367 #define IGU_MSIX_VECTOR_STEERING_TAG_MASK 0xFF 1368 #define IGU_MSIX_VECTOR_STEERING_TAG_SHIFT 16 1369 #define IGU_MSIX_VECTOR_RESERVED1_MASK 0xFF 1370 #define IGU_MSIX_VECTOR_RESERVED1_SHIFT 24 1371 }; 1372 1373 struct mstorm_core_conn_ag_ctx { 1374 u8 byte0; 1375 u8 byte1; 1376 u8 flags0; 1377 #define MSTORM_CORE_CONN_AG_CTX_BIT0_MASK 0x1 1378 #define MSTORM_CORE_CONN_AG_CTX_BIT0_SHIFT 0 1379 #define MSTORM_CORE_CONN_AG_CTX_BIT1_MASK 0x1 1380 #define MSTORM_CORE_CONN_AG_CTX_BIT1_SHIFT 1 1381 #define MSTORM_CORE_CONN_AG_CTX_CF0_MASK 0x3 1382 #define MSTORM_CORE_CONN_AG_CTX_CF0_SHIFT 2 1383 #define MSTORM_CORE_CONN_AG_CTX_CF1_MASK 0x3 1384 #define MSTORM_CORE_CONN_AG_CTX_CF1_SHIFT 4 1385 #define MSTORM_CORE_CONN_AG_CTX_CF2_MASK 0x3 1386 #define MSTORM_CORE_CONN_AG_CTX_CF2_SHIFT 6 1387 u8 flags1; 1388 #define MSTORM_CORE_CONN_AG_CTX_CF0EN_MASK 0x1 1389 #define MSTORM_CORE_CONN_AG_CTX_CF0EN_SHIFT 0 1390 #define MSTORM_CORE_CONN_AG_CTX_CF1EN_MASK 0x1 1391 #define MSTORM_CORE_CONN_AG_CTX_CF1EN_SHIFT 1 1392 #define MSTORM_CORE_CONN_AG_CTX_CF2EN_MASK 0x1 1393 #define MSTORM_CORE_CONN_AG_CTX_CF2EN_SHIFT 2 1394 #define MSTORM_CORE_CONN_AG_CTX_RULE0EN_MASK 0x1 1395 #define MSTORM_CORE_CONN_AG_CTX_RULE0EN_SHIFT 3 1396 #define MSTORM_CORE_CONN_AG_CTX_RULE1EN_MASK 0x1 1397 #define MSTORM_CORE_CONN_AG_CTX_RULE1EN_SHIFT 4 1398 #define MSTORM_CORE_CONN_AG_CTX_RULE2EN_MASK 0x1 1399 #define MSTORM_CORE_CONN_AG_CTX_RULE2EN_SHIFT 5 1400 #define MSTORM_CORE_CONN_AG_CTX_RULE3EN_MASK 0x1 1401 #define MSTORM_CORE_CONN_AG_CTX_RULE3EN_SHIFT 6 1402 #define MSTORM_CORE_CONN_AG_CTX_RULE4EN_MASK 0x1 1403 #define MSTORM_CORE_CONN_AG_CTX_RULE4EN_SHIFT 7 1404 __le16 word0; 1405 __le16 word1; 1406 __le32 reg0; 1407 __le32 reg1; 1408 }; 1409 1410 /* per encapsulation type enabling flags */ 1411 struct prs_reg_encapsulation_type_en { 1412 u8 flags; 1413 #define PRS_REG_ENCAPSULATION_TYPE_EN_ETH_OVER_GRE_ENABLE_MASK 0x1 1414 #define PRS_REG_ENCAPSULATION_TYPE_EN_ETH_OVER_GRE_ENABLE_SHIFT 0 1415 #define PRS_REG_ENCAPSULATION_TYPE_EN_IP_OVER_GRE_ENABLE_MASK 0x1 1416 #define PRS_REG_ENCAPSULATION_TYPE_EN_IP_OVER_GRE_ENABLE_SHIFT 1 1417 #define PRS_REG_ENCAPSULATION_TYPE_EN_VXLAN_ENABLE_MASK 0x1 1418 #define PRS_REG_ENCAPSULATION_TYPE_EN_VXLAN_ENABLE_SHIFT 2 1419 #define PRS_REG_ENCAPSULATION_TYPE_EN_T_TAG_ENABLE_MASK 0x1 1420 #define PRS_REG_ENCAPSULATION_TYPE_EN_T_TAG_ENABLE_SHIFT 3 1421 #define PRS_REG_ENCAPSULATION_TYPE_EN_ETH_OVER_GENEVE_ENABLE_MASK 0x1 1422 #define PRS_REG_ENCAPSULATION_TYPE_EN_ETH_OVER_GENEVE_ENABLE_SHIFT 4 1423 #define PRS_REG_ENCAPSULATION_TYPE_EN_IP_OVER_GENEVE_ENABLE_MASK 0x1 1424 #define PRS_REG_ENCAPSULATION_TYPE_EN_IP_OVER_GENEVE_ENABLE_SHIFT 5 1425 #define PRS_REG_ENCAPSULATION_TYPE_EN_RESERVED_MASK 0x3 1426 #define PRS_REG_ENCAPSULATION_TYPE_EN_RESERVED_SHIFT 6 1427 }; 1428 1429 enum pxp_tph_st_hint { 1430 TPH_ST_HINT_BIDIR, 1431 TPH_ST_HINT_REQUESTER, 1432 TPH_ST_HINT_TARGET, 1433 TPH_ST_HINT_TARGET_PRIO, 1434 MAX_PXP_TPH_ST_HINT 1435 }; 1436 1437 /* QM hardware structure of enable bypass credit mask */ 1438 struct qm_rf_bypass_mask { 1439 u8 flags; 1440 #define QM_RF_BYPASS_MASK_LINEVOQ_MASK 0x1 1441 #define QM_RF_BYPASS_MASK_LINEVOQ_SHIFT 0 1442 #define QM_RF_BYPASS_MASK_RESERVED0_MASK 0x1 1443 #define QM_RF_BYPASS_MASK_RESERVED0_SHIFT 1 1444 #define QM_RF_BYPASS_MASK_PFWFQ_MASK 0x1 1445 #define QM_RF_BYPASS_MASK_PFWFQ_SHIFT 2 1446 #define QM_RF_BYPASS_MASK_VPWFQ_MASK 0x1 1447 #define QM_RF_BYPASS_MASK_VPWFQ_SHIFT 3 1448 #define QM_RF_BYPASS_MASK_PFRL_MASK 0x1 1449 #define QM_RF_BYPASS_MASK_PFRL_SHIFT 4 1450 #define QM_RF_BYPASS_MASK_VPQCNRL_MASK 0x1 1451 #define QM_RF_BYPASS_MASK_VPQCNRL_SHIFT 5 1452 #define QM_RF_BYPASS_MASK_FWPAUSE_MASK 0x1 1453 #define QM_RF_BYPASS_MASK_FWPAUSE_SHIFT 6 1454 #define QM_RF_BYPASS_MASK_RESERVED1_MASK 0x1 1455 #define QM_RF_BYPASS_MASK_RESERVED1_SHIFT 7 1456 }; 1457 1458 /* QM hardware structure of opportunistic credit mask */ 1459 struct qm_rf_opportunistic_mask { 1460 __le16 flags; 1461 #define QM_RF_OPPORTUNISTIC_MASK_LINEVOQ_MASK 0x1 1462 #define QM_RF_OPPORTUNISTIC_MASK_LINEVOQ_SHIFT 0 1463 #define QM_RF_OPPORTUNISTIC_MASK_BYTEVOQ_MASK 0x1 1464 #define QM_RF_OPPORTUNISTIC_MASK_BYTEVOQ_SHIFT 1 1465 #define QM_RF_OPPORTUNISTIC_MASK_PFWFQ_MASK 0x1 1466 #define QM_RF_OPPORTUNISTIC_MASK_PFWFQ_SHIFT 2 1467 #define QM_RF_OPPORTUNISTIC_MASK_VPWFQ_MASK 0x1 1468 #define QM_RF_OPPORTUNISTIC_MASK_VPWFQ_SHIFT 3 1469 #define QM_RF_OPPORTUNISTIC_MASK_PFRL_MASK 0x1 1470 #define QM_RF_OPPORTUNISTIC_MASK_PFRL_SHIFT 4 1471 #define QM_RF_OPPORTUNISTIC_MASK_VPQCNRL_MASK 0x1 1472 #define QM_RF_OPPORTUNISTIC_MASK_VPQCNRL_SHIFT 5 1473 #define QM_RF_OPPORTUNISTIC_MASK_FWPAUSE_MASK 0x1 1474 #define QM_RF_OPPORTUNISTIC_MASK_FWPAUSE_SHIFT 6 1475 #define QM_RF_OPPORTUNISTIC_MASK_RESERVED0_MASK 0x1 1476 #define QM_RF_OPPORTUNISTIC_MASK_RESERVED0_SHIFT 7 1477 #define QM_RF_OPPORTUNISTIC_MASK_QUEUEEMPTY_MASK 0x1 1478 #define QM_RF_OPPORTUNISTIC_MASK_QUEUEEMPTY_SHIFT 8 1479 #define QM_RF_OPPORTUNISTIC_MASK_RESERVED1_MASK 0x7F 1480 #define QM_RF_OPPORTUNISTIC_MASK_RESERVED1_SHIFT 9 1481 }; 1482 1483 /* QM hardware structure of QM map memory */ 1484 struct qm_rf_pq_map { 1485 __le32 reg; 1486 #define QM_RF_PQ_MAP_PQ_VALID_MASK 0x1 1487 #define QM_RF_PQ_MAP_PQ_VALID_SHIFT 0 1488 #define QM_RF_PQ_MAP_RL_ID_MASK 0xFF 1489 #define QM_RF_PQ_MAP_RL_ID_SHIFT 1 1490 #define QM_RF_PQ_MAP_VP_PQ_ID_MASK 0x1FF 1491 #define QM_RF_PQ_MAP_VP_PQ_ID_SHIFT 9 1492 #define QM_RF_PQ_MAP_VOQ_MASK 0x1F 1493 #define QM_RF_PQ_MAP_VOQ_SHIFT 18 1494 #define QM_RF_PQ_MAP_WRR_WEIGHT_GROUP_MASK 0x3 1495 #define QM_RF_PQ_MAP_WRR_WEIGHT_GROUP_SHIFT 23 1496 #define QM_RF_PQ_MAP_RL_VALID_MASK 0x1 1497 #define QM_RF_PQ_MAP_RL_VALID_SHIFT 25 1498 #define QM_RF_PQ_MAP_RESERVED_MASK 0x3F 1499 #define QM_RF_PQ_MAP_RESERVED_SHIFT 26 1500 }; 1501 1502 /* Completion params for aggregated interrupt completion */ 1503 struct sdm_agg_int_comp_params { 1504 __le16 params; 1505 #define SDM_AGG_INT_COMP_PARAMS_AGG_INT_INDEX_MASK 0x3F 1506 #define SDM_AGG_INT_COMP_PARAMS_AGG_INT_INDEX_SHIFT 0 1507 #define SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_ENABLE_MASK 0x1 1508 #define SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_ENABLE_SHIFT 6 1509 #define SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_BIT_MASK 0x1FF 1510 #define SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_BIT_SHIFT 7 1511 }; 1512 1513 /* SDM operation gen command (generate aggregative interrupt) */ 1514 struct sdm_op_gen { 1515 __le32 command; 1516 #define SDM_OP_GEN_COMP_PARAM_MASK 0xFFFF 1517 #define SDM_OP_GEN_COMP_PARAM_SHIFT 0 1518 #define SDM_OP_GEN_COMP_TYPE_MASK 0xF 1519 #define SDM_OP_GEN_COMP_TYPE_SHIFT 16 1520 #define SDM_OP_GEN_RESERVED_MASK 0xFFF 1521 #define SDM_OP_GEN_RESERVED_SHIFT 20 1522 }; 1523 1524 struct ystorm_core_conn_ag_ctx { 1525 u8 byte0; 1526 u8 byte1; 1527 u8 flags0; 1528 #define YSTORM_CORE_CONN_AG_CTX_BIT0_MASK 0x1 1529 #define YSTORM_CORE_CONN_AG_CTX_BIT0_SHIFT 0 1530 #define YSTORM_CORE_CONN_AG_CTX_BIT1_MASK 0x1 1531 #define YSTORM_CORE_CONN_AG_CTX_BIT1_SHIFT 1 1532 #define YSTORM_CORE_CONN_AG_CTX_CF0_MASK 0x3 1533 #define YSTORM_CORE_CONN_AG_CTX_CF0_SHIFT 2 1534 #define YSTORM_CORE_CONN_AG_CTX_CF1_MASK 0x3 1535 #define YSTORM_CORE_CONN_AG_CTX_CF1_SHIFT 4 1536 #define YSTORM_CORE_CONN_AG_CTX_CF2_MASK 0x3 1537 #define YSTORM_CORE_CONN_AG_CTX_CF2_SHIFT 6 1538 u8 flags1; 1539 #define YSTORM_CORE_CONN_AG_CTX_CF0EN_MASK 0x1 1540 #define YSTORM_CORE_CONN_AG_CTX_CF0EN_SHIFT 0 1541 #define YSTORM_CORE_CONN_AG_CTX_CF1EN_MASK 0x1 1542 #define YSTORM_CORE_CONN_AG_CTX_CF1EN_SHIFT 1 1543 #define YSTORM_CORE_CONN_AG_CTX_CF2EN_MASK 0x1 1544 #define YSTORM_CORE_CONN_AG_CTX_CF2EN_SHIFT 2 1545 #define YSTORM_CORE_CONN_AG_CTX_RULE0EN_MASK 0x1 1546 #define YSTORM_CORE_CONN_AG_CTX_RULE0EN_SHIFT 3 1547 #define YSTORM_CORE_CONN_AG_CTX_RULE1EN_MASK 0x1 1548 #define YSTORM_CORE_CONN_AG_CTX_RULE1EN_SHIFT 4 1549 #define YSTORM_CORE_CONN_AG_CTX_RULE2EN_MASK 0x1 1550 #define YSTORM_CORE_CONN_AG_CTX_RULE2EN_SHIFT 5 1551 #define YSTORM_CORE_CONN_AG_CTX_RULE3EN_MASK 0x1 1552 #define YSTORM_CORE_CONN_AG_CTX_RULE3EN_SHIFT 6 1553 #define YSTORM_CORE_CONN_AG_CTX_RULE4EN_MASK 0x1 1554 #define YSTORM_CORE_CONN_AG_CTX_RULE4EN_SHIFT 7 1555 u8 byte2; 1556 u8 byte3; 1557 __le16 word0; 1558 __le32 reg0; 1559 __le32 reg1; 1560 __le16 word1; 1561 __le16 word2; 1562 __le16 word3; 1563 __le16 word4; 1564 __le32 reg2; 1565 __le32 reg3; 1566 }; 1567 1568 /****************************************/ 1569 /* Debug Tools HSI constants and macros */ 1570 /****************************************/ 1571 1572 enum block_addr { 1573 GRCBASE_GRC = 0x50000, 1574 GRCBASE_MISCS = 0x9000, 1575 GRCBASE_MISC = 0x8000, 1576 GRCBASE_DBU = 0xa000, 1577 GRCBASE_PGLUE_B = 0x2a8000, 1578 GRCBASE_CNIG = 0x218000, 1579 GRCBASE_CPMU = 0x30000, 1580 GRCBASE_NCSI = 0x40000, 1581 GRCBASE_OPTE = 0x53000, 1582 GRCBASE_BMB = 0x540000, 1583 GRCBASE_PCIE = 0x54000, 1584 GRCBASE_MCP = 0xe00000, 1585 GRCBASE_MCP2 = 0x52000, 1586 GRCBASE_PSWHST = 0x2a0000, 1587 GRCBASE_PSWHST2 = 0x29e000, 1588 GRCBASE_PSWRD = 0x29c000, 1589 GRCBASE_PSWRD2 = 0x29d000, 1590 GRCBASE_PSWWR = 0x29a000, 1591 GRCBASE_PSWWR2 = 0x29b000, 1592 GRCBASE_PSWRQ = 0x280000, 1593 GRCBASE_PSWRQ2 = 0x240000, 1594 GRCBASE_PGLCS = 0x0, 1595 GRCBASE_DMAE = 0xc000, 1596 GRCBASE_PTU = 0x560000, 1597 GRCBASE_TCM = 0x1180000, 1598 GRCBASE_MCM = 0x1200000, 1599 GRCBASE_UCM = 0x1280000, 1600 GRCBASE_XCM = 0x1000000, 1601 GRCBASE_YCM = 0x1080000, 1602 GRCBASE_PCM = 0x1100000, 1603 GRCBASE_QM = 0x2f0000, 1604 GRCBASE_TM = 0x2c0000, 1605 GRCBASE_DORQ = 0x100000, 1606 GRCBASE_BRB = 0x340000, 1607 GRCBASE_SRC = 0x238000, 1608 GRCBASE_PRS = 0x1f0000, 1609 GRCBASE_TSDM = 0xfb0000, 1610 GRCBASE_MSDM = 0xfc0000, 1611 GRCBASE_USDM = 0xfd0000, 1612 GRCBASE_XSDM = 0xf80000, 1613 GRCBASE_YSDM = 0xf90000, 1614 GRCBASE_PSDM = 0xfa0000, 1615 GRCBASE_TSEM = 0x1700000, 1616 GRCBASE_MSEM = 0x1800000, 1617 GRCBASE_USEM = 0x1900000, 1618 GRCBASE_XSEM = 0x1400000, 1619 GRCBASE_YSEM = 0x1500000, 1620 GRCBASE_PSEM = 0x1600000, 1621 GRCBASE_RSS = 0x238800, 1622 GRCBASE_TMLD = 0x4d0000, 1623 GRCBASE_MULD = 0x4e0000, 1624 GRCBASE_YULD = 0x4c8000, 1625 GRCBASE_XYLD = 0x4c0000, 1626 GRCBASE_PRM = 0x230000, 1627 GRCBASE_PBF_PB1 = 0xda0000, 1628 GRCBASE_PBF_PB2 = 0xda4000, 1629 GRCBASE_RPB = 0x23c000, 1630 GRCBASE_BTB = 0xdb0000, 1631 GRCBASE_PBF = 0xd80000, 1632 GRCBASE_RDIF = 0x300000, 1633 GRCBASE_TDIF = 0x310000, 1634 GRCBASE_CDU = 0x580000, 1635 GRCBASE_CCFC = 0x2e0000, 1636 GRCBASE_TCFC = 0x2d0000, 1637 GRCBASE_IGU = 0x180000, 1638 GRCBASE_CAU = 0x1c0000, 1639 GRCBASE_UMAC = 0x51000, 1640 GRCBASE_XMAC = 0x210000, 1641 GRCBASE_DBG = 0x10000, 1642 GRCBASE_NIG = 0x500000, 1643 GRCBASE_WOL = 0x600000, 1644 GRCBASE_BMBN = 0x610000, 1645 GRCBASE_IPC = 0x20000, 1646 GRCBASE_NWM = 0x800000, 1647 GRCBASE_NWS = 0x700000, 1648 GRCBASE_MS = 0x6a0000, 1649 GRCBASE_PHY_PCIE = 0x620000, 1650 GRCBASE_LED = 0x6b8000, 1651 GRCBASE_MISC_AEU = 0x8000, 1652 GRCBASE_BAR0_MAP = 0x1c00000, 1653 MAX_BLOCK_ADDR 1654 }; 1655 1656 enum block_id { 1657 BLOCK_GRC, 1658 BLOCK_MISCS, 1659 BLOCK_MISC, 1660 BLOCK_DBU, 1661 BLOCK_PGLUE_B, 1662 BLOCK_CNIG, 1663 BLOCK_CPMU, 1664 BLOCK_NCSI, 1665 BLOCK_OPTE, 1666 BLOCK_BMB, 1667 BLOCK_PCIE, 1668 BLOCK_MCP, 1669 BLOCK_MCP2, 1670 BLOCK_PSWHST, 1671 BLOCK_PSWHST2, 1672 BLOCK_PSWRD, 1673 BLOCK_PSWRD2, 1674 BLOCK_PSWWR, 1675 BLOCK_PSWWR2, 1676 BLOCK_PSWRQ, 1677 BLOCK_PSWRQ2, 1678 BLOCK_PGLCS, 1679 BLOCK_DMAE, 1680 BLOCK_PTU, 1681 BLOCK_TCM, 1682 BLOCK_MCM, 1683 BLOCK_UCM, 1684 BLOCK_XCM, 1685 BLOCK_YCM, 1686 BLOCK_PCM, 1687 BLOCK_QM, 1688 BLOCK_TM, 1689 BLOCK_DORQ, 1690 BLOCK_BRB, 1691 BLOCK_SRC, 1692 BLOCK_PRS, 1693 BLOCK_TSDM, 1694 BLOCK_MSDM, 1695 BLOCK_USDM, 1696 BLOCK_XSDM, 1697 BLOCK_YSDM, 1698 BLOCK_PSDM, 1699 BLOCK_TSEM, 1700 BLOCK_MSEM, 1701 BLOCK_USEM, 1702 BLOCK_XSEM, 1703 BLOCK_YSEM, 1704 BLOCK_PSEM, 1705 BLOCK_RSS, 1706 BLOCK_TMLD, 1707 BLOCK_MULD, 1708 BLOCK_YULD, 1709 BLOCK_XYLD, 1710 BLOCK_PRM, 1711 BLOCK_PBF_PB1, 1712 BLOCK_PBF_PB2, 1713 BLOCK_RPB, 1714 BLOCK_BTB, 1715 BLOCK_PBF, 1716 BLOCK_RDIF, 1717 BLOCK_TDIF, 1718 BLOCK_CDU, 1719 BLOCK_CCFC, 1720 BLOCK_TCFC, 1721 BLOCK_IGU, 1722 BLOCK_CAU, 1723 BLOCK_UMAC, 1724 BLOCK_XMAC, 1725 BLOCK_DBG, 1726 BLOCK_NIG, 1727 BLOCK_WOL, 1728 BLOCK_BMBN, 1729 BLOCK_IPC, 1730 BLOCK_NWM, 1731 BLOCK_NWS, 1732 BLOCK_MS, 1733 BLOCK_PHY_PCIE, 1734 BLOCK_LED, 1735 BLOCK_MISC_AEU, 1736 BLOCK_BAR0_MAP, 1737 MAX_BLOCK_ID 1738 }; 1739 1740 /* binary debug buffer types */ 1741 enum bin_dbg_buffer_type { 1742 BIN_BUF_DBG_MODE_TREE, 1743 BIN_BUF_DBG_DUMP_REG, 1744 BIN_BUF_DBG_DUMP_MEM, 1745 BIN_BUF_DBG_IDLE_CHK_REGS, 1746 BIN_BUF_DBG_IDLE_CHK_IMMS, 1747 BIN_BUF_DBG_IDLE_CHK_RULES, 1748 BIN_BUF_DBG_IDLE_CHK_PARSING_DATA, 1749 BIN_BUF_DBG_ATTN_BLOCKS, 1750 BIN_BUF_DBG_ATTN_REGS, 1751 BIN_BUF_DBG_ATTN_INDEXES, 1752 BIN_BUF_DBG_ATTN_NAME_OFFSETS, 1753 BIN_BUF_DBG_PARSING_STRINGS, 1754 MAX_BIN_DBG_BUFFER_TYPE 1755 }; 1756 1757 1758 /* Attention bit mapping */ 1759 struct dbg_attn_bit_mapping { 1760 __le16 data; 1761 #define DBG_ATTN_BIT_MAPPING_VAL_MASK 0x7FFF 1762 #define DBG_ATTN_BIT_MAPPING_VAL_SHIFT 0 1763 #define DBG_ATTN_BIT_MAPPING_IS_UNUSED_BIT_CNT_MASK 0x1 1764 #define DBG_ATTN_BIT_MAPPING_IS_UNUSED_BIT_CNT_SHIFT 15 1765 }; 1766 1767 /* Attention block per-type data */ 1768 struct dbg_attn_block_type_data { 1769 __le16 names_offset; 1770 __le16 reserved1; 1771 u8 num_regs; 1772 u8 reserved2; 1773 __le16 regs_offset; 1774 }; 1775 1776 /* Block attentions */ 1777 struct dbg_attn_block { 1778 struct dbg_attn_block_type_data per_type_data[2]; 1779 }; 1780 1781 /* Attention register result */ 1782 struct dbg_attn_reg_result { 1783 __le32 data; 1784 #define DBG_ATTN_REG_RESULT_STS_ADDRESS_MASK 0xFFFFFF 1785 #define DBG_ATTN_REG_RESULT_STS_ADDRESS_SHIFT 0 1786 #define DBG_ATTN_REG_RESULT_NUM_ATTN_IDX_MASK 0xFF 1787 #define DBG_ATTN_REG_RESULT_NUM_ATTN_IDX_SHIFT 24 1788 __le16 attn_idx_offset; 1789 __le16 reserved; 1790 __le32 sts_val; 1791 __le32 mask_val; 1792 }; 1793 1794 /* Attention block result */ 1795 struct dbg_attn_block_result { 1796 u8 block_id; 1797 u8 data; 1798 #define DBG_ATTN_BLOCK_RESULT_ATTN_TYPE_MASK 0x3 1799 #define DBG_ATTN_BLOCK_RESULT_ATTN_TYPE_SHIFT 0 1800 #define DBG_ATTN_BLOCK_RESULT_NUM_REGS_MASK 0x3F 1801 #define DBG_ATTN_BLOCK_RESULT_NUM_REGS_SHIFT 2 1802 __le16 names_offset; 1803 struct dbg_attn_reg_result reg_results[15]; 1804 }; 1805 1806 /* mode header */ 1807 struct dbg_mode_hdr { 1808 __le16 data; 1809 #define DBG_MODE_HDR_EVAL_MODE_MASK 0x1 1810 #define DBG_MODE_HDR_EVAL_MODE_SHIFT 0 1811 #define DBG_MODE_HDR_MODES_BUF_OFFSET_MASK 0x7FFF 1812 #define DBG_MODE_HDR_MODES_BUF_OFFSET_SHIFT 1 1813 }; 1814 1815 /* Attention register */ 1816 struct dbg_attn_reg { 1817 struct dbg_mode_hdr mode; 1818 __le16 attn_idx_offset; 1819 __le32 data; 1820 #define DBG_ATTN_REG_STS_ADDRESS_MASK 0xFFFFFF 1821 #define DBG_ATTN_REG_STS_ADDRESS_SHIFT 0 1822 #define DBG_ATTN_REG_NUM_ATTN_IDX_MASK 0xFF 1823 #define DBG_ATTN_REG_NUM_ATTN_IDX_SHIFT 24 1824 __le32 sts_clr_address; 1825 __le32 mask_address; 1826 }; 1827 1828 /* attention types */ 1829 enum dbg_attn_type { 1830 ATTN_TYPE_INTERRUPT, 1831 ATTN_TYPE_PARITY, 1832 MAX_DBG_ATTN_TYPE 1833 }; 1834 1835 /* condition header for registers dump */ 1836 struct dbg_dump_cond_hdr { 1837 struct dbg_mode_hdr mode; /* Mode header */ 1838 u8 block_id; /* block ID */ 1839 u8 data_size; /* size in dwords of the data following this header */ 1840 }; 1841 1842 /* memory data for registers dump */ 1843 struct dbg_dump_mem { 1844 __le32 dword0; 1845 #define DBG_DUMP_MEM_ADDRESS_MASK 0xFFFFFF 1846 #define DBG_DUMP_MEM_ADDRESS_SHIFT 0 1847 #define DBG_DUMP_MEM_MEM_GROUP_ID_MASK 0xFF 1848 #define DBG_DUMP_MEM_MEM_GROUP_ID_SHIFT 24 1849 __le32 dword1; 1850 #define DBG_DUMP_MEM_LENGTH_MASK 0xFFFFFF 1851 #define DBG_DUMP_MEM_LENGTH_SHIFT 0 1852 #define DBG_DUMP_MEM_RESERVED_MASK 0xFF 1853 #define DBG_DUMP_MEM_RESERVED_SHIFT 24 1854 }; 1855 1856 /* register data for registers dump */ 1857 struct dbg_dump_reg { 1858 __le32 data; 1859 #define DBG_DUMP_REG_ADDRESS_MASK 0xFFFFFF /* register address (in dwords) */ 1860 #define DBG_DUMP_REG_ADDRESS_SHIFT 0 1861 #define DBG_DUMP_REG_LENGTH_MASK 0xFF /* register size (in dwords) */ 1862 #define DBG_DUMP_REG_LENGTH_SHIFT 24 1863 }; 1864 1865 /* split header for registers dump */ 1866 struct dbg_dump_split_hdr { 1867 __le32 hdr; 1868 #define DBG_DUMP_SPLIT_HDR_DATA_SIZE_MASK 0xFFFFFF 1869 #define DBG_DUMP_SPLIT_HDR_DATA_SIZE_SHIFT 0 1870 #define DBG_DUMP_SPLIT_HDR_SPLIT_TYPE_ID_MASK 0xFF 1871 #define DBG_DUMP_SPLIT_HDR_SPLIT_TYPE_ID_SHIFT 24 1872 }; 1873 1874 /* condition header for idle check */ 1875 struct dbg_idle_chk_cond_hdr { 1876 struct dbg_mode_hdr mode; /* Mode header */ 1877 __le16 data_size; /* size in dwords of the data following this header */ 1878 }; 1879 1880 /* Idle Check condition register */ 1881 struct dbg_idle_chk_cond_reg { 1882 __le32 data; 1883 #define DBG_IDLE_CHK_COND_REG_ADDRESS_MASK 0xFFFFFF 1884 #define DBG_IDLE_CHK_COND_REG_ADDRESS_SHIFT 0 1885 #define DBG_IDLE_CHK_COND_REG_BLOCK_ID_MASK 0xFF 1886 #define DBG_IDLE_CHK_COND_REG_BLOCK_ID_SHIFT 24 1887 __le16 num_entries; /* number of registers entries to check */ 1888 u8 entry_size; /* size of registers entry (in dwords) */ 1889 u8 start_entry; /* index of the first entry to check */ 1890 }; 1891 1892 /* Idle Check info register */ 1893 struct dbg_idle_chk_info_reg { 1894 __le32 data; 1895 #define DBG_IDLE_CHK_INFO_REG_ADDRESS_MASK 0xFFFFFF 1896 #define DBG_IDLE_CHK_INFO_REG_ADDRESS_SHIFT 0 1897 #define DBG_IDLE_CHK_INFO_REG_BLOCK_ID_MASK 0xFF 1898 #define DBG_IDLE_CHK_INFO_REG_BLOCK_ID_SHIFT 24 1899 __le16 size; /* register size in dwords */ 1900 struct dbg_mode_hdr mode; /* Mode header */ 1901 }; 1902 1903 /* Idle Check register */ 1904 union dbg_idle_chk_reg { 1905 struct dbg_idle_chk_cond_reg cond_reg; /* condition register */ 1906 struct dbg_idle_chk_info_reg info_reg; /* info register */ 1907 }; 1908 1909 /* Idle Check result header */ 1910 struct dbg_idle_chk_result_hdr { 1911 __le16 rule_id; /* Failing rule index */ 1912 __le16 mem_entry_id; /* Failing memory entry index */ 1913 u8 num_dumped_cond_regs; /* number of dumped condition registers */ 1914 u8 num_dumped_info_regs; /* number of dumped condition registers */ 1915 u8 severity; /* from dbg_idle_chk_severity_types enum */ 1916 u8 reserved; 1917 }; 1918 1919 /* Idle Check result register header */ 1920 struct dbg_idle_chk_result_reg_hdr { 1921 u8 data; 1922 #define DBG_IDLE_CHK_RESULT_REG_HDR_IS_MEM_MASK 0x1 1923 #define DBG_IDLE_CHK_RESULT_REG_HDR_IS_MEM_SHIFT 0 1924 #define DBG_IDLE_CHK_RESULT_REG_HDR_REG_ID_MASK 0x7F 1925 #define DBG_IDLE_CHK_RESULT_REG_HDR_REG_ID_SHIFT 1 1926 u8 start_entry; /* index of the first checked entry */ 1927 __le16 size; /* register size in dwords */ 1928 }; 1929 1930 /* Idle Check rule */ 1931 struct dbg_idle_chk_rule { 1932 __le16 rule_id; /* Idle Check rule ID */ 1933 u8 severity; /* value from dbg_idle_chk_severity_types enum */ 1934 u8 cond_id; /* Condition ID */ 1935 u8 num_cond_regs; /* number of condition registers */ 1936 u8 num_info_regs; /* number of info registers */ 1937 u8 num_imms; /* number of immediates in the condition */ 1938 u8 reserved1; 1939 __le16 reg_offset; /* offset of this rules registers in the idle check 1940 * register array (in dbg_idle_chk_reg units). 1941 */ 1942 __le16 imm_offset; /* offset of this rules immediate values in the 1943 * immediate values array (in dwords). 1944 */ 1945 }; 1946 1947 /* Idle Check rule parsing data */ 1948 struct dbg_idle_chk_rule_parsing_data { 1949 __le32 data; 1950 #define DBG_IDLE_CHK_RULE_PARSING_DATA_HAS_FW_MSG_MASK 0x1 1951 #define DBG_IDLE_CHK_RULE_PARSING_DATA_HAS_FW_MSG_SHIFT 0 1952 #define DBG_IDLE_CHK_RULE_PARSING_DATA_STR_OFFSET_MASK 0x7FFFFFFF 1953 #define DBG_IDLE_CHK_RULE_PARSING_DATA_STR_OFFSET_SHIFT 1 1954 }; 1955 1956 /* idle check severity types */ 1957 enum dbg_idle_chk_severity_types { 1958 /* idle check failure should cause an error */ 1959 IDLE_CHK_SEVERITY_ERROR, 1960 /* idle check failure should cause an error only if theres no traffic */ 1961 IDLE_CHK_SEVERITY_ERROR_NO_TRAFFIC, 1962 /* idle check failure should cause a warning */ 1963 IDLE_CHK_SEVERITY_WARNING, 1964 MAX_DBG_IDLE_CHK_SEVERITY_TYPES 1965 }; 1966 1967 /* Debug Bus block data */ 1968 struct dbg_bus_block_data { 1969 u8 enabled; /* Indicates if the block is enabled for recording (0/1) */ 1970 u8 hw_id; /* HW ID associated with the block */ 1971 u8 line_num; /* Debug line number to select */ 1972 u8 right_shift; /* Number of units to right the debug data (0-3) */ 1973 u8 cycle_en; /* 4-bit value: bit i set -> unit i is enabled. */ 1974 u8 force_valid; /* 4-bit value: bit i set -> unit i is forced valid. */ 1975 u8 force_frame; /* 4-bit value: bit i set -> unit i frame bit is forced. 1976 */ 1977 u8 reserved; 1978 }; 1979 1980 /* Debug Bus Clients */ 1981 enum dbg_bus_clients { 1982 DBG_BUS_CLIENT_RBCN, 1983 DBG_BUS_CLIENT_RBCP, 1984 DBG_BUS_CLIENT_RBCR, 1985 DBG_BUS_CLIENT_RBCT, 1986 DBG_BUS_CLIENT_RBCU, 1987 DBG_BUS_CLIENT_RBCF, 1988 DBG_BUS_CLIENT_RBCX, 1989 DBG_BUS_CLIENT_RBCS, 1990 DBG_BUS_CLIENT_RBCH, 1991 DBG_BUS_CLIENT_RBCZ, 1992 DBG_BUS_CLIENT_OTHER_ENGINE, 1993 DBG_BUS_CLIENT_TIMESTAMP, 1994 DBG_BUS_CLIENT_CPU, 1995 DBG_BUS_CLIENT_RBCY, 1996 DBG_BUS_CLIENT_RBCQ, 1997 DBG_BUS_CLIENT_RBCM, 1998 DBG_BUS_CLIENT_RBCB, 1999 DBG_BUS_CLIENT_RBCW, 2000 DBG_BUS_CLIENT_RBCV, 2001 MAX_DBG_BUS_CLIENTS 2002 }; 2003 2004 /* Debug Bus memory address */ 2005 struct dbg_bus_mem_addr { 2006 __le32 lo; 2007 __le32 hi; 2008 }; 2009 2010 /* Debug Bus PCI buffer data */ 2011 struct dbg_bus_pci_buf_data { 2012 struct dbg_bus_mem_addr phys_addr; /* PCI buffer physical address */ 2013 struct dbg_bus_mem_addr virt_addr; /* PCI buffer virtual address */ 2014 __le32 size; /* PCI buffer size in bytes */ 2015 }; 2016 2017 /* Debug Bus Storm EID range filter params */ 2018 struct dbg_bus_storm_eid_range_params { 2019 u8 min; /* Minimal event ID to filter on */ 2020 u8 max; /* Maximal event ID to filter on */ 2021 }; 2022 2023 /* Debug Bus Storm EID mask filter params */ 2024 struct dbg_bus_storm_eid_mask_params { 2025 u8 val; /* Event ID value */ 2026 u8 mask; /* Event ID mask. 1s in the mask = dont care bits. */ 2027 }; 2028 2029 /* Debug Bus Storm EID filter params */ 2030 union dbg_bus_storm_eid_params { 2031 struct dbg_bus_storm_eid_range_params range; 2032 struct dbg_bus_storm_eid_mask_params mask; 2033 }; 2034 2035 /* Debug Bus Storm data */ 2036 struct dbg_bus_storm_data { 2037 u8 fast_enabled; 2038 u8 fast_mode; 2039 u8 slow_enabled; 2040 u8 slow_mode; 2041 u8 hw_id; 2042 u8 eid_filter_en; 2043 u8 eid_range_not_mask; 2044 u8 cid_filter_en; 2045 union dbg_bus_storm_eid_params eid_filter_params; 2046 __le16 reserved; 2047 __le32 cid; 2048 }; 2049 2050 /* Debug Bus data */ 2051 struct dbg_bus_data { 2052 __le32 app_version; /* The tools version number of the application */ 2053 u8 state; /* The current debug bus state */ 2054 u8 hw_dwords; /* HW dwords per cycle */ 2055 u8 next_hw_id; /* Next HW ID to be associated with an input */ 2056 u8 num_enabled_blocks; /* Number of blocks enabled for recording */ 2057 u8 num_enabled_storms; /* Number of Storms enabled for recording */ 2058 u8 target; /* Output target */ 2059 u8 next_trigger_state; /* ID of next trigger state to be added */ 2060 u8 next_constraint_id; /* ID of next filter/trigger constraint to be 2061 * added. 2062 */ 2063 u8 one_shot_en; /* Indicates if one-shot mode is enabled (0/1) */ 2064 u8 grc_input_en; /* Indicates if GRC recording is enabled (0/1) */ 2065 u8 timestamp_input_en; /* Indicates if timestamp recording is enabled 2066 * (0/1). 2067 */ 2068 u8 filter_en; /* Indicates if the recording filter is enabled (0/1) */ 2069 u8 trigger_en; /* Indicates if the recording trigger is enabled (0/1) */ 2070 u8 adding_filter; /* If true, the next added constraint belong to the 2071 * filter. Otherwise, it belongs to the last added 2072 * trigger state. Valid only if either filter or 2073 * triggers are enabled. 2074 */ 2075 u8 filter_pre_trigger; /* Indicates if the recording filter should be 2076 * applied before the trigger. Valid only if both 2077 * filter and trigger are enabled (0/1). 2078 */ 2079 u8 filter_post_trigger; /* Indicates if the recording filter should be 2080 * applied after the trigger. Valid only if both 2081 * filter and trigger are enabled (0/1). 2082 */ 2083 u8 unify_inputs; /* If true, all inputs are associated with HW ID 0. 2084 * Otherwise, each input is assigned a different HW ID 2085 * (0/1). 2086 */ 2087 u8 rcv_from_other_engine; /* Indicates if the other engine sends it NW 2088 * recording to this engine (0/1). 2089 */ 2090 struct dbg_bus_pci_buf_data pci_buf; /* Debug Bus PCI buffer data. Valid 2091 * only when the target is 2092 * DBG_BUS_TARGET_ID_PCI. 2093 */ 2094 __le16 reserved; 2095 struct dbg_bus_block_data blocks[80];/* Debug Bus data for each block */ 2096 struct dbg_bus_storm_data storms[6]; /* Debug Bus data for each block */ 2097 }; 2098 2099 /* Debug bus frame modes */ 2100 enum dbg_bus_frame_modes { 2101 DBG_BUS_FRAME_MODE_0HW_4ST = 0, /* 0 HW dwords, 4 Storm dwords */ 2102 DBG_BUS_FRAME_MODE_4HW_0ST = 3, /* 4 HW dwords, 0 Storm dwords */ 2103 DBG_BUS_FRAME_MODE_8HW_0ST = 4, /* 8 HW dwords, 0 Storm dwords */ 2104 MAX_DBG_BUS_FRAME_MODES 2105 }; 2106 2107 /* Debug bus states */ 2108 enum dbg_bus_states { 2109 DBG_BUS_STATE_IDLE, /* debug bus idle state (not recording) */ 2110 DBG_BUS_STATE_READY, /* debug bus is ready for configuration and 2111 * recording. 2112 */ 2113 DBG_BUS_STATE_RECORDING, /* debug bus is currently recording */ 2114 DBG_BUS_STATE_STOPPED, /* debug bus recording has stopped */ 2115 MAX_DBG_BUS_STATES 2116 }; 2117 2118 /* Debug bus target IDs */ 2119 enum dbg_bus_targets { 2120 /* records debug bus to DBG block internal buffer */ 2121 DBG_BUS_TARGET_ID_INT_BUF, 2122 /* records debug bus to the NW */ 2123 DBG_BUS_TARGET_ID_NIG, 2124 /* records debug bus to a PCI buffer */ 2125 DBG_BUS_TARGET_ID_PCI, 2126 MAX_DBG_BUS_TARGETS 2127 }; 2128 2129 /* GRC Dump data */ 2130 struct dbg_grc_data { 2131 __le32 param_val[40]; /* Value of each GRC parameter. Array size must 2132 * match the enum dbg_grc_params. 2133 */ 2134 u8 param_set_by_user[40]; /* Indicates for each GRC parameter if it was 2135 * set by the user (0/1). Array size must 2136 * match the enum dbg_grc_params. 2137 */ 2138 }; 2139 2140 /* Debug GRC params */ 2141 enum dbg_grc_params { 2142 DBG_GRC_PARAM_DUMP_TSTORM, /* dump Tstorm memories (0/1) */ 2143 DBG_GRC_PARAM_DUMP_MSTORM, /* dump Mstorm memories (0/1) */ 2144 DBG_GRC_PARAM_DUMP_USTORM, /* dump Ustorm memories (0/1) */ 2145 DBG_GRC_PARAM_DUMP_XSTORM, /* dump Xstorm memories (0/1) */ 2146 DBG_GRC_PARAM_DUMP_YSTORM, /* dump Ystorm memories (0/1) */ 2147 DBG_GRC_PARAM_DUMP_PSTORM, /* dump Pstorm memories (0/1) */ 2148 DBG_GRC_PARAM_DUMP_REGS, /* dump non-memory registers (0/1) */ 2149 DBG_GRC_PARAM_DUMP_RAM, /* dump Storm internal RAMs (0/1) */ 2150 DBG_GRC_PARAM_DUMP_PBUF, /* dump Storm passive buffer (0/1) */ 2151 DBG_GRC_PARAM_DUMP_IOR, /* dump Storm IORs (0/1) */ 2152 DBG_GRC_PARAM_DUMP_VFC, /* dump VFC memories (0/1) */ 2153 DBG_GRC_PARAM_DUMP_CM_CTX, /* dump CM contexts (0/1) */ 2154 DBG_GRC_PARAM_DUMP_PXP, /* dump PXP memories (0/1) */ 2155 DBG_GRC_PARAM_DUMP_RSS, /* dump RSS memories (0/1) */ 2156 DBG_GRC_PARAM_DUMP_CAU, /* dump CAU memories (0/1) */ 2157 DBG_GRC_PARAM_DUMP_QM, /* dump QM memories (0/1) */ 2158 DBG_GRC_PARAM_DUMP_MCP, /* dump MCP memories (0/1) */ 2159 DBG_GRC_PARAM_RESERVED, /* reserved */ 2160 DBG_GRC_PARAM_DUMP_CFC, /* dump CFC memories (0/1) */ 2161 DBG_GRC_PARAM_DUMP_IGU, /* dump IGU memories (0/1) */ 2162 DBG_GRC_PARAM_DUMP_BRB, /* dump BRB memories (0/1) */ 2163 DBG_GRC_PARAM_DUMP_BTB, /* dump BTB memories (0/1) */ 2164 DBG_GRC_PARAM_DUMP_BMB, /* dump BMB memories (0/1) */ 2165 DBG_GRC_PARAM_DUMP_NIG, /* dump NIG memories (0/1) */ 2166 DBG_GRC_PARAM_DUMP_MULD, /* dump MULD memories (0/1) */ 2167 DBG_GRC_PARAM_DUMP_PRS, /* dump PRS memories (0/1) */ 2168 DBG_GRC_PARAM_DUMP_DMAE, /* dump PRS memories (0/1) */ 2169 DBG_GRC_PARAM_DUMP_TM, /* dump TM (timers) memories (0/1) */ 2170 DBG_GRC_PARAM_DUMP_SDM, /* dump SDM memories (0/1) */ 2171 DBG_GRC_PARAM_DUMP_DIF, /* dump DIF memories (0/1) */ 2172 DBG_GRC_PARAM_DUMP_STATIC, /* dump static debug data (0/1) */ 2173 DBG_GRC_PARAM_UNSTALL, /* un-stall Storms after dump (0/1) */ 2174 DBG_GRC_PARAM_NUM_LCIDS, /* number of LCIDs (0..320) */ 2175 DBG_GRC_PARAM_NUM_LTIDS, /* number of LTIDs (0..320) */ 2176 /* preset: exclude all memories from dump (1 only) */ 2177 DBG_GRC_PARAM_EXCLUDE_ALL, 2178 /* preset: include memories for crash dump (1 only) */ 2179 DBG_GRC_PARAM_CRASH, 2180 /* perform dump only if MFW is responding (0/1) */ 2181 DBG_GRC_PARAM_PARITY_SAFE, 2182 DBG_GRC_PARAM_DUMP_CM, /* dump CM memories (0/1) */ 2183 DBG_GRC_PARAM_DUMP_PHY, /* dump PHY memories (0/1) */ 2184 MAX_DBG_GRC_PARAMS 2185 }; 2186 2187 /* Debug reset registers */ 2188 enum dbg_reset_regs { 2189 DBG_RESET_REG_MISCS_PL_UA, 2190 DBG_RESET_REG_MISCS_PL_HV, 2191 DBG_RESET_REG_MISCS_PL_HV_2, 2192 DBG_RESET_REG_MISC_PL_UA, 2193 DBG_RESET_REG_MISC_PL_HV, 2194 DBG_RESET_REG_MISC_PL_PDA_VMAIN_1, 2195 DBG_RESET_REG_MISC_PL_PDA_VMAIN_2, 2196 DBG_RESET_REG_MISC_PL_PDA_VAUX, 2197 MAX_DBG_RESET_REGS 2198 }; 2199 2200 /* Debug status codes */ 2201 enum dbg_status { 2202 DBG_STATUS_OK, 2203 DBG_STATUS_APP_VERSION_NOT_SET, 2204 DBG_STATUS_UNSUPPORTED_APP_VERSION, 2205 DBG_STATUS_DBG_BLOCK_NOT_RESET, 2206 DBG_STATUS_INVALID_ARGS, 2207 DBG_STATUS_OUTPUT_ALREADY_SET, 2208 DBG_STATUS_INVALID_PCI_BUF_SIZE, 2209 DBG_STATUS_PCI_BUF_ALLOC_FAILED, 2210 DBG_STATUS_PCI_BUF_NOT_ALLOCATED, 2211 DBG_STATUS_TOO_MANY_INPUTS, 2212 DBG_STATUS_INPUT_OVERLAP, 2213 DBG_STATUS_HW_ONLY_RECORDING, 2214 DBG_STATUS_STORM_ALREADY_ENABLED, 2215 DBG_STATUS_STORM_NOT_ENABLED, 2216 DBG_STATUS_BLOCK_ALREADY_ENABLED, 2217 DBG_STATUS_BLOCK_NOT_ENABLED, 2218 DBG_STATUS_NO_INPUT_ENABLED, 2219 DBG_STATUS_NO_FILTER_TRIGGER_64B, 2220 DBG_STATUS_FILTER_ALREADY_ENABLED, 2221 DBG_STATUS_TRIGGER_ALREADY_ENABLED, 2222 DBG_STATUS_TRIGGER_NOT_ENABLED, 2223 DBG_STATUS_CANT_ADD_CONSTRAINT, 2224 DBG_STATUS_TOO_MANY_TRIGGER_STATES, 2225 DBG_STATUS_TOO_MANY_CONSTRAINTS, 2226 DBG_STATUS_RECORDING_NOT_STARTED, 2227 DBG_STATUS_DATA_DIDNT_TRIGGER, 2228 DBG_STATUS_NO_DATA_RECORDED, 2229 DBG_STATUS_DUMP_BUF_TOO_SMALL, 2230 DBG_STATUS_DUMP_NOT_CHUNK_ALIGNED, 2231 DBG_STATUS_UNKNOWN_CHIP, 2232 DBG_STATUS_VIRT_MEM_ALLOC_FAILED, 2233 DBG_STATUS_BLOCK_IN_RESET, 2234 DBG_STATUS_INVALID_TRACE_SIGNATURE, 2235 DBG_STATUS_INVALID_NVRAM_BUNDLE, 2236 DBG_STATUS_NVRAM_GET_IMAGE_FAILED, 2237 DBG_STATUS_NON_ALIGNED_NVRAM_IMAGE, 2238 DBG_STATUS_NVRAM_READ_FAILED, 2239 DBG_STATUS_IDLE_CHK_PARSE_FAILED, 2240 DBG_STATUS_MCP_TRACE_BAD_DATA, 2241 DBG_STATUS_MCP_TRACE_NO_META, 2242 DBG_STATUS_MCP_COULD_NOT_HALT, 2243 DBG_STATUS_MCP_COULD_NOT_RESUME, 2244 DBG_STATUS_DMAE_FAILED, 2245 DBG_STATUS_SEMI_FIFO_NOT_EMPTY, 2246 DBG_STATUS_IGU_FIFO_BAD_DATA, 2247 DBG_STATUS_MCP_COULD_NOT_MASK_PRTY, 2248 DBG_STATUS_FW_ASSERTS_PARSE_FAILED, 2249 DBG_STATUS_REG_FIFO_BAD_DATA, 2250 DBG_STATUS_PROTECTION_OVERRIDE_BAD_DATA, 2251 DBG_STATUS_DBG_ARRAY_NOT_SET, 2252 DBG_STATUS_MULTI_BLOCKS_WITH_FILTER, 2253 MAX_DBG_STATUS 2254 }; 2255 2256 /* Debug Storms IDs */ 2257 enum dbg_storms { 2258 DBG_TSTORM_ID, 2259 DBG_MSTORM_ID, 2260 DBG_USTORM_ID, 2261 DBG_XSTORM_ID, 2262 DBG_YSTORM_ID, 2263 DBG_PSTORM_ID, 2264 MAX_DBG_STORMS 2265 }; 2266 2267 /* Idle Check data */ 2268 struct idle_chk_data { 2269 __le32 buf_size; /* Idle check buffer size in dwords */ 2270 u8 buf_size_set; /* Indicates if the idle check buffer size was set 2271 * (0/1). 2272 */ 2273 u8 reserved1; 2274 __le16 reserved2; 2275 }; 2276 2277 /* Debug Tools data (per HW function) */ 2278 struct dbg_tools_data { 2279 struct dbg_grc_data grc; /* GRC Dump data */ 2280 struct dbg_bus_data bus; /* Debug Bus data */ 2281 struct idle_chk_data idle_chk; /* Idle Check data */ 2282 u8 mode_enable[40]; /* Indicates if a mode is enabled (0/1) */ 2283 u8 block_in_reset[80]; /* Indicates if a block is in reset state (0/1). 2284 */ 2285 u8 chip_id; /* Chip ID (from enum chip_ids) */ 2286 u8 platform_id; /* Platform ID (from enum platform_ids) */ 2287 u8 initialized; /* Indicates if the data was initialized */ 2288 u8 reserved; 2289 }; 2290 2291 /********************************/ 2292 /* HSI Init Functions constants */ 2293 /********************************/ 2294 2295 /* Number of VLAN priorities */ 2296 #define NUM_OF_VLAN_PRIORITIES 8 2297 2298 struct init_brb_ram_req { 2299 __le32 guranteed_per_tc; 2300 __le32 headroom_per_tc; 2301 __le32 min_pkt_size; 2302 __le32 max_ports_per_engine; 2303 u8 num_active_tcs[MAX_NUM_PORTS]; 2304 }; 2305 2306 struct init_ets_tc_req { 2307 u8 use_sp; 2308 u8 use_wfq; 2309 __le16 weight; 2310 }; 2311 2312 struct init_ets_req { 2313 __le32 mtu; 2314 struct init_ets_tc_req tc_req[NUM_OF_TCS]; 2315 }; 2316 2317 struct init_nig_lb_rl_req { 2318 __le16 lb_mac_rate; 2319 __le16 lb_rate; 2320 __le32 mtu; 2321 __le16 tc_rate[NUM_OF_PHYS_TCS]; 2322 }; 2323 2324 struct init_nig_pri_tc_map_entry { 2325 u8 tc_id; 2326 u8 valid; 2327 }; 2328 2329 struct init_nig_pri_tc_map_req { 2330 struct init_nig_pri_tc_map_entry pri[NUM_OF_VLAN_PRIORITIES]; 2331 }; 2332 2333 struct init_qm_port_params { 2334 u8 active; 2335 u8 active_phys_tcs; 2336 __le16 num_pbf_cmd_lines; 2337 __le16 num_btb_blocks; 2338 __le16 reserved; 2339 }; 2340 2341 /* QM per-PQ init parameters */ 2342 struct init_qm_pq_params { 2343 u8 vport_id; 2344 u8 tc_id; 2345 u8 wrr_group; 2346 u8 rl_valid; 2347 }; 2348 2349 /* QM per-vport init parameters */ 2350 struct init_qm_vport_params { 2351 __le32 vport_rl; 2352 __le16 vport_wfq; 2353 __le16 first_tx_pq_id[NUM_OF_TCS]; 2354 }; 2355 2356 /**************************************/ 2357 /* Init Tool HSI constants and macros */ 2358 /**************************************/ 2359 2360 /* Width of GRC address in bits (addresses are specified in dwords) */ 2361 #define GRC_ADDR_BITS 23 2362 #define MAX_GRC_ADDR (BIT(GRC_ADDR_BITS) - 1) 2363 2364 /* indicates an init that should be applied to any phase ID */ 2365 #define ANY_PHASE_ID 0xffff 2366 2367 /* Max size in dwords of a zipped array */ 2368 #define MAX_ZIPPED_SIZE 8192 2369 2370 struct fw_asserts_ram_section { 2371 __le16 section_ram_line_offset; 2372 __le16 section_ram_line_size; 2373 u8 list_dword_offset; 2374 u8 list_element_dword_size; 2375 u8 list_num_elements; 2376 u8 list_next_index_dword_offset; 2377 }; 2378 2379 struct fw_ver_num { 2380 u8 major; /* Firmware major version number */ 2381 u8 minor; /* Firmware minor version number */ 2382 u8 rev; /* Firmware revision version number */ 2383 u8 eng; /* Firmware engineering version number (for bootleg versions) */ 2384 }; 2385 2386 struct fw_ver_info { 2387 __le16 tools_ver; /* Tools version number */ 2388 u8 image_id; /* FW image ID (e.g. main) */ 2389 u8 reserved1; 2390 struct fw_ver_num num; /* FW version number */ 2391 __le32 timestamp; /* FW Timestamp in unix time (sec. since 1970) */ 2392 __le32 reserved2; 2393 }; 2394 2395 struct fw_info { 2396 struct fw_ver_info ver; 2397 struct fw_asserts_ram_section fw_asserts_section; 2398 }; 2399 2400 struct fw_info_location { 2401 __le32 grc_addr; 2402 __le32 size; 2403 }; 2404 2405 enum init_modes { 2406 MODE_RESERVED, 2407 MODE_BB_B0, 2408 MODE_K2, 2409 MODE_ASIC, 2410 MODE_RESERVED2, 2411 MODE_RESERVED3, 2412 MODE_RESERVED4, 2413 MODE_RESERVED5, 2414 MODE_SF, 2415 MODE_MF_SD, 2416 MODE_MF_SI, 2417 MODE_PORTS_PER_ENG_1, 2418 MODE_PORTS_PER_ENG_2, 2419 MODE_PORTS_PER_ENG_4, 2420 MODE_100G, 2421 MODE_40G, 2422 MODE_RESERVED6, 2423 MAX_INIT_MODES 2424 }; 2425 2426 enum init_phases { 2427 PHASE_ENGINE, 2428 PHASE_PORT, 2429 PHASE_PF, 2430 PHASE_VF, 2431 PHASE_QM_PF, 2432 MAX_INIT_PHASES 2433 }; 2434 2435 enum init_split_types { 2436 SPLIT_TYPE_NONE, 2437 SPLIT_TYPE_PORT, 2438 SPLIT_TYPE_PF, 2439 SPLIT_TYPE_PORT_PF, 2440 SPLIT_TYPE_VF, 2441 MAX_INIT_SPLIT_TYPES 2442 }; 2443 2444 /* Binary buffer header */ 2445 struct bin_buffer_hdr { 2446 __le32 offset; 2447 __le32 length; 2448 }; 2449 2450 /* binary init buffer types */ 2451 enum bin_init_buffer_type { 2452 BIN_BUF_INIT_FW_VER_INFO, 2453 BIN_BUF_INIT_CMD, 2454 BIN_BUF_INIT_VAL, 2455 BIN_BUF_INIT_MODE_TREE, 2456 BIN_BUF_INIT_IRO, 2457 MAX_BIN_INIT_BUFFER_TYPE 2458 }; 2459 2460 /* init array header: raw */ 2461 struct init_array_raw_hdr { 2462 __le32 data; 2463 #define INIT_ARRAY_RAW_HDR_TYPE_MASK 0xF 2464 #define INIT_ARRAY_RAW_HDR_TYPE_SHIFT 0 2465 #define INIT_ARRAY_RAW_HDR_PARAMS_MASK 0xFFFFFFF 2466 #define INIT_ARRAY_RAW_HDR_PARAMS_SHIFT 4 2467 }; 2468 2469 /* init array header: standard */ 2470 struct init_array_standard_hdr { 2471 __le32 data; 2472 #define INIT_ARRAY_STANDARD_HDR_TYPE_MASK 0xF 2473 #define INIT_ARRAY_STANDARD_HDR_TYPE_SHIFT 0 2474 #define INIT_ARRAY_STANDARD_HDR_SIZE_MASK 0xFFFFFFF 2475 #define INIT_ARRAY_STANDARD_HDR_SIZE_SHIFT 4 2476 }; 2477 2478 /* init array header: zipped */ 2479 struct init_array_zipped_hdr { 2480 __le32 data; 2481 #define INIT_ARRAY_ZIPPED_HDR_TYPE_MASK 0xF 2482 #define INIT_ARRAY_ZIPPED_HDR_TYPE_SHIFT 0 2483 #define INIT_ARRAY_ZIPPED_HDR_ZIPPED_SIZE_MASK 0xFFFFFFF 2484 #define INIT_ARRAY_ZIPPED_HDR_ZIPPED_SIZE_SHIFT 4 2485 }; 2486 2487 /* init array header: pattern */ 2488 struct init_array_pattern_hdr { 2489 __le32 data; 2490 #define INIT_ARRAY_PATTERN_HDR_TYPE_MASK 0xF 2491 #define INIT_ARRAY_PATTERN_HDR_TYPE_SHIFT 0 2492 #define INIT_ARRAY_PATTERN_HDR_PATTERN_SIZE_MASK 0xF 2493 #define INIT_ARRAY_PATTERN_HDR_PATTERN_SIZE_SHIFT 4 2494 #define INIT_ARRAY_PATTERN_HDR_REPETITIONS_MASK 0xFFFFFF 2495 #define INIT_ARRAY_PATTERN_HDR_REPETITIONS_SHIFT 8 2496 }; 2497 2498 /* init array header union */ 2499 union init_array_hdr { 2500 struct init_array_raw_hdr raw; 2501 struct init_array_standard_hdr standard; 2502 struct init_array_zipped_hdr zipped; 2503 struct init_array_pattern_hdr pattern; 2504 }; 2505 2506 /* init array types */ 2507 enum init_array_types { 2508 INIT_ARR_STANDARD, 2509 INIT_ARR_ZIPPED, 2510 INIT_ARR_PATTERN, 2511 MAX_INIT_ARRAY_TYPES 2512 }; 2513 2514 /* init operation: callback */ 2515 struct init_callback_op { 2516 __le32 op_data; 2517 #define INIT_CALLBACK_OP_OP_MASK 0xF 2518 #define INIT_CALLBACK_OP_OP_SHIFT 0 2519 #define INIT_CALLBACK_OP_RESERVED_MASK 0xFFFFFFF 2520 #define INIT_CALLBACK_OP_RESERVED_SHIFT 4 2521 __le16 callback_id; 2522 __le16 block_id; 2523 }; 2524 2525 /* init operation: delay */ 2526 struct init_delay_op { 2527 __le32 op_data; 2528 #define INIT_DELAY_OP_OP_MASK 0xF 2529 #define INIT_DELAY_OP_OP_SHIFT 0 2530 #define INIT_DELAY_OP_RESERVED_MASK 0xFFFFFFF 2531 #define INIT_DELAY_OP_RESERVED_SHIFT 4 2532 __le32 delay; 2533 }; 2534 2535 /* init operation: if_mode */ 2536 struct init_if_mode_op { 2537 __le32 op_data; 2538 #define INIT_IF_MODE_OP_OP_MASK 0xF 2539 #define INIT_IF_MODE_OP_OP_SHIFT 0 2540 #define INIT_IF_MODE_OP_RESERVED1_MASK 0xFFF 2541 #define INIT_IF_MODE_OP_RESERVED1_SHIFT 4 2542 #define INIT_IF_MODE_OP_CMD_OFFSET_MASK 0xFFFF 2543 #define INIT_IF_MODE_OP_CMD_OFFSET_SHIFT 16 2544 __le16 reserved2; 2545 __le16 modes_buf_offset; 2546 }; 2547 2548 /* init operation: if_phase */ 2549 struct init_if_phase_op { 2550 __le32 op_data; 2551 #define INIT_IF_PHASE_OP_OP_MASK 0xF 2552 #define INIT_IF_PHASE_OP_OP_SHIFT 0 2553 #define INIT_IF_PHASE_OP_DMAE_ENABLE_MASK 0x1 2554 #define INIT_IF_PHASE_OP_DMAE_ENABLE_SHIFT 4 2555 #define INIT_IF_PHASE_OP_RESERVED1_MASK 0x7FF 2556 #define INIT_IF_PHASE_OP_RESERVED1_SHIFT 5 2557 #define INIT_IF_PHASE_OP_CMD_OFFSET_MASK 0xFFFF 2558 #define INIT_IF_PHASE_OP_CMD_OFFSET_SHIFT 16 2559 __le32 phase_data; 2560 #define INIT_IF_PHASE_OP_PHASE_MASK 0xFF 2561 #define INIT_IF_PHASE_OP_PHASE_SHIFT 0 2562 #define INIT_IF_PHASE_OP_RESERVED2_MASK 0xFF 2563 #define INIT_IF_PHASE_OP_RESERVED2_SHIFT 8 2564 #define INIT_IF_PHASE_OP_PHASE_ID_MASK 0xFFFF 2565 #define INIT_IF_PHASE_OP_PHASE_ID_SHIFT 16 2566 }; 2567 2568 /* init mode operators */ 2569 enum init_mode_ops { 2570 INIT_MODE_OP_NOT, 2571 INIT_MODE_OP_OR, 2572 INIT_MODE_OP_AND, 2573 MAX_INIT_MODE_OPS 2574 }; 2575 2576 /* init operation: raw */ 2577 struct init_raw_op { 2578 __le32 op_data; 2579 #define INIT_RAW_OP_OP_MASK 0xF 2580 #define INIT_RAW_OP_OP_SHIFT 0 2581 #define INIT_RAW_OP_PARAM1_MASK 0xFFFFFFF 2582 #define INIT_RAW_OP_PARAM1_SHIFT 4 2583 __le32 param2; 2584 }; 2585 2586 /* init array params */ 2587 struct init_op_array_params { 2588 __le16 size; 2589 __le16 offset; 2590 }; 2591 2592 /* Write init operation arguments */ 2593 union init_write_args { 2594 __le32 inline_val; 2595 __le32 zeros_count; 2596 __le32 array_offset; 2597 struct init_op_array_params runtime; 2598 }; 2599 2600 /* init operation: write */ 2601 struct init_write_op { 2602 __le32 data; 2603 #define INIT_WRITE_OP_OP_MASK 0xF 2604 #define INIT_WRITE_OP_OP_SHIFT 0 2605 #define INIT_WRITE_OP_SOURCE_MASK 0x7 2606 #define INIT_WRITE_OP_SOURCE_SHIFT 4 2607 #define INIT_WRITE_OP_RESERVED_MASK 0x1 2608 #define INIT_WRITE_OP_RESERVED_SHIFT 7 2609 #define INIT_WRITE_OP_WIDE_BUS_MASK 0x1 2610 #define INIT_WRITE_OP_WIDE_BUS_SHIFT 8 2611 #define INIT_WRITE_OP_ADDRESS_MASK 0x7FFFFF 2612 #define INIT_WRITE_OP_ADDRESS_SHIFT 9 2613 union init_write_args args; 2614 }; 2615 2616 /* init operation: read */ 2617 struct init_read_op { 2618 __le32 op_data; 2619 #define INIT_READ_OP_OP_MASK 0xF 2620 #define INIT_READ_OP_OP_SHIFT 0 2621 #define INIT_READ_OP_POLL_TYPE_MASK 0xF 2622 #define INIT_READ_OP_POLL_TYPE_SHIFT 4 2623 #define INIT_READ_OP_RESERVED_MASK 0x1 2624 #define INIT_READ_OP_RESERVED_SHIFT 8 2625 #define INIT_READ_OP_ADDRESS_MASK 0x7FFFFF 2626 #define INIT_READ_OP_ADDRESS_SHIFT 9 2627 __le32 expected_val; 2628 2629 }; 2630 2631 /* Init operations union */ 2632 union init_op { 2633 struct init_raw_op raw; 2634 struct init_write_op write; 2635 struct init_read_op read; 2636 struct init_if_mode_op if_mode; 2637 struct init_if_phase_op if_phase; 2638 struct init_callback_op callback; 2639 struct init_delay_op delay; 2640 }; 2641 2642 /* Init command operation types */ 2643 enum init_op_types { 2644 INIT_OP_READ, 2645 INIT_OP_WRITE, 2646 INIT_OP_IF_MODE, 2647 INIT_OP_IF_PHASE, 2648 INIT_OP_DELAY, 2649 INIT_OP_CALLBACK, 2650 MAX_INIT_OP_TYPES 2651 }; 2652 2653 /* init polling types */ 2654 enum init_poll_types { 2655 INIT_POLL_NONE, 2656 INIT_POLL_EQ, 2657 INIT_POLL_OR, 2658 INIT_POLL_AND, 2659 MAX_INIT_POLL_TYPES 2660 }; 2661 2662 /* init source types */ 2663 enum init_source_types { 2664 INIT_SRC_INLINE, 2665 INIT_SRC_ZEROS, 2666 INIT_SRC_ARRAY, 2667 INIT_SRC_RUNTIME, 2668 MAX_INIT_SOURCE_TYPES 2669 }; 2670 2671 /* Internal RAM Offsets macro data */ 2672 struct iro { 2673 __le32 base; 2674 __le16 m1; 2675 __le16 m2; 2676 __le16 m3; 2677 __le16 size; 2678 }; 2679 2680 /***************************** Public Functions *******************************/ 2681 /** 2682 * @brief qed_dbg_set_bin_ptr - Sets a pointer to the binary data with debug 2683 * arrays. 2684 * 2685 * @param bin_ptr - a pointer to the binary data with debug arrays. 2686 */ 2687 enum dbg_status qed_dbg_set_bin_ptr(const u8 * const bin_ptr); 2688 /** 2689 * @brief qed_dbg_grc_get_dump_buf_size - Returns the required buffer size for 2690 * GRC Dump. 2691 * 2692 * @param p_hwfn - HW device data 2693 * @param p_ptt - Ptt window used for writing the registers. 2694 * @param buf_size - OUT: required buffer size (in dwords) for the GRC Dump 2695 * data. 2696 * 2697 * @return error if one of the following holds: 2698 * - the version wasn't set 2699 * Otherwise, returns ok. 2700 */ 2701 enum dbg_status qed_dbg_grc_get_dump_buf_size(struct qed_hwfn *p_hwfn, 2702 struct qed_ptt *p_ptt, 2703 u32 *buf_size); 2704 /** 2705 * @brief qed_dbg_grc_dump - Dumps GRC data into the specified buffer. 2706 * 2707 * @param p_hwfn - HW device data 2708 * @param p_ptt - Ptt window used for writing the registers. 2709 * @param dump_buf - Pointer to write the collected GRC data into. 2710 * @param buf_size_in_dwords - Size of the specified buffer in dwords. 2711 * @param num_dumped_dwords - OUT: number of dumped dwords. 2712 * 2713 * @return error if one of the following holds: 2714 * - the version wasn't set 2715 * - the specified dump buffer is too small 2716 * Otherwise, returns ok. 2717 */ 2718 enum dbg_status qed_dbg_grc_dump(struct qed_hwfn *p_hwfn, 2719 struct qed_ptt *p_ptt, 2720 u32 *dump_buf, 2721 u32 buf_size_in_dwords, 2722 u32 *num_dumped_dwords); 2723 /** 2724 * @brief qed_dbg_idle_chk_get_dump_buf_size - Returns the required buffer size 2725 * for idle check results. 2726 * 2727 * @param p_hwfn - HW device data 2728 * @param p_ptt - Ptt window used for writing the registers. 2729 * @param buf_size - OUT: required buffer size (in dwords) for the idle check 2730 * data. 2731 * 2732 * @return error if one of the following holds: 2733 * - the version wasn't set 2734 * Otherwise, returns ok. 2735 */ 2736 enum dbg_status qed_dbg_idle_chk_get_dump_buf_size(struct qed_hwfn *p_hwfn, 2737 struct qed_ptt *p_ptt, 2738 u32 *buf_size); 2739 /** 2740 * @brief qed_dbg_idle_chk_dump - Performs idle check and writes the results 2741 * into the specified buffer. 2742 * 2743 * @param p_hwfn - HW device data 2744 * @param p_ptt - Ptt window used for writing the registers. 2745 * @param dump_buf - Pointer to write the idle check data into. 2746 * @param buf_size_in_dwords - Size of the specified buffer in dwords. 2747 * @param num_dumped_dwords - OUT: number of dumped dwords. 2748 * 2749 * @return error if one of the following holds: 2750 * - the version wasn't set 2751 * - the specified buffer is too small 2752 * Otherwise, returns ok. 2753 */ 2754 enum dbg_status qed_dbg_idle_chk_dump(struct qed_hwfn *p_hwfn, 2755 struct qed_ptt *p_ptt, 2756 u32 *dump_buf, 2757 u32 buf_size_in_dwords, 2758 u32 *num_dumped_dwords); 2759 /** 2760 * @brief qed_dbg_mcp_trace_get_dump_buf_size - Returns the required buffer size 2761 * for mcp trace results. 2762 * 2763 * @param p_hwfn - HW device data 2764 * @param p_ptt - Ptt window used for writing the registers. 2765 * @param buf_size - OUT: required buffer size (in dwords) for mcp trace data. 2766 * 2767 * @return error if one of the following holds: 2768 * - the version wasn't set 2769 * - the trace data in MCP scratchpad contain an invalid signature 2770 * - the bundle ID in NVRAM is invalid 2771 * - the trace meta data cannot be found (in NVRAM or image file) 2772 * Otherwise, returns ok. 2773 */ 2774 enum dbg_status qed_dbg_mcp_trace_get_dump_buf_size(struct qed_hwfn *p_hwfn, 2775 struct qed_ptt *p_ptt, 2776 u32 *buf_size); 2777 /** 2778 * @brief qed_dbg_mcp_trace_dump - Performs mcp trace and writes the results 2779 * into the specified buffer. 2780 * 2781 * @param p_hwfn - HW device data 2782 * @param p_ptt - Ptt window used for writing the registers. 2783 * @param dump_buf - Pointer to write the mcp trace data into. 2784 * @param buf_size_in_dwords - Size of the specified buffer in dwords. 2785 * @param num_dumped_dwords - OUT: number of dumped dwords. 2786 * 2787 * @return error if one of the following holds: 2788 * - the version wasn't set 2789 * - the specified buffer is too small 2790 * - the trace data in MCP scratchpad contain an invalid signature 2791 * - the bundle ID in NVRAM is invalid 2792 * - the trace meta data cannot be found (in NVRAM or image file) 2793 * - the trace meta data cannot be read (from NVRAM or image file) 2794 * Otherwise, returns ok. 2795 */ 2796 enum dbg_status qed_dbg_mcp_trace_dump(struct qed_hwfn *p_hwfn, 2797 struct qed_ptt *p_ptt, 2798 u32 *dump_buf, 2799 u32 buf_size_in_dwords, 2800 u32 *num_dumped_dwords); 2801 /** 2802 * @brief qed_dbg_reg_fifo_get_dump_buf_size - Returns the required buffer size 2803 * for grc trace fifo results. 2804 * 2805 * @param p_hwfn - HW device data 2806 * @param p_ptt - Ptt window used for writing the registers. 2807 * @param buf_size - OUT: required buffer size (in dwords) for reg fifo data. 2808 * 2809 * @return error if one of the following holds: 2810 * - the version wasn't set 2811 * Otherwise, returns ok. 2812 */ 2813 enum dbg_status qed_dbg_reg_fifo_get_dump_buf_size(struct qed_hwfn *p_hwfn, 2814 struct qed_ptt *p_ptt, 2815 u32 *buf_size); 2816 /** 2817 * @brief qed_dbg_reg_fifo_dump - Reads the reg fifo and writes the results into 2818 * the specified buffer. 2819 * 2820 * @param p_hwfn - HW device data 2821 * @param p_ptt - Ptt window used for writing the registers. 2822 * @param dump_buf - Pointer to write the reg fifo data into. 2823 * @param buf_size_in_dwords - Size of the specified buffer in dwords. 2824 * @param num_dumped_dwords - OUT: number of dumped dwords. 2825 * 2826 * @return error if one of the following holds: 2827 * - the version wasn't set 2828 * - the specified buffer is too small 2829 * - DMAE transaction failed 2830 * Otherwise, returns ok. 2831 */ 2832 enum dbg_status qed_dbg_reg_fifo_dump(struct qed_hwfn *p_hwfn, 2833 struct qed_ptt *p_ptt, 2834 u32 *dump_buf, 2835 u32 buf_size_in_dwords, 2836 u32 *num_dumped_dwords); 2837 /** 2838 * @brief qed_dbg_igu_fifo_get_dump_buf_size - Returns the required buffer size 2839 * for the IGU fifo results. 2840 * 2841 * @param p_hwfn - HW device data 2842 * @param p_ptt - Ptt window used for writing the registers. 2843 * @param buf_size - OUT: required buffer size (in dwords) for the IGU fifo 2844 * data. 2845 * 2846 * @return error if one of the following holds: 2847 * - the version wasn't set 2848 * Otherwise, returns ok. 2849 */ 2850 enum dbg_status qed_dbg_igu_fifo_get_dump_buf_size(struct qed_hwfn *p_hwfn, 2851 struct qed_ptt *p_ptt, 2852 u32 *buf_size); 2853 /** 2854 * @brief qed_dbg_igu_fifo_dump - Reads the IGU fifo and writes the results into 2855 * the specified buffer. 2856 * 2857 * @param p_hwfn - HW device data 2858 * @param p_ptt - Ptt window used for writing the registers. 2859 * @param dump_buf - Pointer to write the IGU fifo data into. 2860 * @param buf_size_in_dwords - Size of the specified buffer in dwords. 2861 * @param num_dumped_dwords - OUT: number of dumped dwords. 2862 * 2863 * @return error if one of the following holds: 2864 * - the version wasn't set 2865 * - the specified buffer is too small 2866 * - DMAE transaction failed 2867 * Otherwise, returns ok. 2868 */ 2869 enum dbg_status qed_dbg_igu_fifo_dump(struct qed_hwfn *p_hwfn, 2870 struct qed_ptt *p_ptt, 2871 u32 *dump_buf, 2872 u32 buf_size_in_dwords, 2873 u32 *num_dumped_dwords); 2874 /** 2875 * @brief qed_dbg_protection_override_get_dump_buf_size - Returns the required 2876 * buffer size for protection override window results. 2877 * 2878 * @param p_hwfn - HW device data 2879 * @param p_ptt - Ptt window used for writing the registers. 2880 * @param buf_size - OUT: required buffer size (in dwords) for protection 2881 * override data. 2882 * 2883 * @return error if one of the following holds: 2884 * - the version wasn't set 2885 * Otherwise, returns ok. 2886 */ 2887 enum dbg_status 2888 qed_dbg_protection_override_get_dump_buf_size(struct qed_hwfn *p_hwfn, 2889 struct qed_ptt *p_ptt, 2890 u32 *buf_size); 2891 /** 2892 * @brief qed_dbg_protection_override_dump - Reads protection override window 2893 * entries and writes the results into the specified buffer. 2894 * 2895 * @param p_hwfn - HW device data 2896 * @param p_ptt - Ptt window used for writing the registers. 2897 * @param dump_buf - Pointer to write the protection override data into. 2898 * @param buf_size_in_dwords - Size of the specified buffer in dwords. 2899 * @param num_dumped_dwords - OUT: number of dumped dwords. 2900 * 2901 * @return error if one of the following holds: 2902 * - the version wasn't set 2903 * - the specified buffer is too small 2904 * - DMAE transaction failed 2905 * Otherwise, returns ok. 2906 */ 2907 enum dbg_status qed_dbg_protection_override_dump(struct qed_hwfn *p_hwfn, 2908 struct qed_ptt *p_ptt, 2909 u32 *dump_buf, 2910 u32 buf_size_in_dwords, 2911 u32 *num_dumped_dwords); 2912 /** 2913 * @brief qed_dbg_fw_asserts_get_dump_buf_size - Returns the required buffer 2914 * size for FW Asserts results. 2915 * 2916 * @param p_hwfn - HW device data 2917 * @param p_ptt - Ptt window used for writing the registers. 2918 * @param buf_size - OUT: required buffer size (in dwords) for FW Asserts data. 2919 * 2920 * @return error if one of the following holds: 2921 * - the version wasn't set 2922 * Otherwise, returns ok. 2923 */ 2924 enum dbg_status qed_dbg_fw_asserts_get_dump_buf_size(struct qed_hwfn *p_hwfn, 2925 struct qed_ptt *p_ptt, 2926 u32 *buf_size); 2927 /** 2928 * @brief qed_dbg_fw_asserts_dump - Reads the FW Asserts and writes the results 2929 * into the specified buffer. 2930 * 2931 * @param p_hwfn - HW device data 2932 * @param p_ptt - Ptt window used for writing the registers. 2933 * @param dump_buf - Pointer to write the FW Asserts data into. 2934 * @param buf_size_in_dwords - Size of the specified buffer in dwords. 2935 * @param num_dumped_dwords - OUT: number of dumped dwords. 2936 * 2937 * @return error if one of the following holds: 2938 * - the version wasn't set 2939 * - the specified buffer is too small 2940 * Otherwise, returns ok. 2941 */ 2942 enum dbg_status qed_dbg_fw_asserts_dump(struct qed_hwfn *p_hwfn, 2943 struct qed_ptt *p_ptt, 2944 u32 *dump_buf, 2945 u32 buf_size_in_dwords, 2946 u32 *num_dumped_dwords); 2947 /** 2948 * @brief qed_dbg_print_attn - Prints attention registers values in the 2949 * specified results struct. 2950 * 2951 * @param p_hwfn 2952 * @param results - Pointer to the attention read results 2953 * 2954 * @return error if one of the following holds: 2955 * - the version wasn't set 2956 * Otherwise, returns ok. 2957 */ 2958 enum dbg_status qed_dbg_print_attn(struct qed_hwfn *p_hwfn, 2959 struct dbg_attn_block_result *results); 2960 2961 /******************************** Constants **********************************/ 2962 2963 #define MAX_NAME_LEN 16 2964 2965 /***************************** Public Functions *******************************/ 2966 /** 2967 * @brief qed_dbg_user_set_bin_ptr - Sets a pointer to the binary data with 2968 * debug arrays. 2969 * 2970 * @param bin_ptr - a pointer to the binary data with debug arrays. 2971 */ 2972 enum dbg_status qed_dbg_user_set_bin_ptr(const u8 * const bin_ptr); 2973 /** 2974 * @brief qed_dbg_get_status_str - Returns a string for the specified status. 2975 * 2976 * @param status - a debug status code. 2977 * 2978 * @return a string for the specified status 2979 */ 2980 const char *qed_dbg_get_status_str(enum dbg_status status); 2981 /** 2982 * @brief qed_get_idle_chk_results_buf_size - Returns the required buffer size 2983 * for idle check results (in bytes). 2984 * 2985 * @param p_hwfn - HW device data 2986 * @param dump_buf - idle check dump buffer. 2987 * @param num_dumped_dwords - number of dwords that were dumped. 2988 * @param results_buf_size - OUT: required buffer size (in bytes) for the parsed 2989 * results. 2990 * 2991 * @return error if the parsing fails, ok otherwise. 2992 */ 2993 enum dbg_status qed_get_idle_chk_results_buf_size(struct qed_hwfn *p_hwfn, 2994 u32 *dump_buf, 2995 u32 num_dumped_dwords, 2996 u32 *results_buf_size); 2997 /** 2998 * @brief qed_print_idle_chk_results - Prints idle check results 2999 * 3000 * @param p_hwfn - HW device data 3001 * @param dump_buf - idle check dump buffer. 3002 * @param num_dumped_dwords - number of dwords that were dumped. 3003 * @param results_buf - buffer for printing the idle check results. 3004 * @param num_errors - OUT: number of errors found in idle check. 3005 * @param num_warnings - OUT: number of warnings found in idle check. 3006 * 3007 * @return error if the parsing fails, ok otherwise. 3008 */ 3009 enum dbg_status qed_print_idle_chk_results(struct qed_hwfn *p_hwfn, 3010 u32 *dump_buf, 3011 u32 num_dumped_dwords, 3012 char *results_buf, 3013 u32 *num_errors, 3014 u32 *num_warnings); 3015 /** 3016 * @brief qed_get_mcp_trace_results_buf_size - Returns the required buffer size 3017 * for MCP Trace results (in bytes). 3018 * 3019 * @param p_hwfn - HW device data 3020 * @param dump_buf - MCP Trace dump buffer. 3021 * @param num_dumped_dwords - number of dwords that were dumped. 3022 * @param results_buf_size - OUT: required buffer size (in bytes) for the parsed 3023 * results. 3024 * 3025 * @return error if the parsing fails, ok otherwise. 3026 */ 3027 enum dbg_status qed_get_mcp_trace_results_buf_size(struct qed_hwfn *p_hwfn, 3028 u32 *dump_buf, 3029 u32 num_dumped_dwords, 3030 u32 *results_buf_size); 3031 /** 3032 * @brief qed_print_mcp_trace_results - Prints MCP Trace results 3033 * 3034 * @param p_hwfn - HW device data 3035 * @param dump_buf - mcp trace dump buffer, starting from the header. 3036 * @param num_dumped_dwords - number of dwords that were dumped. 3037 * @param results_buf - buffer for printing the mcp trace results. 3038 * 3039 * @return error if the parsing fails, ok otherwise. 3040 */ 3041 enum dbg_status qed_print_mcp_trace_results(struct qed_hwfn *p_hwfn, 3042 u32 *dump_buf, 3043 u32 num_dumped_dwords, 3044 char *results_buf); 3045 /** 3046 * @brief qed_get_reg_fifo_results_buf_size - Returns the required buffer size 3047 * for reg_fifo results (in bytes). 3048 * 3049 * @param p_hwfn - HW device data 3050 * @param dump_buf - reg fifo dump buffer. 3051 * @param num_dumped_dwords - number of dwords that were dumped. 3052 * @param results_buf_size - OUT: required buffer size (in bytes) for the parsed 3053 * results. 3054 * 3055 * @return error if the parsing fails, ok otherwise. 3056 */ 3057 enum dbg_status qed_get_reg_fifo_results_buf_size(struct qed_hwfn *p_hwfn, 3058 u32 *dump_buf, 3059 u32 num_dumped_dwords, 3060 u32 *results_buf_size); 3061 /** 3062 * @brief qed_print_reg_fifo_results - Prints reg fifo results 3063 * 3064 * @param p_hwfn - HW device data 3065 * @param dump_buf - reg fifo dump buffer, starting from the header. 3066 * @param num_dumped_dwords - number of dwords that were dumped. 3067 * @param results_buf - buffer for printing the reg fifo results. 3068 * 3069 * @return error if the parsing fails, ok otherwise. 3070 */ 3071 enum dbg_status qed_print_reg_fifo_results(struct qed_hwfn *p_hwfn, 3072 u32 *dump_buf, 3073 u32 num_dumped_dwords, 3074 char *results_buf); 3075 /** 3076 * @brief qed_get_igu_fifo_results_buf_size - Returns the required buffer size 3077 * for igu_fifo results (in bytes). 3078 * 3079 * @param p_hwfn - HW device data 3080 * @param dump_buf - IGU fifo dump buffer. 3081 * @param num_dumped_dwords - number of dwords that were dumped. 3082 * @param results_buf_size - OUT: required buffer size (in bytes) for the parsed 3083 * results. 3084 * 3085 * @return error if the parsing fails, ok otherwise. 3086 */ 3087 enum dbg_status qed_get_igu_fifo_results_buf_size(struct qed_hwfn *p_hwfn, 3088 u32 *dump_buf, 3089 u32 num_dumped_dwords, 3090 u32 *results_buf_size); 3091 /** 3092 * @brief qed_print_igu_fifo_results - Prints IGU fifo results 3093 * 3094 * @param p_hwfn - HW device data 3095 * @param dump_buf - IGU fifo dump buffer, starting from the header. 3096 * @param num_dumped_dwords - number of dwords that were dumped. 3097 * @param results_buf - buffer for printing the IGU fifo results. 3098 * 3099 * @return error if the parsing fails, ok otherwise. 3100 */ 3101 enum dbg_status qed_print_igu_fifo_results(struct qed_hwfn *p_hwfn, 3102 u32 *dump_buf, 3103 u32 num_dumped_dwords, 3104 char *results_buf); 3105 /** 3106 * @brief qed_get_protection_override_results_buf_size - Returns the required 3107 * buffer size for protection override results (in bytes). 3108 * 3109 * @param p_hwfn - HW device data 3110 * @param dump_buf - protection override dump buffer. 3111 * @param num_dumped_dwords - number of dwords that were dumped. 3112 * @param results_buf_size - OUT: required buffer size (in bytes) for the parsed 3113 * results. 3114 * 3115 * @return error if the parsing fails, ok otherwise. 3116 */ 3117 enum dbg_status 3118 qed_get_protection_override_results_buf_size(struct qed_hwfn *p_hwfn, 3119 u32 *dump_buf, 3120 u32 num_dumped_dwords, 3121 u32 *results_buf_size); 3122 /** 3123 * @brief qed_print_protection_override_results - Prints protection override 3124 * results. 3125 * 3126 * @param p_hwfn - HW device data 3127 * @param dump_buf - protection override dump buffer, starting from the header. 3128 * @param num_dumped_dwords - number of dwords that were dumped. 3129 * @param results_buf - buffer for printing the reg fifo results. 3130 * 3131 * @return error if the parsing fails, ok otherwise. 3132 */ 3133 enum dbg_status qed_print_protection_override_results(struct qed_hwfn *p_hwfn, 3134 u32 *dump_buf, 3135 u32 num_dumped_dwords, 3136 char *results_buf); 3137 /** 3138 * @brief qed_get_fw_asserts_results_buf_size - Returns the required buffer size 3139 * for FW Asserts results (in bytes). 3140 * 3141 * @param p_hwfn - HW device data 3142 * @param dump_buf - FW Asserts dump buffer. 3143 * @param num_dumped_dwords - number of dwords that were dumped. 3144 * @param results_buf_size - OUT: required buffer size (in bytes) for the parsed 3145 * results. 3146 * 3147 * @return error if the parsing fails, ok otherwise. 3148 */ 3149 enum dbg_status qed_get_fw_asserts_results_buf_size(struct qed_hwfn *p_hwfn, 3150 u32 *dump_buf, 3151 u32 num_dumped_dwords, 3152 u32 *results_buf_size); 3153 /** 3154 * @brief qed_print_fw_asserts_results - Prints FW Asserts results 3155 * 3156 * @param p_hwfn - HW device data 3157 * @param dump_buf - FW Asserts dump buffer, starting from the header. 3158 * @param num_dumped_dwords - number of dwords that were dumped. 3159 * @param results_buf - buffer for printing the FW Asserts results. 3160 * 3161 * @return error if the parsing fails, ok otherwise. 3162 */ 3163 enum dbg_status qed_print_fw_asserts_results(struct qed_hwfn *p_hwfn, 3164 u32 *dump_buf, 3165 u32 num_dumped_dwords, 3166 char *results_buf); 3167 /* Win 2 */ 3168 #define GTT_BAR0_MAP_REG_IGU_CMD 0x00f000UL 3169 3170 /* Win 3 */ 3171 #define GTT_BAR0_MAP_REG_TSDM_RAM 0x010000UL 3172 3173 /* Win 4 */ 3174 #define GTT_BAR0_MAP_REG_MSDM_RAM 0x011000UL 3175 3176 /* Win 5 */ 3177 #define GTT_BAR0_MAP_REG_MSDM_RAM_1024 0x012000UL 3178 3179 /* Win 6 */ 3180 #define GTT_BAR0_MAP_REG_USDM_RAM 0x013000UL 3181 3182 /* Win 7 */ 3183 #define GTT_BAR0_MAP_REG_USDM_RAM_1024 0x014000UL 3184 3185 /* Win 8 */ 3186 #define GTT_BAR0_MAP_REG_USDM_RAM_2048 0x015000UL 3187 3188 /* Win 9 */ 3189 #define GTT_BAR0_MAP_REG_XSDM_RAM 0x016000UL 3190 3191 /* Win 10 */ 3192 #define GTT_BAR0_MAP_REG_YSDM_RAM 0x017000UL 3193 3194 /* Win 11 */ 3195 #define GTT_BAR0_MAP_REG_PSDM_RAM 0x018000UL 3196 3197 /** 3198 * @brief qed_qm_pf_mem_size - prepare QM ILT sizes 3199 * 3200 * Returns the required host memory size in 4KB units. 3201 * Must be called before all QM init HSI functions. 3202 * 3203 * @param pf_id - physical function ID 3204 * @param num_pf_cids - number of connections used by this PF 3205 * @param num_vf_cids - number of connections used by VFs of this PF 3206 * @param num_tids - number of tasks used by this PF 3207 * @param num_pf_pqs - number of PQs used by this PF 3208 * @param num_vf_pqs - number of PQs used by VFs of this PF 3209 * 3210 * @return The required host memory size in 4KB units. 3211 */ 3212 u32 qed_qm_pf_mem_size(u8 pf_id, 3213 u32 num_pf_cids, 3214 u32 num_vf_cids, 3215 u32 num_tids, u16 num_pf_pqs, u16 num_vf_pqs); 3216 3217 struct qed_qm_common_rt_init_params { 3218 u8 max_ports_per_engine; 3219 u8 max_phys_tcs_per_port; 3220 bool pf_rl_en; 3221 bool pf_wfq_en; 3222 bool vport_rl_en; 3223 bool vport_wfq_en; 3224 struct init_qm_port_params *port_params; 3225 }; 3226 3227 int qed_qm_common_rt_init(struct qed_hwfn *p_hwfn, 3228 struct qed_qm_common_rt_init_params *p_params); 3229 3230 struct qed_qm_pf_rt_init_params { 3231 u8 port_id; 3232 u8 pf_id; 3233 u8 max_phys_tcs_per_port; 3234 bool is_first_pf; 3235 u32 num_pf_cids; 3236 u32 num_vf_cids; 3237 u32 num_tids; 3238 u16 start_pq; 3239 u16 num_pf_pqs; 3240 u16 num_vf_pqs; 3241 u8 start_vport; 3242 u8 num_vports; 3243 u16 pf_wfq; 3244 u32 pf_rl; 3245 struct init_qm_pq_params *pq_params; 3246 struct init_qm_vport_params *vport_params; 3247 }; 3248 3249 int qed_qm_pf_rt_init(struct qed_hwfn *p_hwfn, 3250 struct qed_ptt *p_ptt, 3251 struct qed_qm_pf_rt_init_params *p_params); 3252 3253 /** 3254 * @brief qed_init_pf_wfq - Initializes the WFQ weight of the specified PF 3255 * 3256 * @param p_hwfn 3257 * @param p_ptt - ptt window used for writing the registers 3258 * @param pf_id - PF ID 3259 * @param pf_wfq - WFQ weight. Must be non-zero. 3260 * 3261 * @return 0 on success, -1 on error. 3262 */ 3263 int qed_init_pf_wfq(struct qed_hwfn *p_hwfn, 3264 struct qed_ptt *p_ptt, u8 pf_id, u16 pf_wfq); 3265 3266 /** 3267 * @brief qed_init_pf_rl - Initializes the rate limit of the specified PF 3268 * 3269 * @param p_hwfn 3270 * @param p_ptt - ptt window used for writing the registers 3271 * @param pf_id - PF ID 3272 * @param pf_rl - rate limit in Mb/sec units 3273 * 3274 * @return 0 on success, -1 on error. 3275 */ 3276 int qed_init_pf_rl(struct qed_hwfn *p_hwfn, 3277 struct qed_ptt *p_ptt, u8 pf_id, u32 pf_rl); 3278 3279 /** 3280 * @brief qed_init_vport_wfq Initializes the WFQ weight of the specified VPORT 3281 * 3282 * @param p_hwfn 3283 * @param p_ptt - ptt window used for writing the registers 3284 * @param first_tx_pq_id- An array containing the first Tx PQ ID associated 3285 * with the VPORT for each TC. This array is filled by 3286 * qed_qm_pf_rt_init 3287 * @param vport_wfq - WFQ weight. Must be non-zero. 3288 * 3289 * @return 0 on success, -1 on error. 3290 */ 3291 int qed_init_vport_wfq(struct qed_hwfn *p_hwfn, 3292 struct qed_ptt *p_ptt, 3293 u16 first_tx_pq_id[NUM_OF_TCS], u16 vport_wfq); 3294 3295 /** 3296 * @brief qed_init_vport_rl - Initializes the rate limit of the specified VPORT 3297 * 3298 * @param p_hwfn 3299 * @param p_ptt - ptt window used for writing the registers 3300 * @param vport_id - VPORT ID 3301 * @param vport_rl - rate limit in Mb/sec units 3302 * 3303 * @return 0 on success, -1 on error. 3304 */ 3305 int qed_init_vport_rl(struct qed_hwfn *p_hwfn, 3306 struct qed_ptt *p_ptt, u8 vport_id, u32 vport_rl); 3307 /** 3308 * @brief qed_send_qm_stop_cmd Sends a stop command to the QM 3309 * 3310 * @param p_hwfn 3311 * @param p_ptt 3312 * @param is_release_cmd - true for release, false for stop. 3313 * @param is_tx_pq - true for Tx PQs, false for Other PQs. 3314 * @param start_pq - first PQ ID to stop 3315 * @param num_pqs - Number of PQs to stop, starting from start_pq. 3316 * 3317 * @return bool, true if successful, false if timeout occured while waiting for QM command done. 3318 */ 3319 bool qed_send_qm_stop_cmd(struct qed_hwfn *p_hwfn, 3320 struct qed_ptt *p_ptt, 3321 bool is_release_cmd, 3322 bool is_tx_pq, u16 start_pq, u16 num_pqs); 3323 3324 /** 3325 * @brief qed_set_vxlan_dest_port - initializes vxlan tunnel destination udp port 3326 * 3327 * @param p_ptt - ptt window used for writing the registers. 3328 * @param dest_port - vxlan destination udp port. 3329 */ 3330 void qed_set_vxlan_dest_port(struct qed_hwfn *p_hwfn, 3331 struct qed_ptt *p_ptt, u16 dest_port); 3332 3333 /** 3334 * @brief qed_set_vxlan_enable - enable or disable VXLAN tunnel in HW 3335 * 3336 * @param p_ptt - ptt window used for writing the registers. 3337 * @param vxlan_enable - vxlan enable flag. 3338 */ 3339 void qed_set_vxlan_enable(struct qed_hwfn *p_hwfn, 3340 struct qed_ptt *p_ptt, bool vxlan_enable); 3341 3342 /** 3343 * @brief qed_set_gre_enable - enable or disable GRE tunnel in HW 3344 * 3345 * @param p_ptt - ptt window used for writing the registers. 3346 * @param eth_gre_enable - eth GRE enable enable flag. 3347 * @param ip_gre_enable - IP GRE enable enable flag. 3348 */ 3349 void qed_set_gre_enable(struct qed_hwfn *p_hwfn, 3350 struct qed_ptt *p_ptt, 3351 bool eth_gre_enable, bool ip_gre_enable); 3352 3353 /** 3354 * @brief qed_set_geneve_dest_port - initializes geneve tunnel destination udp port 3355 * 3356 * @param p_ptt - ptt window used for writing the registers. 3357 * @param dest_port - geneve destination udp port. 3358 */ 3359 void qed_set_geneve_dest_port(struct qed_hwfn *p_hwfn, 3360 struct qed_ptt *p_ptt, u16 dest_port); 3361 3362 /** 3363 * @brief qed_set_gre_enable - enable or disable GRE tunnel in HW 3364 * 3365 * @param p_ptt - ptt window used for writing the registers. 3366 * @param eth_geneve_enable - eth GENEVE enable enable flag. 3367 * @param ip_geneve_enable - IP GENEVE enable enable flag. 3368 */ 3369 void qed_set_geneve_enable(struct qed_hwfn *p_hwfn, 3370 struct qed_ptt *p_ptt, 3371 bool eth_geneve_enable, bool ip_geneve_enable); 3372 3373 #define YSTORM_FLOW_CONTROL_MODE_OFFSET (IRO[0].base) 3374 #define YSTORM_FLOW_CONTROL_MODE_SIZE (IRO[0].size) 3375 #define TSTORM_PORT_STAT_OFFSET(port_id) \ 3376 (IRO[1].base + ((port_id) * IRO[1].m1)) 3377 #define TSTORM_PORT_STAT_SIZE (IRO[1].size) 3378 #define TSTORM_LL2_PORT_STAT_OFFSET(port_id) \ 3379 (IRO[2].base + ((port_id) * IRO[2].m1)) 3380 #define TSTORM_LL2_PORT_STAT_SIZE (IRO[2].size) 3381 #define USTORM_VF_PF_CHANNEL_READY_OFFSET(vf_id) \ 3382 (IRO[3].base + ((vf_id) * IRO[3].m1)) 3383 #define USTORM_VF_PF_CHANNEL_READY_SIZE (IRO[3].size) 3384 #define USTORM_FLR_FINAL_ACK_OFFSET(pf_id) \ 3385 (IRO[4].base + (pf_id) * IRO[4].m1) 3386 #define USTORM_FLR_FINAL_ACK_SIZE (IRO[4].size) 3387 #define USTORM_EQE_CONS_OFFSET(pf_id) \ 3388 (IRO[5].base + ((pf_id) * IRO[5].m1)) 3389 #define USTORM_EQE_CONS_SIZE (IRO[5].size) 3390 #define USTORM_ETH_QUEUE_ZONE_OFFSET(queue_zone_id) \ 3391 (IRO[6].base + ((queue_zone_id) * IRO[6].m1)) 3392 #define USTORM_ETH_QUEUE_ZONE_SIZE (IRO[6].size) 3393 #define USTORM_COMMON_QUEUE_CONS_OFFSET(queue_zone_id) \ 3394 (IRO[7].base + ((queue_zone_id) * IRO[7].m1)) 3395 #define USTORM_COMMON_QUEUE_CONS_SIZE (IRO[7].size) 3396 #define TSTORM_LL2_RX_PRODS_OFFSET(core_rx_queue_id) \ 3397 (IRO[14].base + ((core_rx_queue_id) * IRO[14].m1)) 3398 #define TSTORM_LL2_RX_PRODS_SIZE (IRO[14].size) 3399 #define CORE_LL2_TSTORM_PER_QUEUE_STAT_OFFSET(core_rx_queue_id) \ 3400 (IRO[15].base + ((core_rx_queue_id) * IRO[15].m1)) 3401 #define CORE_LL2_TSTORM_PER_QUEUE_STAT_SIZE (IRO[15].size) 3402 #define CORE_LL2_USTORM_PER_QUEUE_STAT_OFFSET(core_rx_queue_id) \ 3403 (IRO[16].base + ((core_rx_queue_id) * IRO[16].m1)) 3404 #define CORE_LL2_USTORM_PER_QUEUE_STAT_SIZE (IRO[16].size) 3405 #define CORE_LL2_PSTORM_PER_QUEUE_STAT_OFFSET(core_tx_stats_id) \ 3406 (IRO[17].base + ((core_tx_stats_id) * IRO[17].m1)) 3407 #define CORE_LL2_PSTORM_PER_QUEUE_STAT_SIZE (IRO[17]. size) 3408 #define MSTORM_QUEUE_STAT_OFFSET(stat_counter_id) \ 3409 (IRO[18].base + ((stat_counter_id) * IRO[18].m1)) 3410 #define MSTORM_QUEUE_STAT_SIZE (IRO[18].size) 3411 #define MSTORM_ETH_PF_PRODS_OFFSET(queue_id) \ 3412 (IRO[19].base + ((queue_id) * IRO[19].m1)) 3413 #define MSTORM_ETH_PF_PRODS_SIZE (IRO[19].size) 3414 #define MSTORM_ETH_VF_PRODS_OFFSET(vf_id, vf_queue_id) \ 3415 (IRO[20].base + ((vf_id) * IRO[20].m1) + ((vf_queue_id) * IRO[20].m2)) 3416 #define MSTORM_ETH_VF_PRODS_SIZE (IRO[20].size) 3417 #define MSTORM_TPA_TIMEOUT_US_OFFSET (IRO[21].base) 3418 #define MSTORM_TPA_TIMEOUT_US_SIZE (IRO[21].size) 3419 #define MSTORM_ETH_PF_STAT_OFFSET(pf_id) \ 3420 (IRO[22].base + ((pf_id) * IRO[22].m1)) 3421 #define MSTORM_ETH_PF_STAT_SIZE (IRO[21].size) 3422 #define USTORM_QUEUE_STAT_OFFSET(stat_counter_id) \ 3423 (IRO[23].base + ((stat_counter_id) * IRO[23].m1)) 3424 #define USTORM_QUEUE_STAT_SIZE (IRO[23].size) 3425 #define USTORM_ETH_PF_STAT_OFFSET(pf_id) \ 3426 (IRO[24].base + ((pf_id) * IRO[24].m1)) 3427 #define USTORM_ETH_PF_STAT_SIZE (IRO[24].size) 3428 #define PSTORM_QUEUE_STAT_OFFSET(stat_counter_id) \ 3429 (IRO[25].base + ((stat_counter_id) * IRO[25].m1)) 3430 #define PSTORM_QUEUE_STAT_SIZE (IRO[25].size) 3431 #define PSTORM_ETH_PF_STAT_OFFSET(pf_id) \ 3432 (IRO[26].base + ((pf_id) * IRO[26].m1)) 3433 #define PSTORM_ETH_PF_STAT_SIZE (IRO[26].size) 3434 #define PSTORM_CTL_FRAME_ETHTYPE_OFFSET(ethtype) \ 3435 (IRO[27].base + ((ethtype) * IRO[27].m1)) 3436 #define PSTORM_CTL_FRAME_ETHTYPE_SIZE (IRO[27].size) 3437 #define TSTORM_ETH_PRS_INPUT_OFFSET (IRO[28].base) 3438 #define TSTORM_ETH_PRS_INPUT_SIZE (IRO[28].size) 3439 #define ETH_RX_RATE_LIMIT_OFFSET(pf_id) \ 3440 (IRO[29].base + ((pf_id) * IRO[29].m1)) 3441 #define ETH_RX_RATE_LIMIT_SIZE (IRO[29].size) 3442 #define XSTORM_ETH_QUEUE_ZONE_OFFSET(queue_id) \ 3443 (IRO[30].base + ((queue_id) * IRO[30].m1)) 3444 #define XSTORM_ETH_QUEUE_ZONE_SIZE (IRO[30].size) 3445 #define TSTORM_SCSI_CMDQ_CONS_OFFSET(cmdq_queue_id) \ 3446 (IRO[34].base + ((cmdq_queue_id) * IRO[34].m1)) 3447 #define TSTORM_SCSI_CMDQ_CONS_SIZE (IRO[34].size) 3448 #define TSTORM_SCSI_BDQ_EXT_PROD_OFFSET(func_id, bdq_id) \ 3449 (IRO[35].base + ((func_id) * IRO[35].m1) + ((bdq_id) * IRO[35].m2)) 3450 #define TSTORM_SCSI_BDQ_EXT_PROD_SIZE (IRO[35].size) 3451 #define MSTORM_SCSI_BDQ_EXT_PROD_OFFSET(func_id, bdq_id) \ 3452 (IRO[36].base + ((func_id) * IRO[36].m1) + ((bdq_id) * IRO[36].m2)) 3453 #define MSTORM_SCSI_BDQ_EXT_PROD_SIZE (IRO[36].size) 3454 #define TSTORM_ISCSI_RX_STATS_OFFSET(pf_id) \ 3455 (IRO[37].base + ((pf_id) * IRO[37].m1)) 3456 #define TSTORM_ISCSI_RX_STATS_SIZE (IRO[37].size) 3457 #define MSTORM_ISCSI_RX_STATS_OFFSET(pf_id) \ 3458 (IRO[38].base + ((pf_id) * IRO[38].m1)) 3459 #define MSTORM_ISCSI_RX_STATS_SIZE (IRO[38].size) 3460 #define USTORM_ISCSI_RX_STATS_OFFSET(pf_id) \ 3461 (IRO[39].base + ((pf_id) * IRO[39].m1)) 3462 #define USTORM_ISCSI_RX_STATS_SIZE (IRO[39].size) 3463 #define XSTORM_ISCSI_TX_STATS_OFFSET(pf_id) \ 3464 (IRO[40].base + ((pf_id) * IRO[40].m1)) 3465 #define XSTORM_ISCSI_TX_STATS_SIZE (IRO[40].size) 3466 #define YSTORM_ISCSI_TX_STATS_OFFSET(pf_id) \ 3467 (IRO[41].base + ((pf_id) * IRO[41].m1)) 3468 #define YSTORM_ISCSI_TX_STATS_SIZE (IRO[41].size) 3469 #define PSTORM_ISCSI_TX_STATS_OFFSET(pf_id) \ 3470 (IRO[42].base + ((pf_id) * IRO[42].m1)) 3471 #define PSTORM_ISCSI_TX_STATS_SIZE (IRO[42].size) 3472 #define PSTORM_RDMA_QUEUE_STAT_OFFSET(rdma_stat_counter_id) \ 3473 (IRO[45].base + ((rdma_stat_counter_id) * IRO[45].m1)) 3474 #define PSTORM_RDMA_QUEUE_STAT_SIZE (IRO[45].size) 3475 #define TSTORM_RDMA_QUEUE_STAT_OFFSET(rdma_stat_counter_id) \ 3476 (IRO[46].base + ((rdma_stat_counter_id) * IRO[46].m1)) 3477 #define TSTORM_RDMA_QUEUE_STAT_SIZE (IRO[46].size) 3478 #define TSTORM_FCOE_RX_STATS_OFFSET(pf_id) \ 3479 (IRO[43].base + ((pf_id) * IRO[43].m1)) 3480 #define PSTORM_FCOE_TX_STATS_OFFSET(pf_id) \ 3481 (IRO[44].base + ((pf_id) * IRO[44].m1)) 3482 3483 static const struct iro iro_arr[47] = { 3484 {0x0, 0x0, 0x0, 0x0, 0x8}, 3485 {0x4cb0, 0x78, 0x0, 0x0, 0x78}, 3486 {0x6318, 0x20, 0x0, 0x0, 0x20}, 3487 {0xb00, 0x8, 0x0, 0x0, 0x4}, 3488 {0xa80, 0x8, 0x0, 0x0, 0x4}, 3489 {0x0, 0x8, 0x0, 0x0, 0x2}, 3490 {0x80, 0x8, 0x0, 0x0, 0x4}, 3491 {0x84, 0x8, 0x0, 0x0, 0x2}, 3492 {0x4bc0, 0x0, 0x0, 0x0, 0x78}, 3493 {0x3df0, 0x0, 0x0, 0x0, 0x78}, 3494 {0x29b0, 0x0, 0x0, 0x0, 0x78}, 3495 {0x4c38, 0x0, 0x0, 0x0, 0x78}, 3496 {0x4990, 0x0, 0x0, 0x0, 0x78}, 3497 {0x7e48, 0x0, 0x0, 0x0, 0x78}, 3498 {0xa28, 0x8, 0x0, 0x0, 0x8}, 3499 {0x60f8, 0x10, 0x0, 0x0, 0x10}, 3500 {0xb820, 0x30, 0x0, 0x0, 0x30}, 3501 {0x95b8, 0x30, 0x0, 0x0, 0x30}, 3502 {0x4b60, 0x80, 0x0, 0x0, 0x40}, 3503 {0x1f8, 0x4, 0x0, 0x0, 0x4}, 3504 {0x53a0, 0x80, 0x4, 0x0, 0x4}, 3505 {0xc8f0, 0x0, 0x0, 0x0, 0x4}, 3506 {0x4ba0, 0x80, 0x0, 0x0, 0x20}, 3507 {0x8050, 0x40, 0x0, 0x0, 0x30}, 3508 {0xe770, 0x60, 0x0, 0x0, 0x60}, 3509 {0x2b48, 0x80, 0x0, 0x0, 0x38}, 3510 {0xf188, 0x78, 0x0, 0x0, 0x78}, 3511 {0x1f8, 0x4, 0x0, 0x0, 0x4}, 3512 {0xacf0, 0x0, 0x0, 0x0, 0xf0}, 3513 {0xade0, 0x8, 0x0, 0x0, 0x8}, 3514 {0x1f8, 0x8, 0x0, 0x0, 0x8}, 3515 {0xac0, 0x8, 0x0, 0x0, 0x8}, 3516 {0x2578, 0x8, 0x0, 0x0, 0x8}, 3517 {0x24f8, 0x8, 0x0, 0x0, 0x8}, 3518 {0x0, 0x8, 0x0, 0x0, 0x8}, 3519 {0x200, 0x10, 0x8, 0x0, 0x8}, 3520 {0xb78, 0x10, 0x8, 0x0, 0x2}, 3521 {0xd888, 0x38, 0x0, 0x0, 0x24}, 3522 {0x12c38, 0x10, 0x0, 0x0, 0x8}, 3523 {0x11aa0, 0x38, 0x0, 0x0, 0x18}, 3524 {0xa8c0, 0x30, 0x0, 0x0, 0x10}, 3525 {0x86f8, 0x28, 0x0, 0x0, 0x18}, 3526 {0x101f8, 0x10, 0x0, 0x0, 0x10}, 3527 {0xdd08, 0x48, 0x0, 0x0, 0x38}, 3528 {0x10660, 0x20, 0x0, 0x0, 0x20}, 3529 {0x2b80, 0x80, 0x0, 0x0, 0x10}, 3530 {0x5000, 0x10, 0x0, 0x0, 0x10}, 3531 }; 3532 3533 /* Runtime array offsets */ 3534 #define DORQ_REG_PF_MAX_ICID_0_RT_OFFSET 0 3535 #define DORQ_REG_PF_MAX_ICID_1_RT_OFFSET 1 3536 #define DORQ_REG_PF_MAX_ICID_2_RT_OFFSET 2 3537 #define DORQ_REG_PF_MAX_ICID_3_RT_OFFSET 3 3538 #define DORQ_REG_PF_MAX_ICID_4_RT_OFFSET 4 3539 #define DORQ_REG_PF_MAX_ICID_5_RT_OFFSET 5 3540 #define DORQ_REG_PF_MAX_ICID_6_RT_OFFSET 6 3541 #define DORQ_REG_PF_MAX_ICID_7_RT_OFFSET 7 3542 #define DORQ_REG_VF_MAX_ICID_0_RT_OFFSET 8 3543 #define DORQ_REG_VF_MAX_ICID_1_RT_OFFSET 9 3544 #define DORQ_REG_VF_MAX_ICID_2_RT_OFFSET 10 3545 #define DORQ_REG_VF_MAX_ICID_3_RT_OFFSET 11 3546 #define DORQ_REG_VF_MAX_ICID_4_RT_OFFSET 12 3547 #define DORQ_REG_VF_MAX_ICID_5_RT_OFFSET 13 3548 #define DORQ_REG_VF_MAX_ICID_6_RT_OFFSET 14 3549 #define DORQ_REG_VF_MAX_ICID_7_RT_OFFSET 15 3550 #define DORQ_REG_PF_WAKE_ALL_RT_OFFSET 16 3551 #define DORQ_REG_TAG1_ETHERTYPE_RT_OFFSET 17 3552 #define IGU_REG_PF_CONFIGURATION_RT_OFFSET 18 3553 #define IGU_REG_VF_CONFIGURATION_RT_OFFSET 19 3554 #define IGU_REG_ATTN_MSG_ADDR_L_RT_OFFSET 20 3555 #define IGU_REG_ATTN_MSG_ADDR_H_RT_OFFSET 21 3556 #define IGU_REG_LEADING_EDGE_LATCH_RT_OFFSET 22 3557 #define IGU_REG_TRAILING_EDGE_LATCH_RT_OFFSET 23 3558 #define CAU_REG_CQE_AGG_UNIT_SIZE_RT_OFFSET 24 3559 #define CAU_REG_SB_VAR_MEMORY_RT_OFFSET 761 3560 #define CAU_REG_SB_VAR_MEMORY_RT_SIZE 736 3561 #define CAU_REG_SB_VAR_MEMORY_RT_OFFSET 761 3562 #define CAU_REG_SB_VAR_MEMORY_RT_SIZE 736 3563 #define CAU_REG_SB_ADDR_MEMORY_RT_OFFSET 1497 3564 #define CAU_REG_SB_ADDR_MEMORY_RT_SIZE 736 3565 #define CAU_REG_PI_MEMORY_RT_OFFSET 2233 3566 #define CAU_REG_PI_MEMORY_RT_SIZE 4416 3567 #define PRS_REG_SEARCH_RESP_INITIATOR_TYPE_RT_OFFSET 6649 3568 #define PRS_REG_TASK_ID_MAX_INITIATOR_PF_RT_OFFSET 6650 3569 #define PRS_REG_TASK_ID_MAX_INITIATOR_VF_RT_OFFSET 6651 3570 #define PRS_REG_TASK_ID_MAX_TARGET_PF_RT_OFFSET 6652 3571 #define PRS_REG_TASK_ID_MAX_TARGET_VF_RT_OFFSET 6653 3572 #define PRS_REG_SEARCH_TCP_RT_OFFSET 6654 3573 #define PRS_REG_SEARCH_FCOE_RT_OFFSET 6655 3574 #define PRS_REG_SEARCH_ROCE_RT_OFFSET 6656 3575 #define PRS_REG_ROCE_DEST_QP_MAX_VF_RT_OFFSET 6657 3576 #define PRS_REG_ROCE_DEST_QP_MAX_PF_RT_OFFSET 6658 3577 #define PRS_REG_SEARCH_OPENFLOW_RT_OFFSET 6659 3578 #define PRS_REG_SEARCH_NON_IP_AS_OPENFLOW_RT_OFFSET 6660 3579 #define PRS_REG_OPENFLOW_SUPPORT_ONLY_KNOWN_OVER_IP_RT_OFFSET 6661 3580 #define PRS_REG_OPENFLOW_SEARCH_KEY_MASK_RT_OFFSET 6662 3581 #define PRS_REG_TAG_ETHERTYPE_0_RT_OFFSET 6663 3582 #define PRS_REG_LIGHT_L2_ETHERTYPE_EN_RT_OFFSET 6664 3583 #define SRC_REG_FIRSTFREE_RT_OFFSET 6665 3584 #define SRC_REG_FIRSTFREE_RT_SIZE 2 3585 #define SRC_REG_LASTFREE_RT_OFFSET 6667 3586 #define SRC_REG_LASTFREE_RT_SIZE 2 3587 #define SRC_REG_COUNTFREE_RT_OFFSET 6669 3588 #define SRC_REG_NUMBER_HASH_BITS_RT_OFFSET 6670 3589 #define PSWRQ2_REG_CDUT_P_SIZE_RT_OFFSET 6671 3590 #define PSWRQ2_REG_CDUC_P_SIZE_RT_OFFSET 6672 3591 #define PSWRQ2_REG_TM_P_SIZE_RT_OFFSET 6673 3592 #define PSWRQ2_REG_QM_P_SIZE_RT_OFFSET 6674 3593 #define PSWRQ2_REG_SRC_P_SIZE_RT_OFFSET 6675 3594 #define PSWRQ2_REG_TSDM_P_SIZE_RT_OFFSET 6676 3595 #define PSWRQ2_REG_TM_FIRST_ILT_RT_OFFSET 6677 3596 #define PSWRQ2_REG_TM_LAST_ILT_RT_OFFSET 6678 3597 #define PSWRQ2_REG_QM_FIRST_ILT_RT_OFFSET 6679 3598 #define PSWRQ2_REG_QM_LAST_ILT_RT_OFFSET 6680 3599 #define PSWRQ2_REG_SRC_FIRST_ILT_RT_OFFSET 6681 3600 #define PSWRQ2_REG_SRC_LAST_ILT_RT_OFFSET 6682 3601 #define PSWRQ2_REG_CDUC_FIRST_ILT_RT_OFFSET 6683 3602 #define PSWRQ2_REG_CDUC_LAST_ILT_RT_OFFSET 6684 3603 #define PSWRQ2_REG_CDUT_FIRST_ILT_RT_OFFSET 6685 3604 #define PSWRQ2_REG_CDUT_LAST_ILT_RT_OFFSET 6686 3605 #define PSWRQ2_REG_TSDM_FIRST_ILT_RT_OFFSET 6687 3606 #define PSWRQ2_REG_TSDM_LAST_ILT_RT_OFFSET 6688 3607 #define PSWRQ2_REG_TM_NUMBER_OF_PF_BLOCKS_RT_OFFSET 6689 3608 #define PSWRQ2_REG_CDUT_NUMBER_OF_PF_BLOCKS_RT_OFFSET 6690 3609 #define PSWRQ2_REG_CDUC_NUMBER_OF_PF_BLOCKS_RT_OFFSET 6691 3610 #define PSWRQ2_REG_TM_VF_BLOCKS_RT_OFFSET 6692 3611 #define PSWRQ2_REG_CDUT_VF_BLOCKS_RT_OFFSET 6693 3612 #define PSWRQ2_REG_CDUC_VF_BLOCKS_RT_OFFSET 6694 3613 #define PSWRQ2_REG_TM_BLOCKS_FACTOR_RT_OFFSET 6695 3614 #define PSWRQ2_REG_CDUT_BLOCKS_FACTOR_RT_OFFSET 6696 3615 #define PSWRQ2_REG_CDUC_BLOCKS_FACTOR_RT_OFFSET 6697 3616 #define PSWRQ2_REG_VF_BASE_RT_OFFSET 6698 3617 #define PSWRQ2_REG_VF_LAST_ILT_RT_OFFSET 6699 3618 #define PSWRQ2_REG_WR_MBS0_RT_OFFSET 6700 3619 #define PSWRQ2_REG_RD_MBS0_RT_OFFSET 6701 3620 #define PSWRQ2_REG_DRAM_ALIGN_WR_RT_OFFSET 6702 3621 #define PSWRQ2_REG_DRAM_ALIGN_RD_RT_OFFSET 6703 3622 #define PSWRQ2_REG_ILT_MEMORY_RT_OFFSET 6704 3623 #define PSWRQ2_REG_ILT_MEMORY_RT_SIZE 22000 3624 #define PGLUE_REG_B_VF_BASE_RT_OFFSET 28704 3625 #define PGLUE_REG_B_MSDM_OFFSET_MASK_B_RT_OFFSET 28705 3626 #define PGLUE_REG_B_MSDM_VF_SHIFT_B_RT_OFFSET 28706 3627 #define PGLUE_REG_B_CACHE_LINE_SIZE_RT_OFFSET 28707 3628 #define PGLUE_REG_B_PF_BAR0_SIZE_RT_OFFSET 28708 3629 #define PGLUE_REG_B_PF_BAR1_SIZE_RT_OFFSET 28709 3630 #define PGLUE_REG_B_VF_BAR1_SIZE_RT_OFFSET 28710 3631 #define TM_REG_VF_ENABLE_CONN_RT_OFFSET 28711 3632 #define TM_REG_PF_ENABLE_CONN_RT_OFFSET 28712 3633 #define TM_REG_PF_ENABLE_TASK_RT_OFFSET 28713 3634 #define TM_REG_GROUP_SIZE_RESOLUTION_CONN_RT_OFFSET 28714 3635 #define TM_REG_GROUP_SIZE_RESOLUTION_TASK_RT_OFFSET 28715 3636 #define TM_REG_CONFIG_CONN_MEM_RT_OFFSET 28716 3637 #define TM_REG_CONFIG_CONN_MEM_RT_SIZE 416 3638 #define TM_REG_CONFIG_TASK_MEM_RT_OFFSET 29132 3639 #define TM_REG_CONFIG_TASK_MEM_RT_SIZE 512 3640 #define QM_REG_MAXPQSIZE_0_RT_OFFSET 29644 3641 #define QM_REG_MAXPQSIZE_1_RT_OFFSET 29645 3642 #define QM_REG_MAXPQSIZE_2_RT_OFFSET 29646 3643 #define QM_REG_MAXPQSIZETXSEL_0_RT_OFFSET 29647 3644 #define QM_REG_MAXPQSIZETXSEL_1_RT_OFFSET 29648 3645 #define QM_REG_MAXPQSIZETXSEL_2_RT_OFFSET 29649 3646 #define QM_REG_MAXPQSIZETXSEL_3_RT_OFFSET 29650 3647 #define QM_REG_MAXPQSIZETXSEL_4_RT_OFFSET 29651 3648 #define QM_REG_MAXPQSIZETXSEL_5_RT_OFFSET 29652 3649 #define QM_REG_MAXPQSIZETXSEL_6_RT_OFFSET 29653 3650 #define QM_REG_MAXPQSIZETXSEL_7_RT_OFFSET 29654 3651 #define QM_REG_MAXPQSIZETXSEL_8_RT_OFFSET 29655 3652 #define QM_REG_MAXPQSIZETXSEL_9_RT_OFFSET 29656 3653 #define QM_REG_MAXPQSIZETXSEL_10_RT_OFFSET 29657 3654 #define QM_REG_MAXPQSIZETXSEL_11_RT_OFFSET 29658 3655 #define QM_REG_MAXPQSIZETXSEL_12_RT_OFFSET 29659 3656 #define QM_REG_MAXPQSIZETXSEL_13_RT_OFFSET 29660 3657 #define QM_REG_MAXPQSIZETXSEL_14_RT_OFFSET 29661 3658 #define QM_REG_MAXPQSIZETXSEL_15_RT_OFFSET 29662 3659 #define QM_REG_MAXPQSIZETXSEL_16_RT_OFFSET 29663 3660 #define QM_REG_MAXPQSIZETXSEL_17_RT_OFFSET 29664 3661 #define QM_REG_MAXPQSIZETXSEL_18_RT_OFFSET 29665 3662 #define QM_REG_MAXPQSIZETXSEL_19_RT_OFFSET 29666 3663 #define QM_REG_MAXPQSIZETXSEL_20_RT_OFFSET 29667 3664 #define QM_REG_MAXPQSIZETXSEL_21_RT_OFFSET 29668 3665 #define QM_REG_MAXPQSIZETXSEL_22_RT_OFFSET 29669 3666 #define QM_REG_MAXPQSIZETXSEL_23_RT_OFFSET 29670 3667 #define QM_REG_MAXPQSIZETXSEL_24_RT_OFFSET 29671 3668 #define QM_REG_MAXPQSIZETXSEL_25_RT_OFFSET 29672 3669 #define QM_REG_MAXPQSIZETXSEL_26_RT_OFFSET 29673 3670 #define QM_REG_MAXPQSIZETXSEL_27_RT_OFFSET 29674 3671 #define QM_REG_MAXPQSIZETXSEL_28_RT_OFFSET 29675 3672 #define QM_REG_MAXPQSIZETXSEL_29_RT_OFFSET 29676 3673 #define QM_REG_MAXPQSIZETXSEL_30_RT_OFFSET 29677 3674 #define QM_REG_MAXPQSIZETXSEL_31_RT_OFFSET 29678 3675 #define QM_REG_MAXPQSIZETXSEL_32_RT_OFFSET 29679 3676 #define QM_REG_MAXPQSIZETXSEL_33_RT_OFFSET 29680 3677 #define QM_REG_MAXPQSIZETXSEL_34_RT_OFFSET 29681 3678 #define QM_REG_MAXPQSIZETXSEL_35_RT_OFFSET 29682 3679 #define QM_REG_MAXPQSIZETXSEL_36_RT_OFFSET 29683 3680 #define QM_REG_MAXPQSIZETXSEL_37_RT_OFFSET 29684 3681 #define QM_REG_MAXPQSIZETXSEL_38_RT_OFFSET 29685 3682 #define QM_REG_MAXPQSIZETXSEL_39_RT_OFFSET 29686 3683 #define QM_REG_MAXPQSIZETXSEL_40_RT_OFFSET 29687 3684 #define QM_REG_MAXPQSIZETXSEL_41_RT_OFFSET 29688 3685 #define QM_REG_MAXPQSIZETXSEL_42_RT_OFFSET 29689 3686 #define QM_REG_MAXPQSIZETXSEL_43_RT_OFFSET 29690 3687 #define QM_REG_MAXPQSIZETXSEL_44_RT_OFFSET 29691 3688 #define QM_REG_MAXPQSIZETXSEL_45_RT_OFFSET 29692 3689 #define QM_REG_MAXPQSIZETXSEL_46_RT_OFFSET 29693 3690 #define QM_REG_MAXPQSIZETXSEL_47_RT_OFFSET 29694 3691 #define QM_REG_MAXPQSIZETXSEL_48_RT_OFFSET 29695 3692 #define QM_REG_MAXPQSIZETXSEL_49_RT_OFFSET 29696 3693 #define QM_REG_MAXPQSIZETXSEL_50_RT_OFFSET 29697 3694 #define QM_REG_MAXPQSIZETXSEL_51_RT_OFFSET 29698 3695 #define QM_REG_MAXPQSIZETXSEL_52_RT_OFFSET 29699 3696 #define QM_REG_MAXPQSIZETXSEL_53_RT_OFFSET 29700 3697 #define QM_REG_MAXPQSIZETXSEL_54_RT_OFFSET 29701 3698 #define QM_REG_MAXPQSIZETXSEL_55_RT_OFFSET 29702 3699 #define QM_REG_MAXPQSIZETXSEL_56_RT_OFFSET 29703 3700 #define QM_REG_MAXPQSIZETXSEL_57_RT_OFFSET 29704 3701 #define QM_REG_MAXPQSIZETXSEL_58_RT_OFFSET 29705 3702 #define QM_REG_MAXPQSIZETXSEL_59_RT_OFFSET 29706 3703 #define QM_REG_MAXPQSIZETXSEL_60_RT_OFFSET 29707 3704 #define QM_REG_MAXPQSIZETXSEL_61_RT_OFFSET 29708 3705 #define QM_REG_MAXPQSIZETXSEL_62_RT_OFFSET 29709 3706 #define QM_REG_MAXPQSIZETXSEL_63_RT_OFFSET 29710 3707 #define QM_REG_BASEADDROTHERPQ_RT_OFFSET 29711 3708 #define QM_REG_BASEADDROTHERPQ_RT_SIZE 128 3709 #define QM_REG_VOQCRDLINE_RT_OFFSET 29839 3710 #define QM_REG_VOQCRDLINE_RT_SIZE 20 3711 #define QM_REG_VOQINITCRDLINE_RT_OFFSET 29859 3712 #define QM_REG_VOQINITCRDLINE_RT_SIZE 20 3713 #define QM_REG_AFULLQMBYPTHRPFWFQ_RT_OFFSET 29879 3714 #define QM_REG_AFULLQMBYPTHRVPWFQ_RT_OFFSET 29880 3715 #define QM_REG_AFULLQMBYPTHRPFRL_RT_OFFSET 29881 3716 #define QM_REG_AFULLQMBYPTHRGLBLRL_RT_OFFSET 29882 3717 #define QM_REG_AFULLOPRTNSTCCRDMASK_RT_OFFSET 29883 3718 #define QM_REG_WRROTHERPQGRP_0_RT_OFFSET 29884 3719 #define QM_REG_WRROTHERPQGRP_1_RT_OFFSET 29885 3720 #define QM_REG_WRROTHERPQGRP_2_RT_OFFSET 29886 3721 #define QM_REG_WRROTHERPQGRP_3_RT_OFFSET 29887 3722 #define QM_REG_WRROTHERPQGRP_4_RT_OFFSET 29888 3723 #define QM_REG_WRROTHERPQGRP_5_RT_OFFSET 29889 3724 #define QM_REG_WRROTHERPQGRP_6_RT_OFFSET 29890 3725 #define QM_REG_WRROTHERPQGRP_7_RT_OFFSET 29891 3726 #define QM_REG_WRROTHERPQGRP_8_RT_OFFSET 29892 3727 #define QM_REG_WRROTHERPQGRP_9_RT_OFFSET 29893 3728 #define QM_REG_WRROTHERPQGRP_10_RT_OFFSET 29894 3729 #define QM_REG_WRROTHERPQGRP_11_RT_OFFSET 29895 3730 #define QM_REG_WRROTHERPQGRP_12_RT_OFFSET 29896 3731 #define QM_REG_WRROTHERPQGRP_13_RT_OFFSET 29897 3732 #define QM_REG_WRROTHERPQGRP_14_RT_OFFSET 29898 3733 #define QM_REG_WRROTHERPQGRP_15_RT_OFFSET 29899 3734 #define QM_REG_WRROTHERGRPWEIGHT_0_RT_OFFSET 29900 3735 #define QM_REG_WRROTHERGRPWEIGHT_1_RT_OFFSET 29901 3736 #define QM_REG_WRROTHERGRPWEIGHT_2_RT_OFFSET 29902 3737 #define QM_REG_WRROTHERGRPWEIGHT_3_RT_OFFSET 29903 3738 #define QM_REG_WRRTXGRPWEIGHT_0_RT_OFFSET 29904 3739 #define QM_REG_WRRTXGRPWEIGHT_1_RT_OFFSET 29905 3740 #define QM_REG_PQTX2PF_0_RT_OFFSET 29906 3741 #define QM_REG_PQTX2PF_1_RT_OFFSET 29907 3742 #define QM_REG_PQTX2PF_2_RT_OFFSET 29908 3743 #define QM_REG_PQTX2PF_3_RT_OFFSET 29909 3744 #define QM_REG_PQTX2PF_4_RT_OFFSET 29910 3745 #define QM_REG_PQTX2PF_5_RT_OFFSET 29911 3746 #define QM_REG_PQTX2PF_6_RT_OFFSET 29912 3747 #define QM_REG_PQTX2PF_7_RT_OFFSET 29913 3748 #define QM_REG_PQTX2PF_8_RT_OFFSET 29914 3749 #define QM_REG_PQTX2PF_9_RT_OFFSET 29915 3750 #define QM_REG_PQTX2PF_10_RT_OFFSET 29916 3751 #define QM_REG_PQTX2PF_11_RT_OFFSET 29917 3752 #define QM_REG_PQTX2PF_12_RT_OFFSET 29918 3753 #define QM_REG_PQTX2PF_13_RT_OFFSET 29919 3754 #define QM_REG_PQTX2PF_14_RT_OFFSET 29920 3755 #define QM_REG_PQTX2PF_15_RT_OFFSET 29921 3756 #define QM_REG_PQTX2PF_16_RT_OFFSET 29922 3757 #define QM_REG_PQTX2PF_17_RT_OFFSET 29923 3758 #define QM_REG_PQTX2PF_18_RT_OFFSET 29924 3759 #define QM_REG_PQTX2PF_19_RT_OFFSET 29925 3760 #define QM_REG_PQTX2PF_20_RT_OFFSET 29926 3761 #define QM_REG_PQTX2PF_21_RT_OFFSET 29927 3762 #define QM_REG_PQTX2PF_22_RT_OFFSET 29928 3763 #define QM_REG_PQTX2PF_23_RT_OFFSET 29929 3764 #define QM_REG_PQTX2PF_24_RT_OFFSET 29930 3765 #define QM_REG_PQTX2PF_25_RT_OFFSET 29931 3766 #define QM_REG_PQTX2PF_26_RT_OFFSET 29932 3767 #define QM_REG_PQTX2PF_27_RT_OFFSET 29933 3768 #define QM_REG_PQTX2PF_28_RT_OFFSET 29934 3769 #define QM_REG_PQTX2PF_29_RT_OFFSET 29935 3770 #define QM_REG_PQTX2PF_30_RT_OFFSET 29936 3771 #define QM_REG_PQTX2PF_31_RT_OFFSET 29937 3772 #define QM_REG_PQTX2PF_32_RT_OFFSET 29938 3773 #define QM_REG_PQTX2PF_33_RT_OFFSET 29939 3774 #define QM_REG_PQTX2PF_34_RT_OFFSET 29940 3775 #define QM_REG_PQTX2PF_35_RT_OFFSET 29941 3776 #define QM_REG_PQTX2PF_36_RT_OFFSET 29942 3777 #define QM_REG_PQTX2PF_37_RT_OFFSET 29943 3778 #define QM_REG_PQTX2PF_38_RT_OFFSET 29944 3779 #define QM_REG_PQTX2PF_39_RT_OFFSET 29945 3780 #define QM_REG_PQTX2PF_40_RT_OFFSET 29946 3781 #define QM_REG_PQTX2PF_41_RT_OFFSET 29947 3782 #define QM_REG_PQTX2PF_42_RT_OFFSET 29948 3783 #define QM_REG_PQTX2PF_43_RT_OFFSET 29949 3784 #define QM_REG_PQTX2PF_44_RT_OFFSET 29950 3785 #define QM_REG_PQTX2PF_45_RT_OFFSET 29951 3786 #define QM_REG_PQTX2PF_46_RT_OFFSET 29952 3787 #define QM_REG_PQTX2PF_47_RT_OFFSET 29953 3788 #define QM_REG_PQTX2PF_48_RT_OFFSET 29954 3789 #define QM_REG_PQTX2PF_49_RT_OFFSET 29955 3790 #define QM_REG_PQTX2PF_50_RT_OFFSET 29956 3791 #define QM_REG_PQTX2PF_51_RT_OFFSET 29957 3792 #define QM_REG_PQTX2PF_52_RT_OFFSET 29958 3793 #define QM_REG_PQTX2PF_53_RT_OFFSET 29959 3794 #define QM_REG_PQTX2PF_54_RT_OFFSET 29960 3795 #define QM_REG_PQTX2PF_55_RT_OFFSET 29961 3796 #define QM_REG_PQTX2PF_56_RT_OFFSET 29962 3797 #define QM_REG_PQTX2PF_57_RT_OFFSET 29963 3798 #define QM_REG_PQTX2PF_58_RT_OFFSET 29964 3799 #define QM_REG_PQTX2PF_59_RT_OFFSET 29965 3800 #define QM_REG_PQTX2PF_60_RT_OFFSET 29966 3801 #define QM_REG_PQTX2PF_61_RT_OFFSET 29967 3802 #define QM_REG_PQTX2PF_62_RT_OFFSET 29968 3803 #define QM_REG_PQTX2PF_63_RT_OFFSET 29969 3804 #define QM_REG_PQOTHER2PF_0_RT_OFFSET 29970 3805 #define QM_REG_PQOTHER2PF_1_RT_OFFSET 29971 3806 #define QM_REG_PQOTHER2PF_2_RT_OFFSET 29972 3807 #define QM_REG_PQOTHER2PF_3_RT_OFFSET 29973 3808 #define QM_REG_PQOTHER2PF_4_RT_OFFSET 29974 3809 #define QM_REG_PQOTHER2PF_5_RT_OFFSET 29975 3810 #define QM_REG_PQOTHER2PF_6_RT_OFFSET 29976 3811 #define QM_REG_PQOTHER2PF_7_RT_OFFSET 29977 3812 #define QM_REG_PQOTHER2PF_8_RT_OFFSET 29978 3813 #define QM_REG_PQOTHER2PF_9_RT_OFFSET 29979 3814 #define QM_REG_PQOTHER2PF_10_RT_OFFSET 29980 3815 #define QM_REG_PQOTHER2PF_11_RT_OFFSET 29981 3816 #define QM_REG_PQOTHER2PF_12_RT_OFFSET 29982 3817 #define QM_REG_PQOTHER2PF_13_RT_OFFSET 29983 3818 #define QM_REG_PQOTHER2PF_14_RT_OFFSET 29984 3819 #define QM_REG_PQOTHER2PF_15_RT_OFFSET 29985 3820 #define QM_REG_RLGLBLPERIOD_0_RT_OFFSET 29986 3821 #define QM_REG_RLGLBLPERIOD_1_RT_OFFSET 29987 3822 #define QM_REG_RLGLBLPERIODTIMER_0_RT_OFFSET 29988 3823 #define QM_REG_RLGLBLPERIODTIMER_1_RT_OFFSET 29989 3824 #define QM_REG_RLGLBLPERIODSEL_0_RT_OFFSET 29990 3825 #define QM_REG_RLGLBLPERIODSEL_1_RT_OFFSET 29991 3826 #define QM_REG_RLGLBLPERIODSEL_2_RT_OFFSET 29992 3827 #define QM_REG_RLGLBLPERIODSEL_3_RT_OFFSET 29993 3828 #define QM_REG_RLGLBLPERIODSEL_4_RT_OFFSET 29994 3829 #define QM_REG_RLGLBLPERIODSEL_5_RT_OFFSET 29995 3830 #define QM_REG_RLGLBLPERIODSEL_6_RT_OFFSET 29996 3831 #define QM_REG_RLGLBLPERIODSEL_7_RT_OFFSET 29997 3832 #define QM_REG_RLGLBLINCVAL_RT_OFFSET 29998 3833 #define QM_REG_RLGLBLINCVAL_RT_SIZE 256 3834 #define QM_REG_RLGLBLUPPERBOUND_RT_OFFSET 30254 3835 #define QM_REG_RLGLBLUPPERBOUND_RT_SIZE 256 3836 #define QM_REG_RLGLBLCRD_RT_OFFSET 30510 3837 #define QM_REG_RLGLBLCRD_RT_SIZE 256 3838 #define QM_REG_RLGLBLENABLE_RT_OFFSET 30766 3839 #define QM_REG_RLPFPERIOD_RT_OFFSET 30767 3840 #define QM_REG_RLPFPERIODTIMER_RT_OFFSET 30768 3841 #define QM_REG_RLPFINCVAL_RT_OFFSET 30769 3842 #define QM_REG_RLPFINCVAL_RT_SIZE 16 3843 #define QM_REG_RLPFUPPERBOUND_RT_OFFSET 30785 3844 #define QM_REG_RLPFUPPERBOUND_RT_SIZE 16 3845 #define QM_REG_RLPFCRD_RT_OFFSET 30801 3846 #define QM_REG_RLPFCRD_RT_SIZE 16 3847 #define QM_REG_RLPFENABLE_RT_OFFSET 30817 3848 #define QM_REG_RLPFVOQENABLE_RT_OFFSET 30818 3849 #define QM_REG_WFQPFWEIGHT_RT_OFFSET 30819 3850 #define QM_REG_WFQPFWEIGHT_RT_SIZE 16 3851 #define QM_REG_WFQPFUPPERBOUND_RT_OFFSET 30835 3852 #define QM_REG_WFQPFUPPERBOUND_RT_SIZE 16 3853 #define QM_REG_WFQPFCRD_RT_OFFSET 30851 3854 #define QM_REG_WFQPFCRD_RT_SIZE 160 3855 #define QM_REG_WFQPFENABLE_RT_OFFSET 31011 3856 #define QM_REG_WFQVPENABLE_RT_OFFSET 31012 3857 #define QM_REG_BASEADDRTXPQ_RT_OFFSET 31013 3858 #define QM_REG_BASEADDRTXPQ_RT_SIZE 512 3859 #define QM_REG_TXPQMAP_RT_OFFSET 31525 3860 #define QM_REG_TXPQMAP_RT_SIZE 512 3861 #define QM_REG_WFQVPWEIGHT_RT_OFFSET 32037 3862 #define QM_REG_WFQVPWEIGHT_RT_SIZE 512 3863 #define QM_REG_WFQVPCRD_RT_OFFSET 32549 3864 #define QM_REG_WFQVPCRD_RT_SIZE 512 3865 #define QM_REG_WFQVPMAP_RT_OFFSET 33061 3866 #define QM_REG_WFQVPMAP_RT_SIZE 512 3867 #define QM_REG_WFQPFCRD_MSB_RT_OFFSET 33573 3868 #define QM_REG_WFQPFCRD_MSB_RT_SIZE 160 3869 #define NIG_REG_TAG_ETHERTYPE_0_RT_OFFSET 33733 3870 #define NIG_REG_OUTER_TAG_VALUE_LIST0_RT_OFFSET 33734 3871 #define NIG_REG_OUTER_TAG_VALUE_LIST1_RT_OFFSET 33735 3872 #define NIG_REG_OUTER_TAG_VALUE_LIST2_RT_OFFSET 33736 3873 #define NIG_REG_OUTER_TAG_VALUE_LIST3_RT_OFFSET 33737 3874 #define NIG_REG_OUTER_TAG_VALUE_MASK_RT_OFFSET 33738 3875 #define NIG_REG_LLH_FUNC_TAGMAC_CLS_TYPE_RT_OFFSET 33739 3876 #define NIG_REG_LLH_FUNC_TAG_EN_RT_OFFSET 33740 3877 #define NIG_REG_LLH_FUNC_TAG_EN_RT_SIZE 4 3878 #define NIG_REG_LLH_FUNC_TAG_HDR_SEL_RT_OFFSET 33744 3879 #define NIG_REG_LLH_FUNC_TAG_HDR_SEL_RT_SIZE 4 3880 #define NIG_REG_LLH_FUNC_TAG_VALUE_RT_OFFSET 33748 3881 #define NIG_REG_LLH_FUNC_TAG_VALUE_RT_SIZE 4 3882 #define NIG_REG_LLH_FUNC_NO_TAG_RT_OFFSET 33752 3883 #define NIG_REG_LLH_FUNC_FILTER_VALUE_RT_OFFSET 33753 3884 #define NIG_REG_LLH_FUNC_FILTER_VALUE_RT_SIZE 32 3885 #define NIG_REG_LLH_FUNC_FILTER_EN_RT_OFFSET 33785 3886 #define NIG_REG_LLH_FUNC_FILTER_EN_RT_SIZE 16 3887 #define NIG_REG_LLH_FUNC_FILTER_MODE_RT_OFFSET 33801 3888 #define NIG_REG_LLH_FUNC_FILTER_MODE_RT_SIZE 16 3889 #define NIG_REG_LLH_FUNC_FILTER_PROTOCOL_TYPE_RT_OFFSET 33817 3890 #define NIG_REG_LLH_FUNC_FILTER_PROTOCOL_TYPE_RT_SIZE 16 3891 #define NIG_REG_LLH_FUNC_FILTER_HDR_SEL_RT_OFFSET 33833 3892 #define NIG_REG_LLH_FUNC_FILTER_HDR_SEL_RT_SIZE 16 3893 #define NIG_REG_TX_EDPM_CTRL_RT_OFFSET 33849 3894 #define NIG_REG_ROCE_DUPLICATE_TO_HOST_RT_OFFSET 33850 3895 #define CDU_REG_CID_ADDR_PARAMS_RT_OFFSET 33851 3896 #define CDU_REG_SEGMENT0_PARAMS_RT_OFFSET 33852 3897 #define CDU_REG_SEGMENT1_PARAMS_RT_OFFSET 33853 3898 #define CDU_REG_PF_SEG0_TYPE_OFFSET_RT_OFFSET 33854 3899 #define CDU_REG_PF_SEG1_TYPE_OFFSET_RT_OFFSET 33855 3900 #define CDU_REG_PF_SEG2_TYPE_OFFSET_RT_OFFSET 33856 3901 #define CDU_REG_PF_SEG3_TYPE_OFFSET_RT_OFFSET 33857 3902 #define CDU_REG_PF_FL_SEG0_TYPE_OFFSET_RT_OFFSET 33858 3903 #define CDU_REG_PF_FL_SEG1_TYPE_OFFSET_RT_OFFSET 33859 3904 #define CDU_REG_PF_FL_SEG2_TYPE_OFFSET_RT_OFFSET 33860 3905 #define CDU_REG_PF_FL_SEG3_TYPE_OFFSET_RT_OFFSET 33861 3906 #define CDU_REG_VF_SEG_TYPE_OFFSET_RT_OFFSET 33862 3907 #define CDU_REG_VF_FL_SEG_TYPE_OFFSET_RT_OFFSET 33863 3908 #define PBF_REG_TAG_ETHERTYPE_0_RT_OFFSET 33864 3909 #define PBF_REG_BTB_SHARED_AREA_SIZE_RT_OFFSET 33865 3910 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ0_RT_OFFSET 33866 3911 #define PBF_REG_BTB_GUARANTEED_VOQ0_RT_OFFSET 33867 3912 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ0_RT_OFFSET 33868 3913 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ1_RT_OFFSET 33869 3914 #define PBF_REG_BTB_GUARANTEED_VOQ1_RT_OFFSET 33870 3915 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ1_RT_OFFSET 33871 3916 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ2_RT_OFFSET 33872 3917 #define PBF_REG_BTB_GUARANTEED_VOQ2_RT_OFFSET 33873 3918 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ2_RT_OFFSET 33874 3919 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ3_RT_OFFSET 33875 3920 #define PBF_REG_BTB_GUARANTEED_VOQ3_RT_OFFSET 33876 3921 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ3_RT_OFFSET 33877 3922 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ4_RT_OFFSET 33878 3923 #define PBF_REG_BTB_GUARANTEED_VOQ4_RT_OFFSET 33879 3924 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ4_RT_OFFSET 33880 3925 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ5_RT_OFFSET 33881 3926 #define PBF_REG_BTB_GUARANTEED_VOQ5_RT_OFFSET 33882 3927 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ5_RT_OFFSET 33883 3928 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ6_RT_OFFSET 33884 3929 #define PBF_REG_BTB_GUARANTEED_VOQ6_RT_OFFSET 33885 3930 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ6_RT_OFFSET 33886 3931 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ7_RT_OFFSET 33887 3932 #define PBF_REG_BTB_GUARANTEED_VOQ7_RT_OFFSET 33888 3933 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ7_RT_OFFSET 33889 3934 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ8_RT_OFFSET 33890 3935 #define PBF_REG_BTB_GUARANTEED_VOQ8_RT_OFFSET 33891 3936 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ8_RT_OFFSET 33892 3937 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ9_RT_OFFSET 33893 3938 #define PBF_REG_BTB_GUARANTEED_VOQ9_RT_OFFSET 33894 3939 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ9_RT_OFFSET 33895 3940 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ10_RT_OFFSET 33896 3941 #define PBF_REG_BTB_GUARANTEED_VOQ10_RT_OFFSET 33897 3942 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ10_RT_OFFSET 33898 3943 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ11_RT_OFFSET 33899 3944 #define PBF_REG_BTB_GUARANTEED_VOQ11_RT_OFFSET 33900 3945 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ11_RT_OFFSET 33901 3946 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ12_RT_OFFSET 33902 3947 #define PBF_REG_BTB_GUARANTEED_VOQ12_RT_OFFSET 33903 3948 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ12_RT_OFFSET 33904 3949 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ13_RT_OFFSET 33905 3950 #define PBF_REG_BTB_GUARANTEED_VOQ13_RT_OFFSET 33906 3951 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ13_RT_OFFSET 33907 3952 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ14_RT_OFFSET 33908 3953 #define PBF_REG_BTB_GUARANTEED_VOQ14_RT_OFFSET 33909 3954 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ14_RT_OFFSET 33910 3955 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ15_RT_OFFSET 33911 3956 #define PBF_REG_BTB_GUARANTEED_VOQ15_RT_OFFSET 33912 3957 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ15_RT_OFFSET 33913 3958 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ16_RT_OFFSET 33914 3959 #define PBF_REG_BTB_GUARANTEED_VOQ16_RT_OFFSET 33915 3960 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ16_RT_OFFSET 33916 3961 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ17_RT_OFFSET 33917 3962 #define PBF_REG_BTB_GUARANTEED_VOQ17_RT_OFFSET 33918 3963 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ17_RT_OFFSET 33919 3964 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ18_RT_OFFSET 33920 3965 #define PBF_REG_BTB_GUARANTEED_VOQ18_RT_OFFSET 33921 3966 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ18_RT_OFFSET 33922 3967 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ19_RT_OFFSET 33923 3968 #define PBF_REG_BTB_GUARANTEED_VOQ19_RT_OFFSET 33924 3969 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ19_RT_OFFSET 33925 3970 #define XCM_REG_CON_PHY_Q3_RT_OFFSET 33926 3971 3972 #define RUNTIME_ARRAY_SIZE 33927 3973 3974 /* The eth storm context for the Tstorm */ 3975 struct tstorm_eth_conn_st_ctx { 3976 __le32 reserved[4]; 3977 }; 3978 3979 /* The eth storm context for the Pstorm */ 3980 struct pstorm_eth_conn_st_ctx { 3981 __le32 reserved[8]; 3982 }; 3983 3984 /* The eth storm context for the Xstorm */ 3985 struct xstorm_eth_conn_st_ctx { 3986 __le32 reserved[60]; 3987 }; 3988 3989 struct xstorm_eth_conn_ag_ctx { 3990 u8 reserved0; 3991 u8 eth_state; 3992 u8 flags0; 3993 #define XSTORM_ETH_CONN_AG_CTX_EXIST_IN_QM0_MASK 0x1 3994 #define XSTORM_ETH_CONN_AG_CTX_EXIST_IN_QM0_SHIFT 0 3995 #define XSTORM_ETH_CONN_AG_CTX_RESERVED1_MASK 0x1 3996 #define XSTORM_ETH_CONN_AG_CTX_RESERVED1_SHIFT 1 3997 #define XSTORM_ETH_CONN_AG_CTX_RESERVED2_MASK 0x1 3998 #define XSTORM_ETH_CONN_AG_CTX_RESERVED2_SHIFT 2 3999 #define XSTORM_ETH_CONN_AG_CTX_EXIST_IN_QM3_MASK 0x1 4000 #define XSTORM_ETH_CONN_AG_CTX_EXIST_IN_QM3_SHIFT 3 4001 #define XSTORM_ETH_CONN_AG_CTX_RESERVED3_MASK 0x1 4002 #define XSTORM_ETH_CONN_AG_CTX_RESERVED3_SHIFT 4 4003 #define XSTORM_ETH_CONN_AG_CTX_RESERVED4_MASK 0x1 4004 #define XSTORM_ETH_CONN_AG_CTX_RESERVED4_SHIFT 5 4005 #define XSTORM_ETH_CONN_AG_CTX_RESERVED5_MASK 0x1 4006 #define XSTORM_ETH_CONN_AG_CTX_RESERVED5_SHIFT 6 4007 #define XSTORM_ETH_CONN_AG_CTX_RESERVED6_MASK 0x1 4008 #define XSTORM_ETH_CONN_AG_CTX_RESERVED6_SHIFT 7 4009 u8 flags1; 4010 #define XSTORM_ETH_CONN_AG_CTX_RESERVED7_MASK 0x1 4011 #define XSTORM_ETH_CONN_AG_CTX_RESERVED7_SHIFT 0 4012 #define XSTORM_ETH_CONN_AG_CTX_RESERVED8_MASK 0x1 4013 #define XSTORM_ETH_CONN_AG_CTX_RESERVED8_SHIFT 1 4014 #define XSTORM_ETH_CONN_AG_CTX_RESERVED9_MASK 0x1 4015 #define XSTORM_ETH_CONN_AG_CTX_RESERVED9_SHIFT 2 4016 #define XSTORM_ETH_CONN_AG_CTX_BIT11_MASK 0x1 4017 #define XSTORM_ETH_CONN_AG_CTX_BIT11_SHIFT 3 4018 #define XSTORM_ETH_CONN_AG_CTX_BIT12_MASK 0x1 4019 #define XSTORM_ETH_CONN_AG_CTX_BIT12_SHIFT 4 4020 #define XSTORM_ETH_CONN_AG_CTX_BIT13_MASK 0x1 4021 #define XSTORM_ETH_CONN_AG_CTX_BIT13_SHIFT 5 4022 #define XSTORM_ETH_CONN_AG_CTX_TX_RULE_ACTIVE_MASK 0x1 4023 #define XSTORM_ETH_CONN_AG_CTX_TX_RULE_ACTIVE_SHIFT 6 4024 #define XSTORM_ETH_CONN_AG_CTX_DQ_CF_ACTIVE_MASK 0x1 4025 #define XSTORM_ETH_CONN_AG_CTX_DQ_CF_ACTIVE_SHIFT 7 4026 u8 flags2; 4027 #define XSTORM_ETH_CONN_AG_CTX_CF0_MASK 0x3 4028 #define XSTORM_ETH_CONN_AG_CTX_CF0_SHIFT 0 4029 #define XSTORM_ETH_CONN_AG_CTX_CF1_MASK 0x3 4030 #define XSTORM_ETH_CONN_AG_CTX_CF1_SHIFT 2 4031 #define XSTORM_ETH_CONN_AG_CTX_CF2_MASK 0x3 4032 #define XSTORM_ETH_CONN_AG_CTX_CF2_SHIFT 4 4033 #define XSTORM_ETH_CONN_AG_CTX_CF3_MASK 0x3 4034 #define XSTORM_ETH_CONN_AG_CTX_CF3_SHIFT 6 4035 u8 flags3; 4036 #define XSTORM_ETH_CONN_AG_CTX_CF4_MASK 0x3 4037 #define XSTORM_ETH_CONN_AG_CTX_CF4_SHIFT 0 4038 #define XSTORM_ETH_CONN_AG_CTX_CF5_MASK 0x3 4039 #define XSTORM_ETH_CONN_AG_CTX_CF5_SHIFT 2 4040 #define XSTORM_ETH_CONN_AG_CTX_CF6_MASK 0x3 4041 #define XSTORM_ETH_CONN_AG_CTX_CF6_SHIFT 4 4042 #define XSTORM_ETH_CONN_AG_CTX_CF7_MASK 0x3 4043 #define XSTORM_ETH_CONN_AG_CTX_CF7_SHIFT 6 4044 u8 flags4; 4045 #define XSTORM_ETH_CONN_AG_CTX_CF8_MASK 0x3 4046 #define XSTORM_ETH_CONN_AG_CTX_CF8_SHIFT 0 4047 #define XSTORM_ETH_CONN_AG_CTX_CF9_MASK 0x3 4048 #define XSTORM_ETH_CONN_AG_CTX_CF9_SHIFT 2 4049 #define XSTORM_ETH_CONN_AG_CTX_CF10_MASK 0x3 4050 #define XSTORM_ETH_CONN_AG_CTX_CF10_SHIFT 4 4051 #define XSTORM_ETH_CONN_AG_CTX_CF11_MASK 0x3 4052 #define XSTORM_ETH_CONN_AG_CTX_CF11_SHIFT 6 4053 u8 flags5; 4054 #define XSTORM_ETH_CONN_AG_CTX_CF12_MASK 0x3 4055 #define XSTORM_ETH_CONN_AG_CTX_CF12_SHIFT 0 4056 #define XSTORM_ETH_CONN_AG_CTX_CF13_MASK 0x3 4057 #define XSTORM_ETH_CONN_AG_CTX_CF13_SHIFT 2 4058 #define XSTORM_ETH_CONN_AG_CTX_CF14_MASK 0x3 4059 #define XSTORM_ETH_CONN_AG_CTX_CF14_SHIFT 4 4060 #define XSTORM_ETH_CONN_AG_CTX_CF15_MASK 0x3 4061 #define XSTORM_ETH_CONN_AG_CTX_CF15_SHIFT 6 4062 u8 flags6; 4063 #define XSTORM_ETH_CONN_AG_CTX_GO_TO_BD_CONS_CF_MASK 0x3 4064 #define XSTORM_ETH_CONN_AG_CTX_GO_TO_BD_CONS_CF_SHIFT 0 4065 #define XSTORM_ETH_CONN_AG_CTX_MULTI_UNICAST_CF_MASK 0x3 4066 #define XSTORM_ETH_CONN_AG_CTX_MULTI_UNICAST_CF_SHIFT 2 4067 #define XSTORM_ETH_CONN_AG_CTX_DQ_CF_MASK 0x3 4068 #define XSTORM_ETH_CONN_AG_CTX_DQ_CF_SHIFT 4 4069 #define XSTORM_ETH_CONN_AG_CTX_TERMINATE_CF_MASK 0x3 4070 #define XSTORM_ETH_CONN_AG_CTX_TERMINATE_CF_SHIFT 6 4071 u8 flags7; 4072 #define XSTORM_ETH_CONN_AG_CTX_FLUSH_Q0_MASK 0x3 4073 #define XSTORM_ETH_CONN_AG_CTX_FLUSH_Q0_SHIFT 0 4074 #define XSTORM_ETH_CONN_AG_CTX_RESERVED10_MASK 0x3 4075 #define XSTORM_ETH_CONN_AG_CTX_RESERVED10_SHIFT 2 4076 #define XSTORM_ETH_CONN_AG_CTX_SLOW_PATH_MASK 0x3 4077 #define XSTORM_ETH_CONN_AG_CTX_SLOW_PATH_SHIFT 4 4078 #define XSTORM_ETH_CONN_AG_CTX_CF0EN_MASK 0x1 4079 #define XSTORM_ETH_CONN_AG_CTX_CF0EN_SHIFT 6 4080 #define XSTORM_ETH_CONN_AG_CTX_CF1EN_MASK 0x1 4081 #define XSTORM_ETH_CONN_AG_CTX_CF1EN_SHIFT 7 4082 u8 flags8; 4083 #define XSTORM_ETH_CONN_AG_CTX_CF2EN_MASK 0x1 4084 #define XSTORM_ETH_CONN_AG_CTX_CF2EN_SHIFT 0 4085 #define XSTORM_ETH_CONN_AG_CTX_CF3EN_MASK 0x1 4086 #define XSTORM_ETH_CONN_AG_CTX_CF3EN_SHIFT 1 4087 #define XSTORM_ETH_CONN_AG_CTX_CF4EN_MASK 0x1 4088 #define XSTORM_ETH_CONN_AG_CTX_CF4EN_SHIFT 2 4089 #define XSTORM_ETH_CONN_AG_CTX_CF5EN_MASK 0x1 4090 #define XSTORM_ETH_CONN_AG_CTX_CF5EN_SHIFT 3 4091 #define XSTORM_ETH_CONN_AG_CTX_CF6EN_MASK 0x1 4092 #define XSTORM_ETH_CONN_AG_CTX_CF6EN_SHIFT 4 4093 #define XSTORM_ETH_CONN_AG_CTX_CF7EN_MASK 0x1 4094 #define XSTORM_ETH_CONN_AG_CTX_CF7EN_SHIFT 5 4095 #define XSTORM_ETH_CONN_AG_CTX_CF8EN_MASK 0x1 4096 #define XSTORM_ETH_CONN_AG_CTX_CF8EN_SHIFT 6 4097 #define XSTORM_ETH_CONN_AG_CTX_CF9EN_MASK 0x1 4098 #define XSTORM_ETH_CONN_AG_CTX_CF9EN_SHIFT 7 4099 u8 flags9; 4100 #define XSTORM_ETH_CONN_AG_CTX_CF10EN_MASK 0x1 4101 #define XSTORM_ETH_CONN_AG_CTX_CF10EN_SHIFT 0 4102 #define XSTORM_ETH_CONN_AG_CTX_CF11EN_MASK 0x1 4103 #define XSTORM_ETH_CONN_AG_CTX_CF11EN_SHIFT 1 4104 #define XSTORM_ETH_CONN_AG_CTX_CF12EN_MASK 0x1 4105 #define XSTORM_ETH_CONN_AG_CTX_CF12EN_SHIFT 2 4106 #define XSTORM_ETH_CONN_AG_CTX_CF13EN_MASK 0x1 4107 #define XSTORM_ETH_CONN_AG_CTX_CF13EN_SHIFT 3 4108 #define XSTORM_ETH_CONN_AG_CTX_CF14EN_MASK 0x1 4109 #define XSTORM_ETH_CONN_AG_CTX_CF14EN_SHIFT 4 4110 #define XSTORM_ETH_CONN_AG_CTX_CF15EN_MASK 0x1 4111 #define XSTORM_ETH_CONN_AG_CTX_CF15EN_SHIFT 5 4112 #define XSTORM_ETH_CONN_AG_CTX_GO_TO_BD_CONS_CF_EN_MASK 0x1 4113 #define XSTORM_ETH_CONN_AG_CTX_GO_TO_BD_CONS_CF_EN_SHIFT 6 4114 #define XSTORM_ETH_CONN_AG_CTX_MULTI_UNICAST_CF_EN_MASK 0x1 4115 #define XSTORM_ETH_CONN_AG_CTX_MULTI_UNICAST_CF_EN_SHIFT 7 4116 u8 flags10; 4117 #define XSTORM_ETH_CONN_AG_CTX_DQ_CF_EN_MASK 0x1 4118 #define XSTORM_ETH_CONN_AG_CTX_DQ_CF_EN_SHIFT 0 4119 #define XSTORM_ETH_CONN_AG_CTX_TERMINATE_CF_EN_MASK 0x1 4120 #define XSTORM_ETH_CONN_AG_CTX_TERMINATE_CF_EN_SHIFT 1 4121 #define XSTORM_ETH_CONN_AG_CTX_FLUSH_Q0_EN_MASK 0x1 4122 #define XSTORM_ETH_CONN_AG_CTX_FLUSH_Q0_EN_SHIFT 2 4123 #define XSTORM_ETH_CONN_AG_CTX_RESERVED11_MASK 0x1 4124 #define XSTORM_ETH_CONN_AG_CTX_RESERVED11_SHIFT 3 4125 #define XSTORM_ETH_CONN_AG_CTX_SLOW_PATH_EN_MASK 0x1 4126 #define XSTORM_ETH_CONN_AG_CTX_SLOW_PATH_EN_SHIFT 4 4127 #define XSTORM_ETH_CONN_AG_CTX_TPH_ENABLE_EN_RESERVED_MASK 0x1 4128 #define XSTORM_ETH_CONN_AG_CTX_TPH_ENABLE_EN_RESERVED_SHIFT 5 4129 #define XSTORM_ETH_CONN_AG_CTX_RESERVED12_MASK 0x1 4130 #define XSTORM_ETH_CONN_AG_CTX_RESERVED12_SHIFT 6 4131 #define XSTORM_ETH_CONN_AG_CTX_RESERVED13_MASK 0x1 4132 #define XSTORM_ETH_CONN_AG_CTX_RESERVED13_SHIFT 7 4133 u8 flags11; 4134 #define XSTORM_ETH_CONN_AG_CTX_RESERVED14_MASK 0x1 4135 #define XSTORM_ETH_CONN_AG_CTX_RESERVED14_SHIFT 0 4136 #define XSTORM_ETH_CONN_AG_CTX_RESERVED15_MASK 0x1 4137 #define XSTORM_ETH_CONN_AG_CTX_RESERVED15_SHIFT 1 4138 #define XSTORM_ETH_CONN_AG_CTX_TX_DEC_RULE_EN_MASK 0x1 4139 #define XSTORM_ETH_CONN_AG_CTX_TX_DEC_RULE_EN_SHIFT 2 4140 #define XSTORM_ETH_CONN_AG_CTX_RULE5EN_MASK 0x1 4141 #define XSTORM_ETH_CONN_AG_CTX_RULE5EN_SHIFT 3 4142 #define XSTORM_ETH_CONN_AG_CTX_RULE6EN_MASK 0x1 4143 #define XSTORM_ETH_CONN_AG_CTX_RULE6EN_SHIFT 4 4144 #define XSTORM_ETH_CONN_AG_CTX_RULE7EN_MASK 0x1 4145 #define XSTORM_ETH_CONN_AG_CTX_RULE7EN_SHIFT 5 4146 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED1_MASK 0x1 4147 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED1_SHIFT 6 4148 #define XSTORM_ETH_CONN_AG_CTX_RULE9EN_MASK 0x1 4149 #define XSTORM_ETH_CONN_AG_CTX_RULE9EN_SHIFT 7 4150 u8 flags12; 4151 #define XSTORM_ETH_CONN_AG_CTX_RULE10EN_MASK 0x1 4152 #define XSTORM_ETH_CONN_AG_CTX_RULE10EN_SHIFT 0 4153 #define XSTORM_ETH_CONN_AG_CTX_RULE11EN_MASK 0x1 4154 #define XSTORM_ETH_CONN_AG_CTX_RULE11EN_SHIFT 1 4155 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED2_MASK 0x1 4156 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED2_SHIFT 2 4157 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED3_MASK 0x1 4158 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED3_SHIFT 3 4159 #define XSTORM_ETH_CONN_AG_CTX_RULE14EN_MASK 0x1 4160 #define XSTORM_ETH_CONN_AG_CTX_RULE14EN_SHIFT 4 4161 #define XSTORM_ETH_CONN_AG_CTX_RULE15EN_MASK 0x1 4162 #define XSTORM_ETH_CONN_AG_CTX_RULE15EN_SHIFT 5 4163 #define XSTORM_ETH_CONN_AG_CTX_RULE16EN_MASK 0x1 4164 #define XSTORM_ETH_CONN_AG_CTX_RULE16EN_SHIFT 6 4165 #define XSTORM_ETH_CONN_AG_CTX_RULE17EN_MASK 0x1 4166 #define XSTORM_ETH_CONN_AG_CTX_RULE17EN_SHIFT 7 4167 u8 flags13; 4168 #define XSTORM_ETH_CONN_AG_CTX_RULE18EN_MASK 0x1 4169 #define XSTORM_ETH_CONN_AG_CTX_RULE18EN_SHIFT 0 4170 #define XSTORM_ETH_CONN_AG_CTX_RULE19EN_MASK 0x1 4171 #define XSTORM_ETH_CONN_AG_CTX_RULE19EN_SHIFT 1 4172 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED4_MASK 0x1 4173 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED4_SHIFT 2 4174 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED5_MASK 0x1 4175 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED5_SHIFT 3 4176 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED6_MASK 0x1 4177 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED6_SHIFT 4 4178 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED7_MASK 0x1 4179 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED7_SHIFT 5 4180 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED8_MASK 0x1 4181 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED8_SHIFT 6 4182 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED9_MASK 0x1 4183 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED9_SHIFT 7 4184 u8 flags14; 4185 #define XSTORM_ETH_CONN_AG_CTX_EDPM_USE_EXT_HDR_MASK 0x1 4186 #define XSTORM_ETH_CONN_AG_CTX_EDPM_USE_EXT_HDR_SHIFT 0 4187 #define XSTORM_ETH_CONN_AG_CTX_EDPM_SEND_RAW_L3L4_MASK 0x1 4188 #define XSTORM_ETH_CONN_AG_CTX_EDPM_SEND_RAW_L3L4_SHIFT 1 4189 #define XSTORM_ETH_CONN_AG_CTX_EDPM_INBAND_PROP_HDR_MASK 0x1 4190 #define XSTORM_ETH_CONN_AG_CTX_EDPM_INBAND_PROP_HDR_SHIFT 2 4191 #define XSTORM_ETH_CONN_AG_CTX_EDPM_SEND_EXT_TUNNEL_MASK 0x1 4192 #define XSTORM_ETH_CONN_AG_CTX_EDPM_SEND_EXT_TUNNEL_SHIFT 3 4193 #define XSTORM_ETH_CONN_AG_CTX_L2_EDPM_ENABLE_MASK 0x1 4194 #define XSTORM_ETH_CONN_AG_CTX_L2_EDPM_ENABLE_SHIFT 4 4195 #define XSTORM_ETH_CONN_AG_CTX_ROCE_EDPM_ENABLE_MASK 0x1 4196 #define XSTORM_ETH_CONN_AG_CTX_ROCE_EDPM_ENABLE_SHIFT 5 4197 #define XSTORM_ETH_CONN_AG_CTX_TPH_ENABLE_MASK 0x3 4198 #define XSTORM_ETH_CONN_AG_CTX_TPH_ENABLE_SHIFT 6 4199 u8 edpm_event_id; 4200 __le16 physical_q0; 4201 __le16 quota; 4202 __le16 edpm_num_bds; 4203 __le16 tx_bd_cons; 4204 __le16 tx_bd_prod; 4205 __le16 tx_class; 4206 __le16 conn_dpi; 4207 u8 byte3; 4208 u8 byte4; 4209 u8 byte5; 4210 u8 byte6; 4211 __le32 reg0; 4212 __le32 reg1; 4213 __le32 reg2; 4214 __le32 reg3; 4215 __le32 reg4; 4216 __le32 reg5; 4217 __le32 reg6; 4218 __le16 word7; 4219 __le16 word8; 4220 __le16 word9; 4221 __le16 word10; 4222 __le32 reg7; 4223 __le32 reg8; 4224 __le32 reg9; 4225 u8 byte7; 4226 u8 byte8; 4227 u8 byte9; 4228 u8 byte10; 4229 u8 byte11; 4230 u8 byte12; 4231 u8 byte13; 4232 u8 byte14; 4233 u8 byte15; 4234 u8 byte16; 4235 __le16 word11; 4236 __le32 reg10; 4237 __le32 reg11; 4238 __le32 reg12; 4239 __le32 reg13; 4240 __le32 reg14; 4241 __le32 reg15; 4242 __le32 reg16; 4243 __le32 reg17; 4244 __le32 reg18; 4245 __le32 reg19; 4246 __le16 word12; 4247 __le16 word13; 4248 __le16 word14; 4249 __le16 word15; 4250 }; 4251 4252 /* The eth storm context for the Ystorm */ 4253 struct ystorm_eth_conn_st_ctx { 4254 __le32 reserved[8]; 4255 }; 4256 4257 struct ystorm_eth_conn_ag_ctx { 4258 u8 byte0; 4259 u8 state; 4260 u8 flags0; 4261 #define YSTORM_ETH_CONN_AG_CTX_BIT0_MASK 0x1 4262 #define YSTORM_ETH_CONN_AG_CTX_BIT0_SHIFT 0 4263 #define YSTORM_ETH_CONN_AG_CTX_BIT1_MASK 0x1 4264 #define YSTORM_ETH_CONN_AG_CTX_BIT1_SHIFT 1 4265 #define YSTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_MASK 0x3 4266 #define YSTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_SHIFT 2 4267 #define YSTORM_ETH_CONN_AG_CTX_PMD_TERMINATE_CF_MASK 0x3 4268 #define YSTORM_ETH_CONN_AG_CTX_PMD_TERMINATE_CF_SHIFT 4 4269 #define YSTORM_ETH_CONN_AG_CTX_CF2_MASK 0x3 4270 #define YSTORM_ETH_CONN_AG_CTX_CF2_SHIFT 6 4271 u8 flags1; 4272 #define YSTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_EN_MASK 0x1 4273 #define YSTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_EN_SHIFT 0 4274 #define YSTORM_ETH_CONN_AG_CTX_PMD_TERMINATE_CF_EN_MASK 0x1 4275 #define YSTORM_ETH_CONN_AG_CTX_PMD_TERMINATE_CF_EN_SHIFT 1 4276 #define YSTORM_ETH_CONN_AG_CTX_CF2EN_MASK 0x1 4277 #define YSTORM_ETH_CONN_AG_CTX_CF2EN_SHIFT 2 4278 #define YSTORM_ETH_CONN_AG_CTX_RULE0EN_MASK 0x1 4279 #define YSTORM_ETH_CONN_AG_CTX_RULE0EN_SHIFT 3 4280 #define YSTORM_ETH_CONN_AG_CTX_RULE1EN_MASK 0x1 4281 #define YSTORM_ETH_CONN_AG_CTX_RULE1EN_SHIFT 4 4282 #define YSTORM_ETH_CONN_AG_CTX_RULE2EN_MASK 0x1 4283 #define YSTORM_ETH_CONN_AG_CTX_RULE2EN_SHIFT 5 4284 #define YSTORM_ETH_CONN_AG_CTX_RULE3EN_MASK 0x1 4285 #define YSTORM_ETH_CONN_AG_CTX_RULE3EN_SHIFT 6 4286 #define YSTORM_ETH_CONN_AG_CTX_RULE4EN_MASK 0x1 4287 #define YSTORM_ETH_CONN_AG_CTX_RULE4EN_SHIFT 7 4288 u8 tx_q0_int_coallecing_timeset; 4289 u8 byte3; 4290 __le16 word0; 4291 __le32 terminate_spqe; 4292 __le32 reg1; 4293 __le16 tx_bd_cons_upd; 4294 __le16 word2; 4295 __le16 word3; 4296 __le16 word4; 4297 __le32 reg2; 4298 __le32 reg3; 4299 }; 4300 4301 struct tstorm_eth_conn_ag_ctx { 4302 u8 byte0; 4303 u8 byte1; 4304 u8 flags0; 4305 #define TSTORM_ETH_CONN_AG_CTX_BIT0_MASK 0x1 4306 #define TSTORM_ETH_CONN_AG_CTX_BIT0_SHIFT 0 4307 #define TSTORM_ETH_CONN_AG_CTX_BIT1_MASK 0x1 4308 #define TSTORM_ETH_CONN_AG_CTX_BIT1_SHIFT 1 4309 #define TSTORM_ETH_CONN_AG_CTX_BIT2_MASK 0x1 4310 #define TSTORM_ETH_CONN_AG_CTX_BIT2_SHIFT 2 4311 #define TSTORM_ETH_CONN_AG_CTX_BIT3_MASK 0x1 4312 #define TSTORM_ETH_CONN_AG_CTX_BIT3_SHIFT 3 4313 #define TSTORM_ETH_CONN_AG_CTX_BIT4_MASK 0x1 4314 #define TSTORM_ETH_CONN_AG_CTX_BIT4_SHIFT 4 4315 #define TSTORM_ETH_CONN_AG_CTX_BIT5_MASK 0x1 4316 #define TSTORM_ETH_CONN_AG_CTX_BIT5_SHIFT 5 4317 #define TSTORM_ETH_CONN_AG_CTX_CF0_MASK 0x3 4318 #define TSTORM_ETH_CONN_AG_CTX_CF0_SHIFT 6 4319 u8 flags1; 4320 #define TSTORM_ETH_CONN_AG_CTX_CF1_MASK 0x3 4321 #define TSTORM_ETH_CONN_AG_CTX_CF1_SHIFT 0 4322 #define TSTORM_ETH_CONN_AG_CTX_CF2_MASK 0x3 4323 #define TSTORM_ETH_CONN_AG_CTX_CF2_SHIFT 2 4324 #define TSTORM_ETH_CONN_AG_CTX_CF3_MASK 0x3 4325 #define TSTORM_ETH_CONN_AG_CTX_CF3_SHIFT 4 4326 #define TSTORM_ETH_CONN_AG_CTX_CF4_MASK 0x3 4327 #define TSTORM_ETH_CONN_AG_CTX_CF4_SHIFT 6 4328 u8 flags2; 4329 #define TSTORM_ETH_CONN_AG_CTX_CF5_MASK 0x3 4330 #define TSTORM_ETH_CONN_AG_CTX_CF5_SHIFT 0 4331 #define TSTORM_ETH_CONN_AG_CTX_CF6_MASK 0x3 4332 #define TSTORM_ETH_CONN_AG_CTX_CF6_SHIFT 2 4333 #define TSTORM_ETH_CONN_AG_CTX_CF7_MASK 0x3 4334 #define TSTORM_ETH_CONN_AG_CTX_CF7_SHIFT 4 4335 #define TSTORM_ETH_CONN_AG_CTX_CF8_MASK 0x3 4336 #define TSTORM_ETH_CONN_AG_CTX_CF8_SHIFT 6 4337 u8 flags3; 4338 #define TSTORM_ETH_CONN_AG_CTX_CF9_MASK 0x3 4339 #define TSTORM_ETH_CONN_AG_CTX_CF9_SHIFT 0 4340 #define TSTORM_ETH_CONN_AG_CTX_CF10_MASK 0x3 4341 #define TSTORM_ETH_CONN_AG_CTX_CF10_SHIFT 2 4342 #define TSTORM_ETH_CONN_AG_CTX_CF0EN_MASK 0x1 4343 #define TSTORM_ETH_CONN_AG_CTX_CF0EN_SHIFT 4 4344 #define TSTORM_ETH_CONN_AG_CTX_CF1EN_MASK 0x1 4345 #define TSTORM_ETH_CONN_AG_CTX_CF1EN_SHIFT 5 4346 #define TSTORM_ETH_CONN_AG_CTX_CF2EN_MASK 0x1 4347 #define TSTORM_ETH_CONN_AG_CTX_CF2EN_SHIFT 6 4348 #define TSTORM_ETH_CONN_AG_CTX_CF3EN_MASK 0x1 4349 #define TSTORM_ETH_CONN_AG_CTX_CF3EN_SHIFT 7 4350 u8 flags4; 4351 #define TSTORM_ETH_CONN_AG_CTX_CF4EN_MASK 0x1 4352 #define TSTORM_ETH_CONN_AG_CTX_CF4EN_SHIFT 0 4353 #define TSTORM_ETH_CONN_AG_CTX_CF5EN_MASK 0x1 4354 #define TSTORM_ETH_CONN_AG_CTX_CF5EN_SHIFT 1 4355 #define TSTORM_ETH_CONN_AG_CTX_CF6EN_MASK 0x1 4356 #define TSTORM_ETH_CONN_AG_CTX_CF6EN_SHIFT 2 4357 #define TSTORM_ETH_CONN_AG_CTX_CF7EN_MASK 0x1 4358 #define TSTORM_ETH_CONN_AG_CTX_CF7EN_SHIFT 3 4359 #define TSTORM_ETH_CONN_AG_CTX_CF8EN_MASK 0x1 4360 #define TSTORM_ETH_CONN_AG_CTX_CF8EN_SHIFT 4 4361 #define TSTORM_ETH_CONN_AG_CTX_CF9EN_MASK 0x1 4362 #define TSTORM_ETH_CONN_AG_CTX_CF9EN_SHIFT 5 4363 #define TSTORM_ETH_CONN_AG_CTX_CF10EN_MASK 0x1 4364 #define TSTORM_ETH_CONN_AG_CTX_CF10EN_SHIFT 6 4365 #define TSTORM_ETH_CONN_AG_CTX_RULE0EN_MASK 0x1 4366 #define TSTORM_ETH_CONN_AG_CTX_RULE0EN_SHIFT 7 4367 u8 flags5; 4368 #define TSTORM_ETH_CONN_AG_CTX_RULE1EN_MASK 0x1 4369 #define TSTORM_ETH_CONN_AG_CTX_RULE1EN_SHIFT 0 4370 #define TSTORM_ETH_CONN_AG_CTX_RULE2EN_MASK 0x1 4371 #define TSTORM_ETH_CONN_AG_CTX_RULE2EN_SHIFT 1 4372 #define TSTORM_ETH_CONN_AG_CTX_RULE3EN_MASK 0x1 4373 #define TSTORM_ETH_CONN_AG_CTX_RULE3EN_SHIFT 2 4374 #define TSTORM_ETH_CONN_AG_CTX_RULE4EN_MASK 0x1 4375 #define TSTORM_ETH_CONN_AG_CTX_RULE4EN_SHIFT 3 4376 #define TSTORM_ETH_CONN_AG_CTX_RULE5EN_MASK 0x1 4377 #define TSTORM_ETH_CONN_AG_CTX_RULE5EN_SHIFT 4 4378 #define TSTORM_ETH_CONN_AG_CTX_RX_BD_EN_MASK 0x1 4379 #define TSTORM_ETH_CONN_AG_CTX_RX_BD_EN_SHIFT 5 4380 #define TSTORM_ETH_CONN_AG_CTX_RULE7EN_MASK 0x1 4381 #define TSTORM_ETH_CONN_AG_CTX_RULE7EN_SHIFT 6 4382 #define TSTORM_ETH_CONN_AG_CTX_RULE8EN_MASK 0x1 4383 #define TSTORM_ETH_CONN_AG_CTX_RULE8EN_SHIFT 7 4384 __le32 reg0; 4385 __le32 reg1; 4386 __le32 reg2; 4387 __le32 reg3; 4388 __le32 reg4; 4389 __le32 reg5; 4390 __le32 reg6; 4391 __le32 reg7; 4392 __le32 reg8; 4393 u8 byte2; 4394 u8 byte3; 4395 __le16 rx_bd_cons; 4396 u8 byte4; 4397 u8 byte5; 4398 __le16 rx_bd_prod; 4399 __le16 word2; 4400 __le16 word3; 4401 __le32 reg9; 4402 __le32 reg10; 4403 }; 4404 4405 struct ustorm_eth_conn_ag_ctx { 4406 u8 byte0; 4407 u8 byte1; 4408 u8 flags0; 4409 #define USTORM_ETH_CONN_AG_CTX_BIT0_MASK 0x1 4410 #define USTORM_ETH_CONN_AG_CTX_BIT0_SHIFT 0 4411 #define USTORM_ETH_CONN_AG_CTX_BIT1_MASK 0x1 4412 #define USTORM_ETH_CONN_AG_CTX_BIT1_SHIFT 1 4413 #define USTORM_ETH_CONN_AG_CTX_TX_PMD_TERMINATE_CF_MASK 0x3 4414 #define USTORM_ETH_CONN_AG_CTX_TX_PMD_TERMINATE_CF_SHIFT 2 4415 #define USTORM_ETH_CONN_AG_CTX_RX_PMD_TERMINATE_CF_MASK 0x3 4416 #define USTORM_ETH_CONN_AG_CTX_RX_PMD_TERMINATE_CF_SHIFT 4 4417 #define USTORM_ETH_CONN_AG_CTX_CF2_MASK 0x3 4418 #define USTORM_ETH_CONN_AG_CTX_CF2_SHIFT 6 4419 u8 flags1; 4420 #define USTORM_ETH_CONN_AG_CTX_CF3_MASK 0x3 4421 #define USTORM_ETH_CONN_AG_CTX_CF3_SHIFT 0 4422 #define USTORM_ETH_CONN_AG_CTX_TX_ARM_CF_MASK 0x3 4423 #define USTORM_ETH_CONN_AG_CTX_TX_ARM_CF_SHIFT 2 4424 #define USTORM_ETH_CONN_AG_CTX_RX_ARM_CF_MASK 0x3 4425 #define USTORM_ETH_CONN_AG_CTX_RX_ARM_CF_SHIFT 4 4426 #define USTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_MASK 0x3 4427 #define USTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_SHIFT 6 4428 u8 flags2; 4429 #define USTORM_ETH_CONN_AG_CTX_TX_PMD_TERMINATE_CF_EN_MASK 0x1 4430 #define USTORM_ETH_CONN_AG_CTX_TX_PMD_TERMINATE_CF_EN_SHIFT 0 4431 #define USTORM_ETH_CONN_AG_CTX_RX_PMD_TERMINATE_CF_EN_MASK 0x1 4432 #define USTORM_ETH_CONN_AG_CTX_RX_PMD_TERMINATE_CF_EN_SHIFT 1 4433 #define USTORM_ETH_CONN_AG_CTX_CF2EN_MASK 0x1 4434 #define USTORM_ETH_CONN_AG_CTX_CF2EN_SHIFT 2 4435 #define USTORM_ETH_CONN_AG_CTX_CF3EN_MASK 0x1 4436 #define USTORM_ETH_CONN_AG_CTX_CF3EN_SHIFT 3 4437 #define USTORM_ETH_CONN_AG_CTX_TX_ARM_CF_EN_MASK 0x1 4438 #define USTORM_ETH_CONN_AG_CTX_TX_ARM_CF_EN_SHIFT 4 4439 #define USTORM_ETH_CONN_AG_CTX_RX_ARM_CF_EN_MASK 0x1 4440 #define USTORM_ETH_CONN_AG_CTX_RX_ARM_CF_EN_SHIFT 5 4441 #define USTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_EN_MASK 0x1 4442 #define USTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_EN_SHIFT 6 4443 #define USTORM_ETH_CONN_AG_CTX_RULE0EN_MASK 0x1 4444 #define USTORM_ETH_CONN_AG_CTX_RULE0EN_SHIFT 7 4445 u8 flags3; 4446 #define USTORM_ETH_CONN_AG_CTX_RULE1EN_MASK 0x1 4447 #define USTORM_ETH_CONN_AG_CTX_RULE1EN_SHIFT 0 4448 #define USTORM_ETH_CONN_AG_CTX_RULE2EN_MASK 0x1 4449 #define USTORM_ETH_CONN_AG_CTX_RULE2EN_SHIFT 1 4450 #define USTORM_ETH_CONN_AG_CTX_RULE3EN_MASK 0x1 4451 #define USTORM_ETH_CONN_AG_CTX_RULE3EN_SHIFT 2 4452 #define USTORM_ETH_CONN_AG_CTX_RULE4EN_MASK 0x1 4453 #define USTORM_ETH_CONN_AG_CTX_RULE4EN_SHIFT 3 4454 #define USTORM_ETH_CONN_AG_CTX_RULE5EN_MASK 0x1 4455 #define USTORM_ETH_CONN_AG_CTX_RULE5EN_SHIFT 4 4456 #define USTORM_ETH_CONN_AG_CTX_RULE6EN_MASK 0x1 4457 #define USTORM_ETH_CONN_AG_CTX_RULE6EN_SHIFT 5 4458 #define USTORM_ETH_CONN_AG_CTX_RULE7EN_MASK 0x1 4459 #define USTORM_ETH_CONN_AG_CTX_RULE7EN_SHIFT 6 4460 #define USTORM_ETH_CONN_AG_CTX_RULE8EN_MASK 0x1 4461 #define USTORM_ETH_CONN_AG_CTX_RULE8EN_SHIFT 7 4462 u8 byte2; 4463 u8 byte3; 4464 __le16 word0; 4465 __le16 tx_bd_cons; 4466 __le32 reg0; 4467 __le32 reg1; 4468 __le32 reg2; 4469 __le32 tx_int_coallecing_timeset; 4470 __le16 tx_drv_bd_cons; 4471 __le16 rx_drv_cqe_cons; 4472 }; 4473 4474 /* The eth storm context for the Ustorm */ 4475 struct ustorm_eth_conn_st_ctx { 4476 __le32 reserved[40]; 4477 }; 4478 4479 /* The eth storm context for the Mstorm */ 4480 struct mstorm_eth_conn_st_ctx { 4481 __le32 reserved[8]; 4482 }; 4483 4484 /* eth connection context */ 4485 struct eth_conn_context { 4486 struct tstorm_eth_conn_st_ctx tstorm_st_context; 4487 struct regpair tstorm_st_padding[2]; 4488 struct pstorm_eth_conn_st_ctx pstorm_st_context; 4489 struct xstorm_eth_conn_st_ctx xstorm_st_context; 4490 struct xstorm_eth_conn_ag_ctx xstorm_ag_context; 4491 struct ystorm_eth_conn_st_ctx ystorm_st_context; 4492 struct ystorm_eth_conn_ag_ctx ystorm_ag_context; 4493 struct tstorm_eth_conn_ag_ctx tstorm_ag_context; 4494 struct ustorm_eth_conn_ag_ctx ustorm_ag_context; 4495 struct ustorm_eth_conn_st_ctx ustorm_st_context; 4496 struct mstorm_eth_conn_st_ctx mstorm_st_context; 4497 }; 4498 4499 enum eth_error_code { 4500 ETH_OK = 0x00, 4501 ETH_FILTERS_MAC_ADD_FAIL_FULL, 4502 ETH_FILTERS_MAC_ADD_FAIL_FULL_MTT2, 4503 ETH_FILTERS_MAC_ADD_FAIL_DUP_MTT2, 4504 ETH_FILTERS_MAC_ADD_FAIL_DUP_STT2, 4505 ETH_FILTERS_MAC_DEL_FAIL_NOF, 4506 ETH_FILTERS_MAC_DEL_FAIL_NOF_MTT2, 4507 ETH_FILTERS_MAC_DEL_FAIL_NOF_STT2, 4508 ETH_FILTERS_MAC_ADD_FAIL_ZERO_MAC, 4509 ETH_FILTERS_VLAN_ADD_FAIL_FULL, 4510 ETH_FILTERS_VLAN_ADD_FAIL_DUP, 4511 ETH_FILTERS_VLAN_DEL_FAIL_NOF, 4512 ETH_FILTERS_VLAN_DEL_FAIL_NOF_TT1, 4513 ETH_FILTERS_PAIR_ADD_FAIL_DUP, 4514 ETH_FILTERS_PAIR_ADD_FAIL_FULL, 4515 ETH_FILTERS_PAIR_ADD_FAIL_FULL_MAC, 4516 ETH_FILTERS_PAIR_DEL_FAIL_NOF, 4517 ETH_FILTERS_PAIR_DEL_FAIL_NOF_TT1, 4518 ETH_FILTERS_PAIR_ADD_FAIL_ZERO_MAC, 4519 ETH_FILTERS_VNI_ADD_FAIL_FULL, 4520 ETH_FILTERS_VNI_ADD_FAIL_DUP, 4521 MAX_ETH_ERROR_CODE 4522 }; 4523 4524 enum eth_event_opcode { 4525 ETH_EVENT_UNUSED, 4526 ETH_EVENT_VPORT_START, 4527 ETH_EVENT_VPORT_UPDATE, 4528 ETH_EVENT_VPORT_STOP, 4529 ETH_EVENT_TX_QUEUE_START, 4530 ETH_EVENT_TX_QUEUE_STOP, 4531 ETH_EVENT_RX_QUEUE_START, 4532 ETH_EVENT_RX_QUEUE_UPDATE, 4533 ETH_EVENT_RX_QUEUE_STOP, 4534 ETH_EVENT_FILTERS_UPDATE, 4535 ETH_EVENT_RESERVED, 4536 ETH_EVENT_RESERVED2, 4537 ETH_EVENT_RESERVED3, 4538 ETH_EVENT_RX_ADD_UDP_FILTER, 4539 ETH_EVENT_RX_DELETE_UDP_FILTER, 4540 ETH_EVENT_RESERVED4, 4541 ETH_EVENT_RESERVED5, 4542 MAX_ETH_EVENT_OPCODE 4543 }; 4544 4545 /* Classify rule types in E2/E3 */ 4546 enum eth_filter_action { 4547 ETH_FILTER_ACTION_UNUSED, 4548 ETH_FILTER_ACTION_REMOVE, 4549 ETH_FILTER_ACTION_ADD, 4550 ETH_FILTER_ACTION_REMOVE_ALL, 4551 MAX_ETH_FILTER_ACTION 4552 }; 4553 4554 /* Command for adding/removing a classification rule $$KEEP_ENDIANNESS$$ */ 4555 struct eth_filter_cmd { 4556 u8 type; 4557 u8 vport_id; 4558 u8 action; 4559 u8 reserved0; 4560 __le32 vni; 4561 __le16 mac_lsb; 4562 __le16 mac_mid; 4563 __le16 mac_msb; 4564 __le16 vlan_id; 4565 }; 4566 4567 /* $$KEEP_ENDIANNESS$$ */ 4568 struct eth_filter_cmd_header { 4569 u8 rx; 4570 u8 tx; 4571 u8 cmd_cnt; 4572 u8 assert_on_error; 4573 u8 reserved1[4]; 4574 }; 4575 4576 /* Ethernet filter types: mac/vlan/pair */ 4577 enum eth_filter_type { 4578 ETH_FILTER_TYPE_UNUSED, 4579 ETH_FILTER_TYPE_MAC, 4580 ETH_FILTER_TYPE_VLAN, 4581 ETH_FILTER_TYPE_PAIR, 4582 ETH_FILTER_TYPE_INNER_MAC, 4583 ETH_FILTER_TYPE_INNER_VLAN, 4584 ETH_FILTER_TYPE_INNER_PAIR, 4585 ETH_FILTER_TYPE_INNER_MAC_VNI_PAIR, 4586 ETH_FILTER_TYPE_MAC_VNI_PAIR, 4587 ETH_FILTER_TYPE_VNI, 4588 MAX_ETH_FILTER_TYPE 4589 }; 4590 4591 enum eth_ipv4_frag_type { 4592 ETH_IPV4_NOT_FRAG, 4593 ETH_IPV4_FIRST_FRAG, 4594 ETH_IPV4_NON_FIRST_FRAG, 4595 MAX_ETH_IPV4_FRAG_TYPE 4596 }; 4597 4598 enum eth_ramrod_cmd_id { 4599 ETH_RAMROD_UNUSED, 4600 ETH_RAMROD_VPORT_START, 4601 ETH_RAMROD_VPORT_UPDATE, 4602 ETH_RAMROD_VPORT_STOP, 4603 ETH_RAMROD_RX_QUEUE_START, 4604 ETH_RAMROD_RX_QUEUE_STOP, 4605 ETH_RAMROD_TX_QUEUE_START, 4606 ETH_RAMROD_TX_QUEUE_STOP, 4607 ETH_RAMROD_FILTERS_UPDATE, 4608 ETH_RAMROD_RX_QUEUE_UPDATE, 4609 ETH_RAMROD_RX_CREATE_OPENFLOW_ACTION, 4610 ETH_RAMROD_RX_ADD_OPENFLOW_FILTER, 4611 ETH_RAMROD_RX_DELETE_OPENFLOW_FILTER, 4612 ETH_RAMROD_RX_ADD_UDP_FILTER, 4613 ETH_RAMROD_RX_DELETE_UDP_FILTER, 4614 ETH_RAMROD_RX_CREATE_GFT_ACTION, 4615 ETH_RAMROD_GFT_UPDATE_FILTER, 4616 MAX_ETH_RAMROD_CMD_ID 4617 }; 4618 4619 /* return code from eth sp ramrods */ 4620 struct eth_return_code { 4621 u8 value; 4622 #define ETH_RETURN_CODE_ERR_CODE_MASK 0x1F 4623 #define ETH_RETURN_CODE_ERR_CODE_SHIFT 0 4624 #define ETH_RETURN_CODE_RESERVED_MASK 0x3 4625 #define ETH_RETURN_CODE_RESERVED_SHIFT 5 4626 #define ETH_RETURN_CODE_RX_TX_MASK 0x1 4627 #define ETH_RETURN_CODE_RX_TX_SHIFT 7 4628 }; 4629 4630 /* What to do in case an error occurs */ 4631 enum eth_tx_err { 4632 ETH_TX_ERR_DROP, 4633 ETH_TX_ERR_ASSERT_MALICIOUS, 4634 MAX_ETH_TX_ERR 4635 }; 4636 4637 /* Array of the different error type behaviors */ 4638 struct eth_tx_err_vals { 4639 __le16 values; 4640 #define ETH_TX_ERR_VALS_ILLEGAL_VLAN_MODE_MASK 0x1 4641 #define ETH_TX_ERR_VALS_ILLEGAL_VLAN_MODE_SHIFT 0 4642 #define ETH_TX_ERR_VALS_PACKET_TOO_SMALL_MASK 0x1 4643 #define ETH_TX_ERR_VALS_PACKET_TOO_SMALL_SHIFT 1 4644 #define ETH_TX_ERR_VALS_ANTI_SPOOFING_ERR_MASK 0x1 4645 #define ETH_TX_ERR_VALS_ANTI_SPOOFING_ERR_SHIFT 2 4646 #define ETH_TX_ERR_VALS_ILLEGAL_INBAND_TAGS_MASK 0x1 4647 #define ETH_TX_ERR_VALS_ILLEGAL_INBAND_TAGS_SHIFT 3 4648 #define ETH_TX_ERR_VALS_VLAN_INSERTION_W_INBAND_TAG_MASK 0x1 4649 #define ETH_TX_ERR_VALS_VLAN_INSERTION_W_INBAND_TAG_SHIFT 4 4650 #define ETH_TX_ERR_VALS_MTU_VIOLATION_MASK 0x1 4651 #define ETH_TX_ERR_VALS_MTU_VIOLATION_SHIFT 5 4652 #define ETH_TX_ERR_VALS_ILLEGAL_CONTROL_FRAME_MASK 0x1 4653 #define ETH_TX_ERR_VALS_ILLEGAL_CONTROL_FRAME_SHIFT 6 4654 #define ETH_TX_ERR_VALS_RESERVED_MASK 0x1FF 4655 #define ETH_TX_ERR_VALS_RESERVED_SHIFT 7 4656 }; 4657 4658 /* vport rss configuration data */ 4659 struct eth_vport_rss_config { 4660 __le16 capabilities; 4661 #define ETH_VPORT_RSS_CONFIG_IPV4_CAPABILITY_MASK 0x1 4662 #define ETH_VPORT_RSS_CONFIG_IPV4_CAPABILITY_SHIFT 0 4663 #define ETH_VPORT_RSS_CONFIG_IPV6_CAPABILITY_MASK 0x1 4664 #define ETH_VPORT_RSS_CONFIG_IPV6_CAPABILITY_SHIFT 1 4665 #define ETH_VPORT_RSS_CONFIG_IPV4_TCP_CAPABILITY_MASK 0x1 4666 #define ETH_VPORT_RSS_CONFIG_IPV4_TCP_CAPABILITY_SHIFT 2 4667 #define ETH_VPORT_RSS_CONFIG_IPV6_TCP_CAPABILITY_MASK 0x1 4668 #define ETH_VPORT_RSS_CONFIG_IPV6_TCP_CAPABILITY_SHIFT 3 4669 #define ETH_VPORT_RSS_CONFIG_IPV4_UDP_CAPABILITY_MASK 0x1 4670 #define ETH_VPORT_RSS_CONFIG_IPV4_UDP_CAPABILITY_SHIFT 4 4671 #define ETH_VPORT_RSS_CONFIG_IPV6_UDP_CAPABILITY_MASK 0x1 4672 #define ETH_VPORT_RSS_CONFIG_IPV6_UDP_CAPABILITY_SHIFT 5 4673 #define ETH_VPORT_RSS_CONFIG_EN_5_TUPLE_CAPABILITY_MASK 0x1 4674 #define ETH_VPORT_RSS_CONFIG_EN_5_TUPLE_CAPABILITY_SHIFT 6 4675 #define ETH_VPORT_RSS_CONFIG_RESERVED0_MASK 0x1FF 4676 #define ETH_VPORT_RSS_CONFIG_RESERVED0_SHIFT 7 4677 u8 rss_id; 4678 u8 rss_mode; 4679 u8 update_rss_key; 4680 u8 update_rss_ind_table; 4681 u8 update_rss_capabilities; 4682 u8 tbl_size; 4683 __le32 reserved2[2]; 4684 __le16 indirection_table[ETH_RSS_IND_TABLE_ENTRIES_NUM]; 4685 4686 __le32 rss_key[ETH_RSS_KEY_SIZE_REGS]; 4687 __le32 reserved3[2]; 4688 }; 4689 4690 /* eth vport RSS mode */ 4691 enum eth_vport_rss_mode { 4692 ETH_VPORT_RSS_MODE_DISABLED, 4693 ETH_VPORT_RSS_MODE_REGULAR, 4694 MAX_ETH_VPORT_RSS_MODE 4695 }; 4696 4697 /* Command for setting classification flags for a vport $$KEEP_ENDIANNESS$$ */ 4698 struct eth_vport_rx_mode { 4699 __le16 state; 4700 #define ETH_VPORT_RX_MODE_UCAST_DROP_ALL_MASK 0x1 4701 #define ETH_VPORT_RX_MODE_UCAST_DROP_ALL_SHIFT 0 4702 #define ETH_VPORT_RX_MODE_UCAST_ACCEPT_ALL_MASK 0x1 4703 #define ETH_VPORT_RX_MODE_UCAST_ACCEPT_ALL_SHIFT 1 4704 #define ETH_VPORT_RX_MODE_UCAST_ACCEPT_UNMATCHED_MASK 0x1 4705 #define ETH_VPORT_RX_MODE_UCAST_ACCEPT_UNMATCHED_SHIFT 2 4706 #define ETH_VPORT_RX_MODE_MCAST_DROP_ALL_MASK 0x1 4707 #define ETH_VPORT_RX_MODE_MCAST_DROP_ALL_SHIFT 3 4708 #define ETH_VPORT_RX_MODE_MCAST_ACCEPT_ALL_MASK 0x1 4709 #define ETH_VPORT_RX_MODE_MCAST_ACCEPT_ALL_SHIFT 4 4710 #define ETH_VPORT_RX_MODE_BCAST_ACCEPT_ALL_MASK 0x1 4711 #define ETH_VPORT_RX_MODE_BCAST_ACCEPT_ALL_SHIFT 5 4712 #define ETH_VPORT_RX_MODE_RESERVED1_MASK 0x3FF 4713 #define ETH_VPORT_RX_MODE_RESERVED1_SHIFT 6 4714 __le16 reserved2[3]; 4715 }; 4716 4717 /* Command for setting tpa parameters */ 4718 struct eth_vport_tpa_param { 4719 u8 tpa_ipv4_en_flg; 4720 u8 tpa_ipv6_en_flg; 4721 u8 tpa_ipv4_tunn_en_flg; 4722 u8 tpa_ipv6_tunn_en_flg; 4723 u8 tpa_pkt_split_flg; 4724 u8 tpa_hdr_data_split_flg; 4725 u8 tpa_gro_consistent_flg; 4726 4727 u8 tpa_max_aggs_num; 4728 4729 __le16 tpa_max_size; 4730 __le16 tpa_min_size_to_start; 4731 4732 __le16 tpa_min_size_to_cont; 4733 u8 max_buff_num; 4734 u8 reserved; 4735 }; 4736 4737 /* Command for setting classification flags for a vport $$KEEP_ENDIANNESS$$ */ 4738 struct eth_vport_tx_mode { 4739 __le16 state; 4740 #define ETH_VPORT_TX_MODE_UCAST_DROP_ALL_MASK 0x1 4741 #define ETH_VPORT_TX_MODE_UCAST_DROP_ALL_SHIFT 0 4742 #define ETH_VPORT_TX_MODE_UCAST_ACCEPT_ALL_MASK 0x1 4743 #define ETH_VPORT_TX_MODE_UCAST_ACCEPT_ALL_SHIFT 1 4744 #define ETH_VPORT_TX_MODE_MCAST_DROP_ALL_MASK 0x1 4745 #define ETH_VPORT_TX_MODE_MCAST_DROP_ALL_SHIFT 2 4746 #define ETH_VPORT_TX_MODE_MCAST_ACCEPT_ALL_MASK 0x1 4747 #define ETH_VPORT_TX_MODE_MCAST_ACCEPT_ALL_SHIFT 3 4748 #define ETH_VPORT_TX_MODE_BCAST_ACCEPT_ALL_MASK 0x1 4749 #define ETH_VPORT_TX_MODE_BCAST_ACCEPT_ALL_SHIFT 4 4750 #define ETH_VPORT_TX_MODE_RESERVED1_MASK 0x7FF 4751 #define ETH_VPORT_TX_MODE_RESERVED1_SHIFT 5 4752 __le16 reserved2[3]; 4753 }; 4754 4755 /* Ramrod data for rx queue start ramrod */ 4756 struct rx_queue_start_ramrod_data { 4757 __le16 rx_queue_id; 4758 __le16 num_of_pbl_pages; 4759 __le16 bd_max_bytes; 4760 __le16 sb_id; 4761 u8 sb_index; 4762 u8 vport_id; 4763 u8 default_rss_queue_flg; 4764 u8 complete_cqe_flg; 4765 u8 complete_event_flg; 4766 u8 stats_counter_id; 4767 u8 pin_context; 4768 u8 pxp_tph_valid_bd; 4769 u8 pxp_tph_valid_pkt; 4770 u8 pxp_st_hint; 4771 4772 __le16 pxp_st_index; 4773 u8 pmd_mode; 4774 4775 u8 notify_en; 4776 u8 toggle_val; 4777 4778 u8 vf_rx_prod_index; 4779 u8 vf_rx_prod_use_zone_a; 4780 u8 reserved[5]; 4781 __le16 reserved1; 4782 struct regpair cqe_pbl_addr; 4783 struct regpair bd_base; 4784 struct regpair reserved2; 4785 }; 4786 4787 /* Ramrod data for rx queue start ramrod */ 4788 struct rx_queue_stop_ramrod_data { 4789 __le16 rx_queue_id; 4790 u8 complete_cqe_flg; 4791 u8 complete_event_flg; 4792 u8 vport_id; 4793 u8 reserved[3]; 4794 }; 4795 4796 /* Ramrod data for rx queue update ramrod */ 4797 struct rx_queue_update_ramrod_data { 4798 __le16 rx_queue_id; 4799 u8 complete_cqe_flg; 4800 u8 complete_event_flg; 4801 u8 vport_id; 4802 u8 reserved[4]; 4803 u8 reserved1; 4804 u8 reserved2; 4805 u8 reserved3; 4806 __le16 reserved4; 4807 __le16 reserved5; 4808 struct regpair reserved6; 4809 }; 4810 4811 /* Ramrod data for rx Add UDP Filter */ 4812 struct rx_udp_filter_data { 4813 __le16 action_icid; 4814 __le16 vlan_id; 4815 u8 ip_type; 4816 u8 tenant_id_exists; 4817 __le16 reserved1; 4818 __le32 ip_dst_addr[4]; 4819 __le32 ip_src_addr[4]; 4820 __le16 udp_dst_port; 4821 __le16 udp_src_port; 4822 __le32 tenant_id; 4823 }; 4824 4825 /* Ramrod data for rx queue start ramrod */ 4826 struct tx_queue_start_ramrod_data { 4827 __le16 sb_id; 4828 u8 sb_index; 4829 u8 vport_id; 4830 u8 reserved0; 4831 u8 stats_counter_id; 4832 __le16 qm_pq_id; 4833 u8 flags; 4834 #define TX_QUEUE_START_RAMROD_DATA_DISABLE_OPPORTUNISTIC_MASK 0x1 4835 #define TX_QUEUE_START_RAMROD_DATA_DISABLE_OPPORTUNISTIC_SHIFT 0 4836 #define TX_QUEUE_START_RAMROD_DATA_TEST_MODE_PKT_DUP_MASK 0x1 4837 #define TX_QUEUE_START_RAMROD_DATA_TEST_MODE_PKT_DUP_SHIFT 1 4838 #define TX_QUEUE_START_RAMROD_DATA_TEST_MODE_TX_DEST_MASK 0x1 4839 #define TX_QUEUE_START_RAMROD_DATA_TEST_MODE_TX_DEST_SHIFT 2 4840 #define TX_QUEUE_START_RAMROD_DATA_PMD_MODE_MASK 0x1 4841 #define TX_QUEUE_START_RAMROD_DATA_PMD_MODE_SHIFT 3 4842 #define TX_QUEUE_START_RAMROD_DATA_NOTIFY_EN_MASK 0x1 4843 #define TX_QUEUE_START_RAMROD_DATA_NOTIFY_EN_SHIFT 4 4844 #define TX_QUEUE_START_RAMROD_DATA_PIN_CONTEXT_MASK 0x1 4845 #define TX_QUEUE_START_RAMROD_DATA_PIN_CONTEXT_SHIFT 5 4846 #define TX_QUEUE_START_RAMROD_DATA_RESERVED1_MASK 0x3 4847 #define TX_QUEUE_START_RAMROD_DATA_RESERVED1_SHIFT 6 4848 u8 pxp_st_hint; 4849 u8 pxp_tph_valid_bd; 4850 u8 pxp_tph_valid_pkt; 4851 __le16 pxp_st_index; 4852 __le16 comp_agg_size; 4853 __le16 queue_zone_id; 4854 __le16 reserved2; 4855 __le16 pbl_size; 4856 __le16 tx_queue_id; 4857 __le16 same_as_last_id; 4858 __le16 reserved[3]; 4859 struct regpair pbl_base_addr; 4860 struct regpair bd_cons_address; 4861 }; 4862 4863 /* Ramrod data for tx queue stop ramrod */ 4864 struct tx_queue_stop_ramrod_data { 4865 __le16 reserved[4]; 4866 }; 4867 4868 /* Ramrod data for vport update ramrod */ 4869 struct vport_filter_update_ramrod_data { 4870 struct eth_filter_cmd_header filter_cmd_hdr; 4871 struct eth_filter_cmd filter_cmds[ETH_FILTER_RULES_COUNT]; 4872 }; 4873 4874 /* Ramrod data for vport start ramrod */ 4875 struct vport_start_ramrod_data { 4876 u8 vport_id; 4877 u8 sw_fid; 4878 __le16 mtu; 4879 u8 drop_ttl0_en; 4880 u8 inner_vlan_removal_en; 4881 struct eth_vport_rx_mode rx_mode; 4882 struct eth_vport_tx_mode tx_mode; 4883 struct eth_vport_tpa_param tpa_param; 4884 __le16 default_vlan; 4885 u8 tx_switching_en; 4886 u8 anti_spoofing_en; 4887 4888 u8 default_vlan_en; 4889 4890 u8 handle_ptp_pkts; 4891 u8 silent_vlan_removal_en; 4892 u8 untagged; 4893 struct eth_tx_err_vals tx_err_behav; 4894 4895 u8 zero_placement_offset; 4896 u8 ctl_frame_mac_check_en; 4897 u8 ctl_frame_ethtype_check_en; 4898 u8 reserved[5]; 4899 }; 4900 4901 /* Ramrod data for vport stop ramrod */ 4902 struct vport_stop_ramrod_data { 4903 u8 vport_id; 4904 u8 reserved[7]; 4905 }; 4906 4907 /* Ramrod data for vport update ramrod */ 4908 struct vport_update_ramrod_data_cmn { 4909 u8 vport_id; 4910 u8 update_rx_active_flg; 4911 u8 rx_active_flg; 4912 u8 update_tx_active_flg; 4913 u8 tx_active_flg; 4914 u8 update_rx_mode_flg; 4915 u8 update_tx_mode_flg; 4916 u8 update_approx_mcast_flg; 4917 4918 u8 update_rss_flg; 4919 u8 update_inner_vlan_removal_en_flg; 4920 4921 u8 inner_vlan_removal_en; 4922 u8 update_tpa_param_flg; 4923 u8 update_tpa_en_flg; 4924 u8 update_tx_switching_en_flg; 4925 4926 u8 tx_switching_en; 4927 u8 update_anti_spoofing_en_flg; 4928 4929 u8 anti_spoofing_en; 4930 u8 update_handle_ptp_pkts; 4931 4932 u8 handle_ptp_pkts; 4933 u8 update_default_vlan_en_flg; 4934 4935 u8 default_vlan_en; 4936 4937 u8 update_default_vlan_flg; 4938 4939 __le16 default_vlan; 4940 u8 update_accept_any_vlan_flg; 4941 4942 u8 accept_any_vlan; 4943 u8 silent_vlan_removal_en; 4944 u8 update_mtu_flg; 4945 4946 __le16 mtu; 4947 u8 reserved[2]; 4948 }; 4949 4950 struct vport_update_ramrod_mcast { 4951 __le32 bins[ETH_MULTICAST_MAC_BINS_IN_REGS]; 4952 }; 4953 4954 /* Ramrod data for vport update ramrod */ 4955 struct vport_update_ramrod_data { 4956 struct vport_update_ramrod_data_cmn common; 4957 4958 struct eth_vport_rx_mode rx_mode; 4959 struct eth_vport_tx_mode tx_mode; 4960 struct eth_vport_tpa_param tpa_param; 4961 struct vport_update_ramrod_mcast approx_mcast; 4962 struct eth_vport_rss_config rss_config; 4963 }; 4964 4965 struct mstorm_rdma_task_st_ctx { 4966 struct regpair temp[4]; 4967 }; 4968 4969 struct rdma_close_func_ramrod_data { 4970 u8 cnq_start_offset; 4971 u8 num_cnqs; 4972 u8 vf_id; 4973 u8 vf_valid; 4974 u8 reserved[4]; 4975 }; 4976 4977 struct rdma_cnq_params { 4978 __le16 sb_num; 4979 u8 sb_index; 4980 u8 num_pbl_pages; 4981 __le32 reserved; 4982 struct regpair pbl_base_addr; 4983 __le16 queue_zone_num; 4984 u8 reserved1[6]; 4985 }; 4986 4987 struct rdma_create_cq_ramrod_data { 4988 struct regpair cq_handle; 4989 struct regpair pbl_addr; 4990 __le32 max_cqes; 4991 __le16 pbl_num_pages; 4992 __le16 dpi; 4993 u8 is_two_level_pbl; 4994 u8 cnq_id; 4995 u8 pbl_log_page_size; 4996 u8 toggle_bit; 4997 __le16 int_timeout; 4998 __le16 reserved1; 4999 }; 5000 5001 struct rdma_deregister_tid_ramrod_data { 5002 __le32 itid; 5003 __le32 reserved; 5004 }; 5005 5006 struct rdma_destroy_cq_output_params { 5007 __le16 cnq_num; 5008 __le16 reserved0; 5009 __le32 reserved1; 5010 }; 5011 5012 struct rdma_destroy_cq_ramrod_data { 5013 struct regpair output_params_addr; 5014 }; 5015 5016 enum rdma_event_opcode { 5017 RDMA_EVENT_UNUSED, 5018 RDMA_EVENT_FUNC_INIT, 5019 RDMA_EVENT_FUNC_CLOSE, 5020 RDMA_EVENT_REGISTER_MR, 5021 RDMA_EVENT_DEREGISTER_MR, 5022 RDMA_EVENT_CREATE_CQ, 5023 RDMA_EVENT_RESIZE_CQ, 5024 RDMA_EVENT_DESTROY_CQ, 5025 RDMA_EVENT_CREATE_SRQ, 5026 RDMA_EVENT_MODIFY_SRQ, 5027 RDMA_EVENT_DESTROY_SRQ, 5028 MAX_RDMA_EVENT_OPCODE 5029 }; 5030 5031 enum rdma_fw_return_code { 5032 RDMA_RETURN_OK = 0, 5033 RDMA_RETURN_REGISTER_MR_BAD_STATE_ERR, 5034 RDMA_RETURN_DEREGISTER_MR_BAD_STATE_ERR, 5035 RDMA_RETURN_RESIZE_CQ_ERR, 5036 RDMA_RETURN_NIG_DRAIN_REQ, 5037 MAX_RDMA_FW_RETURN_CODE 5038 }; 5039 5040 struct rdma_init_func_hdr { 5041 u8 cnq_start_offset; 5042 u8 num_cnqs; 5043 u8 cq_ring_mode; 5044 u8 cnp_vlan_priority; 5045 __le32 cnp_send_timeout; 5046 u8 cnp_dscp; 5047 u8 vf_id; 5048 u8 vf_valid; 5049 u8 reserved[5]; 5050 }; 5051 5052 struct rdma_init_func_ramrod_data { 5053 struct rdma_init_func_hdr params_header; 5054 struct rdma_cnq_params cnq_params[NUM_OF_GLOBAL_QUEUES]; 5055 }; 5056 5057 enum rdma_ramrod_cmd_id { 5058 RDMA_RAMROD_UNUSED, 5059 RDMA_RAMROD_FUNC_INIT, 5060 RDMA_RAMROD_FUNC_CLOSE, 5061 RDMA_RAMROD_REGISTER_MR, 5062 RDMA_RAMROD_DEREGISTER_MR, 5063 RDMA_RAMROD_CREATE_CQ, 5064 RDMA_RAMROD_RESIZE_CQ, 5065 RDMA_RAMROD_DESTROY_CQ, 5066 RDMA_RAMROD_CREATE_SRQ, 5067 RDMA_RAMROD_MODIFY_SRQ, 5068 RDMA_RAMROD_DESTROY_SRQ, 5069 MAX_RDMA_RAMROD_CMD_ID 5070 }; 5071 5072 struct rdma_register_tid_ramrod_data { 5073 __le32 flags; 5074 #define RDMA_REGISTER_TID_RAMROD_DATA_MAX_ID_MASK 0x3FFFF 5075 #define RDMA_REGISTER_TID_RAMROD_DATA_MAX_ID_SHIFT 0 5076 #define RDMA_REGISTER_TID_RAMROD_DATA_PAGE_SIZE_LOG_MASK 0x1F 5077 #define RDMA_REGISTER_TID_RAMROD_DATA_PAGE_SIZE_LOG_SHIFT 18 5078 #define RDMA_REGISTER_TID_RAMROD_DATA_TWO_LEVEL_PBL_MASK 0x1 5079 #define RDMA_REGISTER_TID_RAMROD_DATA_TWO_LEVEL_PBL_SHIFT 23 5080 #define RDMA_REGISTER_TID_RAMROD_DATA_ZERO_BASED_MASK 0x1 5081 #define RDMA_REGISTER_TID_RAMROD_DATA_ZERO_BASED_SHIFT 24 5082 #define RDMA_REGISTER_TID_RAMROD_DATA_PHY_MR_MASK 0x1 5083 #define RDMA_REGISTER_TID_RAMROD_DATA_PHY_MR_SHIFT 25 5084 #define RDMA_REGISTER_TID_RAMROD_DATA_REMOTE_READ_MASK 0x1 5085 #define RDMA_REGISTER_TID_RAMROD_DATA_REMOTE_READ_SHIFT 26 5086 #define RDMA_REGISTER_TID_RAMROD_DATA_REMOTE_WRITE_MASK 0x1 5087 #define RDMA_REGISTER_TID_RAMROD_DATA_REMOTE_WRITE_SHIFT 27 5088 #define RDMA_REGISTER_TID_RAMROD_DATA_REMOTE_ATOMIC_MASK 0x1 5089 #define RDMA_REGISTER_TID_RAMROD_DATA_REMOTE_ATOMIC_SHIFT 28 5090 #define RDMA_REGISTER_TID_RAMROD_DATA_LOCAL_WRITE_MASK 0x1 5091 #define RDMA_REGISTER_TID_RAMROD_DATA_LOCAL_WRITE_SHIFT 29 5092 #define RDMA_REGISTER_TID_RAMROD_DATA_LOCAL_READ_MASK 0x1 5093 #define RDMA_REGISTER_TID_RAMROD_DATA_LOCAL_READ_SHIFT 30 5094 #define RDMA_REGISTER_TID_RAMROD_DATA_ENABLE_MW_BIND_MASK 0x1 5095 #define RDMA_REGISTER_TID_RAMROD_DATA_ENABLE_MW_BIND_SHIFT 31 5096 u8 flags1; 5097 #define RDMA_REGISTER_TID_RAMROD_DATA_PBL_PAGE_SIZE_LOG_MASK 0x1F 5098 #define RDMA_REGISTER_TID_RAMROD_DATA_PBL_PAGE_SIZE_LOG_SHIFT 0 5099 #define RDMA_REGISTER_TID_RAMROD_DATA_TID_TYPE_MASK 0x7 5100 #define RDMA_REGISTER_TID_RAMROD_DATA_TID_TYPE_SHIFT 5 5101 u8 flags2; 5102 #define RDMA_REGISTER_TID_RAMROD_DATA_DMA_MR_MASK 0x1 5103 #define RDMA_REGISTER_TID_RAMROD_DATA_DMA_MR_SHIFT 0 5104 #define RDMA_REGISTER_TID_RAMROD_DATA_DIF_ON_HOST_FLG_MASK 0x1 5105 #define RDMA_REGISTER_TID_RAMROD_DATA_DIF_ON_HOST_FLG_SHIFT 1 5106 #define RDMA_REGISTER_TID_RAMROD_DATA_RESERVED1_MASK 0x3F 5107 #define RDMA_REGISTER_TID_RAMROD_DATA_RESERVED1_SHIFT 2 5108 u8 key; 5109 u8 length_hi; 5110 u8 vf_id; 5111 u8 vf_valid; 5112 __le16 pd; 5113 __le32 length_lo; 5114 __le32 itid; 5115 __le32 reserved2; 5116 struct regpair va; 5117 struct regpair pbl_base; 5118 struct regpair dif_error_addr; 5119 struct regpair dif_runt_addr; 5120 __le32 reserved3[2]; 5121 }; 5122 5123 struct rdma_resize_cq_output_params { 5124 __le32 old_cq_cons; 5125 __le32 old_cq_prod; 5126 }; 5127 5128 struct rdma_resize_cq_ramrod_data { 5129 u8 flags; 5130 #define RDMA_RESIZE_CQ_RAMROD_DATA_TOGGLE_BIT_MASK 0x1 5131 #define RDMA_RESIZE_CQ_RAMROD_DATA_TOGGLE_BIT_SHIFT 0 5132 #define RDMA_RESIZE_CQ_RAMROD_DATA_IS_TWO_LEVEL_PBL_MASK 0x1 5133 #define RDMA_RESIZE_CQ_RAMROD_DATA_IS_TWO_LEVEL_PBL_SHIFT 1 5134 #define RDMA_RESIZE_CQ_RAMROD_DATA_RESERVED_MASK 0x3F 5135 #define RDMA_RESIZE_CQ_RAMROD_DATA_RESERVED_SHIFT 2 5136 u8 pbl_log_page_size; 5137 __le16 pbl_num_pages; 5138 __le32 max_cqes; 5139 struct regpair pbl_addr; 5140 struct regpair output_params_addr; 5141 }; 5142 5143 struct rdma_srq_context { 5144 struct regpair temp[8]; 5145 }; 5146 5147 struct rdma_srq_create_ramrod_data { 5148 struct regpair pbl_base_addr; 5149 __le16 pages_in_srq_pbl; 5150 __le16 pd_id; 5151 struct rdma_srq_id srq_id; 5152 __le16 page_size; 5153 __le16 reserved1; 5154 __le32 reserved2; 5155 struct regpair producers_addr; 5156 }; 5157 5158 struct rdma_srq_destroy_ramrod_data { 5159 struct rdma_srq_id srq_id; 5160 __le32 reserved; 5161 }; 5162 5163 struct rdma_srq_modify_ramrod_data { 5164 struct rdma_srq_id srq_id; 5165 __le32 wqe_limit; 5166 }; 5167 5168 struct ystorm_rdma_task_st_ctx { 5169 struct regpair temp[4]; 5170 }; 5171 5172 struct ystorm_rdma_task_ag_ctx { 5173 u8 reserved; 5174 u8 byte1; 5175 __le16 msem_ctx_upd_seq; 5176 u8 flags0; 5177 #define YSTORM_RDMA_TASK_AG_CTX_CONNECTION_TYPE_MASK 0xF 5178 #define YSTORM_RDMA_TASK_AG_CTX_CONNECTION_TYPE_SHIFT 0 5179 #define YSTORM_RDMA_TASK_AG_CTX_EXIST_IN_QM0_MASK 0x1 5180 #define YSTORM_RDMA_TASK_AG_CTX_EXIST_IN_QM0_SHIFT 4 5181 #define YSTORM_RDMA_TASK_AG_CTX_BIT1_MASK 0x1 5182 #define YSTORM_RDMA_TASK_AG_CTX_BIT1_SHIFT 5 5183 #define YSTORM_RDMA_TASK_AG_CTX_VALID_MASK 0x1 5184 #define YSTORM_RDMA_TASK_AG_CTX_VALID_SHIFT 6 5185 #define YSTORM_RDMA_TASK_AG_CTX_BIT3_MASK 0x1 5186 #define YSTORM_RDMA_TASK_AG_CTX_BIT3_SHIFT 7 5187 u8 flags1; 5188 #define YSTORM_RDMA_TASK_AG_CTX_CF0_MASK 0x3 5189 #define YSTORM_RDMA_TASK_AG_CTX_CF0_SHIFT 0 5190 #define YSTORM_RDMA_TASK_AG_CTX_CF1_MASK 0x3 5191 #define YSTORM_RDMA_TASK_AG_CTX_CF1_SHIFT 2 5192 #define YSTORM_RDMA_TASK_AG_CTX_CF2SPECIAL_MASK 0x3 5193 #define YSTORM_RDMA_TASK_AG_CTX_CF2SPECIAL_SHIFT 4 5194 #define YSTORM_RDMA_TASK_AG_CTX_CF0EN_MASK 0x1 5195 #define YSTORM_RDMA_TASK_AG_CTX_CF0EN_SHIFT 6 5196 #define YSTORM_RDMA_TASK_AG_CTX_CF1EN_MASK 0x1 5197 #define YSTORM_RDMA_TASK_AG_CTX_CF1EN_SHIFT 7 5198 u8 flags2; 5199 #define YSTORM_RDMA_TASK_AG_CTX_BIT4_MASK 0x1 5200 #define YSTORM_RDMA_TASK_AG_CTX_BIT4_SHIFT 0 5201 #define YSTORM_RDMA_TASK_AG_CTX_RULE0EN_MASK 0x1 5202 #define YSTORM_RDMA_TASK_AG_CTX_RULE0EN_SHIFT 1 5203 #define YSTORM_RDMA_TASK_AG_CTX_RULE1EN_MASK 0x1 5204 #define YSTORM_RDMA_TASK_AG_CTX_RULE1EN_SHIFT 2 5205 #define YSTORM_RDMA_TASK_AG_CTX_RULE2EN_MASK 0x1 5206 #define YSTORM_RDMA_TASK_AG_CTX_RULE2EN_SHIFT 3 5207 #define YSTORM_RDMA_TASK_AG_CTX_RULE3EN_MASK 0x1 5208 #define YSTORM_RDMA_TASK_AG_CTX_RULE3EN_SHIFT 4 5209 #define YSTORM_RDMA_TASK_AG_CTX_RULE4EN_MASK 0x1 5210 #define YSTORM_RDMA_TASK_AG_CTX_RULE4EN_SHIFT 5 5211 #define YSTORM_RDMA_TASK_AG_CTX_RULE5EN_MASK 0x1 5212 #define YSTORM_RDMA_TASK_AG_CTX_RULE5EN_SHIFT 6 5213 #define YSTORM_RDMA_TASK_AG_CTX_RULE6EN_MASK 0x1 5214 #define YSTORM_RDMA_TASK_AG_CTX_RULE6EN_SHIFT 7 5215 u8 key; 5216 __le32 mw_cnt; 5217 u8 ref_cnt_seq; 5218 u8 ctx_upd_seq; 5219 __le16 dif_flags; 5220 __le16 tx_ref_count; 5221 __le16 last_used_ltid; 5222 __le16 parent_mr_lo; 5223 __le16 parent_mr_hi; 5224 __le32 fbo_lo; 5225 __le32 fbo_hi; 5226 }; 5227 5228 struct mstorm_rdma_task_ag_ctx { 5229 u8 reserved; 5230 u8 byte1; 5231 __le16 icid; 5232 u8 flags0; 5233 #define MSTORM_RDMA_TASK_AG_CTX_CONNECTION_TYPE_MASK 0xF 5234 #define MSTORM_RDMA_TASK_AG_CTX_CONNECTION_TYPE_SHIFT 0 5235 #define MSTORM_RDMA_TASK_AG_CTX_EXIST_IN_QM0_MASK 0x1 5236 #define MSTORM_RDMA_TASK_AG_CTX_EXIST_IN_QM0_SHIFT 4 5237 #define MSTORM_RDMA_TASK_AG_CTX_BIT1_MASK 0x1 5238 #define MSTORM_RDMA_TASK_AG_CTX_BIT1_SHIFT 5 5239 #define MSTORM_RDMA_TASK_AG_CTX_BIT2_MASK 0x1 5240 #define MSTORM_RDMA_TASK_AG_CTX_BIT2_SHIFT 6 5241 #define MSTORM_RDMA_TASK_AG_CTX_BIT3_MASK 0x1 5242 #define MSTORM_RDMA_TASK_AG_CTX_BIT3_SHIFT 7 5243 u8 flags1; 5244 #define MSTORM_RDMA_TASK_AG_CTX_CF0_MASK 0x3 5245 #define MSTORM_RDMA_TASK_AG_CTX_CF0_SHIFT 0 5246 #define MSTORM_RDMA_TASK_AG_CTX_CF1_MASK 0x3 5247 #define MSTORM_RDMA_TASK_AG_CTX_CF1_SHIFT 2 5248 #define MSTORM_RDMA_TASK_AG_CTX_CF2_MASK 0x3 5249 #define MSTORM_RDMA_TASK_AG_CTX_CF2_SHIFT 4 5250 #define MSTORM_RDMA_TASK_AG_CTX_CF0EN_MASK 0x1 5251 #define MSTORM_RDMA_TASK_AG_CTX_CF0EN_SHIFT 6 5252 #define MSTORM_RDMA_TASK_AG_CTX_CF1EN_MASK 0x1 5253 #define MSTORM_RDMA_TASK_AG_CTX_CF1EN_SHIFT 7 5254 u8 flags2; 5255 #define MSTORM_RDMA_TASK_AG_CTX_CF2EN_MASK 0x1 5256 #define MSTORM_RDMA_TASK_AG_CTX_CF2EN_SHIFT 0 5257 #define MSTORM_RDMA_TASK_AG_CTX_RULE0EN_MASK 0x1 5258 #define MSTORM_RDMA_TASK_AG_CTX_RULE0EN_SHIFT 1 5259 #define MSTORM_RDMA_TASK_AG_CTX_RULE1EN_MASK 0x1 5260 #define MSTORM_RDMA_TASK_AG_CTX_RULE1EN_SHIFT 2 5261 #define MSTORM_RDMA_TASK_AG_CTX_RULE2EN_MASK 0x1 5262 #define MSTORM_RDMA_TASK_AG_CTX_RULE2EN_SHIFT 3 5263 #define MSTORM_RDMA_TASK_AG_CTX_RULE3EN_MASK 0x1 5264 #define MSTORM_RDMA_TASK_AG_CTX_RULE3EN_SHIFT 4 5265 #define MSTORM_RDMA_TASK_AG_CTX_RULE4EN_MASK 0x1 5266 #define MSTORM_RDMA_TASK_AG_CTX_RULE4EN_SHIFT 5 5267 #define MSTORM_RDMA_TASK_AG_CTX_RULE5EN_MASK 0x1 5268 #define MSTORM_RDMA_TASK_AG_CTX_RULE5EN_SHIFT 6 5269 #define MSTORM_RDMA_TASK_AG_CTX_RULE6EN_MASK 0x1 5270 #define MSTORM_RDMA_TASK_AG_CTX_RULE6EN_SHIFT 7 5271 u8 key; 5272 __le32 mw_cnt; 5273 u8 ref_cnt_seq; 5274 u8 ctx_upd_seq; 5275 __le16 dif_flags; 5276 __le16 tx_ref_count; 5277 __le16 last_used_ltid; 5278 __le16 parent_mr_lo; 5279 __le16 parent_mr_hi; 5280 __le32 fbo_lo; 5281 __le32 fbo_hi; 5282 }; 5283 5284 struct ustorm_rdma_task_st_ctx { 5285 struct regpair temp[2]; 5286 }; 5287 5288 struct ustorm_rdma_task_ag_ctx { 5289 u8 reserved; 5290 u8 byte1; 5291 __le16 icid; 5292 u8 flags0; 5293 #define USTORM_RDMA_TASK_AG_CTX_CONNECTION_TYPE_MASK 0xF 5294 #define USTORM_RDMA_TASK_AG_CTX_CONNECTION_TYPE_SHIFT 0 5295 #define USTORM_RDMA_TASK_AG_CTX_EXIST_IN_QM0_MASK 0x1 5296 #define USTORM_RDMA_TASK_AG_CTX_EXIST_IN_QM0_SHIFT 4 5297 #define USTORM_RDMA_TASK_AG_CTX_DIF_RUNT_VALID_MASK 0x1 5298 #define USTORM_RDMA_TASK_AG_CTX_DIF_RUNT_VALID_SHIFT 5 5299 #define USTORM_RDMA_TASK_AG_CTX_DIF_WRITE_RESULT_CF_MASK 0x3 5300 #define USTORM_RDMA_TASK_AG_CTX_DIF_WRITE_RESULT_CF_SHIFT 6 5301 u8 flags1; 5302 #define USTORM_RDMA_TASK_AG_CTX_DIF_RESULT_TOGGLE_BIT_MASK 0x3 5303 #define USTORM_RDMA_TASK_AG_CTX_DIF_RESULT_TOGGLE_BIT_SHIFT 0 5304 #define USTORM_RDMA_TASK_AG_CTX_DIF_TX_IO_FLG_MASK 0x3 5305 #define USTORM_RDMA_TASK_AG_CTX_DIF_TX_IO_FLG_SHIFT 2 5306 #define USTORM_RDMA_TASK_AG_CTX_CF3_MASK 0x3 5307 #define USTORM_RDMA_TASK_AG_CTX_CF3_SHIFT 4 5308 #define USTORM_RDMA_TASK_AG_CTX_DIF_ERROR_CF_MASK 0x3 5309 #define USTORM_RDMA_TASK_AG_CTX_DIF_ERROR_CF_SHIFT 6 5310 u8 flags2; 5311 #define USTORM_RDMA_TASK_AG_CTX_DIF_WRITE_RESULT_CF_EN_MASK 0x1 5312 #define USTORM_RDMA_TASK_AG_CTX_DIF_WRITE_RESULT_CF_EN_SHIFT 0 5313 #define USTORM_RDMA_TASK_AG_CTX_RESERVED2_MASK 0x1 5314 #define USTORM_RDMA_TASK_AG_CTX_RESERVED2_SHIFT 1 5315 #define USTORM_RDMA_TASK_AG_CTX_RESERVED3_MASK 0x1 5316 #define USTORM_RDMA_TASK_AG_CTX_RESERVED3_SHIFT 2 5317 #define USTORM_RDMA_TASK_AG_CTX_CF3EN_MASK 0x1 5318 #define USTORM_RDMA_TASK_AG_CTX_CF3EN_SHIFT 3 5319 #define USTORM_RDMA_TASK_AG_CTX_DIF_ERROR_CF_EN_MASK 0x1 5320 #define USTORM_RDMA_TASK_AG_CTX_DIF_ERROR_CF_EN_SHIFT 4 5321 #define USTORM_RDMA_TASK_AG_CTX_RULE0EN_MASK 0x1 5322 #define USTORM_RDMA_TASK_AG_CTX_RULE0EN_SHIFT 5 5323 #define USTORM_RDMA_TASK_AG_CTX_RULE1EN_MASK 0x1 5324 #define USTORM_RDMA_TASK_AG_CTX_RULE1EN_SHIFT 6 5325 #define USTORM_RDMA_TASK_AG_CTX_RULE2EN_MASK 0x1 5326 #define USTORM_RDMA_TASK_AG_CTX_RULE2EN_SHIFT 7 5327 u8 flags3; 5328 #define USTORM_RDMA_TASK_AG_CTX_RULE3EN_MASK 0x1 5329 #define USTORM_RDMA_TASK_AG_CTX_RULE3EN_SHIFT 0 5330 #define USTORM_RDMA_TASK_AG_CTX_RULE4EN_MASK 0x1 5331 #define USTORM_RDMA_TASK_AG_CTX_RULE4EN_SHIFT 1 5332 #define USTORM_RDMA_TASK_AG_CTX_RULE5EN_MASK 0x1 5333 #define USTORM_RDMA_TASK_AG_CTX_RULE5EN_SHIFT 2 5334 #define USTORM_RDMA_TASK_AG_CTX_RULE6EN_MASK 0x1 5335 #define USTORM_RDMA_TASK_AG_CTX_RULE6EN_SHIFT 3 5336 #define USTORM_RDMA_TASK_AG_CTX_DIF_ERROR_TYPE_MASK 0xF 5337 #define USTORM_RDMA_TASK_AG_CTX_DIF_ERROR_TYPE_SHIFT 4 5338 __le32 dif_err_intervals; 5339 __le32 dif_error_1st_interval; 5340 __le32 reg2; 5341 __le32 dif_runt_value; 5342 __le32 reg4; 5343 __le32 reg5; 5344 }; 5345 5346 struct rdma_task_context { 5347 struct ystorm_rdma_task_st_ctx ystorm_st_context; 5348 struct ystorm_rdma_task_ag_ctx ystorm_ag_context; 5349 struct tdif_task_context tdif_context; 5350 struct mstorm_rdma_task_ag_ctx mstorm_ag_context; 5351 struct mstorm_rdma_task_st_ctx mstorm_st_context; 5352 struct rdif_task_context rdif_context; 5353 struct ustorm_rdma_task_st_ctx ustorm_st_context; 5354 struct regpair ustorm_st_padding[2]; 5355 struct ustorm_rdma_task_ag_ctx ustorm_ag_context; 5356 }; 5357 5358 enum rdma_tid_type { 5359 RDMA_TID_REGISTERED_MR, 5360 RDMA_TID_FMR, 5361 RDMA_TID_MW_TYPE1, 5362 RDMA_TID_MW_TYPE2A, 5363 MAX_RDMA_TID_TYPE 5364 }; 5365 5366 struct mstorm_rdma_conn_ag_ctx { 5367 u8 byte0; 5368 u8 byte1; 5369 u8 flags0; 5370 #define MSTORM_RDMA_CONN_AG_CTX_BIT0_MASK 0x1 5371 #define MSTORM_RDMA_CONN_AG_CTX_BIT0_SHIFT 0 5372 #define MSTORM_RDMA_CONN_AG_CTX_BIT1_MASK 0x1 5373 #define MSTORM_RDMA_CONN_AG_CTX_BIT1_SHIFT 1 5374 #define MSTORM_RDMA_CONN_AG_CTX_CF0_MASK 0x3 5375 #define MSTORM_RDMA_CONN_AG_CTX_CF0_SHIFT 2 5376 #define MSTORM_RDMA_CONN_AG_CTX_CF1_MASK 0x3 5377 #define MSTORM_RDMA_CONN_AG_CTX_CF1_SHIFT 4 5378 #define MSTORM_RDMA_CONN_AG_CTX_CF2_MASK 0x3 5379 #define MSTORM_RDMA_CONN_AG_CTX_CF2_SHIFT 6 5380 u8 flags1; 5381 #define MSTORM_RDMA_CONN_AG_CTX_CF0EN_MASK 0x1 5382 #define MSTORM_RDMA_CONN_AG_CTX_CF0EN_SHIFT 0 5383 #define MSTORM_RDMA_CONN_AG_CTX_CF1EN_MASK 0x1 5384 #define MSTORM_RDMA_CONN_AG_CTX_CF1EN_SHIFT 1 5385 #define MSTORM_RDMA_CONN_AG_CTX_CF2EN_MASK 0x1 5386 #define MSTORM_RDMA_CONN_AG_CTX_CF2EN_SHIFT 2 5387 #define MSTORM_RDMA_CONN_AG_CTX_RULE0EN_MASK 0x1 5388 #define MSTORM_RDMA_CONN_AG_CTX_RULE0EN_SHIFT 3 5389 #define MSTORM_RDMA_CONN_AG_CTX_RULE1EN_MASK 0x1 5390 #define MSTORM_RDMA_CONN_AG_CTX_RULE1EN_SHIFT 4 5391 #define MSTORM_RDMA_CONN_AG_CTX_RULE2EN_MASK 0x1 5392 #define MSTORM_RDMA_CONN_AG_CTX_RULE2EN_SHIFT 5 5393 #define MSTORM_RDMA_CONN_AG_CTX_RULE3EN_MASK 0x1 5394 #define MSTORM_RDMA_CONN_AG_CTX_RULE3EN_SHIFT 6 5395 #define MSTORM_RDMA_CONN_AG_CTX_RULE4EN_MASK 0x1 5396 #define MSTORM_RDMA_CONN_AG_CTX_RULE4EN_SHIFT 7 5397 __le16 word0; 5398 __le16 word1; 5399 __le32 reg0; 5400 __le32 reg1; 5401 }; 5402 5403 struct tstorm_rdma_conn_ag_ctx { 5404 u8 reserved0; 5405 u8 byte1; 5406 u8 flags0; 5407 #define TSTORM_RDMA_CONN_AG_CTX_EXIST_IN_QM0_MASK 0x1 5408 #define TSTORM_RDMA_CONN_AG_CTX_EXIST_IN_QM0_SHIFT 0 5409 #define TSTORM_RDMA_CONN_AG_CTX_BIT1_MASK 0x1 5410 #define TSTORM_RDMA_CONN_AG_CTX_BIT1_SHIFT 1 5411 #define TSTORM_RDMA_CONN_AG_CTX_BIT2_MASK 0x1 5412 #define TSTORM_RDMA_CONN_AG_CTX_BIT2_SHIFT 2 5413 #define TSTORM_RDMA_CONN_AG_CTX_BIT3_MASK 0x1 5414 #define TSTORM_RDMA_CONN_AG_CTX_BIT3_SHIFT 3 5415 #define TSTORM_RDMA_CONN_AG_CTX_BIT4_MASK 0x1 5416 #define TSTORM_RDMA_CONN_AG_CTX_BIT4_SHIFT 4 5417 #define TSTORM_RDMA_CONN_AG_CTX_BIT5_MASK 0x1 5418 #define TSTORM_RDMA_CONN_AG_CTX_BIT5_SHIFT 5 5419 #define TSTORM_RDMA_CONN_AG_CTX_CF0_MASK 0x3 5420 #define TSTORM_RDMA_CONN_AG_CTX_CF0_SHIFT 6 5421 u8 flags1; 5422 #define TSTORM_RDMA_CONN_AG_CTX_CF1_MASK 0x3 5423 #define TSTORM_RDMA_CONN_AG_CTX_CF1_SHIFT 0 5424 #define TSTORM_RDMA_CONN_AG_CTX_CF2_MASK 0x3 5425 #define TSTORM_RDMA_CONN_AG_CTX_CF2_SHIFT 2 5426 #define TSTORM_RDMA_CONN_AG_CTX_TIMER_STOP_ALL_CF_MASK 0x3 5427 #define TSTORM_RDMA_CONN_AG_CTX_TIMER_STOP_ALL_CF_SHIFT 4 5428 #define TSTORM_RDMA_CONN_AG_CTX_FLUSH_Q0_CF_MASK 0x3 5429 #define TSTORM_RDMA_CONN_AG_CTX_FLUSH_Q0_CF_SHIFT 6 5430 u8 flags2; 5431 #define TSTORM_RDMA_CONN_AG_CTX_MSTORM_FLUSH_CF_MASK 0x3 5432 #define TSTORM_RDMA_CONN_AG_CTX_MSTORM_FLUSH_CF_SHIFT 0 5433 #define TSTORM_RDMA_CONN_AG_CTX_CF6_MASK 0x3 5434 #define TSTORM_RDMA_CONN_AG_CTX_CF6_SHIFT 2 5435 #define TSTORM_RDMA_CONN_AG_CTX_CF7_MASK 0x3 5436 #define TSTORM_RDMA_CONN_AG_CTX_CF7_SHIFT 4 5437 #define TSTORM_RDMA_CONN_AG_CTX_CF8_MASK 0x3 5438 #define TSTORM_RDMA_CONN_AG_CTX_CF8_SHIFT 6 5439 u8 flags3; 5440 #define TSTORM_RDMA_CONN_AG_CTX_CF9_MASK 0x3 5441 #define TSTORM_RDMA_CONN_AG_CTX_CF9_SHIFT 0 5442 #define TSTORM_RDMA_CONN_AG_CTX_CF10_MASK 0x3 5443 #define TSTORM_RDMA_CONN_AG_CTX_CF10_SHIFT 2 5444 #define TSTORM_RDMA_CONN_AG_CTX_CF0EN_MASK 0x1 5445 #define TSTORM_RDMA_CONN_AG_CTX_CF0EN_SHIFT 4 5446 #define TSTORM_RDMA_CONN_AG_CTX_CF1EN_MASK 0x1 5447 #define TSTORM_RDMA_CONN_AG_CTX_CF1EN_SHIFT 5 5448 #define TSTORM_RDMA_CONN_AG_CTX_CF2EN_MASK 0x1 5449 #define TSTORM_RDMA_CONN_AG_CTX_CF2EN_SHIFT 6 5450 #define TSTORM_RDMA_CONN_AG_CTX_TIMER_STOP_ALL_CF_EN_MASK 0x1 5451 #define TSTORM_RDMA_CONN_AG_CTX_TIMER_STOP_ALL_CF_EN_SHIFT 7 5452 u8 flags4; 5453 #define TSTORM_RDMA_CONN_AG_CTX_FLUSH_Q0_CF_EN_MASK 0x1 5454 #define TSTORM_RDMA_CONN_AG_CTX_FLUSH_Q0_CF_EN_SHIFT 0 5455 #define TSTORM_RDMA_CONN_AG_CTX_MSTORM_FLUSH_CF_EN_MASK 0x1 5456 #define TSTORM_RDMA_CONN_AG_CTX_MSTORM_FLUSH_CF_EN_SHIFT 1 5457 #define TSTORM_RDMA_CONN_AG_CTX_CF6EN_MASK 0x1 5458 #define TSTORM_RDMA_CONN_AG_CTX_CF6EN_SHIFT 2 5459 #define TSTORM_RDMA_CONN_AG_CTX_CF7EN_MASK 0x1 5460 #define TSTORM_RDMA_CONN_AG_CTX_CF7EN_SHIFT 3 5461 #define TSTORM_RDMA_CONN_AG_CTX_CF8EN_MASK 0x1 5462 #define TSTORM_RDMA_CONN_AG_CTX_CF8EN_SHIFT 4 5463 #define TSTORM_RDMA_CONN_AG_CTX_CF9EN_MASK 0x1 5464 #define TSTORM_RDMA_CONN_AG_CTX_CF9EN_SHIFT 5 5465 #define TSTORM_RDMA_CONN_AG_CTX_CF10EN_MASK 0x1 5466 #define TSTORM_RDMA_CONN_AG_CTX_CF10EN_SHIFT 6 5467 #define TSTORM_RDMA_CONN_AG_CTX_RULE0EN_MASK 0x1 5468 #define TSTORM_RDMA_CONN_AG_CTX_RULE0EN_SHIFT 7 5469 u8 flags5; 5470 #define TSTORM_RDMA_CONN_AG_CTX_RULE1EN_MASK 0x1 5471 #define TSTORM_RDMA_CONN_AG_CTX_RULE1EN_SHIFT 0 5472 #define TSTORM_RDMA_CONN_AG_CTX_RULE2EN_MASK 0x1 5473 #define TSTORM_RDMA_CONN_AG_CTX_RULE2EN_SHIFT 1 5474 #define TSTORM_RDMA_CONN_AG_CTX_RULE3EN_MASK 0x1 5475 #define TSTORM_RDMA_CONN_AG_CTX_RULE3EN_SHIFT 2 5476 #define TSTORM_RDMA_CONN_AG_CTX_RULE4EN_MASK 0x1 5477 #define TSTORM_RDMA_CONN_AG_CTX_RULE4EN_SHIFT 3 5478 #define TSTORM_RDMA_CONN_AG_CTX_RULE5EN_MASK 0x1 5479 #define TSTORM_RDMA_CONN_AG_CTX_RULE5EN_SHIFT 4 5480 #define TSTORM_RDMA_CONN_AG_CTX_RULE6EN_MASK 0x1 5481 #define TSTORM_RDMA_CONN_AG_CTX_RULE6EN_SHIFT 5 5482 #define TSTORM_RDMA_CONN_AG_CTX_RULE7EN_MASK 0x1 5483 #define TSTORM_RDMA_CONN_AG_CTX_RULE7EN_SHIFT 6 5484 #define TSTORM_RDMA_CONN_AG_CTX_RULE8EN_MASK 0x1 5485 #define TSTORM_RDMA_CONN_AG_CTX_RULE8EN_SHIFT 7 5486 __le32 reg0; 5487 __le32 reg1; 5488 __le32 reg2; 5489 __le32 reg3; 5490 __le32 reg4; 5491 __le32 reg5; 5492 __le32 reg6; 5493 __le32 reg7; 5494 __le32 reg8; 5495 u8 byte2; 5496 u8 byte3; 5497 __le16 word0; 5498 u8 byte4; 5499 u8 byte5; 5500 __le16 word1; 5501 __le16 word2; 5502 __le16 word3; 5503 __le32 reg9; 5504 __le32 reg10; 5505 }; 5506 5507 struct tstorm_rdma_task_ag_ctx { 5508 u8 byte0; 5509 u8 byte1; 5510 __le16 word0; 5511 u8 flags0; 5512 #define TSTORM_RDMA_TASK_AG_CTX_NIBBLE0_MASK 0xF 5513 #define TSTORM_RDMA_TASK_AG_CTX_NIBBLE0_SHIFT 0 5514 #define TSTORM_RDMA_TASK_AG_CTX_BIT0_MASK 0x1 5515 #define TSTORM_RDMA_TASK_AG_CTX_BIT0_SHIFT 4 5516 #define TSTORM_RDMA_TASK_AG_CTX_BIT1_MASK 0x1 5517 #define TSTORM_RDMA_TASK_AG_CTX_BIT1_SHIFT 5 5518 #define TSTORM_RDMA_TASK_AG_CTX_BIT2_MASK 0x1 5519 #define TSTORM_RDMA_TASK_AG_CTX_BIT2_SHIFT 6 5520 #define TSTORM_RDMA_TASK_AG_CTX_BIT3_MASK 0x1 5521 #define TSTORM_RDMA_TASK_AG_CTX_BIT3_SHIFT 7 5522 u8 flags1; 5523 #define TSTORM_RDMA_TASK_AG_CTX_BIT4_MASK 0x1 5524 #define TSTORM_RDMA_TASK_AG_CTX_BIT4_SHIFT 0 5525 #define TSTORM_RDMA_TASK_AG_CTX_BIT5_MASK 0x1 5526 #define TSTORM_RDMA_TASK_AG_CTX_BIT5_SHIFT 1 5527 #define TSTORM_RDMA_TASK_AG_CTX_CF0_MASK 0x3 5528 #define TSTORM_RDMA_TASK_AG_CTX_CF0_SHIFT 2 5529 #define TSTORM_RDMA_TASK_AG_CTX_CF1_MASK 0x3 5530 #define TSTORM_RDMA_TASK_AG_CTX_CF1_SHIFT 4 5531 #define TSTORM_RDMA_TASK_AG_CTX_CF2_MASK 0x3 5532 #define TSTORM_RDMA_TASK_AG_CTX_CF2_SHIFT 6 5533 u8 flags2; 5534 #define TSTORM_RDMA_TASK_AG_CTX_CF3_MASK 0x3 5535 #define TSTORM_RDMA_TASK_AG_CTX_CF3_SHIFT 0 5536 #define TSTORM_RDMA_TASK_AG_CTX_CF4_MASK 0x3 5537 #define TSTORM_RDMA_TASK_AG_CTX_CF4_SHIFT 2 5538 #define TSTORM_RDMA_TASK_AG_CTX_CF5_MASK 0x3 5539 #define TSTORM_RDMA_TASK_AG_CTX_CF5_SHIFT 4 5540 #define TSTORM_RDMA_TASK_AG_CTX_CF6_MASK 0x3 5541 #define TSTORM_RDMA_TASK_AG_CTX_CF6_SHIFT 6 5542 u8 flags3; 5543 #define TSTORM_RDMA_TASK_AG_CTX_CF7_MASK 0x3 5544 #define TSTORM_RDMA_TASK_AG_CTX_CF7_SHIFT 0 5545 #define TSTORM_RDMA_TASK_AG_CTX_CF0EN_MASK 0x1 5546 #define TSTORM_RDMA_TASK_AG_CTX_CF0EN_SHIFT 2 5547 #define TSTORM_RDMA_TASK_AG_CTX_CF1EN_MASK 0x1 5548 #define TSTORM_RDMA_TASK_AG_CTX_CF1EN_SHIFT 3 5549 #define TSTORM_RDMA_TASK_AG_CTX_CF2EN_MASK 0x1 5550 #define TSTORM_RDMA_TASK_AG_CTX_CF2EN_SHIFT 4 5551 #define TSTORM_RDMA_TASK_AG_CTX_CF3EN_MASK 0x1 5552 #define TSTORM_RDMA_TASK_AG_CTX_CF3EN_SHIFT 5 5553 #define TSTORM_RDMA_TASK_AG_CTX_CF4EN_MASK 0x1 5554 #define TSTORM_RDMA_TASK_AG_CTX_CF4EN_SHIFT 6 5555 #define TSTORM_RDMA_TASK_AG_CTX_CF5EN_MASK 0x1 5556 #define TSTORM_RDMA_TASK_AG_CTX_CF5EN_SHIFT 7 5557 u8 flags4; 5558 #define TSTORM_RDMA_TASK_AG_CTX_CF6EN_MASK 0x1 5559 #define TSTORM_RDMA_TASK_AG_CTX_CF6EN_SHIFT 0 5560 #define TSTORM_RDMA_TASK_AG_CTX_CF7EN_MASK 0x1 5561 #define TSTORM_RDMA_TASK_AG_CTX_CF7EN_SHIFT 1 5562 #define TSTORM_RDMA_TASK_AG_CTX_RULE0EN_MASK 0x1 5563 #define TSTORM_RDMA_TASK_AG_CTX_RULE0EN_SHIFT 2 5564 #define TSTORM_RDMA_TASK_AG_CTX_RULE1EN_MASK 0x1 5565 #define TSTORM_RDMA_TASK_AG_CTX_RULE1EN_SHIFT 3 5566 #define TSTORM_RDMA_TASK_AG_CTX_RULE2EN_MASK 0x1 5567 #define TSTORM_RDMA_TASK_AG_CTX_RULE2EN_SHIFT 4 5568 #define TSTORM_RDMA_TASK_AG_CTX_RULE3EN_MASK 0x1 5569 #define TSTORM_RDMA_TASK_AG_CTX_RULE3EN_SHIFT 5 5570 #define TSTORM_RDMA_TASK_AG_CTX_RULE4EN_MASK 0x1 5571 #define TSTORM_RDMA_TASK_AG_CTX_RULE4EN_SHIFT 6 5572 #define TSTORM_RDMA_TASK_AG_CTX_RULE5EN_MASK 0x1 5573 #define TSTORM_RDMA_TASK_AG_CTX_RULE5EN_SHIFT 7 5574 u8 byte2; 5575 __le16 word1; 5576 __le32 reg0; 5577 u8 byte3; 5578 u8 byte4; 5579 __le16 word2; 5580 __le16 word3; 5581 __le16 word4; 5582 __le32 reg1; 5583 __le32 reg2; 5584 }; 5585 5586 struct ustorm_rdma_conn_ag_ctx { 5587 u8 reserved; 5588 u8 byte1; 5589 u8 flags0; 5590 #define USTORM_RDMA_CONN_AG_CTX_EXIST_IN_QM0_MASK 0x1 5591 #define USTORM_RDMA_CONN_AG_CTX_EXIST_IN_QM0_SHIFT 0 5592 #define USTORM_RDMA_CONN_AG_CTX_BIT1_MASK 0x1 5593 #define USTORM_RDMA_CONN_AG_CTX_BIT1_SHIFT 1 5594 #define USTORM_RDMA_CONN_AG_CTX_FLUSH_Q0_CF_MASK 0x3 5595 #define USTORM_RDMA_CONN_AG_CTX_FLUSH_Q0_CF_SHIFT 2 5596 #define USTORM_RDMA_CONN_AG_CTX_CF1_MASK 0x3 5597 #define USTORM_RDMA_CONN_AG_CTX_CF1_SHIFT 4 5598 #define USTORM_RDMA_CONN_AG_CTX_CF2_MASK 0x3 5599 #define USTORM_RDMA_CONN_AG_CTX_CF2_SHIFT 6 5600 u8 flags1; 5601 #define USTORM_RDMA_CONN_AG_CTX_CF3_MASK 0x3 5602 #define USTORM_RDMA_CONN_AG_CTX_CF3_SHIFT 0 5603 #define USTORM_RDMA_CONN_AG_CTX_CQ_ARM_SE_CF_MASK 0x3 5604 #define USTORM_RDMA_CONN_AG_CTX_CQ_ARM_SE_CF_SHIFT 2 5605 #define USTORM_RDMA_CONN_AG_CTX_CQ_ARM_CF_MASK 0x3 5606 #define USTORM_RDMA_CONN_AG_CTX_CQ_ARM_CF_SHIFT 4 5607 #define USTORM_RDMA_CONN_AG_CTX_CF6_MASK 0x3 5608 #define USTORM_RDMA_CONN_AG_CTX_CF6_SHIFT 6 5609 u8 flags2; 5610 #define USTORM_RDMA_CONN_AG_CTX_FLUSH_Q0_CF_EN_MASK 0x1 5611 #define USTORM_RDMA_CONN_AG_CTX_FLUSH_Q0_CF_EN_SHIFT 0 5612 #define USTORM_RDMA_CONN_AG_CTX_CF1EN_MASK 0x1 5613 #define USTORM_RDMA_CONN_AG_CTX_CF1EN_SHIFT 1 5614 #define USTORM_RDMA_CONN_AG_CTX_CF2EN_MASK 0x1 5615 #define USTORM_RDMA_CONN_AG_CTX_CF2EN_SHIFT 2 5616 #define USTORM_RDMA_CONN_AG_CTX_CF3EN_MASK 0x1 5617 #define USTORM_RDMA_CONN_AG_CTX_CF3EN_SHIFT 3 5618 #define USTORM_RDMA_CONN_AG_CTX_CQ_ARM_SE_CF_EN_MASK 0x1 5619 #define USTORM_RDMA_CONN_AG_CTX_CQ_ARM_SE_CF_EN_SHIFT 4 5620 #define USTORM_RDMA_CONN_AG_CTX_CQ_ARM_CF_EN_MASK 0x1 5621 #define USTORM_RDMA_CONN_AG_CTX_CQ_ARM_CF_EN_SHIFT 5 5622 #define USTORM_RDMA_CONN_AG_CTX_CF6EN_MASK 0x1 5623 #define USTORM_RDMA_CONN_AG_CTX_CF6EN_SHIFT 6 5624 #define USTORM_RDMA_CONN_AG_CTX_CQ_SE_EN_MASK 0x1 5625 #define USTORM_RDMA_CONN_AG_CTX_CQ_SE_EN_SHIFT 7 5626 u8 flags3; 5627 #define USTORM_RDMA_CONN_AG_CTX_CQ_EN_MASK 0x1 5628 #define USTORM_RDMA_CONN_AG_CTX_CQ_EN_SHIFT 0 5629 #define USTORM_RDMA_CONN_AG_CTX_RULE2EN_MASK 0x1 5630 #define USTORM_RDMA_CONN_AG_CTX_RULE2EN_SHIFT 1 5631 #define USTORM_RDMA_CONN_AG_CTX_RULE3EN_MASK 0x1 5632 #define USTORM_RDMA_CONN_AG_CTX_RULE3EN_SHIFT 2 5633 #define USTORM_RDMA_CONN_AG_CTX_RULE4EN_MASK 0x1 5634 #define USTORM_RDMA_CONN_AG_CTX_RULE4EN_SHIFT 3 5635 #define USTORM_RDMA_CONN_AG_CTX_RULE5EN_MASK 0x1 5636 #define USTORM_RDMA_CONN_AG_CTX_RULE5EN_SHIFT 4 5637 #define USTORM_RDMA_CONN_AG_CTX_RULE6EN_MASK 0x1 5638 #define USTORM_RDMA_CONN_AG_CTX_RULE6EN_SHIFT 5 5639 #define USTORM_RDMA_CONN_AG_CTX_RULE7EN_MASK 0x1 5640 #define USTORM_RDMA_CONN_AG_CTX_RULE7EN_SHIFT 6 5641 #define USTORM_RDMA_CONN_AG_CTX_RULE8EN_MASK 0x1 5642 #define USTORM_RDMA_CONN_AG_CTX_RULE8EN_SHIFT 7 5643 u8 byte2; 5644 u8 byte3; 5645 __le16 conn_dpi; 5646 __le16 word1; 5647 __le32 cq_cons; 5648 __le32 cq_se_prod; 5649 __le32 cq_prod; 5650 __le32 reg3; 5651 __le16 int_timeout; 5652 __le16 word3; 5653 }; 5654 5655 struct xstorm_roce_conn_ag_ctx_dq_ext_ld_part { 5656 u8 reserved0; 5657 u8 state; 5658 u8 flags0; 5659 #define XSTORMROCECONNAGCTXDQEXTLDPART_EXIST_IN_QM0_MASK 0x1 5660 #define XSTORMROCECONNAGCTXDQEXTLDPART_EXIST_IN_QM0_SHIFT 0 5661 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT1_MASK 0x1 5662 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT1_SHIFT 1 5663 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT2_MASK 0x1 5664 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT2_SHIFT 2 5665 #define XSTORMROCECONNAGCTXDQEXTLDPART_EXIST_IN_QM3_MASK 0x1 5666 #define XSTORMROCECONNAGCTXDQEXTLDPART_EXIST_IN_QM3_SHIFT 3 5667 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT4_MASK 0x1 5668 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT4_SHIFT 4 5669 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT5_MASK 0x1 5670 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT5_SHIFT 5 5671 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT6_MASK 0x1 5672 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT6_SHIFT 6 5673 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT7_MASK 0x1 5674 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT7_SHIFT 7 5675 u8 flags1; 5676 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT8_MASK 0x1 5677 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT8_SHIFT 0 5678 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT9_MASK 0x1 5679 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT9_SHIFT 1 5680 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT10_MASK 0x1 5681 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT10_SHIFT 2 5682 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT11_MASK 0x1 5683 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT11_SHIFT 3 5684 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT12_MASK 0x1 5685 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT12_SHIFT 4 5686 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT13_MASK 0x1 5687 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT13_SHIFT 5 5688 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT14_MASK 0x1 5689 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT14_SHIFT 6 5690 #define XSTORMROCECONNAGCTXDQEXTLDPART_YSTORM_FLUSH_MASK 0x1 5691 #define XSTORMROCECONNAGCTXDQEXTLDPART_YSTORM_FLUSH_SHIFT 7 5692 u8 flags2; 5693 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF0_MASK 0x3 5694 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF0_SHIFT 0 5695 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF1_MASK 0x3 5696 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF1_SHIFT 2 5697 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF2_MASK 0x3 5698 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF2_SHIFT 4 5699 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF3_MASK 0x3 5700 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF3_SHIFT 6 5701 u8 flags3; 5702 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF4_MASK 0x3 5703 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF4_SHIFT 0 5704 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF5_MASK 0x3 5705 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF5_SHIFT 2 5706 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF6_MASK 0x3 5707 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF6_SHIFT 4 5708 #define XSTORMROCECONNAGCTXDQEXTLDPART_FLUSH_Q0_CF_MASK 0x3 5709 #define XSTORMROCECONNAGCTXDQEXTLDPART_FLUSH_Q0_CF_SHIFT 6 5710 u8 flags4; 5711 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF8_MASK 0x3 5712 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF8_SHIFT 0 5713 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF9_MASK 0x3 5714 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF9_SHIFT 2 5715 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF10_MASK 0x3 5716 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF10_SHIFT 4 5717 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF11_MASK 0x3 5718 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF11_SHIFT 6 5719 u8 flags5; 5720 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF12_MASK 0x3 5721 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF12_SHIFT 0 5722 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF13_MASK 0x3 5723 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF13_SHIFT 2 5724 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF14_MASK 0x3 5725 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF14_SHIFT 4 5726 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF15_MASK 0x3 5727 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF15_SHIFT 6 5728 u8 flags6; 5729 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF16_MASK 0x3 5730 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF16_SHIFT 0 5731 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF17_MASK 0x3 5732 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF17_SHIFT 2 5733 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF18_MASK 0x3 5734 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF18_SHIFT 4 5735 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF19_MASK 0x3 5736 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF19_SHIFT 6 5737 u8 flags7; 5738 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF20_MASK 0x3 5739 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF20_SHIFT 0 5740 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF21_MASK 0x3 5741 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF21_SHIFT 2 5742 #define XSTORMROCECONNAGCTXDQEXTLDPART_SLOW_PATH_MASK 0x3 5743 #define XSTORMROCECONNAGCTXDQEXTLDPART_SLOW_PATH_SHIFT 4 5744 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF0EN_MASK 0x1 5745 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF0EN_SHIFT 6 5746 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF1EN_MASK 0x1 5747 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF1EN_SHIFT 7 5748 u8 flags8; 5749 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF2EN_MASK 0x1 5750 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF2EN_SHIFT 0 5751 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF3EN_MASK 0x1 5752 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF3EN_SHIFT 1 5753 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF4EN_MASK 0x1 5754 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF4EN_SHIFT 2 5755 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF5EN_MASK 0x1 5756 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF5EN_SHIFT 3 5757 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF6EN_MASK 0x1 5758 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF6EN_SHIFT 4 5759 #define XSTORMROCECONNAGCTXDQEXTLDPART_FLUSH_Q0_CF_EN_MASK 0x1 5760 #define XSTORMROCECONNAGCTXDQEXTLDPART_FLUSH_Q0_CF_EN_SHIFT 5 5761 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF8EN_MASK 0x1 5762 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF8EN_SHIFT 6 5763 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF9EN_MASK 0x1 5764 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF9EN_SHIFT 7 5765 u8 flags9; 5766 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF10EN_MASK 0x1 5767 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF10EN_SHIFT 0 5768 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF11EN_MASK 0x1 5769 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF11EN_SHIFT 1 5770 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF12EN_MASK 0x1 5771 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF12EN_SHIFT 2 5772 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF13EN_MASK 0x1 5773 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF13EN_SHIFT 3 5774 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF14EN_MASK 0x1 5775 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF14EN_SHIFT 4 5776 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF15EN_MASK 0x1 5777 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF15EN_SHIFT 5 5778 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF16EN_MASK 0x1 5779 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF16EN_SHIFT 6 5780 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF17EN_MASK 0x1 5781 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF17EN_SHIFT 7 5782 u8 flags10; 5783 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF18EN_MASK 0x1 5784 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF18EN_SHIFT 0 5785 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF19EN_MASK 0x1 5786 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF19EN_SHIFT 1 5787 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF20EN_MASK 0x1 5788 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF20EN_SHIFT 2 5789 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF21EN_MASK 0x1 5790 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF21EN_SHIFT 3 5791 #define XSTORMROCECONNAGCTXDQEXTLDPART_SLOW_PATH_EN_MASK 0x1 5792 #define XSTORMROCECONNAGCTXDQEXTLDPART_SLOW_PATH_EN_SHIFT 4 5793 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF23EN_MASK 0x1 5794 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF23EN_SHIFT 5 5795 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE0EN_MASK 0x1 5796 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE0EN_SHIFT 6 5797 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE1EN_MASK 0x1 5798 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE1EN_SHIFT 7 5799 u8 flags11; 5800 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE2EN_MASK 0x1 5801 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE2EN_SHIFT 0 5802 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE3EN_MASK 0x1 5803 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE3EN_SHIFT 1 5804 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE4EN_MASK 0x1 5805 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE4EN_SHIFT 2 5806 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE5EN_MASK 0x1 5807 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE5EN_SHIFT 3 5808 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE6EN_MASK 0x1 5809 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE6EN_SHIFT 4 5810 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE7EN_MASK 0x1 5811 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE7EN_SHIFT 5 5812 #define XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED1_MASK 0x1 5813 #define XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED1_SHIFT 6 5814 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE9EN_MASK 0x1 5815 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE9EN_SHIFT 7 5816 u8 flags12; 5817 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE10EN_MASK 0x1 5818 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE10EN_SHIFT 0 5819 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE11EN_MASK 0x1 5820 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE11EN_SHIFT 1 5821 #define XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED2_MASK 0x1 5822 #define XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED2_SHIFT 2 5823 #define XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED3_MASK 0x1 5824 #define XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED3_SHIFT 3 5825 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE14EN_MASK 0x1 5826 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE14EN_SHIFT 4 5827 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE15EN_MASK 0x1 5828 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE15EN_SHIFT 5 5829 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE16EN_MASK 0x1 5830 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE16EN_SHIFT 6 5831 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE17EN_MASK 0x1 5832 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE17EN_SHIFT 7 5833 u8 flags13; 5834 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE18EN_MASK 0x1 5835 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE18EN_SHIFT 0 5836 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE19EN_MASK 0x1 5837 #define XSTORMROCECONNAGCTXDQEXTLDPART_RULE19EN_SHIFT 1 5838 #define XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED4_MASK 0x1 5839 #define XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED4_SHIFT 2 5840 #define XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED5_MASK 0x1 5841 #define XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED5_SHIFT 3 5842 #define XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED6_MASK 0x1 5843 #define XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED6_SHIFT 4 5844 #define XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED7_MASK 0x1 5845 #define XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED7_SHIFT 5 5846 #define XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED8_MASK 0x1 5847 #define XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED8_SHIFT 6 5848 #define XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED9_MASK 0x1 5849 #define XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED9_SHIFT 7 5850 u8 flags14; 5851 #define XSTORMROCECONNAGCTXDQEXTLDPART_MIGRATION_MASK 0x1 5852 #define XSTORMROCECONNAGCTXDQEXTLDPART_MIGRATION_SHIFT 0 5853 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT17_MASK 0x1 5854 #define XSTORMROCECONNAGCTXDQEXTLDPART_BIT17_SHIFT 1 5855 #define XSTORMROCECONNAGCTXDQEXTLDPART_DPM_PORT_NUM_MASK 0x3 5856 #define XSTORMROCECONNAGCTXDQEXTLDPART_DPM_PORT_NUM_SHIFT 2 5857 #define XSTORMROCECONNAGCTXDQEXTLDPART_RESERVED_MASK 0x1 5858 #define XSTORMROCECONNAGCTXDQEXTLDPART_RESERVED_SHIFT 4 5859 #define XSTORMROCECONNAGCTXDQEXTLDPART_ROCE_EDPM_ENABLE_MASK 0x1 5860 #define XSTORMROCECONNAGCTXDQEXTLDPART_ROCE_EDPM_ENABLE_SHIFT 5 5861 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF23_MASK 0x3 5862 #define XSTORMROCECONNAGCTXDQEXTLDPART_CF23_SHIFT 6 5863 u8 byte2; 5864 __le16 physical_q0; 5865 __le16 word1; 5866 __le16 word2; 5867 __le16 word3; 5868 __le16 word4; 5869 __le16 word5; 5870 __le16 conn_dpi; 5871 u8 byte3; 5872 u8 byte4; 5873 u8 byte5; 5874 u8 byte6; 5875 __le32 reg0; 5876 __le32 reg1; 5877 __le32 reg2; 5878 __le32 snd_nxt_psn; 5879 __le32 reg4; 5880 }; 5881 5882 struct xstorm_rdma_conn_ag_ctx { 5883 u8 reserved0; 5884 u8 state; 5885 u8 flags0; 5886 #define XSTORM_RDMA_CONN_AG_CTX_EXIST_IN_QM0_MASK 0x1 5887 #define XSTORM_RDMA_CONN_AG_CTX_EXIST_IN_QM0_SHIFT 0 5888 #define XSTORM_RDMA_CONN_AG_CTX_BIT1_MASK 0x1 5889 #define XSTORM_RDMA_CONN_AG_CTX_BIT1_SHIFT 1 5890 #define XSTORM_RDMA_CONN_AG_CTX_BIT2_MASK 0x1 5891 #define XSTORM_RDMA_CONN_AG_CTX_BIT2_SHIFT 2 5892 #define XSTORM_RDMA_CONN_AG_CTX_EXIST_IN_QM3_MASK 0x1 5893 #define XSTORM_RDMA_CONN_AG_CTX_EXIST_IN_QM3_SHIFT 3 5894 #define XSTORM_RDMA_CONN_AG_CTX_BIT4_MASK 0x1 5895 #define XSTORM_RDMA_CONN_AG_CTX_BIT4_SHIFT 4 5896 #define XSTORM_RDMA_CONN_AG_CTX_BIT5_MASK 0x1 5897 #define XSTORM_RDMA_CONN_AG_CTX_BIT5_SHIFT 5 5898 #define XSTORM_RDMA_CONN_AG_CTX_BIT6_MASK 0x1 5899 #define XSTORM_RDMA_CONN_AG_CTX_BIT6_SHIFT 6 5900 #define XSTORM_RDMA_CONN_AG_CTX_BIT7_MASK 0x1 5901 #define XSTORM_RDMA_CONN_AG_CTX_BIT7_SHIFT 7 5902 u8 flags1; 5903 #define XSTORM_RDMA_CONN_AG_CTX_BIT8_MASK 0x1 5904 #define XSTORM_RDMA_CONN_AG_CTX_BIT8_SHIFT 0 5905 #define XSTORM_RDMA_CONN_AG_CTX_BIT9_MASK 0x1 5906 #define XSTORM_RDMA_CONN_AG_CTX_BIT9_SHIFT 1 5907 #define XSTORM_RDMA_CONN_AG_CTX_BIT10_MASK 0x1 5908 #define XSTORM_RDMA_CONN_AG_CTX_BIT10_SHIFT 2 5909 #define XSTORM_RDMA_CONN_AG_CTX_BIT11_MASK 0x1 5910 #define XSTORM_RDMA_CONN_AG_CTX_BIT11_SHIFT 3 5911 #define XSTORM_RDMA_CONN_AG_CTX_BIT12_MASK 0x1 5912 #define XSTORM_RDMA_CONN_AG_CTX_BIT12_SHIFT 4 5913 #define XSTORM_RDMA_CONN_AG_CTX_BIT13_MASK 0x1 5914 #define XSTORM_RDMA_CONN_AG_CTX_BIT13_SHIFT 5 5915 #define XSTORM_RDMA_CONN_AG_CTX_BIT14_MASK 0x1 5916 #define XSTORM_RDMA_CONN_AG_CTX_BIT14_SHIFT 6 5917 #define XSTORM_RDMA_CONN_AG_CTX_YSTORM_FLUSH_MASK 0x1 5918 #define XSTORM_RDMA_CONN_AG_CTX_YSTORM_FLUSH_SHIFT 7 5919 u8 flags2; 5920 #define XSTORM_RDMA_CONN_AG_CTX_CF0_MASK 0x3 5921 #define XSTORM_RDMA_CONN_AG_CTX_CF0_SHIFT 0 5922 #define XSTORM_RDMA_CONN_AG_CTX_CF1_MASK 0x3 5923 #define XSTORM_RDMA_CONN_AG_CTX_CF1_SHIFT 2 5924 #define XSTORM_RDMA_CONN_AG_CTX_CF2_MASK 0x3 5925 #define XSTORM_RDMA_CONN_AG_CTX_CF2_SHIFT 4 5926 #define XSTORM_RDMA_CONN_AG_CTX_CF3_MASK 0x3 5927 #define XSTORM_RDMA_CONN_AG_CTX_CF3_SHIFT 6 5928 u8 flags3; 5929 #define XSTORM_RDMA_CONN_AG_CTX_CF4_MASK 0x3 5930 #define XSTORM_RDMA_CONN_AG_CTX_CF4_SHIFT 0 5931 #define XSTORM_RDMA_CONN_AG_CTX_CF5_MASK 0x3 5932 #define XSTORM_RDMA_CONN_AG_CTX_CF5_SHIFT 2 5933 #define XSTORM_RDMA_CONN_AG_CTX_CF6_MASK 0x3 5934 #define XSTORM_RDMA_CONN_AG_CTX_CF6_SHIFT 4 5935 #define XSTORM_RDMA_CONN_AG_CTX_FLUSH_Q0_CF_MASK 0x3 5936 #define XSTORM_RDMA_CONN_AG_CTX_FLUSH_Q0_CF_SHIFT 6 5937 u8 flags4; 5938 #define XSTORM_RDMA_CONN_AG_CTX_CF8_MASK 0x3 5939 #define XSTORM_RDMA_CONN_AG_CTX_CF8_SHIFT 0 5940 #define XSTORM_RDMA_CONN_AG_CTX_CF9_MASK 0x3 5941 #define XSTORM_RDMA_CONN_AG_CTX_CF9_SHIFT 2 5942 #define XSTORM_RDMA_CONN_AG_CTX_CF10_MASK 0x3 5943 #define XSTORM_RDMA_CONN_AG_CTX_CF10_SHIFT 4 5944 #define XSTORM_RDMA_CONN_AG_CTX_CF11_MASK 0x3 5945 #define XSTORM_RDMA_CONN_AG_CTX_CF11_SHIFT 6 5946 u8 flags5; 5947 #define XSTORM_RDMA_CONN_AG_CTX_CF12_MASK 0x3 5948 #define XSTORM_RDMA_CONN_AG_CTX_CF12_SHIFT 0 5949 #define XSTORM_RDMA_CONN_AG_CTX_CF13_MASK 0x3 5950 #define XSTORM_RDMA_CONN_AG_CTX_CF13_SHIFT 2 5951 #define XSTORM_RDMA_CONN_AG_CTX_CF14_MASK 0x3 5952 #define XSTORM_RDMA_CONN_AG_CTX_CF14_SHIFT 4 5953 #define XSTORM_RDMA_CONN_AG_CTX_CF15_MASK 0x3 5954 #define XSTORM_RDMA_CONN_AG_CTX_CF15_SHIFT 6 5955 u8 flags6; 5956 #define XSTORM_RDMA_CONN_AG_CTX_CF16_MASK 0x3 5957 #define XSTORM_RDMA_CONN_AG_CTX_CF16_SHIFT 0 5958 #define XSTORM_RDMA_CONN_AG_CTX_CF17_MASK 0x3 5959 #define XSTORM_RDMA_CONN_AG_CTX_CF17_SHIFT 2 5960 #define XSTORM_RDMA_CONN_AG_CTX_CF18_MASK 0x3 5961 #define XSTORM_RDMA_CONN_AG_CTX_CF18_SHIFT 4 5962 #define XSTORM_RDMA_CONN_AG_CTX_CF19_MASK 0x3 5963 #define XSTORM_RDMA_CONN_AG_CTX_CF19_SHIFT 6 5964 u8 flags7; 5965 #define XSTORM_RDMA_CONN_AG_CTX_CF20_MASK 0x3 5966 #define XSTORM_RDMA_CONN_AG_CTX_CF20_SHIFT 0 5967 #define XSTORM_RDMA_CONN_AG_CTX_CF21_MASK 0x3 5968 #define XSTORM_RDMA_CONN_AG_CTX_CF21_SHIFT 2 5969 #define XSTORM_RDMA_CONN_AG_CTX_SLOW_PATH_MASK 0x3 5970 #define XSTORM_RDMA_CONN_AG_CTX_SLOW_PATH_SHIFT 4 5971 #define XSTORM_RDMA_CONN_AG_CTX_CF0EN_MASK 0x1 5972 #define XSTORM_RDMA_CONN_AG_CTX_CF0EN_SHIFT 6 5973 #define XSTORM_RDMA_CONN_AG_CTX_CF1EN_MASK 0x1 5974 #define XSTORM_RDMA_CONN_AG_CTX_CF1EN_SHIFT 7 5975 u8 flags8; 5976 #define XSTORM_RDMA_CONN_AG_CTX_CF2EN_MASK 0x1 5977 #define XSTORM_RDMA_CONN_AG_CTX_CF2EN_SHIFT 0 5978 #define XSTORM_RDMA_CONN_AG_CTX_CF3EN_MASK 0x1 5979 #define XSTORM_RDMA_CONN_AG_CTX_CF3EN_SHIFT 1 5980 #define XSTORM_RDMA_CONN_AG_CTX_CF4EN_MASK 0x1 5981 #define XSTORM_RDMA_CONN_AG_CTX_CF4EN_SHIFT 2 5982 #define XSTORM_RDMA_CONN_AG_CTX_CF5EN_MASK 0x1 5983 #define XSTORM_RDMA_CONN_AG_CTX_CF5EN_SHIFT 3 5984 #define XSTORM_RDMA_CONN_AG_CTX_CF6EN_MASK 0x1 5985 #define XSTORM_RDMA_CONN_AG_CTX_CF6EN_SHIFT 4 5986 #define XSTORM_RDMA_CONN_AG_CTX_FLUSH_Q0_CF_EN_MASK 0x1 5987 #define XSTORM_RDMA_CONN_AG_CTX_FLUSH_Q0_CF_EN_SHIFT 5 5988 #define XSTORM_RDMA_CONN_AG_CTX_CF8EN_MASK 0x1 5989 #define XSTORM_RDMA_CONN_AG_CTX_CF8EN_SHIFT 6 5990 #define XSTORM_RDMA_CONN_AG_CTX_CF9EN_MASK 0x1 5991 #define XSTORM_RDMA_CONN_AG_CTX_CF9EN_SHIFT 7 5992 u8 flags9; 5993 #define XSTORM_RDMA_CONN_AG_CTX_CF10EN_MASK 0x1 5994 #define XSTORM_RDMA_CONN_AG_CTX_CF10EN_SHIFT 0 5995 #define XSTORM_RDMA_CONN_AG_CTX_CF11EN_MASK 0x1 5996 #define XSTORM_RDMA_CONN_AG_CTX_CF11EN_SHIFT 1 5997 #define XSTORM_RDMA_CONN_AG_CTX_CF12EN_MASK 0x1 5998 #define XSTORM_RDMA_CONN_AG_CTX_CF12EN_SHIFT 2 5999 #define XSTORM_RDMA_CONN_AG_CTX_CF13EN_MASK 0x1 6000 #define XSTORM_RDMA_CONN_AG_CTX_CF13EN_SHIFT 3 6001 #define XSTORM_RDMA_CONN_AG_CTX_CF14EN_MASK 0x1 6002 #define XSTORM_RDMA_CONN_AG_CTX_CF14EN_SHIFT 4 6003 #define XSTORM_RDMA_CONN_AG_CTX_CF15EN_MASK 0x1 6004 #define XSTORM_RDMA_CONN_AG_CTX_CF15EN_SHIFT 5 6005 #define XSTORM_RDMA_CONN_AG_CTX_CF16EN_MASK 0x1 6006 #define XSTORM_RDMA_CONN_AG_CTX_CF16EN_SHIFT 6 6007 #define XSTORM_RDMA_CONN_AG_CTX_CF17EN_MASK 0x1 6008 #define XSTORM_RDMA_CONN_AG_CTX_CF17EN_SHIFT 7 6009 u8 flags10; 6010 #define XSTORM_RDMA_CONN_AG_CTX_CF18EN_MASK 0x1 6011 #define XSTORM_RDMA_CONN_AG_CTX_CF18EN_SHIFT 0 6012 #define XSTORM_RDMA_CONN_AG_CTX_CF19EN_MASK 0x1 6013 #define XSTORM_RDMA_CONN_AG_CTX_CF19EN_SHIFT 1 6014 #define XSTORM_RDMA_CONN_AG_CTX_CF20EN_MASK 0x1 6015 #define XSTORM_RDMA_CONN_AG_CTX_CF20EN_SHIFT 2 6016 #define XSTORM_RDMA_CONN_AG_CTX_CF21EN_MASK 0x1 6017 #define XSTORM_RDMA_CONN_AG_CTX_CF21EN_SHIFT 3 6018 #define XSTORM_RDMA_CONN_AG_CTX_SLOW_PATH_EN_MASK 0x1 6019 #define XSTORM_RDMA_CONN_AG_CTX_SLOW_PATH_EN_SHIFT 4 6020 #define XSTORM_RDMA_CONN_AG_CTX_CF23EN_MASK 0x1 6021 #define XSTORM_RDMA_CONN_AG_CTX_CF23EN_SHIFT 5 6022 #define XSTORM_RDMA_CONN_AG_CTX_RULE0EN_MASK 0x1 6023 #define XSTORM_RDMA_CONN_AG_CTX_RULE0EN_SHIFT 6 6024 #define XSTORM_RDMA_CONN_AG_CTX_RULE1EN_MASK 0x1 6025 #define XSTORM_RDMA_CONN_AG_CTX_RULE1EN_SHIFT 7 6026 u8 flags11; 6027 #define XSTORM_RDMA_CONN_AG_CTX_RULE2EN_MASK 0x1 6028 #define XSTORM_RDMA_CONN_AG_CTX_RULE2EN_SHIFT 0 6029 #define XSTORM_RDMA_CONN_AG_CTX_RULE3EN_MASK 0x1 6030 #define XSTORM_RDMA_CONN_AG_CTX_RULE3EN_SHIFT 1 6031 #define XSTORM_RDMA_CONN_AG_CTX_RULE4EN_MASK 0x1 6032 #define XSTORM_RDMA_CONN_AG_CTX_RULE4EN_SHIFT 2 6033 #define XSTORM_RDMA_CONN_AG_CTX_RULE5EN_MASK 0x1 6034 #define XSTORM_RDMA_CONN_AG_CTX_RULE5EN_SHIFT 3 6035 #define XSTORM_RDMA_CONN_AG_CTX_RULE6EN_MASK 0x1 6036 #define XSTORM_RDMA_CONN_AG_CTX_RULE6EN_SHIFT 4 6037 #define XSTORM_RDMA_CONN_AG_CTX_RULE7EN_MASK 0x1 6038 #define XSTORM_RDMA_CONN_AG_CTX_RULE7EN_SHIFT 5 6039 #define XSTORM_RDMA_CONN_AG_CTX_A0_RESERVED1_MASK 0x1 6040 #define XSTORM_RDMA_CONN_AG_CTX_A0_RESERVED1_SHIFT 6 6041 #define XSTORM_RDMA_CONN_AG_CTX_RULE9EN_MASK 0x1 6042 #define XSTORM_RDMA_CONN_AG_CTX_RULE9EN_SHIFT 7 6043 u8 flags12; 6044 #define XSTORM_RDMA_CONN_AG_CTX_RULE10EN_MASK 0x1 6045 #define XSTORM_RDMA_CONN_AG_CTX_RULE10EN_SHIFT 0 6046 #define XSTORM_RDMA_CONN_AG_CTX_RULE11EN_MASK 0x1 6047 #define XSTORM_RDMA_CONN_AG_CTX_RULE11EN_SHIFT 1 6048 #define XSTORM_RDMA_CONN_AG_CTX_A0_RESERVED2_MASK 0x1 6049 #define XSTORM_RDMA_CONN_AG_CTX_A0_RESERVED2_SHIFT 2 6050 #define XSTORM_RDMA_CONN_AG_CTX_A0_RESERVED3_MASK 0x1 6051 #define XSTORM_RDMA_CONN_AG_CTX_A0_RESERVED3_SHIFT 3 6052 #define XSTORM_RDMA_CONN_AG_CTX_RULE14EN_MASK 0x1 6053 #define XSTORM_RDMA_CONN_AG_CTX_RULE14EN_SHIFT 4 6054 #define XSTORM_RDMA_CONN_AG_CTX_RULE15EN_MASK 0x1 6055 #define XSTORM_RDMA_CONN_AG_CTX_RULE15EN_SHIFT 5 6056 #define XSTORM_RDMA_CONN_AG_CTX_RULE16EN_MASK 0x1 6057 #define XSTORM_RDMA_CONN_AG_CTX_RULE16EN_SHIFT 6 6058 #define XSTORM_RDMA_CONN_AG_CTX_RULE17EN_MASK 0x1 6059 #define XSTORM_RDMA_CONN_AG_CTX_RULE17EN_SHIFT 7 6060 u8 flags13; 6061 #define XSTORM_RDMA_CONN_AG_CTX_RULE18EN_MASK 0x1 6062 #define XSTORM_RDMA_CONN_AG_CTX_RULE18EN_SHIFT 0 6063 #define XSTORM_RDMA_CONN_AG_CTX_RULE19EN_MASK 0x1 6064 #define XSTORM_RDMA_CONN_AG_CTX_RULE19EN_SHIFT 1 6065 #define XSTORM_RDMA_CONN_AG_CTX_A0_RESERVED4_MASK 0x1 6066 #define XSTORM_RDMA_CONN_AG_CTX_A0_RESERVED4_SHIFT 2 6067 #define XSTORM_RDMA_CONN_AG_CTX_A0_RESERVED5_MASK 0x1 6068 #define XSTORM_RDMA_CONN_AG_CTX_A0_RESERVED5_SHIFT 3 6069 #define XSTORM_RDMA_CONN_AG_CTX_A0_RESERVED6_MASK 0x1 6070 #define XSTORM_RDMA_CONN_AG_CTX_A0_RESERVED6_SHIFT 4 6071 #define XSTORM_RDMA_CONN_AG_CTX_A0_RESERVED7_MASK 0x1 6072 #define XSTORM_RDMA_CONN_AG_CTX_A0_RESERVED7_SHIFT 5 6073 #define XSTORM_RDMA_CONN_AG_CTX_A0_RESERVED8_MASK 0x1 6074 #define XSTORM_RDMA_CONN_AG_CTX_A0_RESERVED8_SHIFT 6 6075 #define XSTORM_RDMA_CONN_AG_CTX_A0_RESERVED9_MASK 0x1 6076 #define XSTORM_RDMA_CONN_AG_CTX_A0_RESERVED9_SHIFT 7 6077 u8 flags14; 6078 #define XSTORM_RDMA_CONN_AG_CTX_MIGRATION_MASK 0x1 6079 #define XSTORM_RDMA_CONN_AG_CTX_MIGRATION_SHIFT 0 6080 #define XSTORM_RDMA_CONN_AG_CTX_BIT17_MASK 0x1 6081 #define XSTORM_RDMA_CONN_AG_CTX_BIT17_SHIFT 1 6082 #define XSTORM_RDMA_CONN_AG_CTX_DPM_PORT_NUM_MASK 0x3 6083 #define XSTORM_RDMA_CONN_AG_CTX_DPM_PORT_NUM_SHIFT 2 6084 #define XSTORM_RDMA_CONN_AG_CTX_RESERVED_MASK 0x1 6085 #define XSTORM_RDMA_CONN_AG_CTX_RESERVED_SHIFT 4 6086 #define XSTORM_RDMA_CONN_AG_CTX_ROCE_EDPM_ENABLE_MASK 0x1 6087 #define XSTORM_RDMA_CONN_AG_CTX_ROCE_EDPM_ENABLE_SHIFT 5 6088 #define XSTORM_RDMA_CONN_AG_CTX_CF23_MASK 0x3 6089 #define XSTORM_RDMA_CONN_AG_CTX_CF23_SHIFT 6 6090 u8 byte2; 6091 __le16 physical_q0; 6092 __le16 word1; 6093 __le16 word2; 6094 __le16 word3; 6095 __le16 word4; 6096 __le16 word5; 6097 __le16 conn_dpi; 6098 u8 byte3; 6099 u8 byte4; 6100 u8 byte5; 6101 u8 byte6; 6102 __le32 reg0; 6103 __le32 reg1; 6104 __le32 reg2; 6105 __le32 snd_nxt_psn; 6106 __le32 reg4; 6107 __le32 reg5; 6108 __le32 reg6; 6109 }; 6110 6111 struct ystorm_rdma_conn_ag_ctx { 6112 u8 byte0; 6113 u8 byte1; 6114 u8 flags0; 6115 #define YSTORM_RDMA_CONN_AG_CTX_BIT0_MASK 0x1 6116 #define YSTORM_RDMA_CONN_AG_CTX_BIT0_SHIFT 0 6117 #define YSTORM_RDMA_CONN_AG_CTX_BIT1_MASK 0x1 6118 #define YSTORM_RDMA_CONN_AG_CTX_BIT1_SHIFT 1 6119 #define YSTORM_RDMA_CONN_AG_CTX_CF0_MASK 0x3 6120 #define YSTORM_RDMA_CONN_AG_CTX_CF0_SHIFT 2 6121 #define YSTORM_RDMA_CONN_AG_CTX_CF1_MASK 0x3 6122 #define YSTORM_RDMA_CONN_AG_CTX_CF1_SHIFT 4 6123 #define YSTORM_RDMA_CONN_AG_CTX_CF2_MASK 0x3 6124 #define YSTORM_RDMA_CONN_AG_CTX_CF2_SHIFT 6 6125 u8 flags1; 6126 #define YSTORM_RDMA_CONN_AG_CTX_CF0EN_MASK 0x1 6127 #define YSTORM_RDMA_CONN_AG_CTX_CF0EN_SHIFT 0 6128 #define YSTORM_RDMA_CONN_AG_CTX_CF1EN_MASK 0x1 6129 #define YSTORM_RDMA_CONN_AG_CTX_CF1EN_SHIFT 1 6130 #define YSTORM_RDMA_CONN_AG_CTX_CF2EN_MASK 0x1 6131 #define YSTORM_RDMA_CONN_AG_CTX_CF2EN_SHIFT 2 6132 #define YSTORM_RDMA_CONN_AG_CTX_RULE0EN_MASK 0x1 6133 #define YSTORM_RDMA_CONN_AG_CTX_RULE0EN_SHIFT 3 6134 #define YSTORM_RDMA_CONN_AG_CTX_RULE1EN_MASK 0x1 6135 #define YSTORM_RDMA_CONN_AG_CTX_RULE1EN_SHIFT 4 6136 #define YSTORM_RDMA_CONN_AG_CTX_RULE2EN_MASK 0x1 6137 #define YSTORM_RDMA_CONN_AG_CTX_RULE2EN_SHIFT 5 6138 #define YSTORM_RDMA_CONN_AG_CTX_RULE3EN_MASK 0x1 6139 #define YSTORM_RDMA_CONN_AG_CTX_RULE3EN_SHIFT 6 6140 #define YSTORM_RDMA_CONN_AG_CTX_RULE4EN_MASK 0x1 6141 #define YSTORM_RDMA_CONN_AG_CTX_RULE4EN_SHIFT 7 6142 u8 byte2; 6143 u8 byte3; 6144 __le16 word0; 6145 __le32 reg0; 6146 __le32 reg1; 6147 __le16 word1; 6148 __le16 word2; 6149 __le16 word3; 6150 __le16 word4; 6151 __le32 reg2; 6152 __le32 reg3; 6153 }; 6154 6155 struct mstorm_roce_conn_st_ctx { 6156 struct regpair temp[6]; 6157 }; 6158 6159 struct pstorm_roce_conn_st_ctx { 6160 struct regpair temp[16]; 6161 }; 6162 6163 struct ystorm_roce_conn_st_ctx { 6164 struct regpair temp[2]; 6165 }; 6166 6167 struct xstorm_roce_conn_st_ctx { 6168 struct regpair temp[22]; 6169 }; 6170 6171 struct tstorm_roce_conn_st_ctx { 6172 struct regpair temp[30]; 6173 }; 6174 6175 struct ustorm_roce_conn_st_ctx { 6176 struct regpair temp[12]; 6177 }; 6178 6179 struct roce_conn_context { 6180 struct ystorm_roce_conn_st_ctx ystorm_st_context; 6181 struct regpair ystorm_st_padding[2]; 6182 struct pstorm_roce_conn_st_ctx pstorm_st_context; 6183 struct xstorm_roce_conn_st_ctx xstorm_st_context; 6184 struct regpair xstorm_st_padding[2]; 6185 struct xstorm_rdma_conn_ag_ctx xstorm_ag_context; 6186 struct tstorm_rdma_conn_ag_ctx tstorm_ag_context; 6187 struct timers_context timer_context; 6188 struct ustorm_rdma_conn_ag_ctx ustorm_ag_context; 6189 struct tstorm_roce_conn_st_ctx tstorm_st_context; 6190 struct mstorm_roce_conn_st_ctx mstorm_st_context; 6191 struct ustorm_roce_conn_st_ctx ustorm_st_context; 6192 struct regpair ustorm_st_padding[2]; 6193 }; 6194 6195 struct roce_create_qp_req_ramrod_data { 6196 __le16 flags; 6197 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_ROCE_FLAVOR_MASK 0x3 6198 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_ROCE_FLAVOR_SHIFT 0 6199 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_FMR_AND_RESERVED_EN_MASK 0x1 6200 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_FMR_AND_RESERVED_EN_SHIFT 2 6201 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_SIGNALED_COMP_MASK 0x1 6202 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_SIGNALED_COMP_SHIFT 3 6203 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_PRI_MASK 0x7 6204 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_PRI_SHIFT 4 6205 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_RESERVED_MASK 0x1 6206 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_RESERVED_SHIFT 7 6207 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_ERR_RETRY_CNT_MASK 0xF 6208 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_ERR_RETRY_CNT_SHIFT 8 6209 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_RNR_NAK_CNT_MASK 0xF 6210 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_RNR_NAK_CNT_SHIFT 12 6211 u8 max_ord; 6212 u8 traffic_class; 6213 u8 hop_limit; 6214 u8 orq_num_pages; 6215 __le16 p_key; 6216 __le32 flow_label; 6217 __le32 dst_qp_id; 6218 __le32 ack_timeout_val; 6219 __le32 initial_psn; 6220 __le16 mtu; 6221 __le16 pd; 6222 __le16 sq_num_pages; 6223 __le16 reseved2; 6224 struct regpair sq_pbl_addr; 6225 struct regpair orq_pbl_addr; 6226 __le16 local_mac_addr[3]; 6227 __le16 remote_mac_addr[3]; 6228 __le16 vlan_id; 6229 __le16 udp_src_port; 6230 __le32 src_gid[4]; 6231 __le32 dst_gid[4]; 6232 struct regpair qp_handle_for_cqe; 6233 struct regpair qp_handle_for_async; 6234 u8 stats_counter_id; 6235 u8 reserved3[7]; 6236 __le32 cq_cid; 6237 __le16 physical_queue0; 6238 __le16 dpi; 6239 }; 6240 6241 struct roce_create_qp_resp_ramrod_data { 6242 __le16 flags; 6243 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_ROCE_FLAVOR_MASK 0x3 6244 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_ROCE_FLAVOR_SHIFT 0 6245 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_RDMA_RD_EN_MASK 0x1 6246 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_RDMA_RD_EN_SHIFT 2 6247 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_RDMA_WR_EN_MASK 0x1 6248 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_RDMA_WR_EN_SHIFT 3 6249 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_ATOMIC_EN_MASK 0x1 6250 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_ATOMIC_EN_SHIFT 4 6251 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_SRQ_FLG_MASK 0x1 6252 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_SRQ_FLG_SHIFT 5 6253 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_E2E_FLOW_CONTROL_EN_MASK 0x1 6254 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_E2E_FLOW_CONTROL_EN_SHIFT 6 6255 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_RESERVED_KEY_EN_MASK 0x1 6256 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_RESERVED_KEY_EN_SHIFT 7 6257 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_PRI_MASK 0x7 6258 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_PRI_SHIFT 8 6259 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_MIN_RNR_NAK_TIMER_MASK 0x1F 6260 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_MIN_RNR_NAK_TIMER_SHIFT 11 6261 u8 max_ird; 6262 u8 traffic_class; 6263 u8 hop_limit; 6264 u8 irq_num_pages; 6265 __le16 p_key; 6266 __le32 flow_label; 6267 __le32 dst_qp_id; 6268 u8 stats_counter_id; 6269 u8 reserved1; 6270 __le16 mtu; 6271 __le32 initial_psn; 6272 __le16 pd; 6273 __le16 rq_num_pages; 6274 struct rdma_srq_id srq_id; 6275 struct regpair rq_pbl_addr; 6276 struct regpair irq_pbl_addr; 6277 __le16 local_mac_addr[3]; 6278 __le16 remote_mac_addr[3]; 6279 __le16 vlan_id; 6280 __le16 udp_src_port; 6281 __le32 src_gid[4]; 6282 __le32 dst_gid[4]; 6283 struct regpair qp_handle_for_cqe; 6284 struct regpair qp_handle_for_async; 6285 __le32 reserved2[2]; 6286 __le32 cq_cid; 6287 __le16 physical_queue0; 6288 __le16 dpi; 6289 }; 6290 6291 struct roce_destroy_qp_req_output_params { 6292 __le32 num_bound_mw; 6293 __le32 reserved; 6294 }; 6295 6296 struct roce_destroy_qp_req_ramrod_data { 6297 struct regpair output_params_addr; 6298 }; 6299 6300 struct roce_destroy_qp_resp_output_params { 6301 __le32 num_invalidated_mw; 6302 __le32 reserved; 6303 }; 6304 6305 struct roce_destroy_qp_resp_ramrod_data { 6306 struct regpair output_params_addr; 6307 }; 6308 6309 enum roce_event_opcode { 6310 ROCE_EVENT_CREATE_QP = 11, 6311 ROCE_EVENT_MODIFY_QP, 6312 ROCE_EVENT_QUERY_QP, 6313 ROCE_EVENT_DESTROY_QP, 6314 MAX_ROCE_EVENT_OPCODE 6315 }; 6316 6317 struct roce_init_func_ramrod_data { 6318 struct rdma_init_func_ramrod_data rdma; 6319 }; 6320 6321 struct roce_modify_qp_req_ramrod_data { 6322 __le16 flags; 6323 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_MOVE_TO_ERR_FLG_MASK 0x1 6324 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_MOVE_TO_ERR_FLG_SHIFT 0 6325 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_MOVE_TO_SQD_FLG_MASK 0x1 6326 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_MOVE_TO_SQD_FLG_SHIFT 1 6327 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_EN_SQD_ASYNC_NOTIFY_MASK 0x1 6328 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_EN_SQD_ASYNC_NOTIFY_SHIFT 2 6329 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_P_KEY_FLG_MASK 0x1 6330 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_P_KEY_FLG_SHIFT 3 6331 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_ADDRESS_VECTOR_FLG_MASK 0x1 6332 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_ADDRESS_VECTOR_FLG_SHIFT 4 6333 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_MAX_ORD_FLG_MASK 0x1 6334 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_MAX_ORD_FLG_SHIFT 5 6335 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_RNR_NAK_CNT_FLG_MASK 0x1 6336 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_RNR_NAK_CNT_FLG_SHIFT 6 6337 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_ERR_RETRY_CNT_FLG_MASK 0x1 6338 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_ERR_RETRY_CNT_FLG_SHIFT 7 6339 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_ACK_TIMEOUT_FLG_MASK 0x1 6340 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_ACK_TIMEOUT_FLG_SHIFT 8 6341 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_PRI_FLG_MASK 0x1 6342 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_PRI_FLG_SHIFT 9 6343 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_PRI_MASK 0x7 6344 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_PRI_SHIFT 10 6345 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_RESERVED1_MASK 0x7 6346 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_RESERVED1_SHIFT 13 6347 u8 fields; 6348 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_ERR_RETRY_CNT_MASK 0xF 6349 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_ERR_RETRY_CNT_SHIFT 0 6350 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_RNR_NAK_CNT_MASK 0xF 6351 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_RNR_NAK_CNT_SHIFT 4 6352 u8 max_ord; 6353 u8 traffic_class; 6354 u8 hop_limit; 6355 __le16 p_key; 6356 __le32 flow_label; 6357 __le32 ack_timeout_val; 6358 __le16 mtu; 6359 __le16 reserved2; 6360 __le32 reserved3[3]; 6361 __le32 src_gid[4]; 6362 __le32 dst_gid[4]; 6363 }; 6364 6365 struct roce_modify_qp_resp_ramrod_data { 6366 __le16 flags; 6367 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_MOVE_TO_ERR_FLG_MASK 0x1 6368 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_MOVE_TO_ERR_FLG_SHIFT 0 6369 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_RDMA_RD_EN_MASK 0x1 6370 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_RDMA_RD_EN_SHIFT 1 6371 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_RDMA_WR_EN_MASK 0x1 6372 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_RDMA_WR_EN_SHIFT 2 6373 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_ATOMIC_EN_MASK 0x1 6374 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_ATOMIC_EN_SHIFT 3 6375 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_P_KEY_FLG_MASK 0x1 6376 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_P_KEY_FLG_SHIFT 4 6377 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_ADDRESS_VECTOR_FLG_MASK 0x1 6378 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_ADDRESS_VECTOR_FLG_SHIFT 5 6379 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_MAX_IRD_FLG_MASK 0x1 6380 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_MAX_IRD_FLG_SHIFT 6 6381 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_PRI_FLG_MASK 0x1 6382 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_PRI_FLG_SHIFT 7 6383 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_MIN_RNR_NAK_TIMER_FLG_MASK 0x1 6384 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_MIN_RNR_NAK_TIMER_FLG_SHIFT 8 6385 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_RDMA_OPS_EN_FLG_MASK 0x1 6386 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_RDMA_OPS_EN_FLG_SHIFT 9 6387 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_RESERVED1_MASK 0x3F 6388 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_RESERVED1_SHIFT 10 6389 u8 fields; 6390 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_PRI_MASK 0x7 6391 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_PRI_SHIFT 0 6392 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_MIN_RNR_NAK_TIMER_MASK 0x1F 6393 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_MIN_RNR_NAK_TIMER_SHIFT 3 6394 u8 max_ird; 6395 u8 traffic_class; 6396 u8 hop_limit; 6397 __le16 p_key; 6398 __le32 flow_label; 6399 __le16 mtu; 6400 __le16 reserved2; 6401 __le32 src_gid[4]; 6402 __le32 dst_gid[4]; 6403 }; 6404 6405 struct roce_query_qp_req_output_params { 6406 __le32 psn; 6407 __le32 flags; 6408 #define ROCE_QUERY_QP_REQ_OUTPUT_PARAMS_ERR_FLG_MASK 0x1 6409 #define ROCE_QUERY_QP_REQ_OUTPUT_PARAMS_ERR_FLG_SHIFT 0 6410 #define ROCE_QUERY_QP_REQ_OUTPUT_PARAMS_SQ_DRAINING_FLG_MASK 0x1 6411 #define ROCE_QUERY_QP_REQ_OUTPUT_PARAMS_SQ_DRAINING_FLG_SHIFT 1 6412 #define ROCE_QUERY_QP_REQ_OUTPUT_PARAMS_RESERVED0_MASK 0x3FFFFFFF 6413 #define ROCE_QUERY_QP_REQ_OUTPUT_PARAMS_RESERVED0_SHIFT 2 6414 }; 6415 6416 struct roce_query_qp_req_ramrod_data { 6417 struct regpair output_params_addr; 6418 }; 6419 6420 struct roce_query_qp_resp_output_params { 6421 __le32 psn; 6422 __le32 err_flag; 6423 #define ROCE_QUERY_QP_RESP_OUTPUT_PARAMS_ERROR_FLG_MASK 0x1 6424 #define ROCE_QUERY_QP_RESP_OUTPUT_PARAMS_ERROR_FLG_SHIFT 0 6425 #define ROCE_QUERY_QP_RESP_OUTPUT_PARAMS_RESERVED0_MASK 0x7FFFFFFF 6426 #define ROCE_QUERY_QP_RESP_OUTPUT_PARAMS_RESERVED0_SHIFT 1 6427 }; 6428 6429 struct roce_query_qp_resp_ramrod_data { 6430 struct regpair output_params_addr; 6431 }; 6432 6433 enum roce_ramrod_cmd_id { 6434 ROCE_RAMROD_CREATE_QP = 11, 6435 ROCE_RAMROD_MODIFY_QP, 6436 ROCE_RAMROD_QUERY_QP, 6437 ROCE_RAMROD_DESTROY_QP, 6438 MAX_ROCE_RAMROD_CMD_ID 6439 }; 6440 6441 struct mstorm_roce_req_conn_ag_ctx { 6442 u8 byte0; 6443 u8 byte1; 6444 u8 flags0; 6445 #define MSTORM_ROCE_REQ_CONN_AG_CTX_BIT0_MASK 0x1 6446 #define MSTORM_ROCE_REQ_CONN_AG_CTX_BIT0_SHIFT 0 6447 #define MSTORM_ROCE_REQ_CONN_AG_CTX_BIT1_MASK 0x1 6448 #define MSTORM_ROCE_REQ_CONN_AG_CTX_BIT1_SHIFT 1 6449 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF0_MASK 0x3 6450 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF0_SHIFT 2 6451 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF1_MASK 0x3 6452 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF1_SHIFT 4 6453 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF2_MASK 0x3 6454 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF2_SHIFT 6 6455 u8 flags1; 6456 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF0EN_MASK 0x1 6457 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF0EN_SHIFT 0 6458 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF1EN_MASK 0x1 6459 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF1EN_SHIFT 1 6460 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF2EN_MASK 0x1 6461 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF2EN_SHIFT 2 6462 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_MASK 0x1 6463 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_SHIFT 3 6464 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_MASK 0x1 6465 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_SHIFT 4 6466 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE2EN_MASK 0x1 6467 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE2EN_SHIFT 5 6468 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_MASK 0x1 6469 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_SHIFT 6 6470 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_MASK 0x1 6471 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_SHIFT 7 6472 __le16 word0; 6473 __le16 word1; 6474 __le32 reg0; 6475 __le32 reg1; 6476 }; 6477 6478 struct mstorm_roce_resp_conn_ag_ctx { 6479 u8 byte0; 6480 u8 byte1; 6481 u8 flags0; 6482 #define MSTORM_ROCE_RESP_CONN_AG_CTX_BIT0_MASK 0x1 6483 #define MSTORM_ROCE_RESP_CONN_AG_CTX_BIT0_SHIFT 0 6484 #define MSTORM_ROCE_RESP_CONN_AG_CTX_BIT1_MASK 0x1 6485 #define MSTORM_ROCE_RESP_CONN_AG_CTX_BIT1_SHIFT 1 6486 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF0_MASK 0x3 6487 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF0_SHIFT 2 6488 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF1_MASK 0x3 6489 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF1_SHIFT 4 6490 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF2_MASK 0x3 6491 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF2_SHIFT 6 6492 u8 flags1; 6493 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_MASK 0x1 6494 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_SHIFT 0 6495 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF1EN_MASK 0x1 6496 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF1EN_SHIFT 1 6497 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF2EN_MASK 0x1 6498 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF2EN_SHIFT 2 6499 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_MASK 0x1 6500 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_SHIFT 3 6501 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_MASK 0x1 6502 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_SHIFT 4 6503 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_MASK 0x1 6504 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_SHIFT 5 6505 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_MASK 0x1 6506 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_SHIFT 6 6507 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_MASK 0x1 6508 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_SHIFT 7 6509 __le16 word0; 6510 __le16 word1; 6511 __le32 reg0; 6512 __le32 reg1; 6513 }; 6514 6515 enum roce_flavor { 6516 PLAIN_ROCE /* RoCE v1 */ , 6517 RROCE_IPV4 /* RoCE v2 (Routable RoCE) over ipv4 */ , 6518 RROCE_IPV6 /* RoCE v2 (Routable RoCE) over ipv6 */ , 6519 MAX_ROCE_FLAVOR 6520 }; 6521 6522 struct tstorm_roce_req_conn_ag_ctx { 6523 u8 reserved0; 6524 u8 state; 6525 u8 flags0; 6526 #define TSTORM_ROCE_REQ_CONN_AG_CTX_EXIST_IN_QM0_MASK 0x1 6527 #define TSTORM_ROCE_REQ_CONN_AG_CTX_EXIST_IN_QM0_SHIFT 0 6528 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RX_ERROR_OCCURED_MASK 0x1 6529 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RX_ERROR_OCCURED_SHIFT 1 6530 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TX_CQE_ERROR_OCCURED_MASK 0x1 6531 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TX_CQE_ERROR_OCCURED_SHIFT 2 6532 #define TSTORM_ROCE_REQ_CONN_AG_CTX_BIT3_MASK 0x1 6533 #define TSTORM_ROCE_REQ_CONN_AG_CTX_BIT3_SHIFT 3 6534 #define TSTORM_ROCE_REQ_CONN_AG_CTX_MSTORM_FLUSH_MASK 0x1 6535 #define TSTORM_ROCE_REQ_CONN_AG_CTX_MSTORM_FLUSH_SHIFT 4 6536 #define TSTORM_ROCE_REQ_CONN_AG_CTX_CACHED_ORQ_MASK 0x1 6537 #define TSTORM_ROCE_REQ_CONN_AG_CTX_CACHED_ORQ_SHIFT 5 6538 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TIMER_CF_MASK 0x3 6539 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TIMER_CF_SHIFT 6 6540 u8 flags1; 6541 #define TSTORM_ROCE_REQ_CONN_AG_CTX_CF1_MASK 0x3 6542 #define TSTORM_ROCE_REQ_CONN_AG_CTX_CF1_SHIFT 0 6543 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_SQ_CF_MASK 0x3 6544 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_SQ_CF_SHIFT 2 6545 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TIMER_STOP_ALL_CF_MASK 0x3 6546 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TIMER_STOP_ALL_CF_SHIFT 4 6547 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_Q0_CF_MASK 0x3 6548 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_Q0_CF_SHIFT 6 6549 u8 flags2; 6550 #define TSTORM_ROCE_REQ_CONN_AG_CTX_MSTORM_FLUSH_CF_MASK 0x3 6551 #define TSTORM_ROCE_REQ_CONN_AG_CTX_MSTORM_FLUSH_CF_SHIFT 0 6552 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SET_TIMER_CF_MASK 0x3 6553 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SET_TIMER_CF_SHIFT 2 6554 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TX_ASYNC_ERROR_CF_MASK 0x3 6555 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TX_ASYNC_ERROR_CF_SHIFT 4 6556 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RXMIT_DONE_CF_MASK 0x3 6557 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RXMIT_DONE_CF_SHIFT 6 6558 u8 flags3; 6559 #define TSTORM_ROCE_REQ_CONN_AG_CTX_ERROR_SCAN_COMPLETED_CF_MASK 0x3 6560 #define TSTORM_ROCE_REQ_CONN_AG_CTX_ERROR_SCAN_COMPLETED_CF_SHIFT 0 6561 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SQ_DRAIN_COMPLETED_CF_MASK 0x3 6562 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SQ_DRAIN_COMPLETED_CF_SHIFT 2 6563 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TIMER_CF_EN_MASK 0x1 6564 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TIMER_CF_EN_SHIFT 4 6565 #define TSTORM_ROCE_REQ_CONN_AG_CTX_CF1EN_MASK 0x1 6566 #define TSTORM_ROCE_REQ_CONN_AG_CTX_CF1EN_SHIFT 5 6567 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_SQ_CF_EN_MASK 0x1 6568 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_SQ_CF_EN_SHIFT 6 6569 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TIMER_STOP_ALL_CF_EN_MASK 0x1 6570 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TIMER_STOP_ALL_CF_EN_SHIFT 7 6571 u8 flags4; 6572 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_Q0_CF_EN_MASK 0x1 6573 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_Q0_CF_EN_SHIFT 0 6574 #define TSTORM_ROCE_REQ_CONN_AG_CTX_MSTORM_FLUSH_CF_EN_MASK 0x1 6575 #define TSTORM_ROCE_REQ_CONN_AG_CTX_MSTORM_FLUSH_CF_EN_SHIFT 1 6576 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SET_TIMER_CF_EN_MASK 0x1 6577 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SET_TIMER_CF_EN_SHIFT 2 6578 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TX_ASYNC_ERROR_CF_EN_MASK 0x1 6579 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TX_ASYNC_ERROR_CF_EN_SHIFT 3 6580 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RXMIT_DONE_CF_EN_MASK 0x1 6581 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RXMIT_DONE_CF_EN_SHIFT 4 6582 #define TSTORM_ROCE_REQ_CONN_AG_CTX_ERROR_SCAN_COMPLETED_CF_EN_MASK 0x1 6583 #define TSTORM_ROCE_REQ_CONN_AG_CTX_ERROR_SCAN_COMPLETED_CF_EN_SHIFT 5 6584 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SQ_DRAIN_COMPLETED_CF_EN_MASK 0x1 6585 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SQ_DRAIN_COMPLETED_CF_EN_SHIFT 6 6586 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_MASK 0x1 6587 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_SHIFT 7 6588 u8 flags5; 6589 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_MASK 0x1 6590 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_SHIFT 0 6591 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE2EN_MASK 0x1 6592 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE2EN_SHIFT 1 6593 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_MASK 0x1 6594 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_SHIFT 2 6595 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_MASK 0x1 6596 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_SHIFT 3 6597 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE5EN_MASK 0x1 6598 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE5EN_SHIFT 4 6599 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SND_SQ_CONS_EN_MASK 0x1 6600 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SND_SQ_CONS_EN_SHIFT 5 6601 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE7EN_MASK 0x1 6602 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE7EN_SHIFT 6 6603 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE8EN_MASK 0x1 6604 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE8EN_SHIFT 7 6605 __le32 reg0; 6606 __le32 snd_nxt_psn; 6607 __le32 snd_max_psn; 6608 __le32 orq_prod; 6609 __le32 reg4; 6610 __le32 reg5; 6611 __le32 reg6; 6612 __le32 reg7; 6613 __le32 reg8; 6614 u8 tx_cqe_error_type; 6615 u8 orq_cache_idx; 6616 __le16 snd_sq_cons_th; 6617 u8 byte4; 6618 u8 byte5; 6619 __le16 snd_sq_cons; 6620 __le16 word2; 6621 __le16 word3; 6622 __le32 reg9; 6623 __le32 reg10; 6624 }; 6625 6626 struct tstorm_roce_resp_conn_ag_ctx { 6627 u8 byte0; 6628 u8 state; 6629 u8 flags0; 6630 #define TSTORM_ROCE_RESP_CONN_AG_CTX_EXIST_IN_QM0_MASK 0x1 6631 #define TSTORM_ROCE_RESP_CONN_AG_CTX_EXIST_IN_QM0_SHIFT 0 6632 #define TSTORM_ROCE_RESP_CONN_AG_CTX_BIT1_MASK 0x1 6633 #define TSTORM_ROCE_RESP_CONN_AG_CTX_BIT1_SHIFT 1 6634 #define TSTORM_ROCE_RESP_CONN_AG_CTX_BIT2_MASK 0x1 6635 #define TSTORM_ROCE_RESP_CONN_AG_CTX_BIT2_SHIFT 2 6636 #define TSTORM_ROCE_RESP_CONN_AG_CTX_BIT3_MASK 0x1 6637 #define TSTORM_ROCE_RESP_CONN_AG_CTX_BIT3_SHIFT 3 6638 #define TSTORM_ROCE_RESP_CONN_AG_CTX_MSTORM_FLUSH_MASK 0x1 6639 #define TSTORM_ROCE_RESP_CONN_AG_CTX_MSTORM_FLUSH_SHIFT 4 6640 #define TSTORM_ROCE_RESP_CONN_AG_CTX_BIT5_MASK 0x1 6641 #define TSTORM_ROCE_RESP_CONN_AG_CTX_BIT5_SHIFT 5 6642 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF0_MASK 0x3 6643 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF0_SHIFT 6 6644 u8 flags1; 6645 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RX_ERROR_CF_MASK 0x3 6646 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RX_ERROR_CF_SHIFT 0 6647 #define TSTORM_ROCE_RESP_CONN_AG_CTX_TX_ERROR_CF_MASK 0x3 6648 #define TSTORM_ROCE_RESP_CONN_AG_CTX_TX_ERROR_CF_SHIFT 2 6649 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF3_MASK 0x3 6650 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF3_SHIFT 4 6651 #define TSTORM_ROCE_RESP_CONN_AG_CTX_FLUSH_Q0_CF_MASK 0x3 6652 #define TSTORM_ROCE_RESP_CONN_AG_CTX_FLUSH_Q0_CF_SHIFT 6 6653 u8 flags2; 6654 #define TSTORM_ROCE_RESP_CONN_AG_CTX_MSTORM_FLUSH_CF_MASK 0x3 6655 #define TSTORM_ROCE_RESP_CONN_AG_CTX_MSTORM_FLUSH_CF_SHIFT 0 6656 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF6_MASK 0x3 6657 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF6_SHIFT 2 6658 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF7_MASK 0x3 6659 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF7_SHIFT 4 6660 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF8_MASK 0x3 6661 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF8_SHIFT 6 6662 u8 flags3; 6663 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF9_MASK 0x3 6664 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF9_SHIFT 0 6665 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF10_MASK 0x3 6666 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF10_SHIFT 2 6667 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_MASK 0x1 6668 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_SHIFT 4 6669 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RX_ERROR_CF_EN_MASK 0x1 6670 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RX_ERROR_CF_EN_SHIFT 5 6671 #define TSTORM_ROCE_RESP_CONN_AG_CTX_TX_ERROR_CF_EN_MASK 0x1 6672 #define TSTORM_ROCE_RESP_CONN_AG_CTX_TX_ERROR_CF_EN_SHIFT 6 6673 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF3EN_MASK 0x1 6674 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF3EN_SHIFT 7 6675 u8 flags4; 6676 #define TSTORM_ROCE_RESP_CONN_AG_CTX_FLUSH_Q0_CF_EN_MASK 0x1 6677 #define TSTORM_ROCE_RESP_CONN_AG_CTX_FLUSH_Q0_CF_EN_SHIFT 0 6678 #define TSTORM_ROCE_RESP_CONN_AG_CTX_MSTORM_FLUSH_CF_EN_MASK 0x1 6679 #define TSTORM_ROCE_RESP_CONN_AG_CTX_MSTORM_FLUSH_CF_EN_SHIFT 1 6680 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF6EN_MASK 0x1 6681 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF6EN_SHIFT 2 6682 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF7EN_MASK 0x1 6683 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF7EN_SHIFT 3 6684 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF8EN_MASK 0x1 6685 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF8EN_SHIFT 4 6686 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF9EN_MASK 0x1 6687 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF9EN_SHIFT 5 6688 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF10EN_MASK 0x1 6689 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF10EN_SHIFT 6 6690 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_MASK 0x1 6691 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_SHIFT 7 6692 u8 flags5; 6693 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_MASK 0x1 6694 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_SHIFT 0 6695 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_MASK 0x1 6696 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_SHIFT 1 6697 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_MASK 0x1 6698 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_SHIFT 2 6699 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_MASK 0x1 6700 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_SHIFT 3 6701 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE5EN_MASK 0x1 6702 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE5EN_SHIFT 4 6703 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RQ_RULE_EN_MASK 0x1 6704 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RQ_RULE_EN_SHIFT 5 6705 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE7EN_MASK 0x1 6706 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE7EN_SHIFT 6 6707 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE8EN_MASK 0x1 6708 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE8EN_SHIFT 7 6709 __le32 psn_and_rxmit_id_echo; 6710 __le32 reg1; 6711 __le32 reg2; 6712 __le32 reg3; 6713 __le32 reg4; 6714 __le32 reg5; 6715 __le32 reg6; 6716 __le32 reg7; 6717 __le32 reg8; 6718 u8 tx_async_error_type; 6719 u8 byte3; 6720 __le16 rq_cons; 6721 u8 byte4; 6722 u8 byte5; 6723 __le16 rq_prod; 6724 __le16 conn_dpi; 6725 __le16 irq_cons; 6726 __le32 num_invlidated_mw; 6727 __le32 reg10; 6728 }; 6729 6730 struct ustorm_roce_req_conn_ag_ctx { 6731 u8 byte0; 6732 u8 byte1; 6733 u8 flags0; 6734 #define USTORM_ROCE_REQ_CONN_AG_CTX_BIT0_MASK 0x1 6735 #define USTORM_ROCE_REQ_CONN_AG_CTX_BIT0_SHIFT 0 6736 #define USTORM_ROCE_REQ_CONN_AG_CTX_BIT1_MASK 0x1 6737 #define USTORM_ROCE_REQ_CONN_AG_CTX_BIT1_SHIFT 1 6738 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF0_MASK 0x3 6739 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF0_SHIFT 2 6740 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF1_MASK 0x3 6741 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF1_SHIFT 4 6742 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF2_MASK 0x3 6743 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF2_SHIFT 6 6744 u8 flags1; 6745 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF3_MASK 0x3 6746 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF3_SHIFT 0 6747 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF4_MASK 0x3 6748 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF4_SHIFT 2 6749 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF5_MASK 0x3 6750 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF5_SHIFT 4 6751 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF6_MASK 0x3 6752 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF6_SHIFT 6 6753 u8 flags2; 6754 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF0EN_MASK 0x1 6755 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF0EN_SHIFT 0 6756 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF1EN_MASK 0x1 6757 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF1EN_SHIFT 1 6758 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF2EN_MASK 0x1 6759 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF2EN_SHIFT 2 6760 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF3EN_MASK 0x1 6761 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF3EN_SHIFT 3 6762 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF4EN_MASK 0x1 6763 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF4EN_SHIFT 4 6764 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF5EN_MASK 0x1 6765 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF5EN_SHIFT 5 6766 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF6EN_MASK 0x1 6767 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF6EN_SHIFT 6 6768 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_MASK 0x1 6769 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_SHIFT 7 6770 u8 flags3; 6771 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_MASK 0x1 6772 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_SHIFT 0 6773 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE2EN_MASK 0x1 6774 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE2EN_SHIFT 1 6775 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_MASK 0x1 6776 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_SHIFT 2 6777 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_MASK 0x1 6778 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_SHIFT 3 6779 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE5EN_MASK 0x1 6780 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE5EN_SHIFT 4 6781 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE6EN_MASK 0x1 6782 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE6EN_SHIFT 5 6783 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE7EN_MASK 0x1 6784 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE7EN_SHIFT 6 6785 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE8EN_MASK 0x1 6786 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE8EN_SHIFT 7 6787 u8 byte2; 6788 u8 byte3; 6789 __le16 word0; 6790 __le16 word1; 6791 __le32 reg0; 6792 __le32 reg1; 6793 __le32 reg2; 6794 __le32 reg3; 6795 __le16 word2; 6796 __le16 word3; 6797 }; 6798 6799 struct ustorm_roce_resp_conn_ag_ctx { 6800 u8 byte0; 6801 u8 byte1; 6802 u8 flags0; 6803 #define USTORM_ROCE_RESP_CONN_AG_CTX_BIT0_MASK 0x1 6804 #define USTORM_ROCE_RESP_CONN_AG_CTX_BIT0_SHIFT 0 6805 #define USTORM_ROCE_RESP_CONN_AG_CTX_BIT1_MASK 0x1 6806 #define USTORM_ROCE_RESP_CONN_AG_CTX_BIT1_SHIFT 1 6807 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF0_MASK 0x3 6808 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF0_SHIFT 2 6809 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF1_MASK 0x3 6810 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF1_SHIFT 4 6811 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF2_MASK 0x3 6812 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF2_SHIFT 6 6813 u8 flags1; 6814 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF3_MASK 0x3 6815 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF3_SHIFT 0 6816 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF4_MASK 0x3 6817 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF4_SHIFT 2 6818 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF5_MASK 0x3 6819 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF5_SHIFT 4 6820 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF6_MASK 0x3 6821 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF6_SHIFT 6 6822 u8 flags2; 6823 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_MASK 0x1 6824 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_SHIFT 0 6825 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF1EN_MASK 0x1 6826 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF1EN_SHIFT 1 6827 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF2EN_MASK 0x1 6828 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF2EN_SHIFT 2 6829 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF3EN_MASK 0x1 6830 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF3EN_SHIFT 3 6831 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF4EN_MASK 0x1 6832 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF4EN_SHIFT 4 6833 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF5EN_MASK 0x1 6834 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF5EN_SHIFT 5 6835 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF6EN_MASK 0x1 6836 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF6EN_SHIFT 6 6837 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_MASK 0x1 6838 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_SHIFT 7 6839 u8 flags3; 6840 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_MASK 0x1 6841 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_SHIFT 0 6842 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_MASK 0x1 6843 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_SHIFT 1 6844 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_MASK 0x1 6845 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_SHIFT 2 6846 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_MASK 0x1 6847 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_SHIFT 3 6848 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE5EN_MASK 0x1 6849 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE5EN_SHIFT 4 6850 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE6EN_MASK 0x1 6851 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE6EN_SHIFT 5 6852 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE7EN_MASK 0x1 6853 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE7EN_SHIFT 6 6854 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE8EN_MASK 0x1 6855 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE8EN_SHIFT 7 6856 u8 byte2; 6857 u8 byte3; 6858 __le16 word0; 6859 __le16 word1; 6860 __le32 reg0; 6861 __le32 reg1; 6862 __le32 reg2; 6863 __le32 reg3; 6864 __le16 word2; 6865 __le16 word3; 6866 }; 6867 6868 struct xstorm_roce_req_conn_ag_ctx { 6869 u8 reserved0; 6870 u8 state; 6871 u8 flags0; 6872 #define XSTORM_ROCE_REQ_CONN_AG_CTX_EXIST_IN_QM0_MASK 0x1 6873 #define XSTORM_ROCE_REQ_CONN_AG_CTX_EXIST_IN_QM0_SHIFT 0 6874 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED1_MASK 0x1 6875 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED1_SHIFT 1 6876 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED2_MASK 0x1 6877 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED2_SHIFT 2 6878 #define XSTORM_ROCE_REQ_CONN_AG_CTX_EXIST_IN_QM3_MASK 0x1 6879 #define XSTORM_ROCE_REQ_CONN_AG_CTX_EXIST_IN_QM3_SHIFT 3 6880 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED3_MASK 0x1 6881 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED3_SHIFT 4 6882 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED4_MASK 0x1 6883 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED4_SHIFT 5 6884 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED5_MASK 0x1 6885 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED5_SHIFT 6 6886 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED6_MASK 0x1 6887 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED6_SHIFT 7 6888 u8 flags1; 6889 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED7_MASK 0x1 6890 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED7_SHIFT 0 6891 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED8_MASK 0x1 6892 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED8_SHIFT 1 6893 #define XSTORM_ROCE_REQ_CONN_AG_CTX_BIT10_MASK 0x1 6894 #define XSTORM_ROCE_REQ_CONN_AG_CTX_BIT10_SHIFT 2 6895 #define XSTORM_ROCE_REQ_CONN_AG_CTX_BIT11_MASK 0x1 6896 #define XSTORM_ROCE_REQ_CONN_AG_CTX_BIT11_SHIFT 3 6897 #define XSTORM_ROCE_REQ_CONN_AG_CTX_BIT12_MASK 0x1 6898 #define XSTORM_ROCE_REQ_CONN_AG_CTX_BIT12_SHIFT 4 6899 #define XSTORM_ROCE_REQ_CONN_AG_CTX_BIT13_MASK 0x1 6900 #define XSTORM_ROCE_REQ_CONN_AG_CTX_BIT13_SHIFT 5 6901 #define XSTORM_ROCE_REQ_CONN_AG_CTX_ERROR_STATE_MASK 0x1 6902 #define XSTORM_ROCE_REQ_CONN_AG_CTX_ERROR_STATE_SHIFT 6 6903 #define XSTORM_ROCE_REQ_CONN_AG_CTX_YSTORM_FLUSH_MASK 0x1 6904 #define XSTORM_ROCE_REQ_CONN_AG_CTX_YSTORM_FLUSH_SHIFT 7 6905 u8 flags2; 6906 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF0_MASK 0x3 6907 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF0_SHIFT 0 6908 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF1_MASK 0x3 6909 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF1_SHIFT 2 6910 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF2_MASK 0x3 6911 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF2_SHIFT 4 6912 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF3_MASK 0x3 6913 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF3_SHIFT 6 6914 u8 flags3; 6915 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SQ_FLUSH_CF_MASK 0x3 6916 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SQ_FLUSH_CF_SHIFT 0 6917 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RX_ERROR_CF_MASK 0x3 6918 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RX_ERROR_CF_SHIFT 2 6919 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SND_RXMIT_CF_MASK 0x3 6920 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SND_RXMIT_CF_SHIFT 4 6921 #define XSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_Q0_CF_MASK 0x3 6922 #define XSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_Q0_CF_SHIFT 6 6923 u8 flags4; 6924 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF8_MASK 0x3 6925 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF8_SHIFT 0 6926 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF9_MASK 0x3 6927 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF9_SHIFT 2 6928 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF10_MASK 0x3 6929 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF10_SHIFT 4 6930 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF11_MASK 0x3 6931 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF11_SHIFT 6 6932 u8 flags5; 6933 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF12_MASK 0x3 6934 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF12_SHIFT 0 6935 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF13_MASK 0x3 6936 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF13_SHIFT 2 6937 #define XSTORM_ROCE_REQ_CONN_AG_CTX_FMR_ENDED_CF_MASK 0x3 6938 #define XSTORM_ROCE_REQ_CONN_AG_CTX_FMR_ENDED_CF_SHIFT 4 6939 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF15_MASK 0x3 6940 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF15_SHIFT 6 6941 u8 flags6; 6942 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF16_MASK 0x3 6943 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF16_SHIFT 0 6944 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF17_MASK 0x3 6945 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF17_SHIFT 2 6946 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF18_MASK 0x3 6947 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF18_SHIFT 4 6948 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF19_MASK 0x3 6949 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF19_SHIFT 6 6950 u8 flags7; 6951 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF20_MASK 0x3 6952 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF20_SHIFT 0 6953 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF21_MASK 0x3 6954 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF21_SHIFT 2 6955 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SLOW_PATH_MASK 0x3 6956 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SLOW_PATH_SHIFT 4 6957 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF0EN_MASK 0x1 6958 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF0EN_SHIFT 6 6959 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF1EN_MASK 0x1 6960 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF1EN_SHIFT 7 6961 u8 flags8; 6962 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF2EN_MASK 0x1 6963 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF2EN_SHIFT 0 6964 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF3EN_MASK 0x1 6965 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF3EN_SHIFT 1 6966 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SQ_FLUSH_CF_EN_MASK 0x1 6967 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SQ_FLUSH_CF_EN_SHIFT 2 6968 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RX_ERROR_CF_EN_MASK 0x1 6969 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RX_ERROR_CF_EN_SHIFT 3 6970 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SND_RXMIT_CF_EN_MASK 0x1 6971 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SND_RXMIT_CF_EN_SHIFT 4 6972 #define XSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_Q0_CF_EN_MASK 0x1 6973 #define XSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_Q0_CF_EN_SHIFT 5 6974 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF8EN_MASK 0x1 6975 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF8EN_SHIFT 6 6976 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF9EN_MASK 0x1 6977 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF9EN_SHIFT 7 6978 u8 flags9; 6979 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF10EN_MASK 0x1 6980 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF10EN_SHIFT 0 6981 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF11EN_MASK 0x1 6982 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF11EN_SHIFT 1 6983 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF12EN_MASK 0x1 6984 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF12EN_SHIFT 2 6985 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF13EN_MASK 0x1 6986 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF13EN_SHIFT 3 6987 #define XSTORM_ROCE_REQ_CONN_AG_CTX_FME_ENDED_CF_EN_MASK 0x1 6988 #define XSTORM_ROCE_REQ_CONN_AG_CTX_FME_ENDED_CF_EN_SHIFT 4 6989 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF15EN_MASK 0x1 6990 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF15EN_SHIFT 5 6991 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF16EN_MASK 0x1 6992 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF16EN_SHIFT 6 6993 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF17EN_MASK 0x1 6994 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF17EN_SHIFT 7 6995 u8 flags10; 6996 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF18EN_MASK 0x1 6997 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF18EN_SHIFT 0 6998 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF19EN_MASK 0x1 6999 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF19EN_SHIFT 1 7000 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF20EN_MASK 0x1 7001 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF20EN_SHIFT 2 7002 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF21EN_MASK 0x1 7003 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF21EN_SHIFT 3 7004 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SLOW_PATH_EN_MASK 0x1 7005 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SLOW_PATH_EN_SHIFT 4 7006 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF23EN_MASK 0x1 7007 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF23EN_SHIFT 5 7008 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_MASK 0x1 7009 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_SHIFT 6 7010 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_MASK 0x1 7011 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_SHIFT 7 7012 u8 flags11; 7013 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE2EN_MASK 0x1 7014 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE2EN_SHIFT 0 7015 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_MASK 0x1 7016 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_SHIFT 1 7017 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_MASK 0x1 7018 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_SHIFT 2 7019 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE5EN_MASK 0x1 7020 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE5EN_SHIFT 3 7021 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE6EN_MASK 0x1 7022 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE6EN_SHIFT 4 7023 #define XSTORM_ROCE_REQ_CONN_AG_CTX_E2E_CREDIT_RULE_EN_MASK 0x1 7024 #define XSTORM_ROCE_REQ_CONN_AG_CTX_E2E_CREDIT_RULE_EN_SHIFT 5 7025 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED1_MASK 0x1 7026 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED1_SHIFT 6 7027 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE9EN_MASK 0x1 7028 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE9EN_SHIFT 7 7029 u8 flags12; 7030 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SQ_PROD_EN_MASK 0x1 7031 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SQ_PROD_EN_SHIFT 0 7032 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE11EN_MASK 0x1 7033 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE11EN_SHIFT 1 7034 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED2_MASK 0x1 7035 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED2_SHIFT 2 7036 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED3_MASK 0x1 7037 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED3_SHIFT 3 7038 #define XSTORM_ROCE_REQ_CONN_AG_CTX_INV_FENCE_RULE_EN_MASK 0x1 7039 #define XSTORM_ROCE_REQ_CONN_AG_CTX_INV_FENCE_RULE_EN_SHIFT 4 7040 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE15EN_MASK 0x1 7041 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE15EN_SHIFT 5 7042 #define XSTORM_ROCE_REQ_CONN_AG_CTX_ORQ_FENCE_RULE_EN_MASK 0x1 7043 #define XSTORM_ROCE_REQ_CONN_AG_CTX_ORQ_FENCE_RULE_EN_SHIFT 6 7044 #define XSTORM_ROCE_REQ_CONN_AG_CTX_MAX_ORD_RULE_EN_MASK 0x1 7045 #define XSTORM_ROCE_REQ_CONN_AG_CTX_MAX_ORD_RULE_EN_SHIFT 7 7046 u8 flags13; 7047 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE18EN_MASK 0x1 7048 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE18EN_SHIFT 0 7049 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE19EN_MASK 0x1 7050 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE19EN_SHIFT 1 7051 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED4_MASK 0x1 7052 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED4_SHIFT 2 7053 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED5_MASK 0x1 7054 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED5_SHIFT 3 7055 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED6_MASK 0x1 7056 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED6_SHIFT 4 7057 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED7_MASK 0x1 7058 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED7_SHIFT 5 7059 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED8_MASK 0x1 7060 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED8_SHIFT 6 7061 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED9_MASK 0x1 7062 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED9_SHIFT 7 7063 u8 flags14; 7064 #define XSTORM_ROCE_REQ_CONN_AG_CTX_MIGRATION_FLAG_MASK 0x1 7065 #define XSTORM_ROCE_REQ_CONN_AG_CTX_MIGRATION_FLAG_SHIFT 0 7066 #define XSTORM_ROCE_REQ_CONN_AG_CTX_BIT17_MASK 0x1 7067 #define XSTORM_ROCE_REQ_CONN_AG_CTX_BIT17_SHIFT 1 7068 #define XSTORM_ROCE_REQ_CONN_AG_CTX_DPM_PORT_NUM_MASK 0x3 7069 #define XSTORM_ROCE_REQ_CONN_AG_CTX_DPM_PORT_NUM_SHIFT 2 7070 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED_MASK 0x1 7071 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED_SHIFT 4 7072 #define XSTORM_ROCE_REQ_CONN_AG_CTX_ROCE_EDPM_ENABLE_MASK 0x1 7073 #define XSTORM_ROCE_REQ_CONN_AG_CTX_ROCE_EDPM_ENABLE_SHIFT 5 7074 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF23_MASK 0x3 7075 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF23_SHIFT 6 7076 u8 byte2; 7077 __le16 physical_q0; 7078 __le16 word1; 7079 __le16 sq_cmp_cons; 7080 __le16 sq_cons; 7081 __le16 sq_prod; 7082 __le16 word5; 7083 __le16 conn_dpi; 7084 u8 byte3; 7085 u8 byte4; 7086 u8 byte5; 7087 u8 byte6; 7088 __le32 lsn; 7089 __le32 ssn; 7090 __le32 snd_una_psn; 7091 __le32 snd_nxt_psn; 7092 __le32 reg4; 7093 __le32 orq_cons_th; 7094 __le32 orq_cons; 7095 }; 7096 7097 struct xstorm_roce_resp_conn_ag_ctx { 7098 u8 reserved0; 7099 u8 state; 7100 u8 flags0; 7101 #define XSTORM_ROCE_RESP_CONN_AG_CTX_EXIST_IN_QM0_MASK 0x1 7102 #define XSTORM_ROCE_RESP_CONN_AG_CTX_EXIST_IN_QM0_SHIFT 0 7103 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED1_MASK 0x1 7104 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED1_SHIFT 1 7105 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED2_MASK 0x1 7106 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED2_SHIFT 2 7107 #define XSTORM_ROCE_RESP_CONN_AG_CTX_EXIST_IN_QM3_MASK 0x1 7108 #define XSTORM_ROCE_RESP_CONN_AG_CTX_EXIST_IN_QM3_SHIFT 3 7109 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED3_MASK 0x1 7110 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED3_SHIFT 4 7111 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED4_MASK 0x1 7112 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED4_SHIFT 5 7113 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED5_MASK 0x1 7114 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED5_SHIFT 6 7115 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED6_MASK 0x1 7116 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED6_SHIFT 7 7117 u8 flags1; 7118 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED7_MASK 0x1 7119 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED7_SHIFT 0 7120 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED8_MASK 0x1 7121 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED8_SHIFT 1 7122 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT10_MASK 0x1 7123 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT10_SHIFT 2 7124 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT11_MASK 0x1 7125 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT11_SHIFT 3 7126 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT12_MASK 0x1 7127 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT12_SHIFT 4 7128 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT13_MASK 0x1 7129 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT13_SHIFT 5 7130 #define XSTORM_ROCE_RESP_CONN_AG_CTX_ERROR_STATE_MASK 0x1 7131 #define XSTORM_ROCE_RESP_CONN_AG_CTX_ERROR_STATE_SHIFT 6 7132 #define XSTORM_ROCE_RESP_CONN_AG_CTX_YSTORM_FLUSH_MASK 0x1 7133 #define XSTORM_ROCE_RESP_CONN_AG_CTX_YSTORM_FLUSH_SHIFT 7 7134 u8 flags2; 7135 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF0_MASK 0x3 7136 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF0_SHIFT 0 7137 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF1_MASK 0x3 7138 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF1_SHIFT 2 7139 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF2_MASK 0x3 7140 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF2_SHIFT 4 7141 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF3_MASK 0x3 7142 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF3_SHIFT 6 7143 u8 flags3; 7144 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RXMIT_CF_MASK 0x3 7145 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RXMIT_CF_SHIFT 0 7146 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RX_ERROR_CF_MASK 0x3 7147 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RX_ERROR_CF_SHIFT 2 7148 #define XSTORM_ROCE_RESP_CONN_AG_CTX_FORCE_ACK_CF_MASK 0x3 7149 #define XSTORM_ROCE_RESP_CONN_AG_CTX_FORCE_ACK_CF_SHIFT 4 7150 #define XSTORM_ROCE_RESP_CONN_AG_CTX_FLUSH_Q0_CF_MASK 0x3 7151 #define XSTORM_ROCE_RESP_CONN_AG_CTX_FLUSH_Q0_CF_SHIFT 6 7152 u8 flags4; 7153 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF8_MASK 0x3 7154 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF8_SHIFT 0 7155 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF9_MASK 0x3 7156 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF9_SHIFT 2 7157 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF10_MASK 0x3 7158 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF10_SHIFT 4 7159 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF11_MASK 0x3 7160 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF11_SHIFT 6 7161 u8 flags5; 7162 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF12_MASK 0x3 7163 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF12_SHIFT 0 7164 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF13_MASK 0x3 7165 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF13_SHIFT 2 7166 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF14_MASK 0x3 7167 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF14_SHIFT 4 7168 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF15_MASK 0x3 7169 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF15_SHIFT 6 7170 u8 flags6; 7171 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF16_MASK 0x3 7172 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF16_SHIFT 0 7173 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF17_MASK 0x3 7174 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF17_SHIFT 2 7175 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF18_MASK 0x3 7176 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF18_SHIFT 4 7177 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF19_MASK 0x3 7178 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF19_SHIFT 6 7179 u8 flags7; 7180 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF20_MASK 0x3 7181 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF20_SHIFT 0 7182 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF21_MASK 0x3 7183 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF21_SHIFT 2 7184 #define XSTORM_ROCE_RESP_CONN_AG_CTX_SLOW_PATH_MASK 0x3 7185 #define XSTORM_ROCE_RESP_CONN_AG_CTX_SLOW_PATH_SHIFT 4 7186 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_MASK 0x1 7187 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_SHIFT 6 7188 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF1EN_MASK 0x1 7189 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF1EN_SHIFT 7 7190 u8 flags8; 7191 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF2EN_MASK 0x1 7192 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF2EN_SHIFT 0 7193 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF3EN_MASK 0x1 7194 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF3EN_SHIFT 1 7195 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RXMIT_CF_EN_MASK 0x1 7196 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RXMIT_CF_EN_SHIFT 2 7197 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RX_ERROR_CF_EN_MASK 0x1 7198 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RX_ERROR_CF_EN_SHIFT 3 7199 #define XSTORM_ROCE_RESP_CONN_AG_CTX_FORCE_ACK_CF_EN_MASK 0x1 7200 #define XSTORM_ROCE_RESP_CONN_AG_CTX_FORCE_ACK_CF_EN_SHIFT 4 7201 #define XSTORM_ROCE_RESP_CONN_AG_CTX_FLUSH_Q0_CF_EN_MASK 0x1 7202 #define XSTORM_ROCE_RESP_CONN_AG_CTX_FLUSH_Q0_CF_EN_SHIFT 5 7203 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF8EN_MASK 0x1 7204 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF8EN_SHIFT 6 7205 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF9EN_MASK 0x1 7206 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF9EN_SHIFT 7 7207 u8 flags9; 7208 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF10EN_MASK 0x1 7209 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF10EN_SHIFT 0 7210 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF11EN_MASK 0x1 7211 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF11EN_SHIFT 1 7212 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF12EN_MASK 0x1 7213 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF12EN_SHIFT 2 7214 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF13EN_MASK 0x1 7215 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF13EN_SHIFT 3 7216 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF14EN_MASK 0x1 7217 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF14EN_SHIFT 4 7218 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF15EN_MASK 0x1 7219 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF15EN_SHIFT 5 7220 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF16EN_MASK 0x1 7221 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF16EN_SHIFT 6 7222 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF17EN_MASK 0x1 7223 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF17EN_SHIFT 7 7224 u8 flags10; 7225 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF18EN_MASK 0x1 7226 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF18EN_SHIFT 0 7227 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF19EN_MASK 0x1 7228 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF19EN_SHIFT 1 7229 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF20EN_MASK 0x1 7230 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF20EN_SHIFT 2 7231 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF21EN_MASK 0x1 7232 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF21EN_SHIFT 3 7233 #define XSTORM_ROCE_RESP_CONN_AG_CTX_SLOW_PATH_EN_MASK 0x1 7234 #define XSTORM_ROCE_RESP_CONN_AG_CTX_SLOW_PATH_EN_SHIFT 4 7235 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF23EN_MASK 0x1 7236 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF23EN_SHIFT 5 7237 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_MASK 0x1 7238 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_SHIFT 6 7239 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_MASK 0x1 7240 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_SHIFT 7 7241 u8 flags11; 7242 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_MASK 0x1 7243 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_SHIFT 0 7244 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_MASK 0x1 7245 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_SHIFT 1 7246 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_MASK 0x1 7247 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_SHIFT 2 7248 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE5EN_MASK 0x1 7249 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE5EN_SHIFT 3 7250 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE6EN_MASK 0x1 7251 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE6EN_SHIFT 4 7252 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE7EN_MASK 0x1 7253 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE7EN_SHIFT 5 7254 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED1_MASK 0x1 7255 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED1_SHIFT 6 7256 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE9EN_MASK 0x1 7257 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE9EN_SHIFT 7 7258 u8 flags12; 7259 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE10EN_MASK 0x1 7260 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE10EN_SHIFT 0 7261 #define XSTORM_ROCE_RESP_CONN_AG_CTX_IRQ_PROD_RULE_EN_MASK 0x1 7262 #define XSTORM_ROCE_RESP_CONN_AG_CTX_IRQ_PROD_RULE_EN_SHIFT 1 7263 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED2_MASK 0x1 7264 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED2_SHIFT 2 7265 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED3_MASK 0x1 7266 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED3_SHIFT 3 7267 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE14EN_MASK 0x1 7268 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE14EN_SHIFT 4 7269 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE15EN_MASK 0x1 7270 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE15EN_SHIFT 5 7271 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE16EN_MASK 0x1 7272 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE16EN_SHIFT 6 7273 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE17EN_MASK 0x1 7274 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE17EN_SHIFT 7 7275 u8 flags13; 7276 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE18EN_MASK 0x1 7277 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE18EN_SHIFT 0 7278 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE19EN_MASK 0x1 7279 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE19EN_SHIFT 1 7280 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED4_MASK 0x1 7281 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED4_SHIFT 2 7282 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED5_MASK 0x1 7283 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED5_SHIFT 3 7284 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED6_MASK 0x1 7285 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED6_SHIFT 4 7286 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED7_MASK 0x1 7287 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED7_SHIFT 5 7288 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED8_MASK 0x1 7289 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED8_SHIFT 6 7290 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED9_MASK 0x1 7291 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED9_SHIFT 7 7292 u8 flags14; 7293 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT16_MASK 0x1 7294 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT16_SHIFT 0 7295 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT17_MASK 0x1 7296 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT17_SHIFT 1 7297 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT18_MASK 0x1 7298 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT18_SHIFT 2 7299 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT19_MASK 0x1 7300 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT19_SHIFT 3 7301 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT20_MASK 0x1 7302 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT20_SHIFT 4 7303 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT21_MASK 0x1 7304 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT21_SHIFT 5 7305 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF23_MASK 0x3 7306 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF23_SHIFT 6 7307 u8 byte2; 7308 __le16 physical_q0; 7309 __le16 word1; 7310 __le16 irq_prod; 7311 __le16 word3; 7312 __le16 word4; 7313 __le16 word5; 7314 __le16 irq_cons; 7315 u8 rxmit_opcode; 7316 u8 byte4; 7317 u8 byte5; 7318 u8 byte6; 7319 __le32 rxmit_psn_and_id; 7320 __le32 rxmit_bytes_length; 7321 __le32 psn; 7322 __le32 reg3; 7323 __le32 reg4; 7324 __le32 reg5; 7325 __le32 msn_and_syndrome; 7326 }; 7327 7328 struct ystorm_roce_req_conn_ag_ctx { 7329 u8 byte0; 7330 u8 byte1; 7331 u8 flags0; 7332 #define YSTORM_ROCE_REQ_CONN_AG_CTX_BIT0_MASK 0x1 7333 #define YSTORM_ROCE_REQ_CONN_AG_CTX_BIT0_SHIFT 0 7334 #define YSTORM_ROCE_REQ_CONN_AG_CTX_BIT1_MASK 0x1 7335 #define YSTORM_ROCE_REQ_CONN_AG_CTX_BIT1_SHIFT 1 7336 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF0_MASK 0x3 7337 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF0_SHIFT 2 7338 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF1_MASK 0x3 7339 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF1_SHIFT 4 7340 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF2_MASK 0x3 7341 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF2_SHIFT 6 7342 u8 flags1; 7343 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF0EN_MASK 0x1 7344 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF0EN_SHIFT 0 7345 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF1EN_MASK 0x1 7346 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF1EN_SHIFT 1 7347 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF2EN_MASK 0x1 7348 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF2EN_SHIFT 2 7349 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_MASK 0x1 7350 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_SHIFT 3 7351 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_MASK 0x1 7352 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_SHIFT 4 7353 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE2EN_MASK 0x1 7354 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE2EN_SHIFT 5 7355 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_MASK 0x1 7356 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_SHIFT 6 7357 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_MASK 0x1 7358 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_SHIFT 7 7359 u8 byte2; 7360 u8 byte3; 7361 __le16 word0; 7362 __le32 reg0; 7363 __le32 reg1; 7364 __le16 word1; 7365 __le16 word2; 7366 __le16 word3; 7367 __le16 word4; 7368 __le32 reg2; 7369 __le32 reg3; 7370 }; 7371 7372 struct ystorm_roce_resp_conn_ag_ctx { 7373 u8 byte0; 7374 u8 byte1; 7375 u8 flags0; 7376 #define YSTORM_ROCE_RESP_CONN_AG_CTX_BIT0_MASK 0x1 7377 #define YSTORM_ROCE_RESP_CONN_AG_CTX_BIT0_SHIFT 0 7378 #define YSTORM_ROCE_RESP_CONN_AG_CTX_BIT1_MASK 0x1 7379 #define YSTORM_ROCE_RESP_CONN_AG_CTX_BIT1_SHIFT 1 7380 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF0_MASK 0x3 7381 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF0_SHIFT 2 7382 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF1_MASK 0x3 7383 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF1_SHIFT 4 7384 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF2_MASK 0x3 7385 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF2_SHIFT 6 7386 u8 flags1; 7387 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_MASK 0x1 7388 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_SHIFT 0 7389 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF1EN_MASK 0x1 7390 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF1EN_SHIFT 1 7391 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF2EN_MASK 0x1 7392 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF2EN_SHIFT 2 7393 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_MASK 0x1 7394 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_SHIFT 3 7395 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_MASK 0x1 7396 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_SHIFT 4 7397 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_MASK 0x1 7398 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_SHIFT 5 7399 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_MASK 0x1 7400 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_SHIFT 6 7401 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_MASK 0x1 7402 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_SHIFT 7 7403 u8 byte2; 7404 u8 byte3; 7405 __le16 word0; 7406 __le32 reg0; 7407 __le32 reg1; 7408 __le16 word1; 7409 __le16 word2; 7410 __le16 word3; 7411 __le16 word4; 7412 __le32 reg2; 7413 __le32 reg3; 7414 }; 7415 7416 struct ystorm_fcoe_conn_st_ctx { 7417 u8 func_mode; 7418 u8 cos; 7419 u8 conf_version; 7420 u8 eth_hdr_size; 7421 __le16 stat_ram_addr; 7422 __le16 mtu; 7423 __le16 max_fc_payload_len; 7424 __le16 tx_max_fc_pay_len; 7425 u8 fcp_cmd_size; 7426 u8 fcp_rsp_size; 7427 __le16 mss; 7428 struct regpair reserved; 7429 u8 protection_info_flags; 7430 #define YSTORM_FCOE_CONN_ST_CTX_SUPPORT_PROTECTION_MASK 0x1 7431 #define YSTORM_FCOE_CONN_ST_CTX_SUPPORT_PROTECTION_SHIFT 0 7432 #define YSTORM_FCOE_CONN_ST_CTX_VALID_MASK 0x1 7433 #define YSTORM_FCOE_CONN_ST_CTX_VALID_SHIFT 1 7434 #define YSTORM_FCOE_CONN_ST_CTX_RESERVED1_MASK 0x3F 7435 #define YSTORM_FCOE_CONN_ST_CTX_RESERVED1_SHIFT 2 7436 u8 dst_protection_per_mss; 7437 u8 src_protection_per_mss; 7438 u8 ptu_log_page_size; 7439 u8 flags; 7440 #define YSTORM_FCOE_CONN_ST_CTX_INNER_VLAN_FLAG_MASK 0x1 7441 #define YSTORM_FCOE_CONN_ST_CTX_INNER_VLAN_FLAG_SHIFT 0 7442 #define YSTORM_FCOE_CONN_ST_CTX_OUTER_VLAN_FLAG_MASK 0x1 7443 #define YSTORM_FCOE_CONN_ST_CTX_OUTER_VLAN_FLAG_SHIFT 1 7444 #define YSTORM_FCOE_CONN_ST_CTX_RSRV_MASK 0x3F 7445 #define YSTORM_FCOE_CONN_ST_CTX_RSRV_SHIFT 2 7446 u8 fcp_xfer_size; 7447 u8 reserved3[2]; 7448 }; 7449 7450 struct fcoe_vlan_fields { 7451 __le16 fields; 7452 #define FCOE_VLAN_FIELDS_VID_MASK 0xFFF 7453 #define FCOE_VLAN_FIELDS_VID_SHIFT 0 7454 #define FCOE_VLAN_FIELDS_CLI_MASK 0x1 7455 #define FCOE_VLAN_FIELDS_CLI_SHIFT 12 7456 #define FCOE_VLAN_FIELDS_PRI_MASK 0x7 7457 #define FCOE_VLAN_FIELDS_PRI_SHIFT 13 7458 }; 7459 7460 union fcoe_vlan_field_union { 7461 struct fcoe_vlan_fields fields; 7462 __le16 val; 7463 }; 7464 7465 union fcoe_vlan_vif_field_union { 7466 union fcoe_vlan_field_union vlan; 7467 __le16 vif; 7468 }; 7469 7470 struct pstorm_fcoe_eth_context_section { 7471 u8 remote_addr_3; 7472 u8 remote_addr_2; 7473 u8 remote_addr_1; 7474 u8 remote_addr_0; 7475 u8 local_addr_1; 7476 u8 local_addr_0; 7477 u8 remote_addr_5; 7478 u8 remote_addr_4; 7479 u8 local_addr_5; 7480 u8 local_addr_4; 7481 u8 local_addr_3; 7482 u8 local_addr_2; 7483 union fcoe_vlan_vif_field_union vif_outer_vlan; 7484 __le16 vif_outer_eth_type; 7485 union fcoe_vlan_vif_field_union inner_vlan; 7486 __le16 inner_eth_type; 7487 }; 7488 7489 struct pstorm_fcoe_conn_st_ctx { 7490 u8 func_mode; 7491 u8 cos; 7492 u8 conf_version; 7493 u8 rsrv; 7494 __le16 stat_ram_addr; 7495 __le16 mss; 7496 struct regpair abts_cleanup_addr; 7497 struct pstorm_fcoe_eth_context_section eth; 7498 u8 sid_2; 7499 u8 sid_1; 7500 u8 sid_0; 7501 u8 flags; 7502 #define PSTORM_FCOE_CONN_ST_CTX_VNTAG_VLAN_MASK 0x1 7503 #define PSTORM_FCOE_CONN_ST_CTX_VNTAG_VLAN_SHIFT 0 7504 #define PSTORM_FCOE_CONN_ST_CTX_SUPPORT_REC_RR_TOV_MASK 0x1 7505 #define PSTORM_FCOE_CONN_ST_CTX_SUPPORT_REC_RR_TOV_SHIFT 1 7506 #define PSTORM_FCOE_CONN_ST_CTX_INNER_VLAN_FLAG_MASK 0x1 7507 #define PSTORM_FCOE_CONN_ST_CTX_INNER_VLAN_FLAG_SHIFT 2 7508 #define PSTORM_FCOE_CONN_ST_CTX_OUTER_VLAN_FLAG_MASK 0x1 7509 #define PSTORM_FCOE_CONN_ST_CTX_OUTER_VLAN_FLAG_SHIFT 3 7510 #define PSTORM_FCOE_CONN_ST_CTX_RESERVED_MASK 0xF 7511 #define PSTORM_FCOE_CONN_ST_CTX_RESERVED_SHIFT 4 7512 u8 did_2; 7513 u8 did_1; 7514 u8 did_0; 7515 u8 src_mac_index; 7516 __le16 rec_rr_tov_val; 7517 u8 q_relative_offset; 7518 u8 reserved1; 7519 }; 7520 7521 struct xstorm_fcoe_conn_st_ctx { 7522 u8 func_mode; 7523 u8 src_mac_index; 7524 u8 conf_version; 7525 u8 cached_wqes_avail; 7526 __le16 stat_ram_addr; 7527 u8 flags; 7528 #define XSTORM_FCOE_CONN_ST_CTX_SQ_DEFERRED_MASK 0x1 7529 #define XSTORM_FCOE_CONN_ST_CTX_SQ_DEFERRED_SHIFT 0 7530 #define XSTORM_FCOE_CONN_ST_CTX_INNER_VLAN_FLAG_MASK 0x1 7531 #define XSTORM_FCOE_CONN_ST_CTX_INNER_VLAN_FLAG_SHIFT 1 7532 #define XSTORM_FCOE_CONN_ST_CTX_INNER_VLAN_FLAG_ORIG_MASK 0x1 7533 #define XSTORM_FCOE_CONN_ST_CTX_INNER_VLAN_FLAG_ORIG_SHIFT 2 7534 #define XSTORM_FCOE_CONN_ST_CTX_LAST_QUEUE_HANDLED_MASK 0x3 7535 #define XSTORM_FCOE_CONN_ST_CTX_LAST_QUEUE_HANDLED_SHIFT 3 7536 #define XSTORM_FCOE_CONN_ST_CTX_RSRV_MASK 0x7 7537 #define XSTORM_FCOE_CONN_ST_CTX_RSRV_SHIFT 5 7538 u8 cached_wqes_offset; 7539 u8 reserved2; 7540 u8 eth_hdr_size; 7541 u8 seq_id; 7542 u8 max_conc_seqs; 7543 __le16 num_pages_in_pbl; 7544 __le16 reserved; 7545 struct regpair sq_pbl_addr; 7546 struct regpair sq_curr_page_addr; 7547 struct regpair sq_next_page_addr; 7548 struct regpair xferq_pbl_addr; 7549 struct regpair xferq_curr_page_addr; 7550 struct regpair xferq_next_page_addr; 7551 struct regpair respq_pbl_addr; 7552 struct regpair respq_curr_page_addr; 7553 struct regpair respq_next_page_addr; 7554 __le16 mtu; 7555 __le16 tx_max_fc_pay_len; 7556 __le16 max_fc_payload_len; 7557 __le16 min_frame_size; 7558 __le16 sq_pbl_next_index; 7559 __le16 respq_pbl_next_index; 7560 u8 fcp_cmd_byte_credit; 7561 u8 fcp_rsp_byte_credit; 7562 __le16 protection_info; 7563 #define XSTORM_FCOE_CONN_ST_CTX_PROTECTION_PERF_MASK 0x1 7564 #define XSTORM_FCOE_CONN_ST_CTX_PROTECTION_PERF_SHIFT 0 7565 #define XSTORM_FCOE_CONN_ST_CTX_SUPPORT_PROTECTION_MASK 0x1 7566 #define XSTORM_FCOE_CONN_ST_CTX_SUPPORT_PROTECTION_SHIFT 1 7567 #define XSTORM_FCOE_CONN_ST_CTX_VALID_MASK 0x1 7568 #define XSTORM_FCOE_CONN_ST_CTX_VALID_SHIFT 2 7569 #define XSTORM_FCOE_CONN_ST_CTX_FRAME_PROT_ALIGNED_MASK 0x1 7570 #define XSTORM_FCOE_CONN_ST_CTX_FRAME_PROT_ALIGNED_SHIFT 3 7571 #define XSTORM_FCOE_CONN_ST_CTX_RESERVED3_MASK 0xF 7572 #define XSTORM_FCOE_CONN_ST_CTX_RESERVED3_SHIFT 4 7573 #define XSTORM_FCOE_CONN_ST_CTX_DST_PROTECTION_PER_MSS_MASK 0xFF 7574 #define XSTORM_FCOE_CONN_ST_CTX_DST_PROTECTION_PER_MSS_SHIFT 8 7575 __le16 xferq_pbl_next_index; 7576 __le16 page_size; 7577 u8 mid_seq; 7578 u8 fcp_xfer_byte_credit; 7579 u8 reserved1[2]; 7580 struct fcoe_wqe cached_wqes[16]; 7581 }; 7582 7583 struct xstorm_fcoe_conn_ag_ctx { 7584 u8 reserved0; 7585 u8 fcoe_state; 7586 u8 flags0; 7587 #define XSTORM_FCOE_CONN_AG_CTX_EXIST_IN_QM0_MASK 0x1 7588 #define XSTORM_FCOE_CONN_AG_CTX_EXIST_IN_QM0_SHIFT 0 7589 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED1_MASK 0x1 7590 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED1_SHIFT 1 7591 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED2_MASK 0x1 7592 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED2_SHIFT 2 7593 #define XSTORM_FCOE_CONN_AG_CTX_EXIST_IN_QM3_MASK 0x1 7594 #define XSTORM_FCOE_CONN_AG_CTX_EXIST_IN_QM3_SHIFT 3 7595 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED3_MASK 0x1 7596 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED3_SHIFT 4 7597 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED4_MASK 0x1 7598 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED4_SHIFT 5 7599 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED5_MASK 0x1 7600 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED5_SHIFT 6 7601 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED6_MASK 0x1 7602 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED6_SHIFT 7 7603 u8 flags1; 7604 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED7_MASK 0x1 7605 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED7_SHIFT 0 7606 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED8_MASK 0x1 7607 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED8_SHIFT 1 7608 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED9_MASK 0x1 7609 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED9_SHIFT 2 7610 #define XSTORM_FCOE_CONN_AG_CTX_BIT11_MASK 0x1 7611 #define XSTORM_FCOE_CONN_AG_CTX_BIT11_SHIFT 3 7612 #define XSTORM_FCOE_CONN_AG_CTX_BIT12_MASK 0x1 7613 #define XSTORM_FCOE_CONN_AG_CTX_BIT12_SHIFT 4 7614 #define XSTORM_FCOE_CONN_AG_CTX_BIT13_MASK 0x1 7615 #define XSTORM_FCOE_CONN_AG_CTX_BIT13_SHIFT 5 7616 #define XSTORM_FCOE_CONN_AG_CTX_BIT14_MASK 0x1 7617 #define XSTORM_FCOE_CONN_AG_CTX_BIT14_SHIFT 6 7618 #define XSTORM_FCOE_CONN_AG_CTX_BIT15_MASK 0x1 7619 #define XSTORM_FCOE_CONN_AG_CTX_BIT15_SHIFT 7 7620 u8 flags2; 7621 #define XSTORM_FCOE_CONN_AG_CTX_CF0_MASK 0x3 7622 #define XSTORM_FCOE_CONN_AG_CTX_CF0_SHIFT 0 7623 #define XSTORM_FCOE_CONN_AG_CTX_CF1_MASK 0x3 7624 #define XSTORM_FCOE_CONN_AG_CTX_CF1_SHIFT 2 7625 #define XSTORM_FCOE_CONN_AG_CTX_CF2_MASK 0x3 7626 #define XSTORM_FCOE_CONN_AG_CTX_CF2_SHIFT 4 7627 #define XSTORM_FCOE_CONN_AG_CTX_CF3_MASK 0x3 7628 #define XSTORM_FCOE_CONN_AG_CTX_CF3_SHIFT 6 7629 u8 flags3; 7630 #define XSTORM_FCOE_CONN_AG_CTX_CF4_MASK 0x3 7631 #define XSTORM_FCOE_CONN_AG_CTX_CF4_SHIFT 0 7632 #define XSTORM_FCOE_CONN_AG_CTX_CF5_MASK 0x3 7633 #define XSTORM_FCOE_CONN_AG_CTX_CF5_SHIFT 2 7634 #define XSTORM_FCOE_CONN_AG_CTX_CF6_MASK 0x3 7635 #define XSTORM_FCOE_CONN_AG_CTX_CF6_SHIFT 4 7636 #define XSTORM_FCOE_CONN_AG_CTX_CF7_MASK 0x3 7637 #define XSTORM_FCOE_CONN_AG_CTX_CF7_SHIFT 6 7638 u8 flags4; 7639 #define XSTORM_FCOE_CONN_AG_CTX_CF8_MASK 0x3 7640 #define XSTORM_FCOE_CONN_AG_CTX_CF8_SHIFT 0 7641 #define XSTORM_FCOE_CONN_AG_CTX_CF9_MASK 0x3 7642 #define XSTORM_FCOE_CONN_AG_CTX_CF9_SHIFT 2 7643 #define XSTORM_FCOE_CONN_AG_CTX_CF10_MASK 0x3 7644 #define XSTORM_FCOE_CONN_AG_CTX_CF10_SHIFT 4 7645 #define XSTORM_FCOE_CONN_AG_CTX_CF11_MASK 0x3 7646 #define XSTORM_FCOE_CONN_AG_CTX_CF11_SHIFT 6 7647 u8 flags5; 7648 #define XSTORM_FCOE_CONN_AG_CTX_CF12_MASK 0x3 7649 #define XSTORM_FCOE_CONN_AG_CTX_CF12_SHIFT 0 7650 #define XSTORM_FCOE_CONN_AG_CTX_CF13_MASK 0x3 7651 #define XSTORM_FCOE_CONN_AG_CTX_CF13_SHIFT 2 7652 #define XSTORM_FCOE_CONN_AG_CTX_CF14_MASK 0x3 7653 #define XSTORM_FCOE_CONN_AG_CTX_CF14_SHIFT 4 7654 #define XSTORM_FCOE_CONN_AG_CTX_CF15_MASK 0x3 7655 #define XSTORM_FCOE_CONN_AG_CTX_CF15_SHIFT 6 7656 u8 flags6; 7657 #define XSTORM_FCOE_CONN_AG_CTX_CF16_MASK 0x3 7658 #define XSTORM_FCOE_CONN_AG_CTX_CF16_SHIFT 0 7659 #define XSTORM_FCOE_CONN_AG_CTX_CF17_MASK 0x3 7660 #define XSTORM_FCOE_CONN_AG_CTX_CF17_SHIFT 2 7661 #define XSTORM_FCOE_CONN_AG_CTX_CF18_MASK 0x3 7662 #define XSTORM_FCOE_CONN_AG_CTX_CF18_SHIFT 4 7663 #define XSTORM_FCOE_CONN_AG_CTX_DQ_CF_MASK 0x3 7664 #define XSTORM_FCOE_CONN_AG_CTX_DQ_CF_SHIFT 6 7665 u8 flags7; 7666 #define XSTORM_FCOE_CONN_AG_CTX_FLUSH_Q0_MASK 0x3 7667 #define XSTORM_FCOE_CONN_AG_CTX_FLUSH_Q0_SHIFT 0 7668 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED10_MASK 0x3 7669 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED10_SHIFT 2 7670 #define XSTORM_FCOE_CONN_AG_CTX_SLOW_PATH_MASK 0x3 7671 #define XSTORM_FCOE_CONN_AG_CTX_SLOW_PATH_SHIFT 4 7672 #define XSTORM_FCOE_CONN_AG_CTX_CF0EN_MASK 0x1 7673 #define XSTORM_FCOE_CONN_AG_CTX_CF0EN_SHIFT 6 7674 #define XSTORM_FCOE_CONN_AG_CTX_CF1EN_MASK 0x1 7675 #define XSTORM_FCOE_CONN_AG_CTX_CF1EN_SHIFT 7 7676 u8 flags8; 7677 #define XSTORM_FCOE_CONN_AG_CTX_CF2EN_MASK 0x1 7678 #define XSTORM_FCOE_CONN_AG_CTX_CF2EN_SHIFT 0 7679 #define XSTORM_FCOE_CONN_AG_CTX_CF3EN_MASK 0x1 7680 #define XSTORM_FCOE_CONN_AG_CTX_CF3EN_SHIFT 1 7681 #define XSTORM_FCOE_CONN_AG_CTX_CF4EN_MASK 0x1 7682 #define XSTORM_FCOE_CONN_AG_CTX_CF4EN_SHIFT 2 7683 #define XSTORM_FCOE_CONN_AG_CTX_CF5EN_MASK 0x1 7684 #define XSTORM_FCOE_CONN_AG_CTX_CF5EN_SHIFT 3 7685 #define XSTORM_FCOE_CONN_AG_CTX_CF6EN_MASK 0x1 7686 #define XSTORM_FCOE_CONN_AG_CTX_CF6EN_SHIFT 4 7687 #define XSTORM_FCOE_CONN_AG_CTX_CF7EN_MASK 0x1 7688 #define XSTORM_FCOE_CONN_AG_CTX_CF7EN_SHIFT 5 7689 #define XSTORM_FCOE_CONN_AG_CTX_CF8EN_MASK 0x1 7690 #define XSTORM_FCOE_CONN_AG_CTX_CF8EN_SHIFT 6 7691 #define XSTORM_FCOE_CONN_AG_CTX_CF9EN_MASK 0x1 7692 #define XSTORM_FCOE_CONN_AG_CTX_CF9EN_SHIFT 7 7693 u8 flags9; 7694 #define XSTORM_FCOE_CONN_AG_CTX_CF10EN_MASK 0x1 7695 #define XSTORM_FCOE_CONN_AG_CTX_CF10EN_SHIFT 0 7696 #define XSTORM_FCOE_CONN_AG_CTX_CF11EN_MASK 0x1 7697 #define XSTORM_FCOE_CONN_AG_CTX_CF11EN_SHIFT 1 7698 #define XSTORM_FCOE_CONN_AG_CTX_CF12EN_MASK 0x1 7699 #define XSTORM_FCOE_CONN_AG_CTX_CF12EN_SHIFT 2 7700 #define XSTORM_FCOE_CONN_AG_CTX_CF13EN_MASK 0x1 7701 #define XSTORM_FCOE_CONN_AG_CTX_CF13EN_SHIFT 3 7702 #define XSTORM_FCOE_CONN_AG_CTX_CF14EN_MASK 0x1 7703 #define XSTORM_FCOE_CONN_AG_CTX_CF14EN_SHIFT 4 7704 #define XSTORM_FCOE_CONN_AG_CTX_CF15EN_MASK 0x1 7705 #define XSTORM_FCOE_CONN_AG_CTX_CF15EN_SHIFT 5 7706 #define XSTORM_FCOE_CONN_AG_CTX_CF16EN_MASK 0x1 7707 #define XSTORM_FCOE_CONN_AG_CTX_CF16EN_SHIFT 6 7708 #define XSTORM_FCOE_CONN_AG_CTX_CF17EN_MASK 0x1 7709 #define XSTORM_FCOE_CONN_AG_CTX_CF17EN_SHIFT 7 7710 u8 flags10; 7711 #define XSTORM_FCOE_CONN_AG_CTX_CF18EN_MASK 0x1 7712 #define XSTORM_FCOE_CONN_AG_CTX_CF18EN_SHIFT 0 7713 #define XSTORM_FCOE_CONN_AG_CTX_DQ_CF_EN_MASK 0x1 7714 #define XSTORM_FCOE_CONN_AG_CTX_DQ_CF_EN_SHIFT 1 7715 #define XSTORM_FCOE_CONN_AG_CTX_FLUSH_Q0_EN_MASK 0x1 7716 #define XSTORM_FCOE_CONN_AG_CTX_FLUSH_Q0_EN_SHIFT 2 7717 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED11_MASK 0x1 7718 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED11_SHIFT 3 7719 #define XSTORM_FCOE_CONN_AG_CTX_SLOW_PATH_EN_MASK 0x1 7720 #define XSTORM_FCOE_CONN_AG_CTX_SLOW_PATH_EN_SHIFT 4 7721 #define XSTORM_FCOE_CONN_AG_CTX_CF23EN_MASK 0x1 7722 #define XSTORM_FCOE_CONN_AG_CTX_CF23EN_SHIFT 5 7723 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED12_MASK 0x1 7724 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED12_SHIFT 6 7725 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED13_MASK 0x1 7726 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED13_SHIFT 7 7727 u8 flags11; 7728 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED14_MASK 0x1 7729 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED14_SHIFT 0 7730 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED15_MASK 0x1 7731 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED15_SHIFT 1 7732 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED16_MASK 0x1 7733 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED16_SHIFT 2 7734 #define XSTORM_FCOE_CONN_AG_CTX_RULE5EN_MASK 0x1 7735 #define XSTORM_FCOE_CONN_AG_CTX_RULE5EN_SHIFT 3 7736 #define XSTORM_FCOE_CONN_AG_CTX_RULE6EN_MASK 0x1 7737 #define XSTORM_FCOE_CONN_AG_CTX_RULE6EN_SHIFT 4 7738 #define XSTORM_FCOE_CONN_AG_CTX_RULE7EN_MASK 0x1 7739 #define XSTORM_FCOE_CONN_AG_CTX_RULE7EN_SHIFT 5 7740 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED1_MASK 0x1 7741 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED1_SHIFT 6 7742 #define XSTORM_FCOE_CONN_AG_CTX_XFERQ_DECISION_EN_MASK 0x1 7743 #define XSTORM_FCOE_CONN_AG_CTX_XFERQ_DECISION_EN_SHIFT 7 7744 u8 flags12; 7745 #define XSTORM_FCOE_CONN_AG_CTX_SQ_DECISION_EN_MASK 0x1 7746 #define XSTORM_FCOE_CONN_AG_CTX_SQ_DECISION_EN_SHIFT 0 7747 #define XSTORM_FCOE_CONN_AG_CTX_RULE11EN_MASK 0x1 7748 #define XSTORM_FCOE_CONN_AG_CTX_RULE11EN_SHIFT 1 7749 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED2_MASK 0x1 7750 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED2_SHIFT 2 7751 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED3_MASK 0x1 7752 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED3_SHIFT 3 7753 #define XSTORM_FCOE_CONN_AG_CTX_RULE14EN_MASK 0x1 7754 #define XSTORM_FCOE_CONN_AG_CTX_RULE14EN_SHIFT 4 7755 #define XSTORM_FCOE_CONN_AG_CTX_RULE15EN_MASK 0x1 7756 #define XSTORM_FCOE_CONN_AG_CTX_RULE15EN_SHIFT 5 7757 #define XSTORM_FCOE_CONN_AG_CTX_RULE16EN_MASK 0x1 7758 #define XSTORM_FCOE_CONN_AG_CTX_RULE16EN_SHIFT 6 7759 #define XSTORM_FCOE_CONN_AG_CTX_RULE17EN_MASK 0x1 7760 #define XSTORM_FCOE_CONN_AG_CTX_RULE17EN_SHIFT 7 7761 u8 flags13; 7762 #define XSTORM_FCOE_CONN_AG_CTX_RESPQ_DECISION_EN_MASK 0x1 7763 #define XSTORM_FCOE_CONN_AG_CTX_RESPQ_DECISION_EN_SHIFT 0 7764 #define XSTORM_FCOE_CONN_AG_CTX_RULE19EN_MASK 0x1 7765 #define XSTORM_FCOE_CONN_AG_CTX_RULE19EN_SHIFT 1 7766 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED4_MASK 0x1 7767 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED4_SHIFT 2 7768 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED5_MASK 0x1 7769 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED5_SHIFT 3 7770 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED6_MASK 0x1 7771 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED6_SHIFT 4 7772 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED7_MASK 0x1 7773 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED7_SHIFT 5 7774 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED8_MASK 0x1 7775 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED8_SHIFT 6 7776 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED9_MASK 0x1 7777 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED9_SHIFT 7 7778 u8 flags14; 7779 #define XSTORM_FCOE_CONN_AG_CTX_BIT16_MASK 0x1 7780 #define XSTORM_FCOE_CONN_AG_CTX_BIT16_SHIFT 0 7781 #define XSTORM_FCOE_CONN_AG_CTX_BIT17_MASK 0x1 7782 #define XSTORM_FCOE_CONN_AG_CTX_BIT17_SHIFT 1 7783 #define XSTORM_FCOE_CONN_AG_CTX_BIT18_MASK 0x1 7784 #define XSTORM_FCOE_CONN_AG_CTX_BIT18_SHIFT 2 7785 #define XSTORM_FCOE_CONN_AG_CTX_BIT19_MASK 0x1 7786 #define XSTORM_FCOE_CONN_AG_CTX_BIT19_SHIFT 3 7787 #define XSTORM_FCOE_CONN_AG_CTX_BIT20_MASK 0x1 7788 #define XSTORM_FCOE_CONN_AG_CTX_BIT20_SHIFT 4 7789 #define XSTORM_FCOE_CONN_AG_CTX_BIT21_MASK 0x1 7790 #define XSTORM_FCOE_CONN_AG_CTX_BIT21_SHIFT 5 7791 #define XSTORM_FCOE_CONN_AG_CTX_CF23_MASK 0x3 7792 #define XSTORM_FCOE_CONN_AG_CTX_CF23_SHIFT 6 7793 u8 byte2; 7794 __le16 physical_q0; 7795 __le16 word1; 7796 __le16 word2; 7797 __le16 sq_cons; 7798 __le16 sq_prod; 7799 __le16 xferq_prod; 7800 __le16 xferq_cons; 7801 u8 byte3; 7802 u8 byte4; 7803 u8 byte5; 7804 u8 byte6; 7805 __le32 remain_io; 7806 __le32 reg1; 7807 __le32 reg2; 7808 __le32 reg3; 7809 __le32 reg4; 7810 __le32 reg5; 7811 __le32 reg6; 7812 __le16 respq_prod; 7813 __le16 respq_cons; 7814 __le16 word9; 7815 __le16 word10; 7816 __le32 reg7; 7817 __le32 reg8; 7818 }; 7819 7820 struct ustorm_fcoe_conn_st_ctx { 7821 struct regpair respq_pbl_addr; 7822 __le16 num_pages_in_pbl; 7823 u8 ptu_log_page_size; 7824 u8 log_page_size; 7825 __le16 respq_prod; 7826 u8 reserved[2]; 7827 }; 7828 7829 struct tstorm_fcoe_conn_ag_ctx { 7830 u8 reserved0; 7831 u8 fcoe_state; 7832 u8 flags0; 7833 #define TSTORM_FCOE_CONN_AG_CTX_EXIST_IN_QM0_MASK 0x1 7834 #define TSTORM_FCOE_CONN_AG_CTX_EXIST_IN_QM0_SHIFT 0 7835 #define TSTORM_FCOE_CONN_AG_CTX_BIT1_MASK 0x1 7836 #define TSTORM_FCOE_CONN_AG_CTX_BIT1_SHIFT 1 7837 #define TSTORM_FCOE_CONN_AG_CTX_BIT2_MASK 0x1 7838 #define TSTORM_FCOE_CONN_AG_CTX_BIT2_SHIFT 2 7839 #define TSTORM_FCOE_CONN_AG_CTX_BIT3_MASK 0x1 7840 #define TSTORM_FCOE_CONN_AG_CTX_BIT3_SHIFT 3 7841 #define TSTORM_FCOE_CONN_AG_CTX_BIT4_MASK 0x1 7842 #define TSTORM_FCOE_CONN_AG_CTX_BIT4_SHIFT 4 7843 #define TSTORM_FCOE_CONN_AG_CTX_BIT5_MASK 0x1 7844 #define TSTORM_FCOE_CONN_AG_CTX_BIT5_SHIFT 5 7845 #define TSTORM_FCOE_CONN_AG_CTX_DUMMY_TIMER_CF_MASK 0x3 7846 #define TSTORM_FCOE_CONN_AG_CTX_DUMMY_TIMER_CF_SHIFT 6 7847 u8 flags1; 7848 #define TSTORM_FCOE_CONN_AG_CTX_FLUSH_Q0_CF_MASK 0x3 7849 #define TSTORM_FCOE_CONN_AG_CTX_FLUSH_Q0_CF_SHIFT 0 7850 #define TSTORM_FCOE_CONN_AG_CTX_CF2_MASK 0x3 7851 #define TSTORM_FCOE_CONN_AG_CTX_CF2_SHIFT 2 7852 #define TSTORM_FCOE_CONN_AG_CTX_TIMER_STOP_ALL_CF_MASK 0x3 7853 #define TSTORM_FCOE_CONN_AG_CTX_TIMER_STOP_ALL_CF_SHIFT 4 7854 #define TSTORM_FCOE_CONN_AG_CTX_CF4_MASK 0x3 7855 #define TSTORM_FCOE_CONN_AG_CTX_CF4_SHIFT 6 7856 u8 flags2; 7857 #define TSTORM_FCOE_CONN_AG_CTX_CF5_MASK 0x3 7858 #define TSTORM_FCOE_CONN_AG_CTX_CF5_SHIFT 0 7859 #define TSTORM_FCOE_CONN_AG_CTX_CF6_MASK 0x3 7860 #define TSTORM_FCOE_CONN_AG_CTX_CF6_SHIFT 2 7861 #define TSTORM_FCOE_CONN_AG_CTX_CF7_MASK 0x3 7862 #define TSTORM_FCOE_CONN_AG_CTX_CF7_SHIFT 4 7863 #define TSTORM_FCOE_CONN_AG_CTX_CF8_MASK 0x3 7864 #define TSTORM_FCOE_CONN_AG_CTX_CF8_SHIFT 6 7865 u8 flags3; 7866 #define TSTORM_FCOE_CONN_AG_CTX_CF9_MASK 0x3 7867 #define TSTORM_FCOE_CONN_AG_CTX_CF9_SHIFT 0 7868 #define TSTORM_FCOE_CONN_AG_CTX_CF10_MASK 0x3 7869 #define TSTORM_FCOE_CONN_AG_CTX_CF10_SHIFT 2 7870 #define TSTORM_FCOE_CONN_AG_CTX_DUMMY_TIMER_CF_EN_MASK 0x1 7871 #define TSTORM_FCOE_CONN_AG_CTX_DUMMY_TIMER_CF_EN_SHIFT 4 7872 #define TSTORM_FCOE_CONN_AG_CTX_FLUSH_Q0_CF_EN_MASK 0x1 7873 #define TSTORM_FCOE_CONN_AG_CTX_FLUSH_Q0_CF_EN_SHIFT 5 7874 #define TSTORM_FCOE_CONN_AG_CTX_CF2EN_MASK 0x1 7875 #define TSTORM_FCOE_CONN_AG_CTX_CF2EN_SHIFT 6 7876 #define TSTORM_FCOE_CONN_AG_CTX_TIMER_STOP_ALL_CF_EN_MASK 0x1 7877 #define TSTORM_FCOE_CONN_AG_CTX_TIMER_STOP_ALL_CF_EN_SHIFT 7 7878 u8 flags4; 7879 #define TSTORM_FCOE_CONN_AG_CTX_CF4EN_MASK 0x1 7880 #define TSTORM_FCOE_CONN_AG_CTX_CF4EN_SHIFT 0 7881 #define TSTORM_FCOE_CONN_AG_CTX_CF5EN_MASK 0x1 7882 #define TSTORM_FCOE_CONN_AG_CTX_CF5EN_SHIFT 1 7883 #define TSTORM_FCOE_CONN_AG_CTX_CF6EN_MASK 0x1 7884 #define TSTORM_FCOE_CONN_AG_CTX_CF6EN_SHIFT 2 7885 #define TSTORM_FCOE_CONN_AG_CTX_CF7EN_MASK 0x1 7886 #define TSTORM_FCOE_CONN_AG_CTX_CF7EN_SHIFT 3 7887 #define TSTORM_FCOE_CONN_AG_CTX_CF8EN_MASK 0x1 7888 #define TSTORM_FCOE_CONN_AG_CTX_CF8EN_SHIFT 4 7889 #define TSTORM_FCOE_CONN_AG_CTX_CF9EN_MASK 0x1 7890 #define TSTORM_FCOE_CONN_AG_CTX_CF9EN_SHIFT 5 7891 #define TSTORM_FCOE_CONN_AG_CTX_CF10EN_MASK 0x1 7892 #define TSTORM_FCOE_CONN_AG_CTX_CF10EN_SHIFT 6 7893 #define TSTORM_FCOE_CONN_AG_CTX_RULE0EN_MASK 0x1 7894 #define TSTORM_FCOE_CONN_AG_CTX_RULE0EN_SHIFT 7 7895 u8 flags5; 7896 #define TSTORM_FCOE_CONN_AG_CTX_RULE1EN_MASK 0x1 7897 #define TSTORM_FCOE_CONN_AG_CTX_RULE1EN_SHIFT 0 7898 #define TSTORM_FCOE_CONN_AG_CTX_RULE2EN_MASK 0x1 7899 #define TSTORM_FCOE_CONN_AG_CTX_RULE2EN_SHIFT 1 7900 #define TSTORM_FCOE_CONN_AG_CTX_RULE3EN_MASK 0x1 7901 #define TSTORM_FCOE_CONN_AG_CTX_RULE3EN_SHIFT 2 7902 #define TSTORM_FCOE_CONN_AG_CTX_RULE4EN_MASK 0x1 7903 #define TSTORM_FCOE_CONN_AG_CTX_RULE4EN_SHIFT 3 7904 #define TSTORM_FCOE_CONN_AG_CTX_RULE5EN_MASK 0x1 7905 #define TSTORM_FCOE_CONN_AG_CTX_RULE5EN_SHIFT 4 7906 #define TSTORM_FCOE_CONN_AG_CTX_RULE6EN_MASK 0x1 7907 #define TSTORM_FCOE_CONN_AG_CTX_RULE6EN_SHIFT 5 7908 #define TSTORM_FCOE_CONN_AG_CTX_RULE7EN_MASK 0x1 7909 #define TSTORM_FCOE_CONN_AG_CTX_RULE7EN_SHIFT 6 7910 #define TSTORM_FCOE_CONN_AG_CTX_RULE8EN_MASK 0x1 7911 #define TSTORM_FCOE_CONN_AG_CTX_RULE8EN_SHIFT 7 7912 __le32 reg0; 7913 __le32 reg1; 7914 }; 7915 7916 struct ustorm_fcoe_conn_ag_ctx { 7917 u8 byte0; 7918 u8 byte1; 7919 u8 flags0; 7920 #define USTORM_FCOE_CONN_AG_CTX_BIT0_MASK 0x1 7921 #define USTORM_FCOE_CONN_AG_CTX_BIT0_SHIFT 0 7922 #define USTORM_FCOE_CONN_AG_CTX_BIT1_MASK 0x1 7923 #define USTORM_FCOE_CONN_AG_CTX_BIT1_SHIFT 1 7924 #define USTORM_FCOE_CONN_AG_CTX_CF0_MASK 0x3 7925 #define USTORM_FCOE_CONN_AG_CTX_CF0_SHIFT 2 7926 #define USTORM_FCOE_CONN_AG_CTX_CF1_MASK 0x3 7927 #define USTORM_FCOE_CONN_AG_CTX_CF1_SHIFT 4 7928 #define USTORM_FCOE_CONN_AG_CTX_CF2_MASK 0x3 7929 #define USTORM_FCOE_CONN_AG_CTX_CF2_SHIFT 6 7930 u8 flags1; 7931 #define USTORM_FCOE_CONN_AG_CTX_CF3_MASK 0x3 7932 #define USTORM_FCOE_CONN_AG_CTX_CF3_SHIFT 0 7933 #define USTORM_FCOE_CONN_AG_CTX_CF4_MASK 0x3 7934 #define USTORM_FCOE_CONN_AG_CTX_CF4_SHIFT 2 7935 #define USTORM_FCOE_CONN_AG_CTX_CF5_MASK 0x3 7936 #define USTORM_FCOE_CONN_AG_CTX_CF5_SHIFT 4 7937 #define USTORM_FCOE_CONN_AG_CTX_CF6_MASK 0x3 7938 #define USTORM_FCOE_CONN_AG_CTX_CF6_SHIFT 6 7939 u8 flags2; 7940 #define USTORM_FCOE_CONN_AG_CTX_CF0EN_MASK 0x1 7941 #define USTORM_FCOE_CONN_AG_CTX_CF0EN_SHIFT 0 7942 #define USTORM_FCOE_CONN_AG_CTX_CF1EN_MASK 0x1 7943 #define USTORM_FCOE_CONN_AG_CTX_CF1EN_SHIFT 1 7944 #define USTORM_FCOE_CONN_AG_CTX_CF2EN_MASK 0x1 7945 #define USTORM_FCOE_CONN_AG_CTX_CF2EN_SHIFT 2 7946 #define USTORM_FCOE_CONN_AG_CTX_CF3EN_MASK 0x1 7947 #define USTORM_FCOE_CONN_AG_CTX_CF3EN_SHIFT 3 7948 #define USTORM_FCOE_CONN_AG_CTX_CF4EN_MASK 0x1 7949 #define USTORM_FCOE_CONN_AG_CTX_CF4EN_SHIFT 4 7950 #define USTORM_FCOE_CONN_AG_CTX_CF5EN_MASK 0x1 7951 #define USTORM_FCOE_CONN_AG_CTX_CF5EN_SHIFT 5 7952 #define USTORM_FCOE_CONN_AG_CTX_CF6EN_MASK 0x1 7953 #define USTORM_FCOE_CONN_AG_CTX_CF6EN_SHIFT 6 7954 #define USTORM_FCOE_CONN_AG_CTX_RULE0EN_MASK 0x1 7955 #define USTORM_FCOE_CONN_AG_CTX_RULE0EN_SHIFT 7 7956 u8 flags3; 7957 #define USTORM_FCOE_CONN_AG_CTX_RULE1EN_MASK 0x1 7958 #define USTORM_FCOE_CONN_AG_CTX_RULE1EN_SHIFT 0 7959 #define USTORM_FCOE_CONN_AG_CTX_RULE2EN_MASK 0x1 7960 #define USTORM_FCOE_CONN_AG_CTX_RULE2EN_SHIFT 1 7961 #define USTORM_FCOE_CONN_AG_CTX_RULE3EN_MASK 0x1 7962 #define USTORM_FCOE_CONN_AG_CTX_RULE3EN_SHIFT 2 7963 #define USTORM_FCOE_CONN_AG_CTX_RULE4EN_MASK 0x1 7964 #define USTORM_FCOE_CONN_AG_CTX_RULE4EN_SHIFT 3 7965 #define USTORM_FCOE_CONN_AG_CTX_RULE5EN_MASK 0x1 7966 #define USTORM_FCOE_CONN_AG_CTX_RULE5EN_SHIFT 4 7967 #define USTORM_FCOE_CONN_AG_CTX_RULE6EN_MASK 0x1 7968 #define USTORM_FCOE_CONN_AG_CTX_RULE6EN_SHIFT 5 7969 #define USTORM_FCOE_CONN_AG_CTX_RULE7EN_MASK 0x1 7970 #define USTORM_FCOE_CONN_AG_CTX_RULE7EN_SHIFT 6 7971 #define USTORM_FCOE_CONN_AG_CTX_RULE8EN_MASK 0x1 7972 #define USTORM_FCOE_CONN_AG_CTX_RULE8EN_SHIFT 7 7973 u8 byte2; 7974 u8 byte3; 7975 __le16 word0; 7976 __le16 word1; 7977 __le32 reg0; 7978 __le32 reg1; 7979 __le32 reg2; 7980 __le32 reg3; 7981 __le16 word2; 7982 __le16 word3; 7983 }; 7984 7985 struct tstorm_fcoe_conn_st_ctx { 7986 __le16 stat_ram_addr; 7987 __le16 rx_max_fc_payload_len; 7988 __le16 e_d_tov_val; 7989 u8 flags; 7990 #define TSTORM_FCOE_CONN_ST_CTX_INC_SEQ_CNT_MASK 0x1 7991 #define TSTORM_FCOE_CONN_ST_CTX_INC_SEQ_CNT_SHIFT 0 7992 #define TSTORM_FCOE_CONN_ST_CTX_SUPPORT_CONF_MASK 0x1 7993 #define TSTORM_FCOE_CONN_ST_CTX_SUPPORT_CONF_SHIFT 1 7994 #define TSTORM_FCOE_CONN_ST_CTX_DEF_Q_IDX_MASK 0x3F 7995 #define TSTORM_FCOE_CONN_ST_CTX_DEF_Q_IDX_SHIFT 2 7996 u8 timers_cleanup_invocation_cnt; 7997 __le32 reserved1[2]; 7998 __le32 dst_mac_address_bytes0to3; 7999 __le16 dst_mac_address_bytes4to5; 8000 __le16 ramrod_echo; 8001 u8 flags1; 8002 #define TSTORM_FCOE_CONN_ST_CTX_MODE_MASK 0x3 8003 #define TSTORM_FCOE_CONN_ST_CTX_MODE_SHIFT 0 8004 #define TSTORM_FCOE_CONN_ST_CTX_RESERVED_MASK 0x3F 8005 #define TSTORM_FCOE_CONN_ST_CTX_RESERVED_SHIFT 2 8006 u8 q_relative_offset; 8007 u8 bdq_resource_id; 8008 u8 reserved0[5]; 8009 }; 8010 8011 struct mstorm_fcoe_conn_ag_ctx { 8012 u8 byte0; 8013 u8 byte1; 8014 u8 flags0; 8015 #define MSTORM_FCOE_CONN_AG_CTX_BIT0_MASK 0x1 8016 #define MSTORM_FCOE_CONN_AG_CTX_BIT0_SHIFT 0 8017 #define MSTORM_FCOE_CONN_AG_CTX_BIT1_MASK 0x1 8018 #define MSTORM_FCOE_CONN_AG_CTX_BIT1_SHIFT 1 8019 #define MSTORM_FCOE_CONN_AG_CTX_CF0_MASK 0x3 8020 #define MSTORM_FCOE_CONN_AG_CTX_CF0_SHIFT 2 8021 #define MSTORM_FCOE_CONN_AG_CTX_CF1_MASK 0x3 8022 #define MSTORM_FCOE_CONN_AG_CTX_CF1_SHIFT 4 8023 #define MSTORM_FCOE_CONN_AG_CTX_CF2_MASK 0x3 8024 #define MSTORM_FCOE_CONN_AG_CTX_CF2_SHIFT 6 8025 u8 flags1; 8026 #define MSTORM_FCOE_CONN_AG_CTX_CF0EN_MASK 0x1 8027 #define MSTORM_FCOE_CONN_AG_CTX_CF0EN_SHIFT 0 8028 #define MSTORM_FCOE_CONN_AG_CTX_CF1EN_MASK 0x1 8029 #define MSTORM_FCOE_CONN_AG_CTX_CF1EN_SHIFT 1 8030 #define MSTORM_FCOE_CONN_AG_CTX_CF2EN_MASK 0x1 8031 #define MSTORM_FCOE_CONN_AG_CTX_CF2EN_SHIFT 2 8032 #define MSTORM_FCOE_CONN_AG_CTX_RULE0EN_MASK 0x1 8033 #define MSTORM_FCOE_CONN_AG_CTX_RULE0EN_SHIFT 3 8034 #define MSTORM_FCOE_CONN_AG_CTX_RULE1EN_MASK 0x1 8035 #define MSTORM_FCOE_CONN_AG_CTX_RULE1EN_SHIFT 4 8036 #define MSTORM_FCOE_CONN_AG_CTX_RULE2EN_MASK 0x1 8037 #define MSTORM_FCOE_CONN_AG_CTX_RULE2EN_SHIFT 5 8038 #define MSTORM_FCOE_CONN_AG_CTX_RULE3EN_MASK 0x1 8039 #define MSTORM_FCOE_CONN_AG_CTX_RULE3EN_SHIFT 6 8040 #define MSTORM_FCOE_CONN_AG_CTX_RULE4EN_MASK 0x1 8041 #define MSTORM_FCOE_CONN_AG_CTX_RULE4EN_SHIFT 7 8042 __le16 word0; 8043 __le16 word1; 8044 __le32 reg0; 8045 __le32 reg1; 8046 }; 8047 8048 struct fcoe_mstorm_fcoe_conn_st_ctx_fp { 8049 __le16 xfer_prod; 8050 __le16 reserved1; 8051 u8 protection_info; 8052 #define FCOE_MSTORM_FCOE_CONN_ST_CTX_FP_SUPPORT_PROTECTION_MASK 0x1 8053 #define FCOE_MSTORM_FCOE_CONN_ST_CTX_FP_SUPPORT_PROTECTION_SHIFT 0 8054 #define FCOE_MSTORM_FCOE_CONN_ST_CTX_FP_VALID_MASK 0x1 8055 #define FCOE_MSTORM_FCOE_CONN_ST_CTX_FP_VALID_SHIFT 1 8056 #define FCOE_MSTORM_FCOE_CONN_ST_CTX_FP_RESERVED0_MASK 0x3F 8057 #define FCOE_MSTORM_FCOE_CONN_ST_CTX_FP_RESERVED0_SHIFT 2 8058 u8 q_relative_offset; 8059 u8 reserved2[2]; 8060 }; 8061 8062 struct fcoe_mstorm_fcoe_conn_st_ctx_non_fp { 8063 __le16 conn_id; 8064 __le16 stat_ram_addr; 8065 __le16 num_pages_in_pbl; 8066 u8 ptu_log_page_size; 8067 u8 log_page_size; 8068 __le16 unsolicited_cq_count; 8069 __le16 cmdq_count; 8070 u8 bdq_resource_id; 8071 u8 reserved0[3]; 8072 struct regpair xferq_pbl_addr; 8073 struct regpair reserved1; 8074 struct regpair reserved2[3]; 8075 }; 8076 8077 struct mstorm_fcoe_conn_st_ctx { 8078 struct fcoe_mstorm_fcoe_conn_st_ctx_fp fp; 8079 struct fcoe_mstorm_fcoe_conn_st_ctx_non_fp non_fp; 8080 }; 8081 8082 struct fcoe_conn_context { 8083 struct ystorm_fcoe_conn_st_ctx ystorm_st_context; 8084 struct pstorm_fcoe_conn_st_ctx pstorm_st_context; 8085 struct regpair pstorm_st_padding[2]; 8086 struct xstorm_fcoe_conn_st_ctx xstorm_st_context; 8087 struct xstorm_fcoe_conn_ag_ctx xstorm_ag_context; 8088 struct regpair xstorm_ag_padding[6]; 8089 struct ustorm_fcoe_conn_st_ctx ustorm_st_context; 8090 struct regpair ustorm_st_padding[2]; 8091 struct tstorm_fcoe_conn_ag_ctx tstorm_ag_context; 8092 struct regpair tstorm_ag_padding[2]; 8093 struct timers_context timer_context; 8094 struct ustorm_fcoe_conn_ag_ctx ustorm_ag_context; 8095 struct tstorm_fcoe_conn_st_ctx tstorm_st_context; 8096 struct mstorm_fcoe_conn_ag_ctx mstorm_ag_context; 8097 struct mstorm_fcoe_conn_st_ctx mstorm_st_context; 8098 }; 8099 8100 struct fcoe_conn_offload_ramrod_params { 8101 struct fcoe_conn_offload_ramrod_data offload_ramrod_data; 8102 }; 8103 8104 struct fcoe_conn_terminate_ramrod_params { 8105 struct fcoe_conn_terminate_ramrod_data terminate_ramrod_data; 8106 }; 8107 8108 enum fcoe_event_type { 8109 FCOE_EVENT_INIT_FUNC, 8110 FCOE_EVENT_DESTROY_FUNC, 8111 FCOE_EVENT_STAT_FUNC, 8112 FCOE_EVENT_OFFLOAD_CONN, 8113 FCOE_EVENT_TERMINATE_CONN, 8114 FCOE_EVENT_ERROR, 8115 MAX_FCOE_EVENT_TYPE 8116 }; 8117 8118 struct fcoe_init_ramrod_params { 8119 struct fcoe_init_func_ramrod_data init_ramrod_data; 8120 }; 8121 8122 enum fcoe_ramrod_cmd_id { 8123 FCOE_RAMROD_CMD_ID_INIT_FUNC, 8124 FCOE_RAMROD_CMD_ID_DESTROY_FUNC, 8125 FCOE_RAMROD_CMD_ID_STAT_FUNC, 8126 FCOE_RAMROD_CMD_ID_OFFLOAD_CONN, 8127 FCOE_RAMROD_CMD_ID_TERMINATE_CONN, 8128 MAX_FCOE_RAMROD_CMD_ID 8129 }; 8130 8131 struct fcoe_stat_ramrod_params { 8132 struct fcoe_stat_ramrod_data stat_ramrod_data; 8133 }; 8134 8135 struct ystorm_fcoe_conn_ag_ctx { 8136 u8 byte0; 8137 u8 byte1; 8138 u8 flags0; 8139 #define YSTORM_FCOE_CONN_AG_CTX_BIT0_MASK 0x1 8140 #define YSTORM_FCOE_CONN_AG_CTX_BIT0_SHIFT 0 8141 #define YSTORM_FCOE_CONN_AG_CTX_BIT1_MASK 0x1 8142 #define YSTORM_FCOE_CONN_AG_CTX_BIT1_SHIFT 1 8143 #define YSTORM_FCOE_CONN_AG_CTX_CF0_MASK 0x3 8144 #define YSTORM_FCOE_CONN_AG_CTX_CF0_SHIFT 2 8145 #define YSTORM_FCOE_CONN_AG_CTX_CF1_MASK 0x3 8146 #define YSTORM_FCOE_CONN_AG_CTX_CF1_SHIFT 4 8147 #define YSTORM_FCOE_CONN_AG_CTX_CF2_MASK 0x3 8148 #define YSTORM_FCOE_CONN_AG_CTX_CF2_SHIFT 6 8149 u8 flags1; 8150 #define YSTORM_FCOE_CONN_AG_CTX_CF0EN_MASK 0x1 8151 #define YSTORM_FCOE_CONN_AG_CTX_CF0EN_SHIFT 0 8152 #define YSTORM_FCOE_CONN_AG_CTX_CF1EN_MASK 0x1 8153 #define YSTORM_FCOE_CONN_AG_CTX_CF1EN_SHIFT 1 8154 #define YSTORM_FCOE_CONN_AG_CTX_CF2EN_MASK 0x1 8155 #define YSTORM_FCOE_CONN_AG_CTX_CF2EN_SHIFT 2 8156 #define YSTORM_FCOE_CONN_AG_CTX_RULE0EN_MASK 0x1 8157 #define YSTORM_FCOE_CONN_AG_CTX_RULE0EN_SHIFT 3 8158 #define YSTORM_FCOE_CONN_AG_CTX_RULE1EN_MASK 0x1 8159 #define YSTORM_FCOE_CONN_AG_CTX_RULE1EN_SHIFT 4 8160 #define YSTORM_FCOE_CONN_AG_CTX_RULE2EN_MASK 0x1 8161 #define YSTORM_FCOE_CONN_AG_CTX_RULE2EN_SHIFT 5 8162 #define YSTORM_FCOE_CONN_AG_CTX_RULE3EN_MASK 0x1 8163 #define YSTORM_FCOE_CONN_AG_CTX_RULE3EN_SHIFT 6 8164 #define YSTORM_FCOE_CONN_AG_CTX_RULE4EN_MASK 0x1 8165 #define YSTORM_FCOE_CONN_AG_CTX_RULE4EN_SHIFT 7 8166 u8 byte2; 8167 u8 byte3; 8168 __le16 word0; 8169 __le32 reg0; 8170 __le32 reg1; 8171 __le16 word1; 8172 __le16 word2; 8173 __le16 word3; 8174 __le16 word4; 8175 __le32 reg2; 8176 __le32 reg3; 8177 }; 8178 8179 struct ystorm_iscsi_conn_st_ctx { 8180 __le32 reserved[4]; 8181 }; 8182 8183 struct pstorm_iscsi_tcp_conn_st_ctx { 8184 __le32 tcp[32]; 8185 __le32 iscsi[4]; 8186 }; 8187 8188 struct xstorm_iscsi_tcp_conn_st_ctx { 8189 __le32 reserved_iscsi[40]; 8190 __le32 reserved_tcp[4]; 8191 }; 8192 8193 struct xstorm_iscsi_conn_ag_ctx { 8194 u8 cdu_validation; 8195 u8 state; 8196 u8 flags0; 8197 #define XSTORM_ISCSI_CONN_AG_CTX_EXIST_IN_QM0_MASK 0x1 8198 #define XSTORM_ISCSI_CONN_AG_CTX_EXIST_IN_QM0_SHIFT 0 8199 #define XSTORM_ISCSI_CONN_AG_CTX_EXIST_IN_QM1_MASK 0x1 8200 #define XSTORM_ISCSI_CONN_AG_CTX_EXIST_IN_QM1_SHIFT 1 8201 #define XSTORM_ISCSI_CONN_AG_CTX_RESERVED1_MASK 0x1 8202 #define XSTORM_ISCSI_CONN_AG_CTX_RESERVED1_SHIFT 2 8203 #define XSTORM_ISCSI_CONN_AG_CTX_EXIST_IN_QM3_MASK 0x1 8204 #define XSTORM_ISCSI_CONN_AG_CTX_EXIST_IN_QM3_SHIFT 3 8205 #define XSTORM_ISCSI_CONN_AG_CTX_BIT4_MASK 0x1 8206 #define XSTORM_ISCSI_CONN_AG_CTX_BIT4_SHIFT 4 8207 #define XSTORM_ISCSI_CONN_AG_CTX_RESERVED2_MASK 0x1 8208 #define XSTORM_ISCSI_CONN_AG_CTX_RESERVED2_SHIFT 5 8209 #define XSTORM_ISCSI_CONN_AG_CTX_BIT6_MASK 0x1 8210 #define XSTORM_ISCSI_CONN_AG_CTX_BIT6_SHIFT 6 8211 #define XSTORM_ISCSI_CONN_AG_CTX_BIT7_MASK 0x1 8212 #define XSTORM_ISCSI_CONN_AG_CTX_BIT7_SHIFT 7 8213 u8 flags1; 8214 #define XSTORM_ISCSI_CONN_AG_CTX_BIT8_MASK 0x1 8215 #define XSTORM_ISCSI_CONN_AG_CTX_BIT8_SHIFT 0 8216 #define XSTORM_ISCSI_CONN_AG_CTX_BIT9_MASK 0x1 8217 #define XSTORM_ISCSI_CONN_AG_CTX_BIT9_SHIFT 1 8218 #define XSTORM_ISCSI_CONN_AG_CTX_BIT10_MASK 0x1 8219 #define XSTORM_ISCSI_CONN_AG_CTX_BIT10_SHIFT 2 8220 #define XSTORM_ISCSI_CONN_AG_CTX_BIT11_MASK 0x1 8221 #define XSTORM_ISCSI_CONN_AG_CTX_BIT11_SHIFT 3 8222 #define XSTORM_ISCSI_CONN_AG_CTX_BIT12_MASK 0x1 8223 #define XSTORM_ISCSI_CONN_AG_CTX_BIT12_SHIFT 4 8224 #define XSTORM_ISCSI_CONN_AG_CTX_BIT13_MASK 0x1 8225 #define XSTORM_ISCSI_CONN_AG_CTX_BIT13_SHIFT 5 8226 #define XSTORM_ISCSI_CONN_AG_CTX_BIT14_MASK 0x1 8227 #define XSTORM_ISCSI_CONN_AG_CTX_BIT14_SHIFT 6 8228 #define XSTORM_ISCSI_CONN_AG_CTX_TX_TRUNCATE_MASK 0x1 8229 #define XSTORM_ISCSI_CONN_AG_CTX_TX_TRUNCATE_SHIFT 7 8230 u8 flags2; 8231 #define XSTORM_ISCSI_CONN_AG_CTX_CF0_MASK 0x3 8232 #define XSTORM_ISCSI_CONN_AG_CTX_CF0_SHIFT 0 8233 #define XSTORM_ISCSI_CONN_AG_CTX_CF1_MASK 0x3 8234 #define XSTORM_ISCSI_CONN_AG_CTX_CF1_SHIFT 2 8235 #define XSTORM_ISCSI_CONN_AG_CTX_CF2_MASK 0x3 8236 #define XSTORM_ISCSI_CONN_AG_CTX_CF2_SHIFT 4 8237 #define XSTORM_ISCSI_CONN_AG_CTX_TIMER_STOP_ALL_MASK 0x3 8238 #define XSTORM_ISCSI_CONN_AG_CTX_TIMER_STOP_ALL_SHIFT 6 8239 u8 flags3; 8240 #define XSTORM_ISCSI_CONN_AG_CTX_CF4_MASK 0x3 8241 #define XSTORM_ISCSI_CONN_AG_CTX_CF4_SHIFT 0 8242 #define XSTORM_ISCSI_CONN_AG_CTX_CF5_MASK 0x3 8243 #define XSTORM_ISCSI_CONN_AG_CTX_CF5_SHIFT 2 8244 #define XSTORM_ISCSI_CONN_AG_CTX_CF6_MASK 0x3 8245 #define XSTORM_ISCSI_CONN_AG_CTX_CF6_SHIFT 4 8246 #define XSTORM_ISCSI_CONN_AG_CTX_CF7_MASK 0x3 8247 #define XSTORM_ISCSI_CONN_AG_CTX_CF7_SHIFT 6 8248 u8 flags4; 8249 #define XSTORM_ISCSI_CONN_AG_CTX_CF8_MASK 0x3 8250 #define XSTORM_ISCSI_CONN_AG_CTX_CF8_SHIFT 0 8251 #define XSTORM_ISCSI_CONN_AG_CTX_CF9_MASK 0x3 8252 #define XSTORM_ISCSI_CONN_AG_CTX_CF9_SHIFT 2 8253 #define XSTORM_ISCSI_CONN_AG_CTX_CF10_MASK 0x3 8254 #define XSTORM_ISCSI_CONN_AG_CTX_CF10_SHIFT 4 8255 #define XSTORM_ISCSI_CONN_AG_CTX_CF11_MASK 0x3 8256 #define XSTORM_ISCSI_CONN_AG_CTX_CF11_SHIFT 6 8257 u8 flags5; 8258 #define XSTORM_ISCSI_CONN_AG_CTX_CF12_MASK 0x3 8259 #define XSTORM_ISCSI_CONN_AG_CTX_CF12_SHIFT 0 8260 #define XSTORM_ISCSI_CONN_AG_CTX_CF13_MASK 0x3 8261 #define XSTORM_ISCSI_CONN_AG_CTX_CF13_SHIFT 2 8262 #define XSTORM_ISCSI_CONN_AG_CTX_CF14_MASK 0x3 8263 #define XSTORM_ISCSI_CONN_AG_CTX_CF14_SHIFT 4 8264 #define XSTORM_ISCSI_CONN_AG_CTX_UPDATE_STATE_TO_BASE_CF_MASK 0x3 8265 #define XSTORM_ISCSI_CONN_AG_CTX_UPDATE_STATE_TO_BASE_CF_SHIFT 6 8266 u8 flags6; 8267 #define XSTORM_ISCSI_CONN_AG_CTX_CF16_MASK 0x3 8268 #define XSTORM_ISCSI_CONN_AG_CTX_CF16_SHIFT 0 8269 #define XSTORM_ISCSI_CONN_AG_CTX_CF17_MASK 0x3 8270 #define XSTORM_ISCSI_CONN_AG_CTX_CF17_SHIFT 2 8271 #define XSTORM_ISCSI_CONN_AG_CTX_CF18_MASK 0x3 8272 #define XSTORM_ISCSI_CONN_AG_CTX_CF18_SHIFT 4 8273 #define XSTORM_ISCSI_CONN_AG_CTX_DQ_FLUSH_MASK 0x3 8274 #define XSTORM_ISCSI_CONN_AG_CTX_DQ_FLUSH_SHIFT 6 8275 u8 flags7; 8276 #define XSTORM_ISCSI_CONN_AG_CTX_FLUSH_Q0_MASK 0x3 8277 #define XSTORM_ISCSI_CONN_AG_CTX_FLUSH_Q0_SHIFT 0 8278 #define XSTORM_ISCSI_CONN_AG_CTX_FLUSH_Q1_MASK 0x3 8279 #define XSTORM_ISCSI_CONN_AG_CTX_FLUSH_Q1_SHIFT 2 8280 #define XSTORM_ISCSI_CONN_AG_CTX_SLOW_PATH_MASK 0x3 8281 #define XSTORM_ISCSI_CONN_AG_CTX_SLOW_PATH_SHIFT 4 8282 #define XSTORM_ISCSI_CONN_AG_CTX_CF0EN_MASK 0x1 8283 #define XSTORM_ISCSI_CONN_AG_CTX_CF0EN_SHIFT 6 8284 #define XSTORM_ISCSI_CONN_AG_CTX_CF1EN_MASK 0x1 8285 #define XSTORM_ISCSI_CONN_AG_CTX_CF1EN_SHIFT 7 8286 u8 flags8; 8287 #define XSTORM_ISCSI_CONN_AG_CTX_CF2EN_MASK 0x1 8288 #define XSTORM_ISCSI_CONN_AG_CTX_CF2EN_SHIFT 0 8289 #define XSTORM_ISCSI_CONN_AG_CTX_TIMER_STOP_ALL_EN_MASK 0x1 8290 #define XSTORM_ISCSI_CONN_AG_CTX_TIMER_STOP_ALL_EN_SHIFT 1 8291 #define XSTORM_ISCSI_CONN_AG_CTX_CF4EN_MASK 0x1 8292 #define XSTORM_ISCSI_CONN_AG_CTX_CF4EN_SHIFT 2 8293 #define XSTORM_ISCSI_CONN_AG_CTX_CF5EN_MASK 0x1 8294 #define XSTORM_ISCSI_CONN_AG_CTX_CF5EN_SHIFT 3 8295 #define XSTORM_ISCSI_CONN_AG_CTX_CF6EN_MASK 0x1 8296 #define XSTORM_ISCSI_CONN_AG_CTX_CF6EN_SHIFT 4 8297 #define XSTORM_ISCSI_CONN_AG_CTX_CF7EN_MASK 0x1 8298 #define XSTORM_ISCSI_CONN_AG_CTX_CF7EN_SHIFT 5 8299 #define XSTORM_ISCSI_CONN_AG_CTX_CF8EN_MASK 0x1 8300 #define XSTORM_ISCSI_CONN_AG_CTX_CF8EN_SHIFT 6 8301 #define XSTORM_ISCSI_CONN_AG_CTX_CF9EN_MASK 0x1 8302 #define XSTORM_ISCSI_CONN_AG_CTX_CF9EN_SHIFT 7 8303 u8 flags9; 8304 #define XSTORM_ISCSI_CONN_AG_CTX_CF10EN_MASK 0x1 8305 #define XSTORM_ISCSI_CONN_AG_CTX_CF10EN_SHIFT 0 8306 #define XSTORM_ISCSI_CONN_AG_CTX_CF11EN_MASK 0x1 8307 #define XSTORM_ISCSI_CONN_AG_CTX_CF11EN_SHIFT 1 8308 #define XSTORM_ISCSI_CONN_AG_CTX_CF12EN_MASK 0x1 8309 #define XSTORM_ISCSI_CONN_AG_CTX_CF12EN_SHIFT 2 8310 #define XSTORM_ISCSI_CONN_AG_CTX_CF13EN_MASK 0x1 8311 #define XSTORM_ISCSI_CONN_AG_CTX_CF13EN_SHIFT 3 8312 #define XSTORM_ISCSI_CONN_AG_CTX_CF14EN_MASK 0x1 8313 #define XSTORM_ISCSI_CONN_AG_CTX_CF14EN_SHIFT 4 8314 #define XSTORM_ISCSI_CONN_AG_CTX_UPDATE_STATE_TO_BASE_CF_EN_MASK 0x1 8315 #define XSTORM_ISCSI_CONN_AG_CTX_UPDATE_STATE_TO_BASE_CF_EN_SHIFT 5 8316 #define XSTORM_ISCSI_CONN_AG_CTX_CF16EN_MASK 0x1 8317 #define XSTORM_ISCSI_CONN_AG_CTX_CF16EN_SHIFT 6 8318 #define XSTORM_ISCSI_CONN_AG_CTX_CF17EN_MASK 0x1 8319 #define XSTORM_ISCSI_CONN_AG_CTX_CF17EN_SHIFT 7 8320 u8 flags10; 8321 #define XSTORM_ISCSI_CONN_AG_CTX_CF18EN_MASK 0x1 8322 #define XSTORM_ISCSI_CONN_AG_CTX_CF18EN_SHIFT 0 8323 #define XSTORM_ISCSI_CONN_AG_CTX_DQ_FLUSH_EN_MASK 0x1 8324 #define XSTORM_ISCSI_CONN_AG_CTX_DQ_FLUSH_EN_SHIFT 1 8325 #define XSTORM_ISCSI_CONN_AG_CTX_FLUSH_Q0_EN_MASK 0x1 8326 #define XSTORM_ISCSI_CONN_AG_CTX_FLUSH_Q0_EN_SHIFT 2 8327 #define XSTORM_ISCSI_CONN_AG_CTX_FLUSH_Q1_EN_MASK 0x1 8328 #define XSTORM_ISCSI_CONN_AG_CTX_FLUSH_Q1_EN_SHIFT 3 8329 #define XSTORM_ISCSI_CONN_AG_CTX_SLOW_PATH_EN_MASK 0x1 8330 #define XSTORM_ISCSI_CONN_AG_CTX_SLOW_PATH_EN_SHIFT 4 8331 #define XSTORM_ISCSI_CONN_AG_CTX_PROC_ONLY_CLEANUP_EN_MASK 0x1 8332 #define XSTORM_ISCSI_CONN_AG_CTX_PROC_ONLY_CLEANUP_EN_SHIFT 5 8333 #define XSTORM_ISCSI_CONN_AG_CTX_RULE0EN_MASK 0x1 8334 #define XSTORM_ISCSI_CONN_AG_CTX_RULE0EN_SHIFT 6 8335 #define XSTORM_ISCSI_CONN_AG_CTX_MORE_TO_SEND_DEC_RULE_EN_MASK 0x1 8336 #define XSTORM_ISCSI_CONN_AG_CTX_MORE_TO_SEND_DEC_RULE_EN_SHIFT 7 8337 u8 flags11; 8338 #define XSTORM_ISCSI_CONN_AG_CTX_RULE2EN_MASK 0x1 8339 #define XSTORM_ISCSI_CONN_AG_CTX_RULE2EN_SHIFT 0 8340 #define XSTORM_ISCSI_CONN_AG_CTX_RULE3EN_MASK 0x1 8341 #define XSTORM_ISCSI_CONN_AG_CTX_RULE3EN_SHIFT 1 8342 #define XSTORM_ISCSI_CONN_AG_CTX_RESERVED3_MASK 0x1 8343 #define XSTORM_ISCSI_CONN_AG_CTX_RESERVED3_SHIFT 2 8344 #define XSTORM_ISCSI_CONN_AG_CTX_RULE5EN_MASK 0x1 8345 #define XSTORM_ISCSI_CONN_AG_CTX_RULE5EN_SHIFT 3 8346 #define XSTORM_ISCSI_CONN_AG_CTX_RULE6EN_MASK 0x1 8347 #define XSTORM_ISCSI_CONN_AG_CTX_RULE6EN_SHIFT 4 8348 #define XSTORM_ISCSI_CONN_AG_CTX_RULE7EN_MASK 0x1 8349 #define XSTORM_ISCSI_CONN_AG_CTX_RULE7EN_SHIFT 5 8350 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED1_MASK 0x1 8351 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED1_SHIFT 6 8352 #define XSTORM_ISCSI_CONN_AG_CTX_RULE9EN_MASK 0x1 8353 #define XSTORM_ISCSI_CONN_AG_CTX_RULE9EN_SHIFT 7 8354 u8 flags12; 8355 #define XSTORM_ISCSI_CONN_AG_CTX_SQ_DEC_RULE_EN_MASK 0x1 8356 #define XSTORM_ISCSI_CONN_AG_CTX_SQ_DEC_RULE_EN_SHIFT 0 8357 #define XSTORM_ISCSI_CONN_AG_CTX_RULE11EN_MASK 0x1 8358 #define XSTORM_ISCSI_CONN_AG_CTX_RULE11EN_SHIFT 1 8359 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED2_MASK 0x1 8360 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED2_SHIFT 2 8361 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED3_MASK 0x1 8362 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED3_SHIFT 3 8363 #define XSTORM_ISCSI_CONN_AG_CTX_RULE14EN_MASK 0x1 8364 #define XSTORM_ISCSI_CONN_AG_CTX_RULE14EN_SHIFT 4 8365 #define XSTORM_ISCSI_CONN_AG_CTX_RULE15EN_MASK 0x1 8366 #define XSTORM_ISCSI_CONN_AG_CTX_RULE15EN_SHIFT 5 8367 #define XSTORM_ISCSI_CONN_AG_CTX_RULE16EN_MASK 0x1 8368 #define XSTORM_ISCSI_CONN_AG_CTX_RULE16EN_SHIFT 6 8369 #define XSTORM_ISCSI_CONN_AG_CTX_RULE17EN_MASK 0x1 8370 #define XSTORM_ISCSI_CONN_AG_CTX_RULE17EN_SHIFT 7 8371 u8 flags13; 8372 #define XSTORM_ISCSI_CONN_AG_CTX_R2TQ_DEC_RULE_EN_MASK 0x1 8373 #define XSTORM_ISCSI_CONN_AG_CTX_R2TQ_DEC_RULE_EN_SHIFT 0 8374 #define XSTORM_ISCSI_CONN_AG_CTX_HQ_DEC_RULE_EN_MASK 0x1 8375 #define XSTORM_ISCSI_CONN_AG_CTX_HQ_DEC_RULE_EN_SHIFT 1 8376 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED4_MASK 0x1 8377 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED4_SHIFT 2 8378 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED5_MASK 0x1 8379 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED5_SHIFT 3 8380 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED6_MASK 0x1 8381 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED6_SHIFT 4 8382 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED7_MASK 0x1 8383 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED7_SHIFT 5 8384 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED8_MASK 0x1 8385 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED8_SHIFT 6 8386 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED9_MASK 0x1 8387 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED9_SHIFT 7 8388 u8 flags14; 8389 #define XSTORM_ISCSI_CONN_AG_CTX_BIT16_MASK 0x1 8390 #define XSTORM_ISCSI_CONN_AG_CTX_BIT16_SHIFT 0 8391 #define XSTORM_ISCSI_CONN_AG_CTX_BIT17_MASK 0x1 8392 #define XSTORM_ISCSI_CONN_AG_CTX_BIT17_SHIFT 1 8393 #define XSTORM_ISCSI_CONN_AG_CTX_BIT18_MASK 0x1 8394 #define XSTORM_ISCSI_CONN_AG_CTX_BIT18_SHIFT 2 8395 #define XSTORM_ISCSI_CONN_AG_CTX_BIT19_MASK 0x1 8396 #define XSTORM_ISCSI_CONN_AG_CTX_BIT19_SHIFT 3 8397 #define XSTORM_ISCSI_CONN_AG_CTX_BIT20_MASK 0x1 8398 #define XSTORM_ISCSI_CONN_AG_CTX_BIT20_SHIFT 4 8399 #define XSTORM_ISCSI_CONN_AG_CTX_DUMMY_READ_DONE_MASK 0x1 8400 #define XSTORM_ISCSI_CONN_AG_CTX_DUMMY_READ_DONE_SHIFT 5 8401 #define XSTORM_ISCSI_CONN_AG_CTX_PROC_ONLY_CLEANUP_MASK 0x3 8402 #define XSTORM_ISCSI_CONN_AG_CTX_PROC_ONLY_CLEANUP_SHIFT 6 8403 u8 byte2; 8404 __le16 physical_q0; 8405 __le16 physical_q1; 8406 __le16 dummy_dorq_var; 8407 __le16 sq_cons; 8408 __le16 sq_prod; 8409 __le16 word5; 8410 __le16 slow_io_total_data_tx_update; 8411 u8 byte3; 8412 u8 byte4; 8413 u8 byte5; 8414 u8 byte6; 8415 __le32 reg0; 8416 __le32 reg1; 8417 __le32 reg2; 8418 __le32 more_to_send_seq; 8419 __le32 reg4; 8420 __le32 reg5; 8421 __le32 hq_scan_next_relevant_ack; 8422 __le16 r2tq_prod; 8423 __le16 r2tq_cons; 8424 __le16 hq_prod; 8425 __le16 hq_cons; 8426 __le32 remain_seq; 8427 __le32 bytes_to_next_pdu; 8428 __le32 hq_tcp_seq; 8429 u8 byte7; 8430 u8 byte8; 8431 u8 byte9; 8432 u8 byte10; 8433 u8 byte11; 8434 u8 byte12; 8435 u8 byte13; 8436 u8 byte14; 8437 u8 byte15; 8438 u8 byte16; 8439 __le16 word11; 8440 __le32 reg10; 8441 __le32 reg11; 8442 __le32 exp_stat_sn; 8443 __le32 reg13; 8444 __le32 reg14; 8445 __le32 reg15; 8446 __le32 reg16; 8447 __le32 reg17; 8448 }; 8449 8450 struct tstorm_iscsi_conn_ag_ctx { 8451 u8 reserved0; 8452 u8 state; 8453 u8 flags0; 8454 #define TSTORM_ISCSI_CONN_AG_CTX_EXIST_IN_QM0_MASK 0x1 8455 #define TSTORM_ISCSI_CONN_AG_CTX_EXIST_IN_QM0_SHIFT 0 8456 #define TSTORM_ISCSI_CONN_AG_CTX_BIT1_MASK 0x1 8457 #define TSTORM_ISCSI_CONN_AG_CTX_BIT1_SHIFT 1 8458 #define TSTORM_ISCSI_CONN_AG_CTX_BIT2_MASK 0x1 8459 #define TSTORM_ISCSI_CONN_AG_CTX_BIT2_SHIFT 2 8460 #define TSTORM_ISCSI_CONN_AG_CTX_BIT3_MASK 0x1 8461 #define TSTORM_ISCSI_CONN_AG_CTX_BIT3_SHIFT 3 8462 #define TSTORM_ISCSI_CONN_AG_CTX_BIT4_MASK 0x1 8463 #define TSTORM_ISCSI_CONN_AG_CTX_BIT4_SHIFT 4 8464 #define TSTORM_ISCSI_CONN_AG_CTX_BIT5_MASK 0x1 8465 #define TSTORM_ISCSI_CONN_AG_CTX_BIT5_SHIFT 5 8466 #define TSTORM_ISCSI_CONN_AG_CTX_CF0_MASK 0x3 8467 #define TSTORM_ISCSI_CONN_AG_CTX_CF0_SHIFT 6 8468 u8 flags1; 8469 #define TSTORM_ISCSI_CONN_AG_CTX_CF1_MASK 0x3 8470 #define TSTORM_ISCSI_CONN_AG_CTX_CF1_SHIFT 0 8471 #define TSTORM_ISCSI_CONN_AG_CTX_CF2_MASK 0x3 8472 #define TSTORM_ISCSI_CONN_AG_CTX_CF2_SHIFT 2 8473 #define TSTORM_ISCSI_CONN_AG_CTX_TIMER_STOP_ALL_MASK 0x3 8474 #define TSTORM_ISCSI_CONN_AG_CTX_TIMER_STOP_ALL_SHIFT 4 8475 #define TSTORM_ISCSI_CONN_AG_CTX_CF4_MASK 0x3 8476 #define TSTORM_ISCSI_CONN_AG_CTX_CF4_SHIFT 6 8477 u8 flags2; 8478 #define TSTORM_ISCSI_CONN_AG_CTX_CF5_MASK 0x3 8479 #define TSTORM_ISCSI_CONN_AG_CTX_CF5_SHIFT 0 8480 #define TSTORM_ISCSI_CONN_AG_CTX_CF6_MASK 0x3 8481 #define TSTORM_ISCSI_CONN_AG_CTX_CF6_SHIFT 2 8482 #define TSTORM_ISCSI_CONN_AG_CTX_CF7_MASK 0x3 8483 #define TSTORM_ISCSI_CONN_AG_CTX_CF7_SHIFT 4 8484 #define TSTORM_ISCSI_CONN_AG_CTX_CF8_MASK 0x3 8485 #define TSTORM_ISCSI_CONN_AG_CTX_CF8_SHIFT 6 8486 u8 flags3; 8487 #define TSTORM_ISCSI_CONN_AG_CTX_FLUSH_Q0_MASK 0x3 8488 #define TSTORM_ISCSI_CONN_AG_CTX_FLUSH_Q0_SHIFT 0 8489 #define TSTORM_ISCSI_CONN_AG_CTX_CF10_MASK 0x3 8490 #define TSTORM_ISCSI_CONN_AG_CTX_CF10_SHIFT 2 8491 #define TSTORM_ISCSI_CONN_AG_CTX_CF0EN_MASK 0x1 8492 #define TSTORM_ISCSI_CONN_AG_CTX_CF0EN_SHIFT 4 8493 #define TSTORM_ISCSI_CONN_AG_CTX_CF1EN_MASK 0x1 8494 #define TSTORM_ISCSI_CONN_AG_CTX_CF1EN_SHIFT 5 8495 #define TSTORM_ISCSI_CONN_AG_CTX_CF2EN_MASK 0x1 8496 #define TSTORM_ISCSI_CONN_AG_CTX_CF2EN_SHIFT 6 8497 #define TSTORM_ISCSI_CONN_AG_CTX_TIMER_STOP_ALL_EN_MASK 0x1 8498 #define TSTORM_ISCSI_CONN_AG_CTX_TIMER_STOP_ALL_EN_SHIFT 7 8499 u8 flags4; 8500 #define TSTORM_ISCSI_CONN_AG_CTX_CF4EN_MASK 0x1 8501 #define TSTORM_ISCSI_CONN_AG_CTX_CF4EN_SHIFT 0 8502 #define TSTORM_ISCSI_CONN_AG_CTX_CF5EN_MASK 0x1 8503 #define TSTORM_ISCSI_CONN_AG_CTX_CF5EN_SHIFT 1 8504 #define TSTORM_ISCSI_CONN_AG_CTX_CF6EN_MASK 0x1 8505 #define TSTORM_ISCSI_CONN_AG_CTX_CF6EN_SHIFT 2 8506 #define TSTORM_ISCSI_CONN_AG_CTX_CF7EN_MASK 0x1 8507 #define TSTORM_ISCSI_CONN_AG_CTX_CF7EN_SHIFT 3 8508 #define TSTORM_ISCSI_CONN_AG_CTX_CF8EN_MASK 0x1 8509 #define TSTORM_ISCSI_CONN_AG_CTX_CF8EN_SHIFT 4 8510 #define TSTORM_ISCSI_CONN_AG_CTX_FLUSH_Q0_EN_MASK 0x1 8511 #define TSTORM_ISCSI_CONN_AG_CTX_FLUSH_Q0_EN_SHIFT 5 8512 #define TSTORM_ISCSI_CONN_AG_CTX_CF10EN_MASK 0x1 8513 #define TSTORM_ISCSI_CONN_AG_CTX_CF10EN_SHIFT 6 8514 #define TSTORM_ISCSI_CONN_AG_CTX_RULE0EN_MASK 0x1 8515 #define TSTORM_ISCSI_CONN_AG_CTX_RULE0EN_SHIFT 7 8516 u8 flags5; 8517 #define TSTORM_ISCSI_CONN_AG_CTX_RULE1EN_MASK 0x1 8518 #define TSTORM_ISCSI_CONN_AG_CTX_RULE1EN_SHIFT 0 8519 #define TSTORM_ISCSI_CONN_AG_CTX_RULE2EN_MASK 0x1 8520 #define TSTORM_ISCSI_CONN_AG_CTX_RULE2EN_SHIFT 1 8521 #define TSTORM_ISCSI_CONN_AG_CTX_RULE3EN_MASK 0x1 8522 #define TSTORM_ISCSI_CONN_AG_CTX_RULE3EN_SHIFT 2 8523 #define TSTORM_ISCSI_CONN_AG_CTX_RULE4EN_MASK 0x1 8524 #define TSTORM_ISCSI_CONN_AG_CTX_RULE4EN_SHIFT 3 8525 #define TSTORM_ISCSI_CONN_AG_CTX_RULE5EN_MASK 0x1 8526 #define TSTORM_ISCSI_CONN_AG_CTX_RULE5EN_SHIFT 4 8527 #define TSTORM_ISCSI_CONN_AG_CTX_RULE6EN_MASK 0x1 8528 #define TSTORM_ISCSI_CONN_AG_CTX_RULE6EN_SHIFT 5 8529 #define TSTORM_ISCSI_CONN_AG_CTX_RULE7EN_MASK 0x1 8530 #define TSTORM_ISCSI_CONN_AG_CTX_RULE7EN_SHIFT 6 8531 #define TSTORM_ISCSI_CONN_AG_CTX_RULE8EN_MASK 0x1 8532 #define TSTORM_ISCSI_CONN_AG_CTX_RULE8EN_SHIFT 7 8533 __le32 reg0; 8534 __le32 reg1; 8535 __le32 reg2; 8536 __le32 reg3; 8537 __le32 reg4; 8538 __le32 reg5; 8539 __le32 reg6; 8540 __le32 reg7; 8541 __le32 reg8; 8542 u8 byte2; 8543 u8 byte3; 8544 __le16 word0; 8545 }; 8546 8547 struct ustorm_iscsi_conn_ag_ctx { 8548 u8 byte0; 8549 u8 byte1; 8550 u8 flags0; 8551 #define USTORM_ISCSI_CONN_AG_CTX_BIT0_MASK 0x1 8552 #define USTORM_ISCSI_CONN_AG_CTX_BIT0_SHIFT 0 8553 #define USTORM_ISCSI_CONN_AG_CTX_BIT1_MASK 0x1 8554 #define USTORM_ISCSI_CONN_AG_CTX_BIT1_SHIFT 1 8555 #define USTORM_ISCSI_CONN_AG_CTX_CF0_MASK 0x3 8556 #define USTORM_ISCSI_CONN_AG_CTX_CF0_SHIFT 2 8557 #define USTORM_ISCSI_CONN_AG_CTX_CF1_MASK 0x3 8558 #define USTORM_ISCSI_CONN_AG_CTX_CF1_SHIFT 4 8559 #define USTORM_ISCSI_CONN_AG_CTX_CF2_MASK 0x3 8560 #define USTORM_ISCSI_CONN_AG_CTX_CF2_SHIFT 6 8561 u8 flags1; 8562 #define USTORM_ISCSI_CONN_AG_CTX_CF3_MASK 0x3 8563 #define USTORM_ISCSI_CONN_AG_CTX_CF3_SHIFT 0 8564 #define USTORM_ISCSI_CONN_AG_CTX_CF4_MASK 0x3 8565 #define USTORM_ISCSI_CONN_AG_CTX_CF4_SHIFT 2 8566 #define USTORM_ISCSI_CONN_AG_CTX_CF5_MASK 0x3 8567 #define USTORM_ISCSI_CONN_AG_CTX_CF5_SHIFT 4 8568 #define USTORM_ISCSI_CONN_AG_CTX_CF6_MASK 0x3 8569 #define USTORM_ISCSI_CONN_AG_CTX_CF6_SHIFT 6 8570 u8 flags2; 8571 #define USTORM_ISCSI_CONN_AG_CTX_CF0EN_MASK 0x1 8572 #define USTORM_ISCSI_CONN_AG_CTX_CF0EN_SHIFT 0 8573 #define USTORM_ISCSI_CONN_AG_CTX_CF1EN_MASK 0x1 8574 #define USTORM_ISCSI_CONN_AG_CTX_CF1EN_SHIFT 1 8575 #define USTORM_ISCSI_CONN_AG_CTX_CF2EN_MASK 0x1 8576 #define USTORM_ISCSI_CONN_AG_CTX_CF2EN_SHIFT 2 8577 #define USTORM_ISCSI_CONN_AG_CTX_CF3EN_MASK 0x1 8578 #define USTORM_ISCSI_CONN_AG_CTX_CF3EN_SHIFT 3 8579 #define USTORM_ISCSI_CONN_AG_CTX_CF4EN_MASK 0x1 8580 #define USTORM_ISCSI_CONN_AG_CTX_CF4EN_SHIFT 4 8581 #define USTORM_ISCSI_CONN_AG_CTX_CF5EN_MASK 0x1 8582 #define USTORM_ISCSI_CONN_AG_CTX_CF5EN_SHIFT 5 8583 #define USTORM_ISCSI_CONN_AG_CTX_CF6EN_MASK 0x1 8584 #define USTORM_ISCSI_CONN_AG_CTX_CF6EN_SHIFT 6 8585 #define USTORM_ISCSI_CONN_AG_CTX_RULE0EN_MASK 0x1 8586 #define USTORM_ISCSI_CONN_AG_CTX_RULE0EN_SHIFT 7 8587 u8 flags3; 8588 #define USTORM_ISCSI_CONN_AG_CTX_RULE1EN_MASK 0x1 8589 #define USTORM_ISCSI_CONN_AG_CTX_RULE1EN_SHIFT 0 8590 #define USTORM_ISCSI_CONN_AG_CTX_RULE2EN_MASK 0x1 8591 #define USTORM_ISCSI_CONN_AG_CTX_RULE2EN_SHIFT 1 8592 #define USTORM_ISCSI_CONN_AG_CTX_RULE3EN_MASK 0x1 8593 #define USTORM_ISCSI_CONN_AG_CTX_RULE3EN_SHIFT 2 8594 #define USTORM_ISCSI_CONN_AG_CTX_RULE4EN_MASK 0x1 8595 #define USTORM_ISCSI_CONN_AG_CTX_RULE4EN_SHIFT 3 8596 #define USTORM_ISCSI_CONN_AG_CTX_RULE5EN_MASK 0x1 8597 #define USTORM_ISCSI_CONN_AG_CTX_RULE5EN_SHIFT 4 8598 #define USTORM_ISCSI_CONN_AG_CTX_RULE6EN_MASK 0x1 8599 #define USTORM_ISCSI_CONN_AG_CTX_RULE6EN_SHIFT 5 8600 #define USTORM_ISCSI_CONN_AG_CTX_RULE7EN_MASK 0x1 8601 #define USTORM_ISCSI_CONN_AG_CTX_RULE7EN_SHIFT 6 8602 #define USTORM_ISCSI_CONN_AG_CTX_RULE8EN_MASK 0x1 8603 #define USTORM_ISCSI_CONN_AG_CTX_RULE8EN_SHIFT 7 8604 u8 byte2; 8605 u8 byte3; 8606 __le16 word0; 8607 __le16 word1; 8608 __le32 reg0; 8609 __le32 reg1; 8610 __le32 reg2; 8611 __le32 reg3; 8612 __le16 word2; 8613 __le16 word3; 8614 }; 8615 8616 struct tstorm_iscsi_conn_st_ctx { 8617 __le32 reserved[40]; 8618 }; 8619 8620 struct mstorm_iscsi_conn_ag_ctx { 8621 u8 reserved; 8622 u8 state; 8623 u8 flags0; 8624 #define MSTORM_ISCSI_CONN_AG_CTX_BIT0_MASK 0x1 8625 #define MSTORM_ISCSI_CONN_AG_CTX_BIT0_SHIFT 0 8626 #define MSTORM_ISCSI_CONN_AG_CTX_BIT1_MASK 0x1 8627 #define MSTORM_ISCSI_CONN_AG_CTX_BIT1_SHIFT 1 8628 #define MSTORM_ISCSI_CONN_AG_CTX_CF0_MASK 0x3 8629 #define MSTORM_ISCSI_CONN_AG_CTX_CF0_SHIFT 2 8630 #define MSTORM_ISCSI_CONN_AG_CTX_CF1_MASK 0x3 8631 #define MSTORM_ISCSI_CONN_AG_CTX_CF1_SHIFT 4 8632 #define MSTORM_ISCSI_CONN_AG_CTX_CF2_MASK 0x3 8633 #define MSTORM_ISCSI_CONN_AG_CTX_CF2_SHIFT 6 8634 u8 flags1; 8635 #define MSTORM_ISCSI_CONN_AG_CTX_CF0EN_MASK 0x1 8636 #define MSTORM_ISCSI_CONN_AG_CTX_CF0EN_SHIFT 0 8637 #define MSTORM_ISCSI_CONN_AG_CTX_CF1EN_MASK 0x1 8638 #define MSTORM_ISCSI_CONN_AG_CTX_CF1EN_SHIFT 1 8639 #define MSTORM_ISCSI_CONN_AG_CTX_CF2EN_MASK 0x1 8640 #define MSTORM_ISCSI_CONN_AG_CTX_CF2EN_SHIFT 2 8641 #define MSTORM_ISCSI_CONN_AG_CTX_RULE0EN_MASK 0x1 8642 #define MSTORM_ISCSI_CONN_AG_CTX_RULE0EN_SHIFT 3 8643 #define MSTORM_ISCSI_CONN_AG_CTX_RULE1EN_MASK 0x1 8644 #define MSTORM_ISCSI_CONN_AG_CTX_RULE1EN_SHIFT 4 8645 #define MSTORM_ISCSI_CONN_AG_CTX_RULE2EN_MASK 0x1 8646 #define MSTORM_ISCSI_CONN_AG_CTX_RULE2EN_SHIFT 5 8647 #define MSTORM_ISCSI_CONN_AG_CTX_RULE3EN_MASK 0x1 8648 #define MSTORM_ISCSI_CONN_AG_CTX_RULE3EN_SHIFT 6 8649 #define MSTORM_ISCSI_CONN_AG_CTX_RULE4EN_MASK 0x1 8650 #define MSTORM_ISCSI_CONN_AG_CTX_RULE4EN_SHIFT 7 8651 __le16 word0; 8652 __le16 word1; 8653 __le32 reg0; 8654 __le32 reg1; 8655 }; 8656 8657 struct mstorm_iscsi_tcp_conn_st_ctx { 8658 __le32 reserved_tcp[20]; 8659 __le32 reserved_iscsi[8]; 8660 }; 8661 8662 struct ustorm_iscsi_conn_st_ctx { 8663 __le32 reserved[52]; 8664 }; 8665 8666 struct iscsi_conn_context { 8667 struct ystorm_iscsi_conn_st_ctx ystorm_st_context; 8668 struct regpair ystorm_st_padding[2]; 8669 struct pstorm_iscsi_tcp_conn_st_ctx pstorm_st_context; 8670 struct regpair pstorm_st_padding[2]; 8671 struct pb_context xpb2_context; 8672 struct xstorm_iscsi_tcp_conn_st_ctx xstorm_st_context; 8673 struct regpair xstorm_st_padding[2]; 8674 struct xstorm_iscsi_conn_ag_ctx xstorm_ag_context; 8675 struct tstorm_iscsi_conn_ag_ctx tstorm_ag_context; 8676 struct regpair tstorm_ag_padding[2]; 8677 struct timers_context timer_context; 8678 struct ustorm_iscsi_conn_ag_ctx ustorm_ag_context; 8679 struct pb_context upb_context; 8680 struct tstorm_iscsi_conn_st_ctx tstorm_st_context; 8681 struct regpair tstorm_st_padding[2]; 8682 struct mstorm_iscsi_conn_ag_ctx mstorm_ag_context; 8683 struct mstorm_iscsi_tcp_conn_st_ctx mstorm_st_context; 8684 struct ustorm_iscsi_conn_st_ctx ustorm_st_context; 8685 }; 8686 8687 struct iscsi_init_ramrod_params { 8688 struct iscsi_spe_func_init iscsi_init_spe; 8689 struct tcp_init_params tcp_init; 8690 }; 8691 8692 struct ystorm_iscsi_conn_ag_ctx { 8693 u8 byte0; 8694 u8 byte1; 8695 u8 flags0; 8696 #define YSTORM_ISCSI_CONN_AG_CTX_BIT0_MASK 0x1 8697 #define YSTORM_ISCSI_CONN_AG_CTX_BIT0_SHIFT 0 8698 #define YSTORM_ISCSI_CONN_AG_CTX_BIT1_MASK 0x1 8699 #define YSTORM_ISCSI_CONN_AG_CTX_BIT1_SHIFT 1 8700 #define YSTORM_ISCSI_CONN_AG_CTX_CF0_MASK 0x3 8701 #define YSTORM_ISCSI_CONN_AG_CTX_CF0_SHIFT 2 8702 #define YSTORM_ISCSI_CONN_AG_CTX_CF1_MASK 0x3 8703 #define YSTORM_ISCSI_CONN_AG_CTX_CF1_SHIFT 4 8704 #define YSTORM_ISCSI_CONN_AG_CTX_CF2_MASK 0x3 8705 #define YSTORM_ISCSI_CONN_AG_CTX_CF2_SHIFT 6 8706 u8 flags1; 8707 #define YSTORM_ISCSI_CONN_AG_CTX_CF0EN_MASK 0x1 8708 #define YSTORM_ISCSI_CONN_AG_CTX_CF0EN_SHIFT 0 8709 #define YSTORM_ISCSI_CONN_AG_CTX_CF1EN_MASK 0x1 8710 #define YSTORM_ISCSI_CONN_AG_CTX_CF1EN_SHIFT 1 8711 #define YSTORM_ISCSI_CONN_AG_CTX_CF2EN_MASK 0x1 8712 #define YSTORM_ISCSI_CONN_AG_CTX_CF2EN_SHIFT 2 8713 #define YSTORM_ISCSI_CONN_AG_CTX_RULE0EN_MASK 0x1 8714 #define YSTORM_ISCSI_CONN_AG_CTX_RULE0EN_SHIFT 3 8715 #define YSTORM_ISCSI_CONN_AG_CTX_RULE1EN_MASK 0x1 8716 #define YSTORM_ISCSI_CONN_AG_CTX_RULE1EN_SHIFT 4 8717 #define YSTORM_ISCSI_CONN_AG_CTX_RULE2EN_MASK 0x1 8718 #define YSTORM_ISCSI_CONN_AG_CTX_RULE2EN_SHIFT 5 8719 #define YSTORM_ISCSI_CONN_AG_CTX_RULE3EN_MASK 0x1 8720 #define YSTORM_ISCSI_CONN_AG_CTX_RULE3EN_SHIFT 6 8721 #define YSTORM_ISCSI_CONN_AG_CTX_RULE4EN_MASK 0x1 8722 #define YSTORM_ISCSI_CONN_AG_CTX_RULE4EN_SHIFT 7 8723 u8 byte2; 8724 u8 byte3; 8725 __le16 word0; 8726 __le32 reg0; 8727 __le32 reg1; 8728 __le16 word1; 8729 __le16 word2; 8730 __le16 word3; 8731 __le16 word4; 8732 __le32 reg2; 8733 __le32 reg3; 8734 }; 8735 8736 #define MFW_TRACE_SIGNATURE 0x25071946 8737 8738 /* The trace in the buffer */ 8739 #define MFW_TRACE_EVENTID_MASK 0x00ffff 8740 #define MFW_TRACE_PRM_SIZE_MASK 0x0f0000 8741 #define MFW_TRACE_PRM_SIZE_SHIFT 16 8742 #define MFW_TRACE_ENTRY_SIZE 3 8743 8744 struct mcp_trace { 8745 u32 signature; /* Help to identify that the trace is valid */ 8746 u32 size; /* the size of the trace buffer in bytes */ 8747 u32 curr_level; /* 2 - all will be written to the buffer 8748 * 1 - debug trace will not be written 8749 * 0 - just errors will be written to the buffer 8750 */ 8751 u32 modules_mask[2]; /* a bit per module, 1 means write it, 0 means 8752 * mask it. 8753 */ 8754 8755 /* Warning: the following pointers are assumed to be 32bits as they are 8756 * used only in the MFW. 8757 */ 8758 u32 trace_prod; /* The next trace will be written to this offset */ 8759 u32 trace_oldest; /* The oldest valid trace starts at this offset 8760 * (usually very close after the current producer). 8761 */ 8762 }; 8763 8764 #define VF_MAX_STATIC 192 8765 8766 #define MCP_GLOB_PATH_MAX 2 8767 #define MCP_PORT_MAX 2 8768 #define MCP_GLOB_PORT_MAX 4 8769 #define MCP_GLOB_FUNC_MAX 16 8770 8771 typedef u32 offsize_t; /* In DWORDS !!! */ 8772 /* Offset from the beginning of the MCP scratchpad */ 8773 #define OFFSIZE_OFFSET_SHIFT 0 8774 #define OFFSIZE_OFFSET_MASK 0x0000ffff 8775 /* Size of specific element (not the whole array if any) */ 8776 #define OFFSIZE_SIZE_SHIFT 16 8777 #define OFFSIZE_SIZE_MASK 0xffff0000 8778 8779 #define SECTION_OFFSET(_offsize) ((((_offsize & \ 8780 OFFSIZE_OFFSET_MASK) >> \ 8781 OFFSIZE_OFFSET_SHIFT) << 2)) 8782 8783 #define QED_SECTION_SIZE(_offsize) (((_offsize & \ 8784 OFFSIZE_SIZE_MASK) >> \ 8785 OFFSIZE_SIZE_SHIFT) << 2) 8786 8787 #define SECTION_ADDR(_offsize, idx) (MCP_REG_SCRATCH + \ 8788 SECTION_OFFSET(_offsize) + \ 8789 (QED_SECTION_SIZE(_offsize) * idx)) 8790 8791 #define SECTION_OFFSIZE_ADDR(_pub_base, _section) \ 8792 (_pub_base + offsetof(struct mcp_public_data, sections[_section])) 8793 8794 /* PHY configuration */ 8795 struct eth_phy_cfg { 8796 u32 speed; 8797 #define ETH_SPEED_AUTONEG 0 8798 #define ETH_SPEED_SMARTLINQ 0x8 8799 8800 u32 pause; 8801 #define ETH_PAUSE_NONE 0x0 8802 #define ETH_PAUSE_AUTONEG 0x1 8803 #define ETH_PAUSE_RX 0x2 8804 #define ETH_PAUSE_TX 0x4 8805 8806 u32 adv_speed; 8807 u32 loopback_mode; 8808 #define ETH_LOOPBACK_NONE (0) 8809 #define ETH_LOOPBACK_INT_PHY (1) 8810 #define ETH_LOOPBACK_EXT_PHY (2) 8811 #define ETH_LOOPBACK_EXT (3) 8812 #define ETH_LOOPBACK_MAC (4) 8813 8814 u32 feature_config_flags; 8815 #define ETH_EEE_MODE_ADV_LPI (1 << 0) 8816 }; 8817 8818 struct port_mf_cfg { 8819 u32 dynamic_cfg; 8820 #define PORT_MF_CFG_OV_TAG_MASK 0x0000ffff 8821 #define PORT_MF_CFG_OV_TAG_SHIFT 0 8822 #define PORT_MF_CFG_OV_TAG_DEFAULT PORT_MF_CFG_OV_TAG_MASK 8823 8824 u32 reserved[1]; 8825 }; 8826 8827 struct eth_stats { 8828 u64 r64; 8829 u64 r127; 8830 u64 r255; 8831 u64 r511; 8832 u64 r1023; 8833 u64 r1518; 8834 u64 r1522; 8835 u64 r2047; 8836 u64 r4095; 8837 u64 r9216; 8838 u64 r16383; 8839 u64 rfcs; 8840 u64 rxcf; 8841 u64 rxpf; 8842 u64 rxpp; 8843 u64 raln; 8844 u64 rfcr; 8845 u64 rovr; 8846 u64 rjbr; 8847 u64 rund; 8848 u64 rfrg; 8849 u64 t64; 8850 u64 t127; 8851 u64 t255; 8852 u64 t511; 8853 u64 t1023; 8854 u64 t1518; 8855 u64 t2047; 8856 u64 t4095; 8857 u64 t9216; 8858 u64 t16383; 8859 u64 txpf; 8860 u64 txpp; 8861 u64 tlpiec; 8862 u64 tncl; 8863 u64 rbyte; 8864 u64 rxuca; 8865 u64 rxmca; 8866 u64 rxbca; 8867 u64 rxpok; 8868 u64 tbyte; 8869 u64 txuca; 8870 u64 txmca; 8871 u64 txbca; 8872 u64 txcf; 8873 }; 8874 8875 struct brb_stats { 8876 u64 brb_truncate[8]; 8877 u64 brb_discard[8]; 8878 }; 8879 8880 struct port_stats { 8881 struct brb_stats brb; 8882 struct eth_stats eth; 8883 }; 8884 8885 struct couple_mode_teaming { 8886 u8 port_cmt[MCP_GLOB_PORT_MAX]; 8887 #define PORT_CMT_IN_TEAM (1 << 0) 8888 8889 #define PORT_CMT_PORT_ROLE (1 << 1) 8890 #define PORT_CMT_PORT_INACTIVE (0 << 1) 8891 #define PORT_CMT_PORT_ACTIVE (1 << 1) 8892 8893 #define PORT_CMT_TEAM_MASK (1 << 2) 8894 #define PORT_CMT_TEAM0 (0 << 2) 8895 #define PORT_CMT_TEAM1 (1 << 2) 8896 }; 8897 8898 #define LLDP_CHASSIS_ID_STAT_LEN 4 8899 #define LLDP_PORT_ID_STAT_LEN 4 8900 #define DCBX_MAX_APP_PROTOCOL 32 8901 #define MAX_SYSTEM_LLDP_TLV_DATA 32 8902 8903 enum _lldp_agent { 8904 LLDP_NEAREST_BRIDGE = 0, 8905 LLDP_NEAREST_NON_TPMR_BRIDGE, 8906 LLDP_NEAREST_CUSTOMER_BRIDGE, 8907 LLDP_MAX_LLDP_AGENTS 8908 }; 8909 8910 struct lldp_config_params_s { 8911 u32 config; 8912 #define LLDP_CONFIG_TX_INTERVAL_MASK 0x000000ff 8913 #define LLDP_CONFIG_TX_INTERVAL_SHIFT 0 8914 #define LLDP_CONFIG_HOLD_MASK 0x00000f00 8915 #define LLDP_CONFIG_HOLD_SHIFT 8 8916 #define LLDP_CONFIG_MAX_CREDIT_MASK 0x0000f000 8917 #define LLDP_CONFIG_MAX_CREDIT_SHIFT 12 8918 #define LLDP_CONFIG_ENABLE_RX_MASK 0x40000000 8919 #define LLDP_CONFIG_ENABLE_RX_SHIFT 30 8920 #define LLDP_CONFIG_ENABLE_TX_MASK 0x80000000 8921 #define LLDP_CONFIG_ENABLE_TX_SHIFT 31 8922 u32 local_chassis_id[LLDP_CHASSIS_ID_STAT_LEN]; 8923 u32 local_port_id[LLDP_PORT_ID_STAT_LEN]; 8924 }; 8925 8926 struct lldp_status_params_s { 8927 u32 prefix_seq_num; 8928 u32 status; 8929 u32 peer_chassis_id[LLDP_CHASSIS_ID_STAT_LEN]; 8930 u32 peer_port_id[LLDP_PORT_ID_STAT_LEN]; 8931 u32 suffix_seq_num; 8932 }; 8933 8934 struct dcbx_ets_feature { 8935 u32 flags; 8936 #define DCBX_ETS_ENABLED_MASK 0x00000001 8937 #define DCBX_ETS_ENABLED_SHIFT 0 8938 #define DCBX_ETS_WILLING_MASK 0x00000002 8939 #define DCBX_ETS_WILLING_SHIFT 1 8940 #define DCBX_ETS_ERROR_MASK 0x00000004 8941 #define DCBX_ETS_ERROR_SHIFT 2 8942 #define DCBX_ETS_CBS_MASK 0x00000008 8943 #define DCBX_ETS_CBS_SHIFT 3 8944 #define DCBX_ETS_MAX_TCS_MASK 0x000000f0 8945 #define DCBX_ETS_MAX_TCS_SHIFT 4 8946 #define DCBX_ISCSI_OOO_TC_MASK 0x00000f00 8947 #define DCBX_ISCSI_OOO_TC_SHIFT 8 8948 u32 pri_tc_tbl[1]; 8949 #define DCBX_ISCSI_OOO_TC (4) 8950 8951 #define NIG_ETS_ISCSI_OOO_CLIENT_OFFSET (DCBX_ISCSI_OOO_TC + 1) 8952 #define DCBX_CEE_STRICT_PRIORITY 0xf 8953 u32 tc_bw_tbl[2]; 8954 u32 tc_tsa_tbl[2]; 8955 #define DCBX_ETS_TSA_STRICT 0 8956 #define DCBX_ETS_TSA_CBS 1 8957 #define DCBX_ETS_TSA_ETS 2 8958 }; 8959 8960 struct dcbx_app_priority_entry { 8961 u32 entry; 8962 #define DCBX_APP_PRI_MAP_MASK 0x000000ff 8963 #define DCBX_APP_PRI_MAP_SHIFT 0 8964 #define DCBX_APP_PRI_0 0x01 8965 #define DCBX_APP_PRI_1 0x02 8966 #define DCBX_APP_PRI_2 0x04 8967 #define DCBX_APP_PRI_3 0x08 8968 #define DCBX_APP_PRI_4 0x10 8969 #define DCBX_APP_PRI_5 0x20 8970 #define DCBX_APP_PRI_6 0x40 8971 #define DCBX_APP_PRI_7 0x80 8972 #define DCBX_APP_SF_MASK 0x00000300 8973 #define DCBX_APP_SF_SHIFT 8 8974 #define DCBX_APP_SF_ETHTYPE 0 8975 #define DCBX_APP_SF_PORT 1 8976 #define DCBX_APP_SF_IEEE_MASK 0x0000f000 8977 #define DCBX_APP_SF_IEEE_SHIFT 12 8978 #define DCBX_APP_SF_IEEE_RESERVED 0 8979 #define DCBX_APP_SF_IEEE_ETHTYPE 1 8980 #define DCBX_APP_SF_IEEE_TCP_PORT 2 8981 #define DCBX_APP_SF_IEEE_UDP_PORT 3 8982 #define DCBX_APP_SF_IEEE_TCP_UDP_PORT 4 8983 8984 #define DCBX_APP_PROTOCOL_ID_MASK 0xffff0000 8985 #define DCBX_APP_PROTOCOL_ID_SHIFT 16 8986 }; 8987 8988 struct dcbx_app_priority_feature { 8989 u32 flags; 8990 #define DCBX_APP_ENABLED_MASK 0x00000001 8991 #define DCBX_APP_ENABLED_SHIFT 0 8992 #define DCBX_APP_WILLING_MASK 0x00000002 8993 #define DCBX_APP_WILLING_SHIFT 1 8994 #define DCBX_APP_ERROR_MASK 0x00000004 8995 #define DCBX_APP_ERROR_SHIFT 2 8996 #define DCBX_APP_MAX_TCS_MASK 0x0000f000 8997 #define DCBX_APP_MAX_TCS_SHIFT 12 8998 #define DCBX_APP_NUM_ENTRIES_MASK 0x00ff0000 8999 #define DCBX_APP_NUM_ENTRIES_SHIFT 16 9000 struct dcbx_app_priority_entry app_pri_tbl[DCBX_MAX_APP_PROTOCOL]; 9001 }; 9002 9003 struct dcbx_features { 9004 struct dcbx_ets_feature ets; 9005 u32 pfc; 9006 #define DCBX_PFC_PRI_EN_BITMAP_MASK 0x000000ff 9007 #define DCBX_PFC_PRI_EN_BITMAP_SHIFT 0 9008 #define DCBX_PFC_PRI_EN_BITMAP_PRI_0 0x01 9009 #define DCBX_PFC_PRI_EN_BITMAP_PRI_1 0x02 9010 #define DCBX_PFC_PRI_EN_BITMAP_PRI_2 0x04 9011 #define DCBX_PFC_PRI_EN_BITMAP_PRI_3 0x08 9012 #define DCBX_PFC_PRI_EN_BITMAP_PRI_4 0x10 9013 #define DCBX_PFC_PRI_EN_BITMAP_PRI_5 0x20 9014 #define DCBX_PFC_PRI_EN_BITMAP_PRI_6 0x40 9015 #define DCBX_PFC_PRI_EN_BITMAP_PRI_7 0x80 9016 9017 #define DCBX_PFC_FLAGS_MASK 0x0000ff00 9018 #define DCBX_PFC_FLAGS_SHIFT 8 9019 #define DCBX_PFC_CAPS_MASK 0x00000f00 9020 #define DCBX_PFC_CAPS_SHIFT 8 9021 #define DCBX_PFC_MBC_MASK 0x00004000 9022 #define DCBX_PFC_MBC_SHIFT 14 9023 #define DCBX_PFC_WILLING_MASK 0x00008000 9024 #define DCBX_PFC_WILLING_SHIFT 15 9025 #define DCBX_PFC_ENABLED_MASK 0x00010000 9026 #define DCBX_PFC_ENABLED_SHIFT 16 9027 #define DCBX_PFC_ERROR_MASK 0x00020000 9028 #define DCBX_PFC_ERROR_SHIFT 17 9029 9030 struct dcbx_app_priority_feature app; 9031 }; 9032 9033 struct dcbx_local_params { 9034 u32 config; 9035 #define DCBX_CONFIG_VERSION_MASK 0x00000007 9036 #define DCBX_CONFIG_VERSION_SHIFT 0 9037 #define DCBX_CONFIG_VERSION_DISABLED 0 9038 #define DCBX_CONFIG_VERSION_IEEE 1 9039 #define DCBX_CONFIG_VERSION_CEE 2 9040 #define DCBX_CONFIG_VERSION_STATIC 4 9041 9042 u32 flags; 9043 struct dcbx_features features; 9044 }; 9045 9046 struct dcbx_mib { 9047 u32 prefix_seq_num; 9048 u32 flags; 9049 struct dcbx_features features; 9050 u32 suffix_seq_num; 9051 }; 9052 9053 struct lldp_system_tlvs_buffer_s { 9054 u16 valid; 9055 u16 length; 9056 u32 data[MAX_SYSTEM_LLDP_TLV_DATA]; 9057 }; 9058 9059 struct dcb_dscp_map { 9060 u32 flags; 9061 #define DCB_DSCP_ENABLE_MASK 0x1 9062 #define DCB_DSCP_ENABLE_SHIFT 0 9063 #define DCB_DSCP_ENABLE 1 9064 u32 dscp_pri_map[8]; 9065 }; 9066 9067 struct public_global { 9068 u32 max_path; 9069 u32 max_ports; 9070 u32 debug_mb_offset; 9071 u32 phymod_dbg_mb_offset; 9072 struct couple_mode_teaming cmt; 9073 s32 internal_temperature; 9074 u32 mfw_ver; 9075 u32 running_bundle_id; 9076 s32 external_temperature; 9077 u32 mdump_reason; 9078 }; 9079 9080 struct fw_flr_mb { 9081 u32 aggint; 9082 u32 opgen_addr; 9083 u32 accum_ack; 9084 }; 9085 9086 struct public_path { 9087 struct fw_flr_mb flr_mb; 9088 u32 mcp_vf_disabled[VF_MAX_STATIC / 32]; 9089 9090 u32 process_kill; 9091 #define PROCESS_KILL_COUNTER_MASK 0x0000ffff 9092 #define PROCESS_KILL_COUNTER_SHIFT 0 9093 #define PROCESS_KILL_GLOB_AEU_BIT_MASK 0xffff0000 9094 #define PROCESS_KILL_GLOB_AEU_BIT_SHIFT 16 9095 #define GLOBAL_AEU_BIT(aeu_reg_id, aeu_bit) (aeu_reg_id * 32 + aeu_bit) 9096 }; 9097 9098 struct public_port { 9099 u32 validity_map; 9100 9101 u32 link_status; 9102 #define LINK_STATUS_LINK_UP 0x00000001 9103 #define LINK_STATUS_SPEED_AND_DUPLEX_MASK 0x0000001e 9104 #define LINK_STATUS_SPEED_AND_DUPLEX_1000THD (1 << 1) 9105 #define LINK_STATUS_SPEED_AND_DUPLEX_1000TFD (2 << 1) 9106 #define LINK_STATUS_SPEED_AND_DUPLEX_10G (3 << 1) 9107 #define LINK_STATUS_SPEED_AND_DUPLEX_20G (4 << 1) 9108 #define LINK_STATUS_SPEED_AND_DUPLEX_40G (5 << 1) 9109 #define LINK_STATUS_SPEED_AND_DUPLEX_50G (6 << 1) 9110 #define LINK_STATUS_SPEED_AND_DUPLEX_100G (7 << 1) 9111 #define LINK_STATUS_SPEED_AND_DUPLEX_25G (8 << 1) 9112 9113 #define LINK_STATUS_AUTO_NEGOTIATE_ENABLED 0x00000020 9114 9115 #define LINK_STATUS_AUTO_NEGOTIATE_COMPLETE 0x00000040 9116 #define LINK_STATUS_PARALLEL_DETECTION_USED 0x00000080 9117 9118 #define LINK_STATUS_PFC_ENABLED 0x00000100 9119 #define LINK_STATUS_LINK_PARTNER_1000TFD_CAPABLE 0x00000200 9120 #define LINK_STATUS_LINK_PARTNER_1000THD_CAPABLE 0x00000400 9121 #define LINK_STATUS_LINK_PARTNER_10G_CAPABLE 0x00000800 9122 #define LINK_STATUS_LINK_PARTNER_20G_CAPABLE 0x00001000 9123 #define LINK_STATUS_LINK_PARTNER_40G_CAPABLE 0x00002000 9124 #define LINK_STATUS_LINK_PARTNER_50G_CAPABLE 0x00004000 9125 #define LINK_STATUS_LINK_PARTNER_100G_CAPABLE 0x00008000 9126 #define LINK_STATUS_LINK_PARTNER_25G_CAPABLE 0x00010000 9127 9128 #define LINK_STATUS_LINK_PARTNER_FLOW_CONTROL_MASK 0x000C0000 9129 #define LINK_STATUS_LINK_PARTNER_NOT_PAUSE_CAPABLE (0 << 18) 9130 #define LINK_STATUS_LINK_PARTNER_SYMMETRIC_PAUSE (1 << 18) 9131 #define LINK_STATUS_LINK_PARTNER_ASYMMETRIC_PAUSE (2 << 18) 9132 #define LINK_STATUS_LINK_PARTNER_BOTH_PAUSE (3 << 18) 9133 9134 #define LINK_STATUS_SFP_TX_FAULT 0x00100000 9135 #define LINK_STATUS_TX_FLOW_CONTROL_ENABLED 0x00200000 9136 #define LINK_STATUS_RX_FLOW_CONTROL_ENABLED 0x00400000 9137 #define LINK_STATUS_RX_SIGNAL_PRESENT 0x00800000 9138 #define LINK_STATUS_MAC_LOCAL_FAULT 0x01000000 9139 #define LINK_STATUS_MAC_REMOTE_FAULT 0x02000000 9140 #define LINK_STATUS_UNSUPPORTED_SPD_REQ 0x04000000 9141 9142 u32 link_status1; 9143 u32 ext_phy_fw_version; 9144 u32 drv_phy_cfg_addr; 9145 9146 u32 port_stx; 9147 9148 u32 stat_nig_timer; 9149 9150 struct port_mf_cfg port_mf_config; 9151 struct port_stats stats; 9152 9153 u32 media_type; 9154 #define MEDIA_UNSPECIFIED 0x0 9155 #define MEDIA_SFPP_10G_FIBER 0x1 9156 #define MEDIA_XFP_FIBER 0x2 9157 #define MEDIA_DA_TWINAX 0x3 9158 #define MEDIA_BASE_T 0x4 9159 #define MEDIA_SFP_1G_FIBER 0x5 9160 #define MEDIA_MODULE_FIBER 0x6 9161 #define MEDIA_KR 0xf0 9162 #define MEDIA_NOT_PRESENT 0xff 9163 9164 u32 lfa_status; 9165 u32 link_change_count; 9166 9167 struct lldp_config_params_s lldp_config_params[LLDP_MAX_LLDP_AGENTS]; 9168 struct lldp_status_params_s lldp_status_params[LLDP_MAX_LLDP_AGENTS]; 9169 struct lldp_system_tlvs_buffer_s system_lldp_tlvs_buf; 9170 9171 /* DCBX related MIB */ 9172 struct dcbx_local_params local_admin_dcbx_mib; 9173 struct dcbx_mib remote_dcbx_mib; 9174 struct dcbx_mib operational_dcbx_mib; 9175 9176 u32 reserved[2]; 9177 u32 transceiver_data; 9178 #define ETH_TRANSCEIVER_STATE_MASK 0x000000FF 9179 #define ETH_TRANSCEIVER_STATE_SHIFT 0x00000000 9180 #define ETH_TRANSCEIVER_STATE_UNPLUGGED 0x00000000 9181 #define ETH_TRANSCEIVER_STATE_PRESENT 0x00000001 9182 #define ETH_TRANSCEIVER_STATE_VALID 0x00000003 9183 #define ETH_TRANSCEIVER_STATE_UPDATING 0x00000008 9184 9185 u32 wol_info; 9186 u32 wol_pkt_len; 9187 u32 wol_pkt_details; 9188 struct dcb_dscp_map dcb_dscp_map; 9189 }; 9190 9191 struct public_func { 9192 u32 reserved0[2]; 9193 9194 u32 mtu_size; 9195 9196 u32 reserved[7]; 9197 9198 u32 config; 9199 #define FUNC_MF_CFG_FUNC_HIDE 0x00000001 9200 #define FUNC_MF_CFG_PAUSE_ON_HOST_RING 0x00000002 9201 #define FUNC_MF_CFG_PAUSE_ON_HOST_RING_SHIFT 0x00000001 9202 9203 #define FUNC_MF_CFG_PROTOCOL_MASK 0x000000f0 9204 #define FUNC_MF_CFG_PROTOCOL_SHIFT 4 9205 #define FUNC_MF_CFG_PROTOCOL_ETHERNET 0x00000000 9206 #define FUNC_MF_CFG_PROTOCOL_ISCSI 0x00000010 9207 #define FUNC_MF_CFG_PROTOCOL_FCOE 0x00000020 9208 #define FUNC_MF_CFG_PROTOCOL_ROCE 0x00000030 9209 #define FUNC_MF_CFG_PROTOCOL_MAX 0x00000030 9210 9211 #define FUNC_MF_CFG_MIN_BW_MASK 0x0000ff00 9212 #define FUNC_MF_CFG_MIN_BW_SHIFT 8 9213 #define FUNC_MF_CFG_MIN_BW_DEFAULT 0x00000000 9214 #define FUNC_MF_CFG_MAX_BW_MASK 0x00ff0000 9215 #define FUNC_MF_CFG_MAX_BW_SHIFT 16 9216 #define FUNC_MF_CFG_MAX_BW_DEFAULT 0x00640000 9217 9218 u32 status; 9219 #define FUNC_STATUS_VLINK_DOWN 0x00000001 9220 9221 u32 mac_upper; 9222 #define FUNC_MF_CFG_UPPERMAC_MASK 0x0000ffff 9223 #define FUNC_MF_CFG_UPPERMAC_SHIFT 0 9224 #define FUNC_MF_CFG_UPPERMAC_DEFAULT FUNC_MF_CFG_UPPERMAC_MASK 9225 u32 mac_lower; 9226 #define FUNC_MF_CFG_LOWERMAC_DEFAULT 0xffffffff 9227 9228 u32 fcoe_wwn_port_name_upper; 9229 u32 fcoe_wwn_port_name_lower; 9230 9231 u32 fcoe_wwn_node_name_upper; 9232 u32 fcoe_wwn_node_name_lower; 9233 9234 u32 ovlan_stag; 9235 #define FUNC_MF_CFG_OV_STAG_MASK 0x0000ffff 9236 #define FUNC_MF_CFG_OV_STAG_SHIFT 0 9237 #define FUNC_MF_CFG_OV_STAG_DEFAULT FUNC_MF_CFG_OV_STAG_MASK 9238 9239 u32 pf_allocation; 9240 9241 u32 preserve_data; 9242 9243 u32 driver_last_activity_ts; 9244 9245 u32 drv_ack_vf_disabled[VF_MAX_STATIC / 32]; 9246 9247 u32 drv_id; 9248 #define DRV_ID_PDA_COMP_VER_MASK 0x0000ffff 9249 #define DRV_ID_PDA_COMP_VER_SHIFT 0 9250 9251 #define DRV_ID_MCP_HSI_VER_MASK 0x00ff0000 9252 #define DRV_ID_MCP_HSI_VER_SHIFT 16 9253 #define DRV_ID_MCP_HSI_VER_CURRENT (1 << DRV_ID_MCP_HSI_VER_SHIFT) 9254 9255 #define DRV_ID_DRV_TYPE_MASK 0x7f000000 9256 #define DRV_ID_DRV_TYPE_SHIFT 24 9257 #define DRV_ID_DRV_TYPE_UNKNOWN (0 << DRV_ID_DRV_TYPE_SHIFT) 9258 #define DRV_ID_DRV_TYPE_LINUX (1 << DRV_ID_DRV_TYPE_SHIFT) 9259 9260 #define DRV_ID_DRV_INIT_HW_MASK 0x80000000 9261 #define DRV_ID_DRV_INIT_HW_SHIFT 31 9262 #define DRV_ID_DRV_INIT_HW_FLAG (1 << DRV_ID_DRV_INIT_HW_SHIFT) 9263 }; 9264 9265 struct mcp_mac { 9266 u32 mac_upper; 9267 u32 mac_lower; 9268 }; 9269 9270 struct mcp_val64 { 9271 u32 lo; 9272 u32 hi; 9273 }; 9274 9275 struct mcp_file_att { 9276 u32 nvm_start_addr; 9277 u32 len; 9278 }; 9279 9280 struct bist_nvm_image_att { 9281 u32 return_code; 9282 u32 image_type; 9283 u32 nvm_start_addr; 9284 u32 len; 9285 }; 9286 9287 #define MCP_DRV_VER_STR_SIZE 16 9288 #define MCP_DRV_VER_STR_SIZE_DWORD (MCP_DRV_VER_STR_SIZE / sizeof(u32)) 9289 #define MCP_DRV_NVM_BUF_LEN 32 9290 struct drv_version_stc { 9291 u32 version; 9292 u8 name[MCP_DRV_VER_STR_SIZE - 4]; 9293 }; 9294 9295 struct lan_stats_stc { 9296 u64 ucast_rx_pkts; 9297 u64 ucast_tx_pkts; 9298 u32 fcs_err; 9299 u32 rserved; 9300 }; 9301 9302 struct fcoe_stats_stc { 9303 u64 rx_pkts; 9304 u64 tx_pkts; 9305 u32 fcs_err; 9306 u32 login_failure; 9307 }; 9308 9309 struct ocbb_data_stc { 9310 u32 ocbb_host_addr; 9311 u32 ocsd_host_addr; 9312 u32 ocsd_req_update_interval; 9313 }; 9314 9315 #define MAX_NUM_OF_SENSORS 7 9316 struct temperature_status_stc { 9317 u32 num_of_sensors; 9318 u32 sensor[MAX_NUM_OF_SENSORS]; 9319 }; 9320 9321 /* crash dump configuration header */ 9322 struct mdump_config_stc { 9323 u32 version; 9324 u32 config; 9325 u32 epoc; 9326 u32 num_of_logs; 9327 u32 valid_logs; 9328 }; 9329 9330 enum resource_id_enum { 9331 RESOURCE_NUM_SB_E = 0, 9332 RESOURCE_NUM_L2_QUEUE_E = 1, 9333 RESOURCE_NUM_VPORT_E = 2, 9334 RESOURCE_NUM_VMQ_E = 3, 9335 RESOURCE_FACTOR_NUM_RSS_PF_E = 4, 9336 RESOURCE_FACTOR_RSS_PER_VF_E = 5, 9337 RESOURCE_NUM_RL_E = 6, 9338 RESOURCE_NUM_PQ_E = 7, 9339 RESOURCE_NUM_VF_E = 8, 9340 RESOURCE_VFC_FILTER_E = 9, 9341 RESOURCE_ILT_E = 10, 9342 RESOURCE_CQS_E = 11, 9343 RESOURCE_GFT_PROFILES_E = 12, 9344 RESOURCE_NUM_TC_E = 13, 9345 RESOURCE_NUM_RSS_ENGINES_E = 14, 9346 RESOURCE_LL2_QUEUE_E = 15, 9347 RESOURCE_RDMA_STATS_QUEUE_E = 16, 9348 RESOURCE_MAX_NUM, 9349 RESOURCE_NUM_INVALID = 0xFFFFFFFF 9350 }; 9351 9352 /* Resource ID is to be filled by the driver in the MB request 9353 * Size, offset & flags to be filled by the MFW in the MB response 9354 */ 9355 struct resource_info { 9356 enum resource_id_enum res_id; 9357 u32 size; /* number of allocated resources */ 9358 u32 offset; /* Offset of the 1st resource */ 9359 u32 vf_size; 9360 u32 vf_offset; 9361 u32 flags; 9362 #define RESOURCE_ELEMENT_STRICT (1 << 0) 9363 }; 9364 9365 union drv_union_data { 9366 u32 ver_str[MCP_DRV_VER_STR_SIZE_DWORD]; 9367 struct mcp_mac wol_mac; 9368 9369 struct eth_phy_cfg drv_phy_cfg; 9370 9371 struct mcp_val64 val64; 9372 9373 u8 raw_data[MCP_DRV_NVM_BUF_LEN]; 9374 9375 struct mcp_file_att file_att; 9376 9377 u32 ack_vf_disabled[VF_MAX_STATIC / 32]; 9378 9379 struct drv_version_stc drv_version; 9380 9381 struct lan_stats_stc lan_stats; 9382 struct fcoe_stats_stc fcoe_stats; 9383 struct ocbb_data_stc ocbb_info; 9384 struct temperature_status_stc temp_info; 9385 struct resource_info resource; 9386 struct bist_nvm_image_att nvm_image_att; 9387 struct mdump_config_stc mdump_config; 9388 }; 9389 9390 struct public_drv_mb { 9391 u32 drv_mb_header; 9392 #define DRV_MSG_CODE_MASK 0xffff0000 9393 #define DRV_MSG_CODE_LOAD_REQ 0x10000000 9394 #define DRV_MSG_CODE_LOAD_DONE 0x11000000 9395 #define DRV_MSG_CODE_INIT_HW 0x12000000 9396 #define DRV_MSG_CODE_UNLOAD_REQ 0x20000000 9397 #define DRV_MSG_CODE_UNLOAD_DONE 0x21000000 9398 #define DRV_MSG_CODE_INIT_PHY 0x22000000 9399 #define DRV_MSG_CODE_LINK_RESET 0x23000000 9400 #define DRV_MSG_CODE_SET_DCBX 0x25000000 9401 #define DRV_MSG_CODE_OV_UPDATE_CURR_CFG 0x26000000 9402 #define DRV_MSG_CODE_OV_UPDATE_BUS_NUM 0x27000000 9403 #define DRV_MSG_CODE_OV_UPDATE_BOOT_PROGRESS 0x28000000 9404 #define DRV_MSG_CODE_OV_UPDATE_STORM_FW_VER 0x29000000 9405 #define DRV_MSG_CODE_OV_UPDATE_DRIVER_STATE 0x31000000 9406 #define DRV_MSG_CODE_BW_UPDATE_ACK 0x32000000 9407 #define DRV_MSG_CODE_OV_UPDATE_MTU 0x33000000 9408 #define DRV_MSG_CODE_OV_UPDATE_WOL 0x38000000 9409 #define DRV_MSG_CODE_OV_UPDATE_ESWITCH_MODE 0x39000000 9410 9411 #define DRV_MSG_CODE_BW_UPDATE_ACK 0x32000000 9412 #define DRV_MSG_CODE_NIG_DRAIN 0x30000000 9413 #define DRV_MSG_GET_RESOURCE_ALLOC_MSG 0x34000000 9414 #define DRV_MSG_CODE_VF_DISABLED_DONE 0xc0000000 9415 #define DRV_MSG_CODE_CFG_VF_MSIX 0xc0010000 9416 #define DRV_MSG_CODE_NVM_GET_FILE_ATT 0x00030000 9417 #define DRV_MSG_CODE_NVM_READ_NVRAM 0x00050000 9418 #define DRV_MSG_CODE_MCP_RESET 0x00090000 9419 #define DRV_MSG_CODE_SET_VERSION 0x000f0000 9420 #define DRV_MSG_CODE_MCP_HALT 0x00100000 9421 #define DRV_MSG_CODE_SET_VMAC 0x00110000 9422 #define DRV_MSG_CODE_GET_VMAC 0x00120000 9423 #define DRV_MSG_CODE_VMAC_TYPE_SHIFT 4 9424 #define DRV_MSG_CODE_VMAC_TYPE_MASK 0x30 9425 #define DRV_MSG_CODE_VMAC_TYPE_MAC 1 9426 #define DRV_MSG_CODE_VMAC_TYPE_WWNN 2 9427 #define DRV_MSG_CODE_VMAC_TYPE_WWPN 3 9428 9429 #define DRV_MSG_CODE_GET_STATS 0x00130000 9430 #define DRV_MSG_CODE_STATS_TYPE_LAN 1 9431 #define DRV_MSG_CODE_STATS_TYPE_FCOE 2 9432 #define DRV_MSG_CODE_STATS_TYPE_ISCSI 3 9433 #define DRV_MSG_CODE_STATS_TYPE_RDMA 4 9434 9435 #define DRV_MSG_CODE_MASK_PARITIES 0x001a0000 9436 9437 #define DRV_MSG_CODE_BIST_TEST 0x001e0000 9438 #define DRV_MSG_CODE_SET_LED_MODE 0x00200000 9439 #define DRV_MSG_CODE_GET_PF_RDMA_PROTOCOL 0x002b0000 9440 #define DRV_MSG_CODE_OS_WOL 0x002e0000 9441 9442 #define DRV_MSG_SEQ_NUMBER_MASK 0x0000ffff 9443 9444 u32 drv_mb_param; 9445 #define DRV_MB_PARAM_UNLOAD_WOL_UNKNOWN 0x00000000 9446 #define DRV_MB_PARAM_UNLOAD_WOL_MCP 0x00000001 9447 #define DRV_MB_PARAM_UNLOAD_WOL_DISABLED 0x00000002 9448 #define DRV_MB_PARAM_UNLOAD_WOL_ENABLED 0x00000003 9449 #define DRV_MB_PARAM_DCBX_NOTIFY_MASK 0x000000FF 9450 #define DRV_MB_PARAM_DCBX_NOTIFY_SHIFT 3 9451 9452 #define DRV_MB_PARAM_NVM_LEN_SHIFT 24 9453 9454 #define DRV_MB_PARAM_CFG_VF_MSIX_VF_ID_SHIFT 0 9455 #define DRV_MB_PARAM_CFG_VF_MSIX_VF_ID_MASK 0x000000FF 9456 #define DRV_MB_PARAM_CFG_VF_MSIX_SB_NUM_SHIFT 8 9457 #define DRV_MB_PARAM_CFG_VF_MSIX_SB_NUM_MASK 0x0000FF00 9458 #define DRV_MB_PARAM_LLDP_SEND_MASK 0x00000001 9459 #define DRV_MB_PARAM_LLDP_SEND_SHIFT 0 9460 9461 #define DRV_MB_PARAM_OV_CURR_CFG_SHIFT 0 9462 #define DRV_MB_PARAM_OV_CURR_CFG_MASK 0x0000000F 9463 #define DRV_MB_PARAM_OV_CURR_CFG_NONE 0 9464 #define DRV_MB_PARAM_OV_CURR_CFG_OS 1 9465 #define DRV_MB_PARAM_OV_CURR_CFG_VENDOR_SPEC 2 9466 #define DRV_MB_PARAM_OV_CURR_CFG_OTHER 3 9467 9468 #define DRV_MB_PARAM_OV_STORM_FW_VER_SHIFT 0 9469 #define DRV_MB_PARAM_OV_STORM_FW_VER_MASK 0xFFFFFFFF 9470 #define DRV_MB_PARAM_OV_STORM_FW_VER_MAJOR_MASK 0xFF000000 9471 #define DRV_MB_PARAM_OV_STORM_FW_VER_MINOR_MASK 0x00FF0000 9472 #define DRV_MB_PARAM_OV_STORM_FW_VER_BUILD_MASK 0x0000FF00 9473 #define DRV_MB_PARAM_OV_STORM_FW_VER_DROP_MASK 0x000000FF 9474 9475 #define DRV_MSG_CODE_OV_UPDATE_DRIVER_STATE_SHIFT 0 9476 #define DRV_MSG_CODE_OV_UPDATE_DRIVER_STATE_MASK 0xF 9477 #define DRV_MSG_CODE_OV_UPDATE_DRIVER_STATE_UNKNOWN 0x1 9478 #define DRV_MSG_CODE_OV_UPDATE_DRIVER_STATE_NOT_LOADED 0x2 9479 #define DRV_MSG_CODE_OV_UPDATE_DRIVER_STATE_LOADING 0x3 9480 #define DRV_MSG_CODE_OV_UPDATE_DRIVER_STATE_DISABLED 0x4 9481 #define DRV_MSG_CODE_OV_UPDATE_DRIVER_STATE_ACTIVE 0x5 9482 9483 #define DRV_MB_PARAM_OV_MTU_SIZE_SHIFT 0 9484 #define DRV_MB_PARAM_OV_MTU_SIZE_MASK 0xFFFFFFFF 9485 9486 #define DRV_MB_PARAM_WOL_MASK (DRV_MB_PARAM_WOL_DEFAULT | \ 9487 DRV_MB_PARAM_WOL_DISABLED | \ 9488 DRV_MB_PARAM_WOL_ENABLED) 9489 #define DRV_MB_PARAM_WOL_DEFAULT DRV_MB_PARAM_UNLOAD_WOL_MCP 9490 #define DRV_MB_PARAM_WOL_DISABLED DRV_MB_PARAM_UNLOAD_WOL_DISABLED 9491 #define DRV_MB_PARAM_WOL_ENABLED DRV_MB_PARAM_UNLOAD_WOL_ENABLED 9492 9493 #define DRV_MB_PARAM_ESWITCH_MODE_MASK (DRV_MB_PARAM_ESWITCH_MODE_NONE | \ 9494 DRV_MB_PARAM_ESWITCH_MODE_VEB | \ 9495 DRV_MB_PARAM_ESWITCH_MODE_VEPA) 9496 #define DRV_MB_PARAM_ESWITCH_MODE_NONE 0x0 9497 #define DRV_MB_PARAM_ESWITCH_MODE_VEB 0x1 9498 #define DRV_MB_PARAM_ESWITCH_MODE_VEPA 0x2 9499 9500 #define DRV_MB_PARAM_SET_LED_MODE_OPER 0x0 9501 #define DRV_MB_PARAM_SET_LED_MODE_ON 0x1 9502 #define DRV_MB_PARAM_SET_LED_MODE_OFF 0x2 9503 9504 /* Resource Allocation params - Driver version support */ 9505 #define DRV_MB_PARAM_RESOURCE_ALLOC_VERSION_MAJOR_MASK 0xFFFF0000 9506 #define DRV_MB_PARAM_RESOURCE_ALLOC_VERSION_MAJOR_SHIFT 16 9507 #define DRV_MB_PARAM_RESOURCE_ALLOC_VERSION_MINOR_MASK 0x0000FFFF 9508 #define DRV_MB_PARAM_RESOURCE_ALLOC_VERSION_MINOR_SHIFT 0 9509 9510 #define DRV_MB_PARAM_BIST_REGISTER_TEST 1 9511 #define DRV_MB_PARAM_BIST_CLOCK_TEST 2 9512 #define DRV_MB_PARAM_BIST_NVM_TEST_NUM_IMAGES 3 9513 #define DRV_MB_PARAM_BIST_NVM_TEST_IMAGE_BY_INDEX 4 9514 9515 #define DRV_MB_PARAM_BIST_RC_UNKNOWN 0 9516 #define DRV_MB_PARAM_BIST_RC_PASSED 1 9517 #define DRV_MB_PARAM_BIST_RC_FAILED 2 9518 #define DRV_MB_PARAM_BIST_RC_INVALID_PARAMETER 3 9519 9520 #define DRV_MB_PARAM_BIST_TEST_INDEX_SHIFT 0 9521 #define DRV_MB_PARAM_BIST_TEST_INDEX_MASK 0x000000FF 9522 #define DRV_MB_PARAM_BIST_TEST_IMAGE_INDEX_SHIFT 8 9523 #define DRV_MB_PARAM_BIST_TEST_IMAGE_INDEX_MASK 0x0000FF00 9524 9525 u32 fw_mb_header; 9526 #define FW_MSG_CODE_MASK 0xffff0000 9527 #define FW_MSG_CODE_DRV_LOAD_ENGINE 0x10100000 9528 #define FW_MSG_CODE_DRV_LOAD_PORT 0x10110000 9529 #define FW_MSG_CODE_DRV_LOAD_FUNCTION 0x10120000 9530 #define FW_MSG_CODE_DRV_LOAD_REFUSED_PDA 0x10200000 9531 #define FW_MSG_CODE_DRV_LOAD_REFUSED_HSI 0x10210000 9532 #define FW_MSG_CODE_DRV_LOAD_REFUSED_DIAG 0x10220000 9533 #define FW_MSG_CODE_DRV_LOAD_DONE 0x11100000 9534 #define FW_MSG_CODE_DRV_UNLOAD_ENGINE 0x20110000 9535 #define FW_MSG_CODE_DRV_UNLOAD_PORT 0x20120000 9536 #define FW_MSG_CODE_DRV_UNLOAD_FUNCTION 0x20130000 9537 #define FW_MSG_CODE_DRV_UNLOAD_DONE 0x21100000 9538 #define FW_MSG_CODE_RESOURCE_ALLOC_OK 0x34000000 9539 #define FW_MSG_CODE_RESOURCE_ALLOC_UNKNOWN 0x35000000 9540 #define FW_MSG_CODE_RESOURCE_ALLOC_DEPRECATED 0x36000000 9541 #define FW_MSG_CODE_DRV_CFG_VF_MSIX_DONE 0xb0010000 9542 9543 #define FW_MSG_CODE_NVM_OK 0x00010000 9544 #define FW_MSG_CODE_OK 0x00160000 9545 9546 #define FW_MSG_CODE_OS_WOL_SUPPORTED 0x00800000 9547 #define FW_MSG_CODE_OS_WOL_NOT_SUPPORTED 0x00810000 9548 9549 #define FW_MSG_SEQ_NUMBER_MASK 0x0000ffff 9550 9551 u32 fw_mb_param; 9552 9553 /* get pf rdma protocol command responce */ 9554 #define FW_MB_PARAM_GET_PF_RDMA_NONE 0x0 9555 #define FW_MB_PARAM_GET_PF_RDMA_ROCE 0x1 9556 #define FW_MB_PARAM_GET_PF_RDMA_IWARP 0x2 9557 #define FW_MB_PARAM_GET_PF_RDMA_BOTH 0x3 9558 9559 u32 drv_pulse_mb; 9560 #define DRV_PULSE_SEQ_MASK 0x00007fff 9561 #define DRV_PULSE_SYSTEM_TIME_MASK 0xffff0000 9562 #define DRV_PULSE_ALWAYS_ALIVE 0x00008000 9563 9564 u32 mcp_pulse_mb; 9565 #define MCP_PULSE_SEQ_MASK 0x00007fff 9566 #define MCP_PULSE_ALWAYS_ALIVE 0x00008000 9567 #define MCP_EVENT_MASK 0xffff0000 9568 #define MCP_EVENT_OTHER_DRIVER_RESET_REQ 0x00010000 9569 9570 union drv_union_data union_data; 9571 }; 9572 9573 enum MFW_DRV_MSG_TYPE { 9574 MFW_DRV_MSG_LINK_CHANGE, 9575 MFW_DRV_MSG_FLR_FW_ACK_FAILED, 9576 MFW_DRV_MSG_VF_DISABLED, 9577 MFW_DRV_MSG_LLDP_DATA_UPDATED, 9578 MFW_DRV_MSG_DCBX_REMOTE_MIB_UPDATED, 9579 MFW_DRV_MSG_DCBX_OPERATIONAL_MIB_UPDATED, 9580 MFW_DRV_MSG_RESERVED4, 9581 MFW_DRV_MSG_BW_UPDATE, 9582 MFW_DRV_MSG_BW_UPDATE5, 9583 MFW_DRV_MSG_GET_LAN_STATS, 9584 MFW_DRV_MSG_GET_FCOE_STATS, 9585 MFW_DRV_MSG_GET_ISCSI_STATS, 9586 MFW_DRV_MSG_GET_RDMA_STATS, 9587 MFW_DRV_MSG_BW_UPDATE10, 9588 MFW_DRV_MSG_TRANSCEIVER_STATE_CHANGE, 9589 MFW_DRV_MSG_BW_UPDATE11, 9590 MFW_DRV_MSG_MAX 9591 }; 9592 9593 #define MFW_DRV_MSG_MAX_DWORDS(msgs) (((msgs - 1) >> 2) + 1) 9594 #define MFW_DRV_MSG_DWORD(msg_id) (msg_id >> 2) 9595 #define MFW_DRV_MSG_OFFSET(msg_id) ((msg_id & 0x3) << 3) 9596 #define MFW_DRV_MSG_MASK(msg_id) (0xff << MFW_DRV_MSG_OFFSET(msg_id)) 9597 9598 struct public_mfw_mb { 9599 u32 sup_msgs; 9600 u32 msg[MFW_DRV_MSG_MAX_DWORDS(MFW_DRV_MSG_MAX)]; 9601 u32 ack[MFW_DRV_MSG_MAX_DWORDS(MFW_DRV_MSG_MAX)]; 9602 }; 9603 9604 enum public_sections { 9605 PUBLIC_DRV_MB, 9606 PUBLIC_MFW_MB, 9607 PUBLIC_GLOBAL, 9608 PUBLIC_PATH, 9609 PUBLIC_PORT, 9610 PUBLIC_FUNC, 9611 PUBLIC_MAX_SECTIONS 9612 }; 9613 9614 struct mcp_public_data { 9615 u32 num_sections; 9616 u32 sections[PUBLIC_MAX_SECTIONS]; 9617 struct public_drv_mb drv_mb[MCP_GLOB_FUNC_MAX]; 9618 struct public_mfw_mb mfw_mb[MCP_GLOB_FUNC_MAX]; 9619 struct public_global global; 9620 struct public_path path[MCP_GLOB_PATH_MAX]; 9621 struct public_port port[MCP_GLOB_PORT_MAX]; 9622 struct public_func func[MCP_GLOB_FUNC_MAX]; 9623 }; 9624 9625 struct nvm_cfg_mac_address { 9626 u32 mac_addr_hi; 9627 #define NVM_CFG_MAC_ADDRESS_HI_MASK 0x0000FFFF 9628 #define NVM_CFG_MAC_ADDRESS_HI_OFFSET 0 9629 u32 mac_addr_lo; 9630 }; 9631 9632 struct nvm_cfg1_glob { 9633 u32 generic_cont0; 9634 #define NVM_CFG1_GLOB_MF_MODE_MASK 0x00000FF0 9635 #define NVM_CFG1_GLOB_MF_MODE_OFFSET 4 9636 #define NVM_CFG1_GLOB_MF_MODE_MF_ALLOWED 0x0 9637 #define NVM_CFG1_GLOB_MF_MODE_DEFAULT 0x1 9638 #define NVM_CFG1_GLOB_MF_MODE_SPIO4 0x2 9639 #define NVM_CFG1_GLOB_MF_MODE_NPAR1_0 0x3 9640 #define NVM_CFG1_GLOB_MF_MODE_NPAR1_5 0x4 9641 #define NVM_CFG1_GLOB_MF_MODE_NPAR2_0 0x5 9642 #define NVM_CFG1_GLOB_MF_MODE_BD 0x6 9643 #define NVM_CFG1_GLOB_MF_MODE_UFP 0x7 9644 u32 engineering_change[3]; 9645 u32 manufacturing_id; 9646 u32 serial_number[4]; 9647 u32 pcie_cfg; 9648 u32 mgmt_traffic; 9649 u32 core_cfg; 9650 #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_MASK 0x000000FF 9651 #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_OFFSET 0 9652 #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_BB_2X40G 0x0 9653 #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_2X50G 0x1 9654 #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_BB_1X100G 0x2 9655 #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_4X10G_F 0x3 9656 #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_BB_4X10G_E 0x4 9657 #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_BB_4X20G 0x5 9658 #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_1X40G 0xB 9659 #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_2X25G 0xC 9660 #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_1X25G 0xD 9661 #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_4X25G 0xE 9662 u32 e_lane_cfg1; 9663 u32 e_lane_cfg2; 9664 u32 f_lane_cfg1; 9665 u32 f_lane_cfg2; 9666 u32 mps10_preemphasis; 9667 u32 mps10_driver_current; 9668 u32 mps25_preemphasis; 9669 u32 mps25_driver_current; 9670 u32 pci_id; 9671 u32 pci_subsys_id; 9672 u32 bar; 9673 u32 mps10_txfir_main; 9674 u32 mps10_txfir_post; 9675 u32 mps25_txfir_main; 9676 u32 mps25_txfir_post; 9677 u32 manufacture_ver; 9678 u32 manufacture_time; 9679 u32 led_global_settings; 9680 u32 generic_cont1; 9681 u32 mbi_version; 9682 u32 mbi_date; 9683 u32 misc_sig; 9684 u32 device_capabilities; 9685 #define NVM_CFG1_GLOB_DEVICE_CAPABILITIES_ETHERNET 0x1 9686 #define NVM_CFG1_GLOB_DEVICE_CAPABILITIES_FCOE 0x2 9687 #define NVM_CFG1_GLOB_DEVICE_CAPABILITIES_ISCSI 0x4 9688 #define NVM_CFG1_GLOB_DEVICE_CAPABILITIES_ROCE 0x8 9689 u32 power_dissipated; 9690 u32 power_consumed; 9691 u32 efi_version; 9692 u32 multi_network_modes_capability; 9693 u32 reserved[41]; 9694 }; 9695 9696 struct nvm_cfg1_path { 9697 u32 reserved[30]; 9698 }; 9699 9700 struct nvm_cfg1_port { 9701 u32 reserved__m_relocated_to_option_123; 9702 u32 reserved__m_relocated_to_option_124; 9703 u32 generic_cont0; 9704 #define NVM_CFG1_PORT_DCBX_MODE_MASK 0x000F0000 9705 #define NVM_CFG1_PORT_DCBX_MODE_OFFSET 16 9706 #define NVM_CFG1_PORT_DCBX_MODE_DISABLED 0x0 9707 #define NVM_CFG1_PORT_DCBX_MODE_IEEE 0x1 9708 #define NVM_CFG1_PORT_DCBX_MODE_CEE 0x2 9709 #define NVM_CFG1_PORT_DCBX_MODE_DYNAMIC 0x3 9710 #define NVM_CFG1_PORT_DEFAULT_ENABLED_PROTOCOLS_MASK 0x00F00000 9711 #define NVM_CFG1_PORT_DEFAULT_ENABLED_PROTOCOLS_OFFSET 20 9712 #define NVM_CFG1_PORT_DEFAULT_ENABLED_PROTOCOLS_ETHERNET 0x1 9713 #define NVM_CFG1_PORT_DEFAULT_ENABLED_PROTOCOLS_FCOE 0x2 9714 #define NVM_CFG1_PORT_DEFAULT_ENABLED_PROTOCOLS_ISCSI 0x4 9715 u32 pcie_cfg; 9716 u32 features; 9717 u32 speed_cap_mask; 9718 #define NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_MASK 0x0000FFFF 9719 #define NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_OFFSET 0 9720 #define NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_1G 0x1 9721 #define NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_10G 0x2 9722 #define NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_25G 0x8 9723 #define NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_40G 0x10 9724 #define NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_50G 0x20 9725 #define NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_BB_100G 0x40 9726 u32 link_settings; 9727 #define NVM_CFG1_PORT_DRV_LINK_SPEED_MASK 0x0000000F 9728 #define NVM_CFG1_PORT_DRV_LINK_SPEED_OFFSET 0 9729 #define NVM_CFG1_PORT_DRV_LINK_SPEED_AUTONEG 0x0 9730 #define NVM_CFG1_PORT_DRV_LINK_SPEED_1G 0x1 9731 #define NVM_CFG1_PORT_DRV_LINK_SPEED_10G 0x2 9732 #define NVM_CFG1_PORT_DRV_LINK_SPEED_25G 0x4 9733 #define NVM_CFG1_PORT_DRV_LINK_SPEED_40G 0x5 9734 #define NVM_CFG1_PORT_DRV_LINK_SPEED_50G 0x6 9735 #define NVM_CFG1_PORT_DRV_LINK_SPEED_BB_100G 0x7 9736 #define NVM_CFG1_PORT_DRV_LINK_SPEED_SMARTLINQ 0x8 9737 #define NVM_CFG1_PORT_DRV_FLOW_CONTROL_MASK 0x00000070 9738 #define NVM_CFG1_PORT_DRV_FLOW_CONTROL_OFFSET 4 9739 #define NVM_CFG1_PORT_DRV_FLOW_CONTROL_AUTONEG 0x1 9740 #define NVM_CFG1_PORT_DRV_FLOW_CONTROL_RX 0x2 9741 #define NVM_CFG1_PORT_DRV_FLOW_CONTROL_TX 0x4 9742 u32 phy_cfg; 9743 u32 mgmt_traffic; 9744 u32 ext_phy; 9745 u32 mba_cfg1; 9746 u32 mba_cfg2; 9747 u32 vf_cfg; 9748 struct nvm_cfg_mac_address lldp_mac_address; 9749 u32 led_port_settings; 9750 u32 transceiver_00; 9751 u32 device_ids; 9752 u32 board_cfg; 9753 u32 mnm_10g_cap; 9754 u32 mnm_10g_ctrl; 9755 u32 mnm_10g_misc; 9756 u32 mnm_25g_cap; 9757 u32 mnm_25g_ctrl; 9758 u32 mnm_25g_misc; 9759 u32 mnm_40g_cap; 9760 u32 mnm_40g_ctrl; 9761 u32 mnm_40g_misc; 9762 u32 mnm_50g_cap; 9763 u32 mnm_50g_ctrl; 9764 u32 mnm_50g_misc; 9765 u32 mnm_100g_cap; 9766 u32 mnm_100g_ctrl; 9767 u32 mnm_100g_misc; 9768 u32 reserved[116]; 9769 }; 9770 9771 struct nvm_cfg1_func { 9772 struct nvm_cfg_mac_address mac_address; 9773 u32 rsrv1; 9774 u32 rsrv2; 9775 u32 device_id; 9776 u32 cmn_cfg; 9777 u32 pci_cfg; 9778 struct nvm_cfg_mac_address fcoe_node_wwn_mac_addr; 9779 struct nvm_cfg_mac_address fcoe_port_wwn_mac_addr; 9780 u32 preboot_generic_cfg; 9781 u32 reserved[8]; 9782 }; 9783 9784 struct nvm_cfg1 { 9785 struct nvm_cfg1_glob glob; 9786 struct nvm_cfg1_path path[MCP_GLOB_PATH_MAX]; 9787 struct nvm_cfg1_port port[MCP_GLOB_PORT_MAX]; 9788 struct nvm_cfg1_func func[MCP_GLOB_FUNC_MAX]; 9789 }; 9790 9791 enum spad_sections { 9792 SPAD_SECTION_TRACE, 9793 SPAD_SECTION_NVM_CFG, 9794 SPAD_SECTION_PUBLIC, 9795 SPAD_SECTION_PRIVATE, 9796 SPAD_SECTION_MAX 9797 }; 9798 9799 #define MCP_TRACE_SIZE 2048 /* 2kb */ 9800 9801 /* This section is located at a fixed location in the beginning of the 9802 * scratchpad, to ensure that the MCP trace is not run over during MFW upgrade. 9803 * All the rest of data has a floating location which differs from version to 9804 * version, and is pointed by the mcp_meta_data below. 9805 * Moreover, the spad_layout section is part of the MFW firmware, and is loaded 9806 * with it from nvram in order to clear this portion. 9807 */ 9808 struct static_init { 9809 u32 num_sections; 9810 offsize_t sections[SPAD_SECTION_MAX]; 9811 #define SECTION(_sec_) (*((offsize_t *)(STRUCT_OFFSET(sections[_sec_])))) 9812 9813 struct mcp_trace trace; 9814 #define MCP_TRACE_P ((struct mcp_trace *)(STRUCT_OFFSET(trace))) 9815 u8 trace_buffer[MCP_TRACE_SIZE]; 9816 #define MCP_TRACE_BUF ((u8 *)(STRUCT_OFFSET(trace_buffer))) 9817 /* running_mfw has the same definition as in nvm_map.h. 9818 * This bit indicate both the running dir, and the running bundle. 9819 * It is set once when the LIM is loaded. 9820 */ 9821 u32 running_mfw; 9822 #define RUNNING_MFW (*((u32 *)(STRUCT_OFFSET(running_mfw)))) 9823 u32 build_time; 9824 #define MFW_BUILD_TIME (*((u32 *)(STRUCT_OFFSET(build_time)))) 9825 u32 reset_type; 9826 #define RESET_TYPE (*((u32 *)(STRUCT_OFFSET(reset_type)))) 9827 u32 mfw_secure_mode; 9828 #define MFW_SECURE_MODE (*((u32 *)(STRUCT_OFFSET(mfw_secure_mode)))) 9829 u16 pme_status_pf_bitmap; 9830 #define PME_STATUS_PF_BITMAP (*((u16 *)(STRUCT_OFFSET(pme_status_pf_bitmap)))) 9831 u16 pme_enable_pf_bitmap; 9832 #define PME_ENABLE_PF_BITMAP (*((u16 *)(STRUCT_OFFSET(pme_enable_pf_bitmap)))) 9833 u32 mim_nvm_addr; 9834 u32 mim_start_addr; 9835 u32 ah_pcie_link_params; 9836 #define AH_PCIE_LINK_PARAMS_LINK_SPEED_MASK (0x000000ff) 9837 #define AH_PCIE_LINK_PARAMS_LINK_SPEED_SHIFT (0) 9838 #define AH_PCIE_LINK_PARAMS_LINK_WIDTH_MASK (0x0000ff00) 9839 #define AH_PCIE_LINK_PARAMS_LINK_WIDTH_SHIFT (8) 9840 #define AH_PCIE_LINK_PARAMS_ASPM_MODE_MASK (0x00ff0000) 9841 #define AH_PCIE_LINK_PARAMS_ASPM_MODE_SHIFT (16) 9842 #define AH_PCIE_LINK_PARAMS_ASPM_CAP_MASK (0xff000000) 9843 #define AH_PCIE_LINK_PARAMS_ASPM_CAP_SHIFT (24) 9844 #define AH_PCIE_LINK_PARAMS (*((u32 *)(STRUCT_OFFSET(ah_pcie_link_params)))) 9845 9846 u32 rsrv_persist[5]; /* Persist reserved for MFW upgrades */ 9847 }; 9848 9849 enum nvm_image_type { 9850 NVM_TYPE_TIM1 = 0x01, 9851 NVM_TYPE_TIM2 = 0x02, 9852 NVM_TYPE_MIM1 = 0x03, 9853 NVM_TYPE_MIM2 = 0x04, 9854 NVM_TYPE_MBA = 0x05, 9855 NVM_TYPE_MODULES_PN = 0x06, 9856 NVM_TYPE_VPD = 0x07, 9857 NVM_TYPE_MFW_TRACE1 = 0x08, 9858 NVM_TYPE_MFW_TRACE2 = 0x09, 9859 NVM_TYPE_NVM_CFG1 = 0x0a, 9860 NVM_TYPE_L2B = 0x0b, 9861 NVM_TYPE_DIR1 = 0x0c, 9862 NVM_TYPE_EAGLE_FW1 = 0x0d, 9863 NVM_TYPE_FALCON_FW1 = 0x0e, 9864 NVM_TYPE_PCIE_FW1 = 0x0f, 9865 NVM_TYPE_HW_SET = 0x10, 9866 NVM_TYPE_LIM = 0x11, 9867 NVM_TYPE_AVS_FW1 = 0x12, 9868 NVM_TYPE_DIR2 = 0x13, 9869 NVM_TYPE_CCM = 0x14, 9870 NVM_TYPE_EAGLE_FW2 = 0x15, 9871 NVM_TYPE_FALCON_FW2 = 0x16, 9872 NVM_TYPE_PCIE_FW2 = 0x17, 9873 NVM_TYPE_AVS_FW2 = 0x18, 9874 NVM_TYPE_INIT_HW = 0x19, 9875 NVM_TYPE_DEFAULT_CFG = 0x1a, 9876 NVM_TYPE_MDUMP = 0x1b, 9877 NVM_TYPE_META = 0x1c, 9878 NVM_TYPE_ISCSI_CFG = 0x1d, 9879 NVM_TYPE_FCOE_CFG = 0x1f, 9880 NVM_TYPE_ETH_PHY_FW1 = 0x20, 9881 NVM_TYPE_ETH_PHY_FW2 = 0x21, 9882 NVM_TYPE_MAX, 9883 }; 9884 9885 #define DIR_ID_1 (0) 9886 9887 #endif 9888