1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
2 /* QLogic qed NIC Driver
3  * Copyright (c) 2015-2017  QLogic Corporation
4  * Copyright (c) 2019-2021 Marvell International Ltd.
5  */
6 
7 #ifndef _QED_HSI_H
8 #define _QED_HSI_H
9 
10 #include <linux/types.h>
11 #include <linux/io.h>
12 #include <linux/bitops.h>
13 #include <linux/delay.h>
14 #include <linux/kernel.h>
15 #include <linux/list.h>
16 #include <linux/slab.h>
17 #include <linux/qed/common_hsi.h>
18 #include <linux/qed/storage_common.h>
19 #include <linux/qed/tcp_common.h>
20 #include <linux/qed/fcoe_common.h>
21 #include <linux/qed/eth_common.h>
22 #include <linux/qed/iscsi_common.h>
23 #include <linux/qed/nvmetcp_common.h>
24 #include <linux/qed/iwarp_common.h>
25 #include <linux/qed/rdma_common.h>
26 #include <linux/qed/roce_common.h>
27 #include <linux/qed/qed_fcoe_if.h>
28 
29 struct qed_hwfn;
30 struct qed_ptt;
31 
32 /* Opcodes for the event ring */
33 enum common_event_opcode {
34 	COMMON_EVENT_PF_START,
35 	COMMON_EVENT_PF_STOP,
36 	COMMON_EVENT_VF_START,
37 	COMMON_EVENT_VF_STOP,
38 	COMMON_EVENT_VF_PF_CHANNEL,
39 	COMMON_EVENT_VF_FLR,
40 	COMMON_EVENT_PF_UPDATE,
41 	COMMON_EVENT_FW_ERROR,
42 	COMMON_EVENT_RL_UPDATE,
43 	COMMON_EVENT_EMPTY,
44 	MAX_COMMON_EVENT_OPCODE
45 };
46 
47 /* Common Ramrod Command IDs */
48 enum common_ramrod_cmd_id {
49 	COMMON_RAMROD_UNUSED,
50 	COMMON_RAMROD_PF_START,
51 	COMMON_RAMROD_PF_STOP,
52 	COMMON_RAMROD_VF_START,
53 	COMMON_RAMROD_VF_STOP,
54 	COMMON_RAMROD_PF_UPDATE,
55 	COMMON_RAMROD_RL_UPDATE,
56 	COMMON_RAMROD_EMPTY,
57 	MAX_COMMON_RAMROD_CMD_ID
58 };
59 
60 /* How ll2 should deal with packet upon errors */
61 enum core_error_handle {
62 	LL2_DROP_PACKET,
63 	LL2_DO_NOTHING,
64 	LL2_ASSERT,
65 	MAX_CORE_ERROR_HANDLE
66 };
67 
68 /* Opcodes for the event ring */
69 enum core_event_opcode {
70 	CORE_EVENT_TX_QUEUE_START,
71 	CORE_EVENT_TX_QUEUE_STOP,
72 	CORE_EVENT_RX_QUEUE_START,
73 	CORE_EVENT_RX_QUEUE_STOP,
74 	CORE_EVENT_RX_QUEUE_FLUSH,
75 	CORE_EVENT_TX_QUEUE_UPDATE,
76 	CORE_EVENT_QUEUE_STATS_QUERY,
77 	MAX_CORE_EVENT_OPCODE
78 };
79 
80 /* The L4 pseudo checksum mode for Core */
81 enum core_l4_pseudo_checksum_mode {
82 	CORE_L4_PSEUDO_CSUM_CORRECT_LENGTH,
83 	CORE_L4_PSEUDO_CSUM_ZERO_LENGTH,
84 	MAX_CORE_L4_PSEUDO_CHECKSUM_MODE
85 };
86 
87 /* LL2 SP error code */
88 enum core_ll2_error_code {
89 	LL2_OK = 0,
90 	LL2_ERROR,
91 	MAX_CORE_LL2_ERROR_CODE
92 };
93 
94 /* Light-L2 RX Producers in Tstorm RAM */
95 struct core_ll2_port_stats {
96 	struct regpair gsi_invalid_hdr;
97 	struct regpair gsi_invalid_pkt_length;
98 	struct regpair gsi_unsupported_pkt_typ;
99 	struct regpair gsi_crcchksm_error;
100 };
101 
102 /* LL2 TX Per Queue Stats */
103 struct core_ll2_pstorm_per_queue_stat {
104 	struct regpair sent_ucast_bytes;
105 	struct regpair sent_mcast_bytes;
106 	struct regpair sent_bcast_bytes;
107 	struct regpair sent_ucast_pkts;
108 	struct regpair sent_mcast_pkts;
109 	struct regpair sent_bcast_pkts;
110 	struct regpair error_drop_pkts;
111 };
112 
113 /* Light-L2 RX Producers in Tstorm RAM */
114 struct core_ll2_rx_prod {
115 	__le16 bd_prod;
116 	__le16 cqe_prod;
117 };
118 
119 struct core_ll2_tstorm_per_queue_stat {
120 	struct regpair packet_too_big_discard;
121 	struct regpair no_buff_discard;
122 };
123 
124 struct core_ll2_ustorm_per_queue_stat {
125 	struct regpair rcv_ucast_bytes;
126 	struct regpair rcv_mcast_bytes;
127 	struct regpair rcv_bcast_bytes;
128 	struct regpair rcv_ucast_pkts;
129 	struct regpair rcv_mcast_pkts;
130 	struct regpair rcv_bcast_pkts;
131 };
132 
133 struct core_ll2_rx_per_queue_stat {
134 	struct core_ll2_tstorm_per_queue_stat tstorm_stat;
135 	struct core_ll2_ustorm_per_queue_stat ustorm_stat;
136 };
137 
138 struct core_ll2_tx_per_queue_stat {
139 	struct core_ll2_pstorm_per_queue_stat pstorm_stat;
140 };
141 
142 /* Structure for doorbell data, in PWM mode, for RX producers update. */
143 struct core_pwm_prod_update_data {
144 	__le16 icid; /* internal CID */
145 	u8 reserved0;
146 	u8 params;
147 #define CORE_PWM_PROD_UPDATE_DATA_AGG_CMD_MASK	  0x3
148 #define CORE_PWM_PROD_UPDATE_DATA_AGG_CMD_SHIFT   0
149 #define CORE_PWM_PROD_UPDATE_DATA_RESERVED1_MASK  0x3F	/* Set 0 */
150 #define CORE_PWM_PROD_UPDATE_DATA_RESERVED1_SHIFT 2
151 	struct core_ll2_rx_prod prod; /* Producers */
152 };
153 
154 /* Ramrod data for rx/tx queue statistics query ramrod */
155 struct core_queue_stats_query_ramrod_data {
156 	u8 rx_stat;
157 	u8 tx_stat;
158 	__le16 reserved[3];
159 	struct regpair rx_stat_addr;
160 	struct regpair tx_stat_addr;
161 };
162 
163 /* Core Ramrod Command IDs (light L2) */
164 enum core_ramrod_cmd_id {
165 	CORE_RAMROD_UNUSED,
166 	CORE_RAMROD_RX_QUEUE_START,
167 	CORE_RAMROD_TX_QUEUE_START,
168 	CORE_RAMROD_RX_QUEUE_STOP,
169 	CORE_RAMROD_TX_QUEUE_STOP,
170 	CORE_RAMROD_RX_QUEUE_FLUSH,
171 	CORE_RAMROD_TX_QUEUE_UPDATE,
172 	CORE_RAMROD_QUEUE_STATS_QUERY,
173 	MAX_CORE_RAMROD_CMD_ID
174 };
175 
176 /* Core RX CQE Type for Light L2 */
177 enum core_roce_flavor_type {
178 	CORE_ROCE,
179 	CORE_RROCE,
180 	MAX_CORE_ROCE_FLAVOR_TYPE
181 };
182 
183 /* Specifies how ll2 should deal with packets errors: packet_too_big and
184  * no_buff.
185  */
186 struct core_rx_action_on_error {
187 	u8 error_type;
188 #define CORE_RX_ACTION_ON_ERROR_PACKET_TOO_BIG_MASK	0x3
189 #define CORE_RX_ACTION_ON_ERROR_PACKET_TOO_BIG_SHIFT	0
190 #define CORE_RX_ACTION_ON_ERROR_NO_BUFF_MASK		0x3
191 #define CORE_RX_ACTION_ON_ERROR_NO_BUFF_SHIFT		2
192 #define CORE_RX_ACTION_ON_ERROR_RESERVED_MASK		0xF
193 #define CORE_RX_ACTION_ON_ERROR_RESERVED_SHIFT		4
194 };
195 
196 /* Core RX BD for Light L2 */
197 struct core_rx_bd {
198 	struct regpair addr;
199 	__le16 reserved[4];
200 };
201 
202 /* Core RX CM offload BD for Light L2 */
203 struct core_rx_bd_with_buff_len {
204 	struct regpair addr;
205 	__le16 buff_length;
206 	__le16 reserved[3];
207 };
208 
209 /* Core RX CM offload BD for Light L2 */
210 union core_rx_bd_union {
211 	struct core_rx_bd rx_bd;
212 	struct core_rx_bd_with_buff_len rx_bd_with_len;
213 };
214 
215 /* Opaque Data for Light L2 RX CQE */
216 struct core_rx_cqe_opaque_data {
217 	__le32 data[2];
218 };
219 
220 /* Core RX CQE Type for Light L2 */
221 enum core_rx_cqe_type {
222 	CORE_RX_CQE_ILLEGAL_TYPE,
223 	CORE_RX_CQE_TYPE_REGULAR,
224 	CORE_RX_CQE_TYPE_GSI_OFFLOAD,
225 	CORE_RX_CQE_TYPE_SLOW_PATH,
226 	MAX_CORE_RX_CQE_TYPE
227 };
228 
229 /* Core RX CQE for Light L2 */
230 struct core_rx_fast_path_cqe {
231 	u8 type;
232 	u8 placement_offset;
233 	struct parsing_and_err_flags parse_flags;
234 	__le16 packet_length;
235 	__le16 vlan;
236 	struct core_rx_cqe_opaque_data opaque_data;
237 	struct parsing_err_flags err_flags;
238 	u8 packet_source;
239 	u8 reserved0;
240 	__le32 reserved1[3];
241 };
242 
243 /* Core Rx CM offload CQE */
244 struct core_rx_gsi_offload_cqe {
245 	u8 type;
246 	u8 data_length_error;
247 	struct parsing_and_err_flags parse_flags;
248 	__le16 data_length;
249 	__le16 vlan;
250 	__le32 src_mac_addrhi;
251 	__le16 src_mac_addrlo;
252 	__le16 qp_id;
253 	__le32 src_qp;
254 	struct core_rx_cqe_opaque_data opaque_data;
255 	u8 packet_source;
256 	u8 reserved[3];
257 };
258 
259 /* Core RX CQE for Light L2 */
260 struct core_rx_slow_path_cqe {
261 	u8 type;
262 	u8 ramrod_cmd_id;
263 	__le16 echo;
264 	struct core_rx_cqe_opaque_data opaque_data;
265 	__le32 reserved1[5];
266 };
267 
268 /* Core RX CM offload BD for Light L2 */
269 union core_rx_cqe_union {
270 	struct core_rx_fast_path_cqe rx_cqe_fp;
271 	struct core_rx_gsi_offload_cqe rx_cqe_gsi;
272 	struct core_rx_slow_path_cqe rx_cqe_sp;
273 };
274 
275 /* RX packet source. */
276 enum core_rx_pkt_source {
277 	CORE_RX_PKT_SOURCE_NETWORK = 0,
278 	CORE_RX_PKT_SOURCE_LB,
279 	CORE_RX_PKT_SOURCE_TX,
280 	CORE_RX_PKT_SOURCE_LL2_TX,
281 	MAX_CORE_RX_PKT_SOURCE
282 };
283 
284 /* Ramrod data for rx queue start ramrod */
285 struct core_rx_start_ramrod_data {
286 	struct regpair bd_base;
287 	struct regpair cqe_pbl_addr;
288 	__le16 mtu;
289 	__le16 sb_id;
290 	u8 sb_index;
291 	u8 complete_cqe_flg;
292 	u8 complete_event_flg;
293 	u8 drop_ttl0_flg;
294 	__le16 num_of_pbl_pages;
295 	u8 inner_vlan_stripping_en;
296 	u8 report_outer_vlan;
297 	u8 queue_id;
298 	u8 main_func_queue;
299 	u8 mf_si_bcast_accept_all;
300 	u8 mf_si_mcast_accept_all;
301 	struct core_rx_action_on_error action_on_error;
302 	u8 gsi_offload_flag;
303 	u8 vport_id_valid;
304 	u8 vport_id;
305 	u8 zero_prod_flg;
306 	u8 wipe_inner_vlan_pri_en;
307 	u8 reserved[2];
308 };
309 
310 /* Ramrod data for rx queue stop ramrod */
311 struct core_rx_stop_ramrod_data {
312 	u8 complete_cqe_flg;
313 	u8 complete_event_flg;
314 	u8 queue_id;
315 	u8 reserved1;
316 	__le16 reserved2[2];
317 };
318 
319 /* Flags for Core TX BD */
320 struct core_tx_bd_data {
321 	__le16 as_bitfield;
322 #define CORE_TX_BD_DATA_FORCE_VLAN_MODE_MASK		0x1
323 #define CORE_TX_BD_DATA_FORCE_VLAN_MODE_SHIFT		0
324 #define CORE_TX_BD_DATA_VLAN_INSERTION_MASK		0x1
325 #define CORE_TX_BD_DATA_VLAN_INSERTION_SHIFT		1
326 #define CORE_TX_BD_DATA_START_BD_MASK			0x1
327 #define CORE_TX_BD_DATA_START_BD_SHIFT			2
328 #define CORE_TX_BD_DATA_IP_CSUM_MASK			0x1
329 #define CORE_TX_BD_DATA_IP_CSUM_SHIFT			3
330 #define CORE_TX_BD_DATA_L4_CSUM_MASK			0x1
331 #define CORE_TX_BD_DATA_L4_CSUM_SHIFT			4
332 #define CORE_TX_BD_DATA_IPV6_EXT_MASK			0x1
333 #define CORE_TX_BD_DATA_IPV6_EXT_SHIFT			5
334 #define CORE_TX_BD_DATA_L4_PROTOCOL_MASK		0x1
335 #define CORE_TX_BD_DATA_L4_PROTOCOL_SHIFT		6
336 #define CORE_TX_BD_DATA_L4_PSEUDO_CSUM_MODE_MASK	0x1
337 #define CORE_TX_BD_DATA_L4_PSEUDO_CSUM_MODE_SHIFT	7
338 #define CORE_TX_BD_DATA_NBDS_MASK			0xF
339 #define CORE_TX_BD_DATA_NBDS_SHIFT			8
340 #define CORE_TX_BD_DATA_ROCE_FLAV_MASK			0x1
341 #define CORE_TX_BD_DATA_ROCE_FLAV_SHIFT			12
342 #define CORE_TX_BD_DATA_IP_LEN_MASK			0x1
343 #define CORE_TX_BD_DATA_IP_LEN_SHIFT			13
344 #define CORE_TX_BD_DATA_DISABLE_STAG_INSERTION_MASK	0x1
345 #define CORE_TX_BD_DATA_DISABLE_STAG_INSERTION_SHIFT	14
346 #define CORE_TX_BD_DATA_RESERVED0_MASK			0x1
347 #define CORE_TX_BD_DATA_RESERVED0_SHIFT			15
348 };
349 
350 /* Core TX BD for Light L2 */
351 struct core_tx_bd {
352 	struct regpair addr;
353 	__le16 nbytes;
354 	__le16 nw_vlan_or_lb_echo;
355 	struct core_tx_bd_data bd_data;
356 	__le16 bitfield1;
357 #define CORE_TX_BD_L4_HDR_OFFSET_W_MASK		0x3FFF
358 #define CORE_TX_BD_L4_HDR_OFFSET_W_SHIFT	0
359 #define CORE_TX_BD_TX_DST_MASK			0x3
360 #define CORE_TX_BD_TX_DST_SHIFT			14
361 };
362 
363 /* Light L2 TX Destination */
364 enum core_tx_dest {
365 	CORE_TX_DEST_NW,
366 	CORE_TX_DEST_LB,
367 	CORE_TX_DEST_RESERVED,
368 	CORE_TX_DEST_DROP,
369 	MAX_CORE_TX_DEST
370 };
371 
372 /* Ramrod data for tx queue start ramrod */
373 struct core_tx_start_ramrod_data {
374 	struct regpair pbl_base_addr;
375 	__le16 mtu;
376 	__le16 sb_id;
377 	u8 sb_index;
378 	u8 stats_en;
379 	u8 stats_id;
380 	u8 conn_type;
381 	__le16 pbl_size;
382 	__le16 qm_pq_id;
383 	u8 gsi_offload_flag;
384 	u8 ctx_stats_en;
385 	u8 vport_id_valid;
386 	u8 vport_id;
387 	u8 enforce_security_flag;
388 	u8 reserved[7];
389 };
390 
391 /* Ramrod data for tx queue stop ramrod */
392 struct core_tx_stop_ramrod_data {
393 	__le32 reserved0[2];
394 };
395 
396 /* Ramrod data for tx queue update ramrod */
397 struct core_tx_update_ramrod_data {
398 	u8 update_qm_pq_id_flg;
399 	u8 reserved0;
400 	__le16 qm_pq_id;
401 	__le32 reserved1[1];
402 };
403 
404 /* Enum flag for what type of dcb data to update */
405 enum dcb_dscp_update_mode {
406 	DONT_UPDATE_DCB_DSCP,
407 	UPDATE_DCB,
408 	UPDATE_DSCP,
409 	UPDATE_DCB_DSCP,
410 	MAX_DCB_DSCP_UPDATE_MODE
411 };
412 
413 /* The core storm context for the Ystorm */
414 struct ystorm_core_conn_st_ctx {
415 	__le32 reserved[4];
416 };
417 
418 /* The core storm context for the Pstorm */
419 struct pstorm_core_conn_st_ctx {
420 	__le32 reserved[20];
421 };
422 
423 /* Core Slowpath Connection storm context of Xstorm */
424 struct xstorm_core_conn_st_ctx {
425 	struct regpair spq_base_addr;
426 	__le32 reserved0[2];
427 	__le16 spq_cons;
428 	__le16 reserved1[111];
429 };
430 
431 struct xstorm_core_conn_ag_ctx {
432 	u8 reserved0;
433 	u8 state;
434 	u8 flags0;
435 #define XSTORM_CORE_CONN_AG_CTX_EXIST_IN_QM0_MASK	0x1
436 #define XSTORM_CORE_CONN_AG_CTX_EXIST_IN_QM0_SHIFT	0
437 #define XSTORM_CORE_CONN_AG_CTX_RESERVED1_MASK	0x1
438 #define XSTORM_CORE_CONN_AG_CTX_RESERVED1_SHIFT	1
439 #define XSTORM_CORE_CONN_AG_CTX_RESERVED2_MASK	0x1
440 #define XSTORM_CORE_CONN_AG_CTX_RESERVED2_SHIFT	2
441 #define XSTORM_CORE_CONN_AG_CTX_EXIST_IN_QM3_MASK	0x1
442 #define XSTORM_CORE_CONN_AG_CTX_EXIST_IN_QM3_SHIFT	3
443 #define XSTORM_CORE_CONN_AG_CTX_RESERVED3_MASK	0x1
444 #define XSTORM_CORE_CONN_AG_CTX_RESERVED3_SHIFT	4
445 #define XSTORM_CORE_CONN_AG_CTX_RESERVED4_MASK	0x1
446 #define XSTORM_CORE_CONN_AG_CTX_RESERVED4_SHIFT	5
447 #define XSTORM_CORE_CONN_AG_CTX_RESERVED5_MASK	0x1
448 #define XSTORM_CORE_CONN_AG_CTX_RESERVED5_SHIFT	6
449 #define XSTORM_CORE_CONN_AG_CTX_RESERVED6_MASK	0x1
450 #define XSTORM_CORE_CONN_AG_CTX_RESERVED6_SHIFT	7
451 	u8 flags1;
452 #define XSTORM_CORE_CONN_AG_CTX_RESERVED7_MASK	0x1
453 #define XSTORM_CORE_CONN_AG_CTX_RESERVED7_SHIFT	0
454 #define XSTORM_CORE_CONN_AG_CTX_RESERVED8_MASK	0x1
455 #define XSTORM_CORE_CONN_AG_CTX_RESERVED8_SHIFT	1
456 #define XSTORM_CORE_CONN_AG_CTX_RESERVED9_MASK	0x1
457 #define XSTORM_CORE_CONN_AG_CTX_RESERVED9_SHIFT	2
458 #define XSTORM_CORE_CONN_AG_CTX_BIT11_MASK		0x1
459 #define XSTORM_CORE_CONN_AG_CTX_BIT11_SHIFT		3
460 #define XSTORM_CORE_CONN_AG_CTX_BIT12_MASK		0x1
461 #define XSTORM_CORE_CONN_AG_CTX_BIT12_SHIFT		4
462 #define XSTORM_CORE_CONN_AG_CTX_BIT13_MASK		0x1
463 #define XSTORM_CORE_CONN_AG_CTX_BIT13_SHIFT		5
464 #define XSTORM_CORE_CONN_AG_CTX_TX_RULE_ACTIVE_MASK	0x1
465 #define XSTORM_CORE_CONN_AG_CTX_TX_RULE_ACTIVE_SHIFT	6
466 #define XSTORM_CORE_CONN_AG_CTX_DQ_CF_ACTIVE_MASK	0x1
467 #define XSTORM_CORE_CONN_AG_CTX_DQ_CF_ACTIVE_SHIFT	7
468 	u8 flags2;
469 #define XSTORM_CORE_CONN_AG_CTX_CF0_MASK	0x3
470 #define XSTORM_CORE_CONN_AG_CTX_CF0_SHIFT	0
471 #define XSTORM_CORE_CONN_AG_CTX_CF1_MASK	0x3
472 #define XSTORM_CORE_CONN_AG_CTX_CF1_SHIFT	2
473 #define XSTORM_CORE_CONN_AG_CTX_CF2_MASK	0x3
474 #define XSTORM_CORE_CONN_AG_CTX_CF2_SHIFT	4
475 #define XSTORM_CORE_CONN_AG_CTX_CF3_MASK	0x3
476 #define XSTORM_CORE_CONN_AG_CTX_CF3_SHIFT	6
477 	u8 flags3;
478 #define XSTORM_CORE_CONN_AG_CTX_CF4_MASK	0x3
479 #define XSTORM_CORE_CONN_AG_CTX_CF4_SHIFT	0
480 #define XSTORM_CORE_CONN_AG_CTX_CF5_MASK	0x3
481 #define XSTORM_CORE_CONN_AG_CTX_CF5_SHIFT	2
482 #define XSTORM_CORE_CONN_AG_CTX_CF6_MASK	0x3
483 #define XSTORM_CORE_CONN_AG_CTX_CF6_SHIFT	4
484 #define XSTORM_CORE_CONN_AG_CTX_CF7_MASK	0x3
485 #define XSTORM_CORE_CONN_AG_CTX_CF7_SHIFT	6
486 	u8 flags4;
487 #define XSTORM_CORE_CONN_AG_CTX_CF8_MASK	0x3
488 #define XSTORM_CORE_CONN_AG_CTX_CF8_SHIFT	0
489 #define XSTORM_CORE_CONN_AG_CTX_CF9_MASK	0x3
490 #define XSTORM_CORE_CONN_AG_CTX_CF9_SHIFT	2
491 #define XSTORM_CORE_CONN_AG_CTX_CF10_MASK	0x3
492 #define XSTORM_CORE_CONN_AG_CTX_CF10_SHIFT	4
493 #define XSTORM_CORE_CONN_AG_CTX_CF11_MASK	0x3
494 #define XSTORM_CORE_CONN_AG_CTX_CF11_SHIFT	6
495 	u8 flags5;
496 #define XSTORM_CORE_CONN_AG_CTX_CF12_MASK	0x3
497 #define XSTORM_CORE_CONN_AG_CTX_CF12_SHIFT	0
498 #define XSTORM_CORE_CONN_AG_CTX_CF13_MASK	0x3
499 #define XSTORM_CORE_CONN_AG_CTX_CF13_SHIFT	2
500 #define XSTORM_CORE_CONN_AG_CTX_CF14_MASK	0x3
501 #define XSTORM_CORE_CONN_AG_CTX_CF14_SHIFT	4
502 #define XSTORM_CORE_CONN_AG_CTX_CF15_MASK	0x3
503 #define XSTORM_CORE_CONN_AG_CTX_CF15_SHIFT	6
504 	u8 flags6;
505 #define XSTORM_CORE_CONN_AG_CTX_CONSOLID_PROD_CF_MASK	0x3
506 #define XSTORM_CORE_CONN_AG_CTX_CONSOLID_PROD_CF_SHIFT	0
507 #define XSTORM_CORE_CONN_AG_CTX_CF17_MASK			0x3
508 #define XSTORM_CORE_CONN_AG_CTX_CF17_SHIFT			2
509 #define XSTORM_CORE_CONN_AG_CTX_DQ_CF_MASK			0x3
510 #define XSTORM_CORE_CONN_AG_CTX_DQ_CF_SHIFT			4
511 #define XSTORM_CORE_CONN_AG_CTX_TERMINATE_CF_MASK		0x3
512 #define XSTORM_CORE_CONN_AG_CTX_TERMINATE_CF_SHIFT		6
513 	u8 flags7;
514 #define XSTORM_CORE_CONN_AG_CTX_FLUSH_Q0_MASK	0x3
515 #define XSTORM_CORE_CONN_AG_CTX_FLUSH_Q0_SHIFT	0
516 #define XSTORM_CORE_CONN_AG_CTX_RESERVED10_MASK	0x3
517 #define XSTORM_CORE_CONN_AG_CTX_RESERVED10_SHIFT	2
518 #define XSTORM_CORE_CONN_AG_CTX_SLOW_PATH_MASK	0x3
519 #define XSTORM_CORE_CONN_AG_CTX_SLOW_PATH_SHIFT	4
520 #define XSTORM_CORE_CONN_AG_CTX_CF0EN_MASK		0x1
521 #define XSTORM_CORE_CONN_AG_CTX_CF0EN_SHIFT		6
522 #define XSTORM_CORE_CONN_AG_CTX_CF1EN_MASK		0x1
523 #define XSTORM_CORE_CONN_AG_CTX_CF1EN_SHIFT		7
524 	u8 flags8;
525 #define XSTORM_CORE_CONN_AG_CTX_CF2EN_MASK	0x1
526 #define XSTORM_CORE_CONN_AG_CTX_CF2EN_SHIFT	0
527 #define XSTORM_CORE_CONN_AG_CTX_CF3EN_MASK	0x1
528 #define XSTORM_CORE_CONN_AG_CTX_CF3EN_SHIFT	1
529 #define XSTORM_CORE_CONN_AG_CTX_CF4EN_MASK	0x1
530 #define XSTORM_CORE_CONN_AG_CTX_CF4EN_SHIFT	2
531 #define XSTORM_CORE_CONN_AG_CTX_CF5EN_MASK	0x1
532 #define XSTORM_CORE_CONN_AG_CTX_CF5EN_SHIFT	3
533 #define XSTORM_CORE_CONN_AG_CTX_CF6EN_MASK	0x1
534 #define XSTORM_CORE_CONN_AG_CTX_CF6EN_SHIFT	4
535 #define XSTORM_CORE_CONN_AG_CTX_CF7EN_MASK	0x1
536 #define XSTORM_CORE_CONN_AG_CTX_CF7EN_SHIFT	5
537 #define XSTORM_CORE_CONN_AG_CTX_CF8EN_MASK	0x1
538 #define XSTORM_CORE_CONN_AG_CTX_CF8EN_SHIFT	6
539 #define XSTORM_CORE_CONN_AG_CTX_CF9EN_MASK	0x1
540 #define XSTORM_CORE_CONN_AG_CTX_CF9EN_SHIFT	7
541 	u8 flags9;
542 #define XSTORM_CORE_CONN_AG_CTX_CF10EN_MASK			0x1
543 #define XSTORM_CORE_CONN_AG_CTX_CF10EN_SHIFT			0
544 #define XSTORM_CORE_CONN_AG_CTX_CF11EN_MASK			0x1
545 #define XSTORM_CORE_CONN_AG_CTX_CF11EN_SHIFT			1
546 #define XSTORM_CORE_CONN_AG_CTX_CF12EN_MASK			0x1
547 #define XSTORM_CORE_CONN_AG_CTX_CF12EN_SHIFT			2
548 #define XSTORM_CORE_CONN_AG_CTX_CF13EN_MASK			0x1
549 #define XSTORM_CORE_CONN_AG_CTX_CF13EN_SHIFT			3
550 #define XSTORM_CORE_CONN_AG_CTX_CF14EN_MASK			0x1
551 #define XSTORM_CORE_CONN_AG_CTX_CF14EN_SHIFT			4
552 #define XSTORM_CORE_CONN_AG_CTX_CF15EN_MASK			0x1
553 #define XSTORM_CORE_CONN_AG_CTX_CF15EN_SHIFT			5
554 #define XSTORM_CORE_CONN_AG_CTX_CONSOLID_PROD_CF_EN_MASK	0x1
555 #define XSTORM_CORE_CONN_AG_CTX_CONSOLID_PROD_CF_EN_SHIFT	6
556 #define XSTORM_CORE_CONN_AG_CTX_CF17EN_MASK			0x1
557 #define XSTORM_CORE_CONN_AG_CTX_CF17EN_SHIFT			7
558 	u8 flags10;
559 #define XSTORM_CORE_CONN_AG_CTX_DQ_CF_EN_MASK		0x1
560 #define XSTORM_CORE_CONN_AG_CTX_DQ_CF_EN_SHIFT		0
561 #define XSTORM_CORE_CONN_AG_CTX_TERMINATE_CF_EN_MASK		0x1
562 #define XSTORM_CORE_CONN_AG_CTX_TERMINATE_CF_EN_SHIFT	1
563 #define XSTORM_CORE_CONN_AG_CTX_FLUSH_Q0_EN_MASK		0x1
564 #define XSTORM_CORE_CONN_AG_CTX_FLUSH_Q0_EN_SHIFT		2
565 #define XSTORM_CORE_CONN_AG_CTX_RESERVED11_MASK		0x1
566 #define XSTORM_CORE_CONN_AG_CTX_RESERVED11_SHIFT		3
567 #define XSTORM_CORE_CONN_AG_CTX_SLOW_PATH_EN_MASK		0x1
568 #define XSTORM_CORE_CONN_AG_CTX_SLOW_PATH_EN_SHIFT		4
569 #define XSTORM_CORE_CONN_AG_CTX_CF23EN_MASK			0x1
570 #define XSTORM_CORE_CONN_AG_CTX_CF23EN_SHIFT			5
571 #define XSTORM_CORE_CONN_AG_CTX_RESERVED12_MASK		0x1
572 #define XSTORM_CORE_CONN_AG_CTX_RESERVED12_SHIFT		6
573 #define XSTORM_CORE_CONN_AG_CTX_RESERVED13_MASK		0x1
574 #define XSTORM_CORE_CONN_AG_CTX_RESERVED13_SHIFT		7
575 	u8 flags11;
576 #define XSTORM_CORE_CONN_AG_CTX_RESERVED14_MASK	0x1
577 #define XSTORM_CORE_CONN_AG_CTX_RESERVED14_SHIFT	0
578 #define XSTORM_CORE_CONN_AG_CTX_RESERVED15_MASK	0x1
579 #define XSTORM_CORE_CONN_AG_CTX_RESERVED15_SHIFT	1
580 #define XSTORM_CORE_CONN_AG_CTX_TX_DEC_RULE_EN_MASK	0x1
581 #define XSTORM_CORE_CONN_AG_CTX_TX_DEC_RULE_EN_SHIFT	2
582 #define XSTORM_CORE_CONN_AG_CTX_RULE5EN_MASK		0x1
583 #define XSTORM_CORE_CONN_AG_CTX_RULE5EN_SHIFT	3
584 #define XSTORM_CORE_CONN_AG_CTX_RULE6EN_MASK		0x1
585 #define XSTORM_CORE_CONN_AG_CTX_RULE6EN_SHIFT	4
586 #define XSTORM_CORE_CONN_AG_CTX_RULE7EN_MASK		0x1
587 #define XSTORM_CORE_CONN_AG_CTX_RULE7EN_SHIFT	5
588 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED1_MASK	0x1
589 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED1_SHIFT	6
590 #define XSTORM_CORE_CONN_AG_CTX_RULE9EN_MASK		0x1
591 #define XSTORM_CORE_CONN_AG_CTX_RULE9EN_SHIFT	7
592 	u8 flags12;
593 #define XSTORM_CORE_CONN_AG_CTX_RULE10EN_MASK	0x1
594 #define XSTORM_CORE_CONN_AG_CTX_RULE10EN_SHIFT	0
595 #define XSTORM_CORE_CONN_AG_CTX_RULE11EN_MASK	0x1
596 #define XSTORM_CORE_CONN_AG_CTX_RULE11EN_SHIFT	1
597 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED2_MASK	0x1
598 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED2_SHIFT	2
599 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED3_MASK	0x1
600 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED3_SHIFT	3
601 #define XSTORM_CORE_CONN_AG_CTX_RULE14EN_MASK	0x1
602 #define XSTORM_CORE_CONN_AG_CTX_RULE14EN_SHIFT	4
603 #define XSTORM_CORE_CONN_AG_CTX_RULE15EN_MASK	0x1
604 #define XSTORM_CORE_CONN_AG_CTX_RULE15EN_SHIFT	5
605 #define XSTORM_CORE_CONN_AG_CTX_RULE16EN_MASK	0x1
606 #define XSTORM_CORE_CONN_AG_CTX_RULE16EN_SHIFT	6
607 #define XSTORM_CORE_CONN_AG_CTX_RULE17EN_MASK	0x1
608 #define XSTORM_CORE_CONN_AG_CTX_RULE17EN_SHIFT	7
609 	u8 flags13;
610 #define XSTORM_CORE_CONN_AG_CTX_RULE18EN_MASK	0x1
611 #define XSTORM_CORE_CONN_AG_CTX_RULE18EN_SHIFT	0
612 #define XSTORM_CORE_CONN_AG_CTX_RULE19EN_MASK	0x1
613 #define XSTORM_CORE_CONN_AG_CTX_RULE19EN_SHIFT	1
614 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED4_MASK	0x1
615 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED4_SHIFT	2
616 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED5_MASK	0x1
617 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED5_SHIFT	3
618 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED6_MASK	0x1
619 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED6_SHIFT	4
620 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED7_MASK	0x1
621 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED7_SHIFT	5
622 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED8_MASK	0x1
623 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED8_SHIFT	6
624 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED9_MASK	0x1
625 #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED9_SHIFT	7
626 	u8 flags14;
627 #define XSTORM_CORE_CONN_AG_CTX_BIT16_MASK	0x1
628 #define XSTORM_CORE_CONN_AG_CTX_BIT16_SHIFT	0
629 #define XSTORM_CORE_CONN_AG_CTX_BIT17_MASK	0x1
630 #define XSTORM_CORE_CONN_AG_CTX_BIT17_SHIFT	1
631 #define XSTORM_CORE_CONN_AG_CTX_BIT18_MASK	0x1
632 #define XSTORM_CORE_CONN_AG_CTX_BIT18_SHIFT	2
633 #define XSTORM_CORE_CONN_AG_CTX_BIT19_MASK	0x1
634 #define XSTORM_CORE_CONN_AG_CTX_BIT19_SHIFT	3
635 #define XSTORM_CORE_CONN_AG_CTX_BIT20_MASK	0x1
636 #define XSTORM_CORE_CONN_AG_CTX_BIT20_SHIFT	4
637 #define XSTORM_CORE_CONN_AG_CTX_BIT21_MASK	0x1
638 #define XSTORM_CORE_CONN_AG_CTX_BIT21_SHIFT	5
639 #define XSTORM_CORE_CONN_AG_CTX_CF23_MASK	0x3
640 #define XSTORM_CORE_CONN_AG_CTX_CF23_SHIFT	6
641 	u8 byte2;
642 	__le16 physical_q0;
643 	__le16 consolid_prod;
644 	__le16 reserved16;
645 	__le16 tx_bd_cons;
646 	__le16 tx_bd_or_spq_prod;
647 	__le16 updated_qm_pq_id;
648 	__le16 conn_dpi;
649 	u8 byte3;
650 	u8 byte4;
651 	u8 byte5;
652 	u8 byte6;
653 	__le32 reg0;
654 	__le32 reg1;
655 	__le32 reg2;
656 	__le32 reg3;
657 	__le32 reg4;
658 	__le32 reg5;
659 	__le32 reg6;
660 	__le16 word7;
661 	__le16 word8;
662 	__le16 word9;
663 	__le16 word10;
664 	__le32 reg7;
665 	__le32 reg8;
666 	__le32 reg9;
667 	u8 byte7;
668 	u8 byte8;
669 	u8 byte9;
670 	u8 byte10;
671 	u8 byte11;
672 	u8 byte12;
673 	u8 byte13;
674 	u8 byte14;
675 	u8 byte15;
676 	u8 e5_reserved;
677 	__le16 word11;
678 	__le32 reg10;
679 	__le32 reg11;
680 	__le32 reg12;
681 	__le32 reg13;
682 	__le32 reg14;
683 	__le32 reg15;
684 	__le32 reg16;
685 	__le32 reg17;
686 	__le32 reg18;
687 	__le32 reg19;
688 	__le16 word12;
689 	__le16 word13;
690 	__le16 word14;
691 	__le16 word15;
692 };
693 
694 struct tstorm_core_conn_ag_ctx {
695 	u8 byte0;
696 	u8 byte1;
697 	u8 flags0;
698 #define TSTORM_CORE_CONN_AG_CTX_BIT0_MASK	0x1
699 #define TSTORM_CORE_CONN_AG_CTX_BIT0_SHIFT	0
700 #define TSTORM_CORE_CONN_AG_CTX_BIT1_MASK	0x1
701 #define TSTORM_CORE_CONN_AG_CTX_BIT1_SHIFT	1
702 #define TSTORM_CORE_CONN_AG_CTX_BIT2_MASK	0x1
703 #define TSTORM_CORE_CONN_AG_CTX_BIT2_SHIFT	2
704 #define TSTORM_CORE_CONN_AG_CTX_BIT3_MASK	0x1
705 #define TSTORM_CORE_CONN_AG_CTX_BIT3_SHIFT	3
706 #define TSTORM_CORE_CONN_AG_CTX_BIT4_MASK	0x1
707 #define TSTORM_CORE_CONN_AG_CTX_BIT4_SHIFT	4
708 #define TSTORM_CORE_CONN_AG_CTX_BIT5_MASK	0x1
709 #define TSTORM_CORE_CONN_AG_CTX_BIT5_SHIFT	5
710 #define TSTORM_CORE_CONN_AG_CTX_CF0_MASK	0x3
711 #define TSTORM_CORE_CONN_AG_CTX_CF0_SHIFT	6
712 	u8 flags1;
713 #define TSTORM_CORE_CONN_AG_CTX_CF1_MASK	0x3
714 #define TSTORM_CORE_CONN_AG_CTX_CF1_SHIFT	0
715 #define TSTORM_CORE_CONN_AG_CTX_CF2_MASK	0x3
716 #define TSTORM_CORE_CONN_AG_CTX_CF2_SHIFT	2
717 #define TSTORM_CORE_CONN_AG_CTX_CF3_MASK	0x3
718 #define TSTORM_CORE_CONN_AG_CTX_CF3_SHIFT	4
719 #define TSTORM_CORE_CONN_AG_CTX_CF4_MASK	0x3
720 #define TSTORM_CORE_CONN_AG_CTX_CF4_SHIFT	6
721 	u8 flags2;
722 #define TSTORM_CORE_CONN_AG_CTX_CF5_MASK	0x3
723 #define TSTORM_CORE_CONN_AG_CTX_CF5_SHIFT	0
724 #define TSTORM_CORE_CONN_AG_CTX_CF6_MASK	0x3
725 #define TSTORM_CORE_CONN_AG_CTX_CF6_SHIFT	2
726 #define TSTORM_CORE_CONN_AG_CTX_CF7_MASK	0x3
727 #define TSTORM_CORE_CONN_AG_CTX_CF7_SHIFT	4
728 #define TSTORM_CORE_CONN_AG_CTX_CF8_MASK	0x3
729 #define TSTORM_CORE_CONN_AG_CTX_CF8_SHIFT	6
730 	u8 flags3;
731 #define TSTORM_CORE_CONN_AG_CTX_CF9_MASK	0x3
732 #define TSTORM_CORE_CONN_AG_CTX_CF9_SHIFT	0
733 #define TSTORM_CORE_CONN_AG_CTX_CF10_MASK	0x3
734 #define TSTORM_CORE_CONN_AG_CTX_CF10_SHIFT	2
735 #define TSTORM_CORE_CONN_AG_CTX_CF0EN_MASK	0x1
736 #define TSTORM_CORE_CONN_AG_CTX_CF0EN_SHIFT	4
737 #define TSTORM_CORE_CONN_AG_CTX_CF1EN_MASK	0x1
738 #define TSTORM_CORE_CONN_AG_CTX_CF1EN_SHIFT	5
739 #define TSTORM_CORE_CONN_AG_CTX_CF2EN_MASK	0x1
740 #define TSTORM_CORE_CONN_AG_CTX_CF2EN_SHIFT	6
741 #define TSTORM_CORE_CONN_AG_CTX_CF3EN_MASK	0x1
742 #define TSTORM_CORE_CONN_AG_CTX_CF3EN_SHIFT	7
743 	u8 flags4;
744 #define TSTORM_CORE_CONN_AG_CTX_CF4EN_MASK		0x1
745 #define TSTORM_CORE_CONN_AG_CTX_CF4EN_SHIFT		0
746 #define TSTORM_CORE_CONN_AG_CTX_CF5EN_MASK		0x1
747 #define TSTORM_CORE_CONN_AG_CTX_CF5EN_SHIFT		1
748 #define TSTORM_CORE_CONN_AG_CTX_CF6EN_MASK		0x1
749 #define TSTORM_CORE_CONN_AG_CTX_CF6EN_SHIFT		2
750 #define TSTORM_CORE_CONN_AG_CTX_CF7EN_MASK		0x1
751 #define TSTORM_CORE_CONN_AG_CTX_CF7EN_SHIFT		3
752 #define TSTORM_CORE_CONN_AG_CTX_CF8EN_MASK		0x1
753 #define TSTORM_CORE_CONN_AG_CTX_CF8EN_SHIFT		4
754 #define TSTORM_CORE_CONN_AG_CTX_CF9EN_MASK		0x1
755 #define TSTORM_CORE_CONN_AG_CTX_CF9EN_SHIFT		5
756 #define TSTORM_CORE_CONN_AG_CTX_CF10EN_MASK		0x1
757 #define TSTORM_CORE_CONN_AG_CTX_CF10EN_SHIFT		6
758 #define TSTORM_CORE_CONN_AG_CTX_RULE0EN_MASK		0x1
759 #define TSTORM_CORE_CONN_AG_CTX_RULE0EN_SHIFT	7
760 	u8 flags5;
761 #define TSTORM_CORE_CONN_AG_CTX_RULE1EN_MASK		0x1
762 #define TSTORM_CORE_CONN_AG_CTX_RULE1EN_SHIFT	0
763 #define TSTORM_CORE_CONN_AG_CTX_RULE2EN_MASK		0x1
764 #define TSTORM_CORE_CONN_AG_CTX_RULE2EN_SHIFT	1
765 #define TSTORM_CORE_CONN_AG_CTX_RULE3EN_MASK		0x1
766 #define TSTORM_CORE_CONN_AG_CTX_RULE3EN_SHIFT	2
767 #define TSTORM_CORE_CONN_AG_CTX_RULE4EN_MASK		0x1
768 #define TSTORM_CORE_CONN_AG_CTX_RULE4EN_SHIFT	3
769 #define TSTORM_CORE_CONN_AG_CTX_RULE5EN_MASK		0x1
770 #define TSTORM_CORE_CONN_AG_CTX_RULE5EN_SHIFT	4
771 #define TSTORM_CORE_CONN_AG_CTX_RULE6EN_MASK		0x1
772 #define TSTORM_CORE_CONN_AG_CTX_RULE6EN_SHIFT	5
773 #define TSTORM_CORE_CONN_AG_CTX_RULE7EN_MASK		0x1
774 #define TSTORM_CORE_CONN_AG_CTX_RULE7EN_SHIFT	6
775 #define TSTORM_CORE_CONN_AG_CTX_RULE8EN_MASK		0x1
776 #define TSTORM_CORE_CONN_AG_CTX_RULE8EN_SHIFT	7
777 	__le32 reg0;
778 	__le32 reg1;
779 	__le32 reg2;
780 	__le32 reg3;
781 	__le32 reg4;
782 	__le32 reg5;
783 	__le32 reg6;
784 	__le32 reg7;
785 	__le32 reg8;
786 	u8 byte2;
787 	u8 byte3;
788 	__le16 word0;
789 	u8 byte4;
790 	u8 byte5;
791 	__le16 word1;
792 	__le16 word2;
793 	__le16 word3;
794 	__le32 ll2_rx_prod;
795 	__le32 reg10;
796 };
797 
798 struct ustorm_core_conn_ag_ctx {
799 	u8 reserved;
800 	u8 byte1;
801 	u8 flags0;
802 #define USTORM_CORE_CONN_AG_CTX_BIT0_MASK	0x1
803 #define USTORM_CORE_CONN_AG_CTX_BIT0_SHIFT	0
804 #define USTORM_CORE_CONN_AG_CTX_BIT1_MASK	0x1
805 #define USTORM_CORE_CONN_AG_CTX_BIT1_SHIFT	1
806 #define USTORM_CORE_CONN_AG_CTX_CF0_MASK	0x3
807 #define USTORM_CORE_CONN_AG_CTX_CF0_SHIFT	2
808 #define USTORM_CORE_CONN_AG_CTX_CF1_MASK	0x3
809 #define USTORM_CORE_CONN_AG_CTX_CF1_SHIFT	4
810 #define USTORM_CORE_CONN_AG_CTX_CF2_MASK	0x3
811 #define USTORM_CORE_CONN_AG_CTX_CF2_SHIFT	6
812 	u8 flags1;
813 #define USTORM_CORE_CONN_AG_CTX_CF3_MASK	0x3
814 #define USTORM_CORE_CONN_AG_CTX_CF3_SHIFT	0
815 #define USTORM_CORE_CONN_AG_CTX_CF4_MASK	0x3
816 #define USTORM_CORE_CONN_AG_CTX_CF4_SHIFT	2
817 #define USTORM_CORE_CONN_AG_CTX_CF5_MASK	0x3
818 #define USTORM_CORE_CONN_AG_CTX_CF5_SHIFT	4
819 #define USTORM_CORE_CONN_AG_CTX_CF6_MASK	0x3
820 #define USTORM_CORE_CONN_AG_CTX_CF6_SHIFT	6
821 	u8 flags2;
822 #define USTORM_CORE_CONN_AG_CTX_CF0EN_MASK		0x1
823 #define USTORM_CORE_CONN_AG_CTX_CF0EN_SHIFT		0
824 #define USTORM_CORE_CONN_AG_CTX_CF1EN_MASK		0x1
825 #define USTORM_CORE_CONN_AG_CTX_CF1EN_SHIFT		1
826 #define USTORM_CORE_CONN_AG_CTX_CF2EN_MASK		0x1
827 #define USTORM_CORE_CONN_AG_CTX_CF2EN_SHIFT		2
828 #define USTORM_CORE_CONN_AG_CTX_CF3EN_MASK		0x1
829 #define USTORM_CORE_CONN_AG_CTX_CF3EN_SHIFT		3
830 #define USTORM_CORE_CONN_AG_CTX_CF4EN_MASK		0x1
831 #define USTORM_CORE_CONN_AG_CTX_CF4EN_SHIFT		4
832 #define USTORM_CORE_CONN_AG_CTX_CF5EN_MASK		0x1
833 #define USTORM_CORE_CONN_AG_CTX_CF5EN_SHIFT		5
834 #define USTORM_CORE_CONN_AG_CTX_CF6EN_MASK		0x1
835 #define USTORM_CORE_CONN_AG_CTX_CF6EN_SHIFT		6
836 #define USTORM_CORE_CONN_AG_CTX_RULE0EN_MASK		0x1
837 #define USTORM_CORE_CONN_AG_CTX_RULE0EN_SHIFT	7
838 	u8 flags3;
839 #define USTORM_CORE_CONN_AG_CTX_RULE1EN_MASK		0x1
840 #define USTORM_CORE_CONN_AG_CTX_RULE1EN_SHIFT	0
841 #define USTORM_CORE_CONN_AG_CTX_RULE2EN_MASK		0x1
842 #define USTORM_CORE_CONN_AG_CTX_RULE2EN_SHIFT	1
843 #define USTORM_CORE_CONN_AG_CTX_RULE3EN_MASK		0x1
844 #define USTORM_CORE_CONN_AG_CTX_RULE3EN_SHIFT	2
845 #define USTORM_CORE_CONN_AG_CTX_RULE4EN_MASK		0x1
846 #define USTORM_CORE_CONN_AG_CTX_RULE4EN_SHIFT	3
847 #define USTORM_CORE_CONN_AG_CTX_RULE5EN_MASK		0x1
848 #define USTORM_CORE_CONN_AG_CTX_RULE5EN_SHIFT	4
849 #define USTORM_CORE_CONN_AG_CTX_RULE6EN_MASK		0x1
850 #define USTORM_CORE_CONN_AG_CTX_RULE6EN_SHIFT	5
851 #define USTORM_CORE_CONN_AG_CTX_RULE7EN_MASK		0x1
852 #define USTORM_CORE_CONN_AG_CTX_RULE7EN_SHIFT	6
853 #define USTORM_CORE_CONN_AG_CTX_RULE8EN_MASK		0x1
854 #define USTORM_CORE_CONN_AG_CTX_RULE8EN_SHIFT	7
855 	u8 byte2;
856 	u8 byte3;
857 	__le16 word0;
858 	__le16 word1;
859 	__le32 rx_producers;
860 	__le32 reg1;
861 	__le32 reg2;
862 	__le32 reg3;
863 	__le16 word2;
864 	__le16 word3;
865 };
866 
867 /* The core storm context for the Mstorm */
868 struct mstorm_core_conn_st_ctx {
869 	__le32 reserved[40];
870 };
871 
872 /* The core storm context for the Ustorm */
873 struct ustorm_core_conn_st_ctx {
874 	__le32 reserved[20];
875 };
876 
877 /* The core storm context for the Tstorm */
878 struct tstorm_core_conn_st_ctx {
879 	__le32 reserved[4];
880 };
881 
882 /* core connection context */
883 struct core_conn_context {
884 	struct ystorm_core_conn_st_ctx ystorm_st_context;
885 	struct regpair ystorm_st_padding[2];
886 	struct pstorm_core_conn_st_ctx pstorm_st_context;
887 	struct regpair pstorm_st_padding[2];
888 	struct xstorm_core_conn_st_ctx xstorm_st_context;
889 	struct xstorm_core_conn_ag_ctx xstorm_ag_context;
890 	struct tstorm_core_conn_ag_ctx tstorm_ag_context;
891 	struct ustorm_core_conn_ag_ctx ustorm_ag_context;
892 	struct mstorm_core_conn_st_ctx mstorm_st_context;
893 	struct ustorm_core_conn_st_ctx ustorm_st_context;
894 	struct regpair ustorm_st_padding[2];
895 	struct tstorm_core_conn_st_ctx tstorm_st_context;
896 	struct regpair tstorm_st_padding[2];
897 };
898 
899 struct eth_mstorm_per_pf_stat {
900 	struct regpair gre_discard_pkts;
901 	struct regpair vxlan_discard_pkts;
902 	struct regpair geneve_discard_pkts;
903 	struct regpair lb_discard_pkts;
904 };
905 
906 struct eth_mstorm_per_queue_stat {
907 	struct regpair ttl0_discard;
908 	struct regpair packet_too_big_discard;
909 	struct regpair no_buff_discard;
910 	struct regpair not_active_discard;
911 	struct regpair tpa_coalesced_pkts;
912 	struct regpair tpa_coalesced_events;
913 	struct regpair tpa_aborts_num;
914 	struct regpair tpa_coalesced_bytes;
915 };
916 
917 /* Ethernet TX Per PF */
918 struct eth_pstorm_per_pf_stat {
919 	struct regpair sent_lb_ucast_bytes;
920 	struct regpair sent_lb_mcast_bytes;
921 	struct regpair sent_lb_bcast_bytes;
922 	struct regpair sent_lb_ucast_pkts;
923 	struct regpair sent_lb_mcast_pkts;
924 	struct regpair sent_lb_bcast_pkts;
925 	struct regpair sent_gre_bytes;
926 	struct regpair sent_vxlan_bytes;
927 	struct regpair sent_geneve_bytes;
928 	struct regpair sent_mpls_bytes;
929 	struct regpair sent_gre_mpls_bytes;
930 	struct regpair sent_udp_mpls_bytes;
931 	struct regpair sent_gre_pkts;
932 	struct regpair sent_vxlan_pkts;
933 	struct regpair sent_geneve_pkts;
934 	struct regpair sent_mpls_pkts;
935 	struct regpair sent_gre_mpls_pkts;
936 	struct regpair sent_udp_mpls_pkts;
937 	struct regpair gre_drop_pkts;
938 	struct regpair vxlan_drop_pkts;
939 	struct regpair geneve_drop_pkts;
940 	struct regpair mpls_drop_pkts;
941 	struct regpair gre_mpls_drop_pkts;
942 	struct regpair udp_mpls_drop_pkts;
943 };
944 
945 /* Ethernet TX Per Queue Stats */
946 struct eth_pstorm_per_queue_stat {
947 	struct regpair sent_ucast_bytes;
948 	struct regpair sent_mcast_bytes;
949 	struct regpair sent_bcast_bytes;
950 	struct regpair sent_ucast_pkts;
951 	struct regpair sent_mcast_pkts;
952 	struct regpair sent_bcast_pkts;
953 	struct regpair error_drop_pkts;
954 };
955 
956 /* ETH Rx producers data */
957 struct eth_rx_rate_limit {
958 	__le16 mult;
959 	__le16 cnst;
960 	u8 add_sub_cnst;
961 	u8 reserved0;
962 	__le16 reserved1;
963 };
964 
965 /* Update RSS indirection table entry command */
966 struct eth_tstorm_rss_update_data {
967 	u8 vport_id;
968 	u8 ind_table_index;
969 	__le16 ind_table_value;
970 	__le16 reserved1;
971 	u8 reserved;
972 	u8 valid;
973 };
974 
975 struct eth_ustorm_per_pf_stat {
976 	struct regpair rcv_lb_ucast_bytes;
977 	struct regpair rcv_lb_mcast_bytes;
978 	struct regpair rcv_lb_bcast_bytes;
979 	struct regpair rcv_lb_ucast_pkts;
980 	struct regpair rcv_lb_mcast_pkts;
981 	struct regpair rcv_lb_bcast_pkts;
982 	struct regpair rcv_gre_bytes;
983 	struct regpair rcv_vxlan_bytes;
984 	struct regpair rcv_geneve_bytes;
985 	struct regpair rcv_gre_pkts;
986 	struct regpair rcv_vxlan_pkts;
987 	struct regpair rcv_geneve_pkts;
988 };
989 
990 struct eth_ustorm_per_queue_stat {
991 	struct regpair rcv_ucast_bytes;
992 	struct regpair rcv_mcast_bytes;
993 	struct regpair rcv_bcast_bytes;
994 	struct regpair rcv_ucast_pkts;
995 	struct regpair rcv_mcast_pkts;
996 	struct regpair rcv_bcast_pkts;
997 };
998 
999 /* Event Ring VF-PF Channel data */
1000 struct vf_pf_channel_eqe_data {
1001 	struct regpair msg_addr;
1002 };
1003 
1004 /* Event Ring initial cleanup data */
1005 struct initial_cleanup_eqe_data {
1006 	u8 vf_id;
1007 	u8 reserved[7];
1008 };
1009 
1010 /* FW error data */
1011 struct fw_err_data {
1012 	u8 recovery_scope;
1013 	u8 err_id;
1014 	__le16 entity_id;
1015 	u8 reserved[4];
1016 };
1017 
1018 /* Event Data Union */
1019 union event_ring_data {
1020 	u8 bytes[8];
1021 	struct vf_pf_channel_eqe_data vf_pf_channel;
1022 	struct iscsi_eqe_data iscsi_info;
1023 	struct iscsi_connect_done_results iscsi_conn_done_info;
1024 	union rdma_eqe_data rdma_data;
1025 	struct initial_cleanup_eqe_data vf_init_cleanup;
1026 	struct fw_err_data err_data;
1027 };
1028 
1029 /* Event Ring Entry */
1030 struct event_ring_entry {
1031 	u8 protocol_id;
1032 	u8 opcode;
1033 	u8 reserved0;
1034 	u8 vf_id;
1035 	__le16 echo;
1036 	u8 fw_return_code;
1037 	u8 flags;
1038 #define EVENT_RING_ENTRY_ASYNC_MASK		0x1
1039 #define EVENT_RING_ENTRY_ASYNC_SHIFT		0
1040 #define EVENT_RING_ENTRY_RESERVED1_MASK		0x7F
1041 #define EVENT_RING_ENTRY_RESERVED1_SHIFT	1
1042 	union event_ring_data data;
1043 };
1044 
1045 /* Event Ring Next Page Address */
1046 struct event_ring_next_addr {
1047 	struct regpair addr;
1048 	__le32 reserved[2];
1049 };
1050 
1051 /* Event Ring Element */
1052 union event_ring_element {
1053 	struct event_ring_entry entry;
1054 	struct event_ring_next_addr next_addr;
1055 };
1056 
1057 /* Ports mode */
1058 enum fw_flow_ctrl_mode {
1059 	flow_ctrl_pause,
1060 	flow_ctrl_pfc,
1061 	MAX_FW_FLOW_CTRL_MODE
1062 };
1063 
1064 /* GFT profile type */
1065 enum gft_profile_type {
1066 	GFT_PROFILE_TYPE_4_TUPLE,
1067 	GFT_PROFILE_TYPE_L4_DST_PORT,
1068 	GFT_PROFILE_TYPE_IP_DST_ADDR,
1069 	GFT_PROFILE_TYPE_IP_SRC_ADDR,
1070 	GFT_PROFILE_TYPE_TUNNEL_TYPE,
1071 	MAX_GFT_PROFILE_TYPE
1072 };
1073 
1074 /* Major and Minor hsi Versions */
1075 struct hsi_fp_ver_struct {
1076 	u8 minor_ver_arr[2];
1077 	u8 major_ver_arr[2];
1078 };
1079 
1080 /* Integration Phase */
1081 enum integ_phase {
1082 	INTEG_PHASE_BB_A0_LATEST = 3,
1083 	INTEG_PHASE_BB_B0_NO_MCP = 10,
1084 	INTEG_PHASE_BB_B0_WITH_MCP = 11,
1085 	MAX_INTEG_PHASE
1086 };
1087 
1088 /* Ports mode */
1089 enum iwarp_ll2_tx_queues {
1090 	IWARP_LL2_IN_ORDER_TX_QUEUE = 1,
1091 	IWARP_LL2_ALIGNED_TX_QUEUE,
1092 	IWARP_LL2_ALIGNED_RIGHT_TRIMMED_TX_QUEUE,
1093 	IWARP_LL2_ERROR,
1094 	MAX_IWARP_LL2_TX_QUEUES
1095 };
1096 
1097 /* Function error ID */
1098 enum func_err_id {
1099 	FUNC_NO_ERROR,
1100 	VF_PF_CHANNEL_NOT_READY,
1101 	VF_ZONE_MSG_NOT_VALID,
1102 	VF_ZONE_FUNC_NOT_ENABLED,
1103 	ETH_PACKET_TOO_SMALL,
1104 	ETH_ILLEGAL_VLAN_MODE,
1105 	ETH_MTU_VIOLATION,
1106 	ETH_ILLEGAL_INBAND_TAGS,
1107 	ETH_VLAN_INSERT_AND_INBAND_VLAN,
1108 	ETH_ILLEGAL_NBDS,
1109 	ETH_FIRST_BD_WO_SOP,
1110 	ETH_INSUFFICIENT_BDS,
1111 	ETH_ILLEGAL_LSO_HDR_NBDS,
1112 	ETH_ILLEGAL_LSO_MSS,
1113 	ETH_ZERO_SIZE_BD,
1114 	ETH_ILLEGAL_LSO_HDR_LEN,
1115 	ETH_INSUFFICIENT_PAYLOAD,
1116 	ETH_EDPM_OUT_OF_SYNC,
1117 	ETH_TUNN_IPV6_EXT_NBD_ERR,
1118 	ETH_CONTROL_PACKET_VIOLATION,
1119 	ETH_ANTI_SPOOFING_ERR,
1120 	ETH_PACKET_SIZE_TOO_LARGE,
1121 	CORE_ILLEGAL_VLAN_MODE,
1122 	CORE_ILLEGAL_NBDS,
1123 	CORE_FIRST_BD_WO_SOP,
1124 	CORE_INSUFFICIENT_BDS,
1125 	CORE_PACKET_TOO_SMALL,
1126 	CORE_ILLEGAL_INBAND_TAGS,
1127 	CORE_VLAN_INSERT_AND_INBAND_VLAN,
1128 	CORE_MTU_VIOLATION,
1129 	CORE_CONTROL_PACKET_VIOLATION,
1130 	CORE_ANTI_SPOOFING_ERR,
1131 	CORE_PACKET_SIZE_TOO_LARGE,
1132 	CORE_ILLEGAL_BD_FLAGS,
1133 	CORE_GSI_PACKET_VIOLATION,
1134 	MAX_FUNC_ERR_ID
1135 };
1136 
1137 /* FW error handling mode */
1138 enum fw_err_mode {
1139 	FW_ERR_FATAL_ASSERT,
1140 	FW_ERR_DRV_REPORT,
1141 	MAX_FW_ERR_MODE
1142 };
1143 
1144 /* FW error recovery scope */
1145 enum fw_err_recovery_scope {
1146 	ERR_SCOPE_INVALID,
1147 	ERR_SCOPE_TX_Q,
1148 	ERR_SCOPE_RX_Q,
1149 	ERR_SCOPE_QP,
1150 	ERR_SCOPE_VPORT,
1151 	ERR_SCOPE_FUNC,
1152 	ERR_SCOPE_PORT,
1153 	ERR_SCOPE_ENGINE,
1154 	MAX_FW_ERR_RECOVERY_SCOPE
1155 };
1156 
1157 /* Mstorm non-triggering VF zone */
1158 struct mstorm_non_trigger_vf_zone {
1159 	struct eth_mstorm_per_queue_stat eth_queue_stat;
1160 	struct eth_rx_prod_data eth_rx_queue_producers[ETH_MAX_RXQ_VF_QUAD];
1161 };
1162 
1163 /* Mstorm VF zone */
1164 struct mstorm_vf_zone {
1165 	struct mstorm_non_trigger_vf_zone non_trigger;
1166 };
1167 
1168 /* vlan header including TPID and TCI fields */
1169 struct vlan_header {
1170 	__le16 tpid;
1171 	__le16 tci;
1172 };
1173 
1174 /* outer tag configurations */
1175 struct outer_tag_config_struct {
1176 	u8 enable_stag_pri_change;
1177 	u8 pri_map_valid;
1178 	u8 reserved[2];
1179 	struct vlan_header outer_tag;
1180 	u8 inner_to_outer_pri_map[8];
1181 };
1182 
1183 /* personality per PF */
1184 enum personality_type {
1185 	BAD_PERSONALITY_TYP,
1186 	PERSONALITY_TCP_ULP,
1187 	PERSONALITY_FCOE,
1188 	PERSONALITY_RDMA_AND_ETH,
1189 	PERSONALITY_RDMA,
1190 	PERSONALITY_CORE,
1191 	PERSONALITY_ETH,
1192 	PERSONALITY_RESERVED,
1193 	MAX_PERSONALITY_TYPE
1194 };
1195 
1196 /* tunnel configuration */
1197 struct pf_start_tunnel_config {
1198 	u8 set_vxlan_udp_port_flg;
1199 	u8 set_geneve_udp_port_flg;
1200 	u8 set_no_inner_l2_vxlan_udp_port_flg;
1201 	u8 tunnel_clss_vxlan;
1202 	u8 tunnel_clss_l2geneve;
1203 	u8 tunnel_clss_ipgeneve;
1204 	u8 tunnel_clss_l2gre;
1205 	u8 tunnel_clss_ipgre;
1206 	__le16 vxlan_udp_port;
1207 	__le16 geneve_udp_port;
1208 	__le16 no_inner_l2_vxlan_udp_port;
1209 	__le16 reserved[3];
1210 };
1211 
1212 /* Ramrod data for PF start ramrod */
1213 struct pf_start_ramrod_data {
1214 	struct regpair event_ring_pbl_addr;
1215 	struct regpair consolid_q_pbl_base_addr;
1216 	struct pf_start_tunnel_config tunnel_config;
1217 	__le16 event_ring_sb_id;
1218 	u8 base_vf_id;
1219 	u8 num_vfs;
1220 	u8 event_ring_num_pages;
1221 	u8 event_ring_sb_index;
1222 	u8 path_id;
1223 	u8 warning_as_error;
1224 	u8 dont_log_ramrods;
1225 	u8 personality;
1226 	__le16 log_type_mask;
1227 	u8 mf_mode;
1228 	u8 integ_phase;
1229 	u8 allow_npar_tx_switching;
1230 	u8 reserved0;
1231 	struct hsi_fp_ver_struct hsi_fp_ver;
1232 	struct outer_tag_config_struct outer_tag_config;
1233 	u8 pf_fp_err_mode;
1234 	u8 consolid_q_num_pages;
1235 	u8 reserved[6];
1236 };
1237 
1238 /* Data for port update ramrod */
1239 struct protocol_dcb_data {
1240 	u8 dcb_enable_flag;
1241 	u8 dscp_enable_flag;
1242 	u8 dcb_priority;
1243 	u8 dcb_tc;
1244 	u8 dscp_val;
1245 	u8 dcb_dont_add_vlan0;
1246 };
1247 
1248 /* Update tunnel configuration */
1249 struct pf_update_tunnel_config {
1250 	u8 update_rx_pf_clss;
1251 	u8 update_rx_def_ucast_clss;
1252 	u8 update_rx_def_non_ucast_clss;
1253 	u8 set_vxlan_udp_port_flg;
1254 	u8 set_geneve_udp_port_flg;
1255 	u8 set_no_inner_l2_vxlan_udp_port_flg;
1256 	u8 tunnel_clss_vxlan;
1257 	u8 tunnel_clss_l2geneve;
1258 	u8 tunnel_clss_ipgeneve;
1259 	u8 tunnel_clss_l2gre;
1260 	u8 tunnel_clss_ipgre;
1261 	u8 reserved;
1262 	__le16 vxlan_udp_port;
1263 	__le16 geneve_udp_port;
1264 	__le16 no_inner_l2_vxlan_udp_port;
1265 	__le16 reserved1[3];
1266 };
1267 
1268 /* Data for port update ramrod */
1269 struct pf_update_ramrod_data {
1270 	u8 update_eth_dcb_data_mode;
1271 	u8 update_fcoe_dcb_data_mode;
1272 	u8 update_iscsi_dcb_data_mode;
1273 	u8 update_roce_dcb_data_mode;
1274 	u8 update_rroce_dcb_data_mode;
1275 	u8 update_iwarp_dcb_data_mode;
1276 	u8 update_mf_vlan_flag;
1277 	u8 update_enable_stag_pri_change;
1278 	struct protocol_dcb_data eth_dcb_data;
1279 	struct protocol_dcb_data fcoe_dcb_data;
1280 	struct protocol_dcb_data iscsi_dcb_data;
1281 	struct protocol_dcb_data roce_dcb_data;
1282 	struct protocol_dcb_data rroce_dcb_data;
1283 	struct protocol_dcb_data iwarp_dcb_data;
1284 	__le16 mf_vlan;
1285 	u8 enable_stag_pri_change;
1286 	u8 reserved;
1287 	struct pf_update_tunnel_config tunnel_config;
1288 };
1289 
1290 /* Ports mode */
1291 enum ports_mode {
1292 	ENGX2_PORTX1,
1293 	ENGX2_PORTX2,
1294 	ENGX1_PORTX1,
1295 	ENGX1_PORTX2,
1296 	ENGX1_PORTX4,
1297 	MAX_PORTS_MODE
1298 };
1299 
1300 /* Protocol-common error code */
1301 enum protocol_common_error_code {
1302 	COMMON_ERR_CODE_OK = 0,
1303 	COMMON_ERR_CODE_ERROR,
1304 	MAX_PROTOCOL_COMMON_ERROR_CODE
1305 };
1306 
1307 /* use to index in hsi_fp_[major|minor]_ver_arr per protocol */
1308 enum protocol_version_array_key {
1309 	ETH_VER_KEY = 0,
1310 	ROCE_VER_KEY,
1311 	MAX_PROTOCOL_VERSION_ARRAY_KEY
1312 };
1313 
1314 /* RDMA TX Stats */
1315 struct rdma_sent_stats {
1316 	struct regpair sent_bytes;
1317 	struct regpair sent_pkts;
1318 };
1319 
1320 /* Pstorm non-triggering VF zone */
1321 struct pstorm_non_trigger_vf_zone {
1322 	struct eth_pstorm_per_queue_stat eth_queue_stat;
1323 	struct rdma_sent_stats rdma_stats;
1324 };
1325 
1326 /* Pstorm VF zone */
1327 struct pstorm_vf_zone {
1328 	struct pstorm_non_trigger_vf_zone non_trigger;
1329 	struct regpair reserved[7];
1330 };
1331 
1332 /* Ramrod Header of SPQE */
1333 struct ramrod_header {
1334 	__le32 cid;
1335 	u8 cmd_id;
1336 	u8 protocol_id;
1337 	__le16 echo;
1338 };
1339 
1340 /* RDMA RX Stats */
1341 struct rdma_rcv_stats {
1342 	struct regpair rcv_bytes;
1343 	struct regpair rcv_pkts;
1344 };
1345 
1346 /* Data for update QCN/DCQCN RL ramrod */
1347 struct rl_update_ramrod_data {
1348 	u8 qcn_update_param_flg;
1349 	u8 dcqcn_update_param_flg;
1350 	u8 rl_init_flg;
1351 	u8 rl_start_flg;
1352 	u8 rl_stop_flg;
1353 	u8 rl_id_first;
1354 	u8 rl_id_last;
1355 	u8 rl_dc_qcn_flg;
1356 	u8 dcqcn_reset_alpha_on_idle;
1357 	u8 rl_bc_stage_th;
1358 	u8 rl_timer_stage_th;
1359 	u8 reserved1;
1360 	__le32 rl_bc_rate;
1361 	__le16 rl_max_rate;
1362 	__le16 rl_r_ai;
1363 	__le16 rl_r_hai;
1364 	__le16 dcqcn_g;
1365 	__le32 dcqcn_k_us;
1366 	__le32 dcqcn_timeuot_us;
1367 	__le32 qcn_timeuot_us;
1368 	__le32 reserved2;
1369 };
1370 
1371 /* Slowpath Element (SPQE) */
1372 struct slow_path_element {
1373 	struct ramrod_header hdr;
1374 	struct regpair data_ptr;
1375 };
1376 
1377 /* Tstorm non-triggering VF zone */
1378 struct tstorm_non_trigger_vf_zone {
1379 	struct rdma_rcv_stats rdma_stats;
1380 };
1381 
1382 struct tstorm_per_port_stat {
1383 	struct regpair trunc_error_discard;
1384 	struct regpair mac_error_discard;
1385 	struct regpair mftag_filter_discard;
1386 	struct regpair eth_mac_filter_discard;
1387 	struct regpair ll2_mac_filter_discard;
1388 	struct regpair ll2_conn_disabled_discard;
1389 	struct regpair iscsi_irregular_pkt;
1390 	struct regpair fcoe_irregular_pkt;
1391 	struct regpair roce_irregular_pkt;
1392 	struct regpair iwarp_irregular_pkt;
1393 	struct regpair eth_irregular_pkt;
1394 	struct regpair toe_irregular_pkt;
1395 	struct regpair preroce_irregular_pkt;
1396 	struct regpair eth_gre_tunn_filter_discard;
1397 	struct regpair eth_vxlan_tunn_filter_discard;
1398 	struct regpair eth_geneve_tunn_filter_discard;
1399 	struct regpair eth_gft_drop_pkt;
1400 };
1401 
1402 /* Tstorm VF zone */
1403 struct tstorm_vf_zone {
1404 	struct tstorm_non_trigger_vf_zone non_trigger;
1405 };
1406 
1407 /* Tunnel classification scheme */
1408 enum tunnel_clss {
1409 	TUNNEL_CLSS_MAC_VLAN = 0,
1410 	TUNNEL_CLSS_MAC_VNI,
1411 	TUNNEL_CLSS_INNER_MAC_VLAN,
1412 	TUNNEL_CLSS_INNER_MAC_VNI,
1413 	TUNNEL_CLSS_MAC_VLAN_DUAL_STAGE,
1414 	MAX_TUNNEL_CLSS
1415 };
1416 
1417 /* Ustorm non-triggering VF zone */
1418 struct ustorm_non_trigger_vf_zone {
1419 	struct eth_ustorm_per_queue_stat eth_queue_stat;
1420 	struct regpair vf_pf_msg_addr;
1421 };
1422 
1423 /* Ustorm triggering VF zone */
1424 struct ustorm_trigger_vf_zone {
1425 	u8 vf_pf_msg_valid;
1426 	u8 reserved[7];
1427 };
1428 
1429 /* Ustorm VF zone */
1430 struct ustorm_vf_zone {
1431 	struct ustorm_non_trigger_vf_zone non_trigger;
1432 	struct ustorm_trigger_vf_zone trigger;
1433 };
1434 
1435 /* VF-PF channel data */
1436 struct vf_pf_channel_data {
1437 	__le32 ready;
1438 	u8 valid;
1439 	u8 reserved0;
1440 	__le16 reserved1;
1441 };
1442 
1443 /* Ramrod data for VF start ramrod */
1444 struct vf_start_ramrod_data {
1445 	u8 vf_id;
1446 	u8 enable_flr_ack;
1447 	__le16 opaque_fid;
1448 	u8 personality;
1449 	u8 reserved[7];
1450 	struct hsi_fp_ver_struct hsi_fp_ver;
1451 
1452 };
1453 
1454 /* Ramrod data for VF start ramrod */
1455 struct vf_stop_ramrod_data {
1456 	u8 vf_id;
1457 	u8 reserved0;
1458 	__le16 reserved1;
1459 	__le32 reserved2;
1460 };
1461 
1462 /* VF zone size mode */
1463 enum vf_zone_size_mode {
1464 	VF_ZONE_SIZE_MODE_DEFAULT,
1465 	VF_ZONE_SIZE_MODE_DOUBLE,
1466 	VF_ZONE_SIZE_MODE_QUAD,
1467 	MAX_VF_ZONE_SIZE_MODE
1468 };
1469 
1470 /* Xstorm non-triggering VF zone */
1471 struct xstorm_non_trigger_vf_zone {
1472 	struct regpair non_edpm_ack_pkts;
1473 };
1474 
1475 /* Tstorm VF zone */
1476 struct xstorm_vf_zone {
1477 	struct xstorm_non_trigger_vf_zone non_trigger;
1478 };
1479 
1480 /* Attentions status block */
1481 struct atten_status_block {
1482 	__le32 atten_bits;
1483 	__le32 atten_ack;
1484 	__le16 reserved0;
1485 	__le16 sb_index;
1486 	__le32 reserved1;
1487 };
1488 
1489 /* DMAE command */
1490 struct dmae_cmd {
1491 	__le32 opcode;
1492 #define DMAE_CMD_SRC_MASK		0x1
1493 #define DMAE_CMD_SRC_SHIFT		0
1494 #define DMAE_CMD_DST_MASK		0x3
1495 #define DMAE_CMD_DST_SHIFT		1
1496 #define DMAE_CMD_C_DST_MASK		0x1
1497 #define DMAE_CMD_C_DST_SHIFT		3
1498 #define DMAE_CMD_CRC_RESET_MASK		0x1
1499 #define DMAE_CMD_CRC_RESET_SHIFT	4
1500 #define DMAE_CMD_SRC_ADDR_RESET_MASK	0x1
1501 #define DMAE_CMD_SRC_ADDR_RESET_SHIFT	5
1502 #define DMAE_CMD_DST_ADDR_RESET_MASK	0x1
1503 #define DMAE_CMD_DST_ADDR_RESET_SHIFT	6
1504 #define DMAE_CMD_COMP_FUNC_MASK		0x1
1505 #define DMAE_CMD_COMP_FUNC_SHIFT	7
1506 #define DMAE_CMD_COMP_WORD_EN_MASK	0x1
1507 #define DMAE_CMD_COMP_WORD_EN_SHIFT	8
1508 #define DMAE_CMD_COMP_CRC_EN_MASK	0x1
1509 #define DMAE_CMD_COMP_CRC_EN_SHIFT	9
1510 #define DMAE_CMD_COMP_CRC_OFFSET_MASK	0x7
1511 #define DMAE_CMD_COMP_CRC_OFFSET_SHIFT 10
1512 #define DMAE_CMD_RESERVED1_MASK		0x1
1513 #define DMAE_CMD_RESERVED1_SHIFT	13
1514 #define DMAE_CMD_ENDIANITY_MODE_MASK	0x3
1515 #define DMAE_CMD_ENDIANITY_MODE_SHIFT	14
1516 #define DMAE_CMD_ERR_HANDLING_MASK	0x3
1517 #define DMAE_CMD_ERR_HANDLING_SHIFT	16
1518 #define DMAE_CMD_PORT_ID_MASK		0x3
1519 #define DMAE_CMD_PORT_ID_SHIFT		18
1520 #define DMAE_CMD_SRC_PF_ID_MASK		0xF
1521 #define DMAE_CMD_SRC_PF_ID_SHIFT	20
1522 #define DMAE_CMD_DST_PF_ID_MASK		0xF
1523 #define DMAE_CMD_DST_PF_ID_SHIFT	24
1524 #define DMAE_CMD_SRC_VF_ID_VALID_MASK	0x1
1525 #define DMAE_CMD_SRC_VF_ID_VALID_SHIFT 28
1526 #define DMAE_CMD_DST_VF_ID_VALID_MASK	0x1
1527 #define DMAE_CMD_DST_VF_ID_VALID_SHIFT 29
1528 #define DMAE_CMD_RESERVED2_MASK		0x3
1529 #define DMAE_CMD_RESERVED2_SHIFT	30
1530 	__le32 src_addr_lo;
1531 	__le32 src_addr_hi;
1532 	__le32 dst_addr_lo;
1533 	__le32 dst_addr_hi;
1534 	__le16 length_dw;
1535 	__le16 opcode_b;
1536 #define DMAE_CMD_SRC_VF_ID_MASK		0xFF
1537 #define DMAE_CMD_SRC_VF_ID_SHIFT	0
1538 #define DMAE_CMD_DST_VF_ID_MASK		0xFF
1539 #define DMAE_CMD_DST_VF_ID_SHIFT	8
1540 	__le32 comp_addr_lo;
1541 	__le32 comp_addr_hi;
1542 	__le32 comp_val;
1543 	__le32 crc32;
1544 	__le32 crc_32_c;
1545 	__le16 crc16;
1546 	__le16 crc16_c;
1547 	__le16 crc10;
1548 	__le16 error_bit_reserved;
1549 #define DMAE_CMD_ERROR_BIT_MASK        0x1
1550 #define DMAE_CMD_ERROR_BIT_SHIFT       0
1551 #define DMAE_CMD_RESERVED_MASK	       0x7FFF
1552 #define DMAE_CMD_RESERVED_SHIFT        1
1553 	__le16 xsum16;
1554 	__le16 xsum8;
1555 };
1556 
1557 enum dmae_cmd_comp_crc_en_enum {
1558 	dmae_cmd_comp_crc_disabled,
1559 	dmae_cmd_comp_crc_enabled,
1560 	MAX_DMAE_CMD_COMP_CRC_EN_ENUM
1561 };
1562 
1563 enum dmae_cmd_comp_func_enum {
1564 	dmae_cmd_comp_func_to_src,
1565 	dmae_cmd_comp_func_to_dst,
1566 	MAX_DMAE_CMD_COMP_FUNC_ENUM
1567 };
1568 
1569 enum dmae_cmd_comp_word_en_enum {
1570 	dmae_cmd_comp_word_disabled,
1571 	dmae_cmd_comp_word_enabled,
1572 	MAX_DMAE_CMD_COMP_WORD_EN_ENUM
1573 };
1574 
1575 enum dmae_cmd_c_dst_enum {
1576 	dmae_cmd_c_dst_pcie,
1577 	dmae_cmd_c_dst_grc,
1578 	MAX_DMAE_CMD_C_DST_ENUM
1579 };
1580 
1581 enum dmae_cmd_dst_enum {
1582 	dmae_cmd_dst_none_0,
1583 	dmae_cmd_dst_pcie,
1584 	dmae_cmd_dst_grc,
1585 	dmae_cmd_dst_none_3,
1586 	MAX_DMAE_CMD_DST_ENUM
1587 };
1588 
1589 enum dmae_cmd_error_handling_enum {
1590 	dmae_cmd_error_handling_send_regular_comp,
1591 	dmae_cmd_error_handling_send_comp_with_err,
1592 	dmae_cmd_error_handling_dont_send_comp,
1593 	MAX_DMAE_CMD_ERROR_HANDLING_ENUM
1594 };
1595 
1596 enum dmae_cmd_src_enum {
1597 	dmae_cmd_src_pcie,
1598 	dmae_cmd_src_grc,
1599 	MAX_DMAE_CMD_SRC_ENUM
1600 };
1601 
1602 struct mstorm_core_conn_ag_ctx {
1603 	u8 byte0;
1604 	u8 byte1;
1605 	u8 flags0;
1606 #define MSTORM_CORE_CONN_AG_CTX_BIT0_MASK	0x1
1607 #define MSTORM_CORE_CONN_AG_CTX_BIT0_SHIFT	0
1608 #define MSTORM_CORE_CONN_AG_CTX_BIT1_MASK	0x1
1609 #define MSTORM_CORE_CONN_AG_CTX_BIT1_SHIFT	1
1610 #define MSTORM_CORE_CONN_AG_CTX_CF0_MASK	0x3
1611 #define MSTORM_CORE_CONN_AG_CTX_CF0_SHIFT	2
1612 #define MSTORM_CORE_CONN_AG_CTX_CF1_MASK	0x3
1613 #define MSTORM_CORE_CONN_AG_CTX_CF1_SHIFT	4
1614 #define MSTORM_CORE_CONN_AG_CTX_CF2_MASK	0x3
1615 #define MSTORM_CORE_CONN_AG_CTX_CF2_SHIFT	6
1616 	u8 flags1;
1617 #define MSTORM_CORE_CONN_AG_CTX_CF0EN_MASK		0x1
1618 #define MSTORM_CORE_CONN_AG_CTX_CF0EN_SHIFT		0
1619 #define MSTORM_CORE_CONN_AG_CTX_CF1EN_MASK		0x1
1620 #define MSTORM_CORE_CONN_AG_CTX_CF1EN_SHIFT		1
1621 #define MSTORM_CORE_CONN_AG_CTX_CF2EN_MASK		0x1
1622 #define MSTORM_CORE_CONN_AG_CTX_CF2EN_SHIFT		2
1623 #define MSTORM_CORE_CONN_AG_CTX_RULE0EN_MASK		0x1
1624 #define MSTORM_CORE_CONN_AG_CTX_RULE0EN_SHIFT	3
1625 #define MSTORM_CORE_CONN_AG_CTX_RULE1EN_MASK		0x1
1626 #define MSTORM_CORE_CONN_AG_CTX_RULE1EN_SHIFT	4
1627 #define MSTORM_CORE_CONN_AG_CTX_RULE2EN_MASK		0x1
1628 #define MSTORM_CORE_CONN_AG_CTX_RULE2EN_SHIFT	5
1629 #define MSTORM_CORE_CONN_AG_CTX_RULE3EN_MASK		0x1
1630 #define MSTORM_CORE_CONN_AG_CTX_RULE3EN_SHIFT	6
1631 #define MSTORM_CORE_CONN_AG_CTX_RULE4EN_MASK		0x1
1632 #define MSTORM_CORE_CONN_AG_CTX_RULE4EN_SHIFT	7
1633 	__le16 word0;
1634 	__le16 word1;
1635 	__le32 reg0;
1636 	__le32 reg1;
1637 };
1638 
1639 struct ystorm_core_conn_ag_ctx {
1640 	u8 byte0;
1641 	u8 byte1;
1642 	u8 flags0;
1643 #define YSTORM_CORE_CONN_AG_CTX_BIT0_MASK	0x1
1644 #define YSTORM_CORE_CONN_AG_CTX_BIT0_SHIFT	0
1645 #define YSTORM_CORE_CONN_AG_CTX_BIT1_MASK	0x1
1646 #define YSTORM_CORE_CONN_AG_CTX_BIT1_SHIFT	1
1647 #define YSTORM_CORE_CONN_AG_CTX_CF0_MASK	0x3
1648 #define YSTORM_CORE_CONN_AG_CTX_CF0_SHIFT	2
1649 #define YSTORM_CORE_CONN_AG_CTX_CF1_MASK	0x3
1650 #define YSTORM_CORE_CONN_AG_CTX_CF1_SHIFT	4
1651 #define YSTORM_CORE_CONN_AG_CTX_CF2_MASK	0x3
1652 #define YSTORM_CORE_CONN_AG_CTX_CF2_SHIFT	6
1653 	u8 flags1;
1654 #define YSTORM_CORE_CONN_AG_CTX_CF0EN_MASK		0x1
1655 #define YSTORM_CORE_CONN_AG_CTX_CF0EN_SHIFT		0
1656 #define YSTORM_CORE_CONN_AG_CTX_CF1EN_MASK		0x1
1657 #define YSTORM_CORE_CONN_AG_CTX_CF1EN_SHIFT		1
1658 #define YSTORM_CORE_CONN_AG_CTX_CF2EN_MASK		0x1
1659 #define YSTORM_CORE_CONN_AG_CTX_CF2EN_SHIFT		2
1660 #define YSTORM_CORE_CONN_AG_CTX_RULE0EN_MASK		0x1
1661 #define YSTORM_CORE_CONN_AG_CTX_RULE0EN_SHIFT	3
1662 #define YSTORM_CORE_CONN_AG_CTX_RULE1EN_MASK		0x1
1663 #define YSTORM_CORE_CONN_AG_CTX_RULE1EN_SHIFT	4
1664 #define YSTORM_CORE_CONN_AG_CTX_RULE2EN_MASK		0x1
1665 #define YSTORM_CORE_CONN_AG_CTX_RULE2EN_SHIFT	5
1666 #define YSTORM_CORE_CONN_AG_CTX_RULE3EN_MASK		0x1
1667 #define YSTORM_CORE_CONN_AG_CTX_RULE3EN_SHIFT	6
1668 #define YSTORM_CORE_CONN_AG_CTX_RULE4EN_MASK		0x1
1669 #define YSTORM_CORE_CONN_AG_CTX_RULE4EN_SHIFT	7
1670 	u8 byte2;
1671 	u8 byte3;
1672 	__le16 word0;
1673 	__le32 reg0;
1674 	__le32 reg1;
1675 	__le16 word1;
1676 	__le16 word2;
1677 	__le16 word3;
1678 	__le16 word4;
1679 	__le32 reg2;
1680 	__le32 reg3;
1681 };
1682 
1683 /* DMAE parameters */
1684 struct qed_dmae_params {
1685 	u32 flags;
1686 /* If QED_DMAE_PARAMS_RW_REPL_SRC flag is set and the
1687  * source is a block of length DMAE_MAX_RW_SIZE and the
1688  * destination is larger, the source block will be duplicated as
1689  * many times as required to fill the destination block. This is
1690  * used mostly to write a zeroed buffer to destination address
1691  * using DMA
1692  */
1693 #define QED_DMAE_PARAMS_RW_REPL_SRC_MASK	0x1
1694 #define QED_DMAE_PARAMS_RW_REPL_SRC_SHIFT	0
1695 #define QED_DMAE_PARAMS_SRC_VF_VALID_MASK	0x1
1696 #define QED_DMAE_PARAMS_SRC_VF_VALID_SHIFT	1
1697 #define QED_DMAE_PARAMS_DST_VF_VALID_MASK	0x1
1698 #define QED_DMAE_PARAMS_DST_VF_VALID_SHIFT	2
1699 #define QED_DMAE_PARAMS_COMPLETION_DST_MASK	0x1
1700 #define QED_DMAE_PARAMS_COMPLETION_DST_SHIFT	3
1701 #define QED_DMAE_PARAMS_PORT_VALID_MASK		0x1
1702 #define QED_DMAE_PARAMS_PORT_VALID_SHIFT	4
1703 #define QED_DMAE_PARAMS_SRC_PF_VALID_MASK	0x1
1704 #define QED_DMAE_PARAMS_SRC_PF_VALID_SHIFT	5
1705 #define QED_DMAE_PARAMS_DST_PF_VALID_MASK	0x1
1706 #define QED_DMAE_PARAMS_DST_PF_VALID_SHIFT	6
1707 #define QED_DMAE_PARAMS_RESERVED_MASK		0x1FFFFFF
1708 #define QED_DMAE_PARAMS_RESERVED_SHIFT		7
1709 	u8 src_vfid;
1710 	u8 dst_vfid;
1711 	u8 port_id;
1712 	u8 src_pfid;
1713 	u8 dst_pfid;
1714 	u8 reserved1;
1715 	__le16 reserved2;
1716 };
1717 
1718 /* IGU cleanup command */
1719 struct igu_cleanup {
1720 	__le32 sb_id_and_flags;
1721 #define IGU_CLEANUP_RESERVED0_MASK	0x7FFFFFF
1722 #define IGU_CLEANUP_RESERVED0_SHIFT	0
1723 #define IGU_CLEANUP_CLEANUP_SET_MASK	0x1
1724 #define IGU_CLEANUP_CLEANUP_SET_SHIFT	27
1725 #define IGU_CLEANUP_CLEANUP_TYPE_MASK	0x7
1726 #define IGU_CLEANUP_CLEANUP_TYPE_SHIFT	28
1727 #define IGU_CLEANUP_COMMAND_TYPE_MASK	0x1
1728 #define IGU_CLEANUP_COMMAND_TYPE_SHIFT	31
1729 	__le32 reserved1;
1730 };
1731 
1732 /* IGU firmware driver command */
1733 union igu_command {
1734 	struct igu_prod_cons_update prod_cons_update;
1735 	struct igu_cleanup cleanup;
1736 };
1737 
1738 /* IGU firmware driver command */
1739 struct igu_command_reg_ctrl {
1740 	__le16 opaque_fid;
1741 	__le16 igu_command_reg_ctrl_fields;
1742 #define IGU_COMMAND_REG_CTRL_PXP_BAR_ADDR_MASK	0xFFF
1743 #define IGU_COMMAND_REG_CTRL_PXP_BAR_ADDR_SHIFT	0
1744 #define IGU_COMMAND_REG_CTRL_RESERVED_MASK	0x7
1745 #define IGU_COMMAND_REG_CTRL_RESERVED_SHIFT	12
1746 #define IGU_COMMAND_REG_CTRL_COMMAND_TYPE_MASK	0x1
1747 #define IGU_COMMAND_REG_CTRL_COMMAND_TYPE_SHIFT	15
1748 };
1749 
1750 /* IGU mapping line structure */
1751 struct igu_mapping_line {
1752 	__le32 igu_mapping_line_fields;
1753 #define IGU_MAPPING_LINE_VALID_MASK		0x1
1754 #define IGU_MAPPING_LINE_VALID_SHIFT		0
1755 #define IGU_MAPPING_LINE_VECTOR_NUMBER_MASK	0xFF
1756 #define IGU_MAPPING_LINE_VECTOR_NUMBER_SHIFT	1
1757 #define IGU_MAPPING_LINE_FUNCTION_NUMBER_MASK	0xFF
1758 #define IGU_MAPPING_LINE_FUNCTION_NUMBER_SHIFT	9
1759 #define IGU_MAPPING_LINE_PF_VALID_MASK		0x1
1760 #define IGU_MAPPING_LINE_PF_VALID_SHIFT		17
1761 #define IGU_MAPPING_LINE_IPS_GROUP_MASK		0x3F
1762 #define IGU_MAPPING_LINE_IPS_GROUP_SHIFT	18
1763 #define IGU_MAPPING_LINE_RESERVED_MASK		0xFF
1764 #define IGU_MAPPING_LINE_RESERVED_SHIFT		24
1765 };
1766 
1767 /* IGU MSIX line structure */
1768 struct igu_msix_vector {
1769 	struct regpair address;
1770 	__le32 data;
1771 	__le32 msix_vector_fields;
1772 #define IGU_MSIX_VECTOR_MASK_BIT_MASK		0x1
1773 #define IGU_MSIX_VECTOR_MASK_BIT_SHIFT		0
1774 #define IGU_MSIX_VECTOR_RESERVED0_MASK		0x7FFF
1775 #define IGU_MSIX_VECTOR_RESERVED0_SHIFT		1
1776 #define IGU_MSIX_VECTOR_STEERING_TAG_MASK	0xFF
1777 #define IGU_MSIX_VECTOR_STEERING_TAG_SHIFT	16
1778 #define IGU_MSIX_VECTOR_RESERVED1_MASK		0xFF
1779 #define IGU_MSIX_VECTOR_RESERVED1_SHIFT		24
1780 };
1781 
1782 /* per encapsulation type enabling flags */
1783 struct prs_reg_encapsulation_type_en {
1784 	u8 flags;
1785 #define PRS_REG_ENCAPSULATION_TYPE_EN_ETH_OVER_GRE_ENABLE_MASK		0x1
1786 #define PRS_REG_ENCAPSULATION_TYPE_EN_ETH_OVER_GRE_ENABLE_SHIFT		0
1787 #define PRS_REG_ENCAPSULATION_TYPE_EN_IP_OVER_GRE_ENABLE_MASK		0x1
1788 #define PRS_REG_ENCAPSULATION_TYPE_EN_IP_OVER_GRE_ENABLE_SHIFT		1
1789 #define PRS_REG_ENCAPSULATION_TYPE_EN_VXLAN_ENABLE_MASK			0x1
1790 #define PRS_REG_ENCAPSULATION_TYPE_EN_VXLAN_ENABLE_SHIFT		2
1791 #define PRS_REG_ENCAPSULATION_TYPE_EN_T_TAG_ENABLE_MASK			0x1
1792 #define PRS_REG_ENCAPSULATION_TYPE_EN_T_TAG_ENABLE_SHIFT		3
1793 #define PRS_REG_ENCAPSULATION_TYPE_EN_ETH_OVER_GENEVE_ENABLE_MASK	0x1
1794 #define PRS_REG_ENCAPSULATION_TYPE_EN_ETH_OVER_GENEVE_ENABLE_SHIFT	4
1795 #define PRS_REG_ENCAPSULATION_TYPE_EN_IP_OVER_GENEVE_ENABLE_MASK	0x1
1796 #define PRS_REG_ENCAPSULATION_TYPE_EN_IP_OVER_GENEVE_ENABLE_SHIFT	5
1797 #define PRS_REG_ENCAPSULATION_TYPE_EN_RESERVED_MASK			0x3
1798 #define PRS_REG_ENCAPSULATION_TYPE_EN_RESERVED_SHIFT			6
1799 };
1800 
1801 enum pxp_tph_st_hint {
1802 	TPH_ST_HINT_BIDIR,
1803 	TPH_ST_HINT_REQUESTER,
1804 	TPH_ST_HINT_TARGET,
1805 	TPH_ST_HINT_TARGET_PRIO,
1806 	MAX_PXP_TPH_ST_HINT
1807 };
1808 
1809 /* QM hardware structure of enable bypass credit mask */
1810 struct qm_rf_bypass_mask {
1811 	u8 flags;
1812 #define QM_RF_BYPASS_MASK_LINEVOQ_MASK		0x1
1813 #define QM_RF_BYPASS_MASK_LINEVOQ_SHIFT		0
1814 #define QM_RF_BYPASS_MASK_RESERVED0_MASK	0x1
1815 #define QM_RF_BYPASS_MASK_RESERVED0_SHIFT	1
1816 #define QM_RF_BYPASS_MASK_PFWFQ_MASK		0x1
1817 #define QM_RF_BYPASS_MASK_PFWFQ_SHIFT		2
1818 #define QM_RF_BYPASS_MASK_VPWFQ_MASK		0x1
1819 #define QM_RF_BYPASS_MASK_VPWFQ_SHIFT		3
1820 #define QM_RF_BYPASS_MASK_PFRL_MASK		0x1
1821 #define QM_RF_BYPASS_MASK_PFRL_SHIFT		4
1822 #define QM_RF_BYPASS_MASK_VPQCNRL_MASK		0x1
1823 #define QM_RF_BYPASS_MASK_VPQCNRL_SHIFT		5
1824 #define QM_RF_BYPASS_MASK_FWPAUSE_MASK		0x1
1825 #define QM_RF_BYPASS_MASK_FWPAUSE_SHIFT		6
1826 #define QM_RF_BYPASS_MASK_RESERVED1_MASK	0x1
1827 #define QM_RF_BYPASS_MASK_RESERVED1_SHIFT	7
1828 };
1829 
1830 /* QM hardware structure of opportunistic credit mask */
1831 struct qm_rf_opportunistic_mask {
1832 	__le16 flags;
1833 #define QM_RF_OPPORTUNISTIC_MASK_LINEVOQ_MASK		0x1
1834 #define QM_RF_OPPORTUNISTIC_MASK_LINEVOQ_SHIFT		0
1835 #define QM_RF_OPPORTUNISTIC_MASK_BYTEVOQ_MASK		0x1
1836 #define QM_RF_OPPORTUNISTIC_MASK_BYTEVOQ_SHIFT		1
1837 #define QM_RF_OPPORTUNISTIC_MASK_PFWFQ_MASK		0x1
1838 #define QM_RF_OPPORTUNISTIC_MASK_PFWFQ_SHIFT		2
1839 #define QM_RF_OPPORTUNISTIC_MASK_VPWFQ_MASK		0x1
1840 #define QM_RF_OPPORTUNISTIC_MASK_VPWFQ_SHIFT		3
1841 #define QM_RF_OPPORTUNISTIC_MASK_PFRL_MASK		0x1
1842 #define QM_RF_OPPORTUNISTIC_MASK_PFRL_SHIFT		4
1843 #define QM_RF_OPPORTUNISTIC_MASK_VPQCNRL_MASK		0x1
1844 #define QM_RF_OPPORTUNISTIC_MASK_VPQCNRL_SHIFT		5
1845 #define QM_RF_OPPORTUNISTIC_MASK_FWPAUSE_MASK		0x1
1846 #define QM_RF_OPPORTUNISTIC_MASK_FWPAUSE_SHIFT		6
1847 #define QM_RF_OPPORTUNISTIC_MASK_RESERVED0_MASK		0x1
1848 #define QM_RF_OPPORTUNISTIC_MASK_RESERVED0_SHIFT	7
1849 #define QM_RF_OPPORTUNISTIC_MASK_QUEUEEMPTY_MASK	0x1
1850 #define QM_RF_OPPORTUNISTIC_MASK_QUEUEEMPTY_SHIFT	8
1851 #define QM_RF_OPPORTUNISTIC_MASK_RESERVED1_MASK		0x7F
1852 #define QM_RF_OPPORTUNISTIC_MASK_RESERVED1_SHIFT	9
1853 };
1854 
1855 /* QM hardware structure of QM map memory */
1856 struct qm_rf_pq_map {
1857 	__le32 reg;
1858 #define QM_RF_PQ_MAP_PQ_VALID_MASK		0x1
1859 #define QM_RF_PQ_MAP_PQ_VALID_SHIFT		0
1860 #define QM_RF_PQ_MAP_RL_ID_MASK		0xFF
1861 #define QM_RF_PQ_MAP_RL_ID_SHIFT		1
1862 #define QM_RF_PQ_MAP_VP_PQ_ID_MASK		0x1FF
1863 #define QM_RF_PQ_MAP_VP_PQ_ID_SHIFT		9
1864 #define QM_RF_PQ_MAP_VOQ_MASK		0x1F
1865 #define QM_RF_PQ_MAP_VOQ_SHIFT		18
1866 #define QM_RF_PQ_MAP_WRR_WEIGHT_GROUP_MASK	0x3
1867 #define QM_RF_PQ_MAP_WRR_WEIGHT_GROUP_SHIFT	23
1868 #define QM_RF_PQ_MAP_RL_VALID_MASK		0x1
1869 #define QM_RF_PQ_MAP_RL_VALID_SHIFT		25
1870 #define QM_RF_PQ_MAP_RESERVED_MASK		0x3F
1871 #define QM_RF_PQ_MAP_RESERVED_SHIFT		26
1872 };
1873 
1874 /* Completion params for aggregated interrupt completion */
1875 struct sdm_agg_int_comp_params {
1876 	__le16 params;
1877 #define SDM_AGG_INT_COMP_PARAMS_AGG_INT_INDEX_MASK	0x3F
1878 #define SDM_AGG_INT_COMP_PARAMS_AGG_INT_INDEX_SHIFT	0
1879 #define SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_ENABLE_MASK	0x1
1880 #define SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_ENABLE_SHIFT	6
1881 #define SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_BIT_MASK	0x1FF
1882 #define SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_BIT_SHIFT	7
1883 };
1884 
1885 /* SDM operation gen command (generate aggregative interrupt) */
1886 struct sdm_op_gen {
1887 	__le32 command;
1888 #define SDM_OP_GEN_COMP_PARAM_MASK	0xFFFF
1889 #define SDM_OP_GEN_COMP_PARAM_SHIFT	0
1890 #define SDM_OP_GEN_COMP_TYPE_MASK	0xF
1891 #define SDM_OP_GEN_COMP_TYPE_SHIFT	16
1892 #define SDM_OP_GEN_RESERVED_MASK	0xFFF
1893 #define SDM_OP_GEN_RESERVED_SHIFT	20
1894 };
1895 
1896 /* Physical memory descriptor */
1897 struct phys_mem_desc {
1898 	dma_addr_t phys_addr;
1899 	void *virt_addr;
1900 	u32 size;		/* In bytes */
1901 };
1902 
1903 /* Virtual memory descriptor */
1904 struct virt_mem_desc {
1905 	void *ptr;
1906 	u32 size;		/* In bytes */
1907 };
1908 
1909 /********************************/
1910 /* HSI Init Functions constants */
1911 /********************************/
1912 
1913 /* Number of VLAN priorities */
1914 #define NUM_OF_VLAN_PRIORITIES	8
1915 
1916 /* BRB RAM init requirements */
1917 struct init_brb_ram_req {
1918 	u32 guranteed_per_tc;
1919 	u32 headroom_per_tc;
1920 	u32 min_pkt_size;
1921 	u32 max_ports_per_engine;
1922 	u8 num_active_tcs[MAX_NUM_PORTS];
1923 };
1924 
1925 /* ETS per-TC init requirements */
1926 struct init_ets_tc_req {
1927 	u8 use_sp;
1928 	u8 use_wfq;
1929 	u16 weight;
1930 };
1931 
1932 /* ETS init requirements */
1933 struct init_ets_req {
1934 	u32 mtu;
1935 	struct init_ets_tc_req tc_req[NUM_OF_TCS];
1936 };
1937 
1938 /* NIG LB RL init requirements */
1939 struct init_nig_lb_rl_req {
1940 	u16 lb_mac_rate;
1941 	u16 lb_rate;
1942 	u32 mtu;
1943 	u16 tc_rate[NUM_OF_PHYS_TCS];
1944 };
1945 
1946 /* NIG TC mapping for each priority */
1947 struct init_nig_pri_tc_map_entry {
1948 	u8 tc_id;
1949 	u8 valid;
1950 };
1951 
1952 /* NIG priority to TC map init requirements */
1953 struct init_nig_pri_tc_map_req {
1954 	struct init_nig_pri_tc_map_entry pri[NUM_OF_VLAN_PRIORITIES];
1955 };
1956 
1957 /* QM per global RL init parameters */
1958 struct init_qm_global_rl_params {
1959 	u8 type;
1960 	u8 reserved0;
1961 	u16 reserved1;
1962 	u32 rate_limit;
1963 };
1964 
1965 /* QM per-port init parameters */
1966 struct init_qm_port_params {
1967 	u16 active_phys_tcs;
1968 	u16 num_pbf_cmd_lines;
1969 	u16 num_btb_blocks;
1970 	u8 active;
1971 	u8 reserved;
1972 };
1973 
1974 /* QM per-PQ init parameters */
1975 struct init_qm_pq_params {
1976 	u16 vport_id;
1977 	u16 rl_id;
1978 	u8 rl_valid;
1979 	u8 tc_id;
1980 	u8 wrr_group;
1981 	u8 port_id;
1982 };
1983 
1984 /* QM per RL init parameters */
1985 struct init_qm_rl_params {
1986 	u32 vport_rl;
1987 	u8 vport_rl_type;
1988 	u8 reserved[3];
1989 };
1990 
1991 /* QM Rate Limiter types */
1992 enum init_qm_rl_type {
1993 	QM_RL_TYPE_NORMAL,
1994 	QM_RL_TYPE_QCN,
1995 	MAX_INIT_QM_RL_TYPE
1996 };
1997 
1998 /* QM per-vport init parameters */
1999 struct init_qm_vport_params {
2000 	u16 wfq;
2001 	u16 reserved;
2002 	u16 tc_wfq[NUM_OF_TCS];
2003 	u16 first_tx_pq_id[NUM_OF_TCS];
2004 };
2005 
2006 /**************************************/
2007 /* Init Tool HSI constants and macros */
2008 /**************************************/
2009 
2010 /* Width of GRC address in bits (addresses are specified in dwords) */
2011 #define GRC_ADDR_BITS	23
2012 #define MAX_GRC_ADDR	(BIT(GRC_ADDR_BITS) - 1)
2013 
2014 /* indicates an init that should be applied to any phase ID */
2015 #define ANY_PHASE_ID	0xffff
2016 
2017 /* Max size in dwords of a zipped array */
2018 #define MAX_ZIPPED_SIZE	8192
2019 enum chip_ids {
2020 	CHIP_BB,
2021 	CHIP_K2,
2022 	MAX_CHIP_IDS
2023 };
2024 
2025 struct fw_asserts_ram_section {
2026 	__le16 section_ram_line_offset;
2027 	__le16 section_ram_line_size;
2028 	u8 list_dword_offset;
2029 	u8 list_element_dword_size;
2030 	u8 list_num_elements;
2031 	u8 list_next_index_dword_offset;
2032 };
2033 
2034 struct fw_ver_num {
2035 	u8 major;
2036 	u8 minor;
2037 	u8 rev;
2038 	u8 eng;
2039 };
2040 
2041 struct fw_ver_info {
2042 	__le16 tools_ver;
2043 	u8 image_id;
2044 	u8 reserved1;
2045 	struct fw_ver_num num;
2046 	__le32 timestamp;
2047 	__le32 reserved2;
2048 };
2049 
2050 struct fw_info {
2051 	struct fw_ver_info ver;
2052 	struct fw_asserts_ram_section fw_asserts_section;
2053 };
2054 
2055 struct fw_info_location {
2056 	__le32 grc_addr;
2057 	__le32 size;
2058 };
2059 
2060 enum init_modes {
2061 	MODE_BB_A0_DEPRECATED,
2062 	MODE_BB,
2063 	MODE_K2,
2064 	MODE_ASIC,
2065 	MODE_EMUL_REDUCED,
2066 	MODE_EMUL_FULL,
2067 	MODE_FPGA,
2068 	MODE_CHIPSIM,
2069 	MODE_SF,
2070 	MODE_MF_SD,
2071 	MODE_MF_SI,
2072 	MODE_PORTS_PER_ENG_1,
2073 	MODE_PORTS_PER_ENG_2,
2074 	MODE_PORTS_PER_ENG_4,
2075 	MODE_100G,
2076 	MODE_SKIP_PRAM_INIT,
2077 	MODE_EMUL_MAC,
2078 	MAX_INIT_MODES
2079 };
2080 
2081 enum init_phases {
2082 	PHASE_ENGINE,
2083 	PHASE_PORT,
2084 	PHASE_PF,
2085 	PHASE_VF,
2086 	PHASE_QM_PF,
2087 	MAX_INIT_PHASES
2088 };
2089 
2090 enum init_split_types {
2091 	SPLIT_TYPE_NONE,
2092 	SPLIT_TYPE_PORT,
2093 	SPLIT_TYPE_PF,
2094 	SPLIT_TYPE_PORT_PF,
2095 	SPLIT_TYPE_VF,
2096 	MAX_INIT_SPLIT_TYPES
2097 };
2098 
2099 /* Binary buffer header */
2100 struct bin_buffer_hdr {
2101 	u32 offset;
2102 	u32 length;
2103 };
2104 
2105 /* Binary init buffer types */
2106 enum bin_init_buffer_type {
2107 	BIN_BUF_INIT_FW_VER_INFO,
2108 	BIN_BUF_INIT_CMD,
2109 	BIN_BUF_INIT_VAL,
2110 	BIN_BUF_INIT_MODE_TREE,
2111 	BIN_BUF_INIT_IRO,
2112 	BIN_BUF_INIT_OVERLAYS,
2113 	MAX_BIN_INIT_BUFFER_TYPE
2114 };
2115 
2116 /* FW overlay buffer header */
2117 struct fw_overlay_buf_hdr {
2118 	u32 data;
2119 #define FW_OVERLAY_BUF_HDR_STORM_ID_MASK  0xFF
2120 #define FW_OVERLAY_BUF_HDR_STORM_ID_SHIFT 0
2121 #define FW_OVERLAY_BUF_HDR_BUF_SIZE_MASK  0xFFFFFF
2122 #define FW_OVERLAY_BUF_HDR_BUF_SIZE_SHIFT 8
2123 };
2124 
2125 /* init array header: raw */
2126 struct init_array_raw_hdr {
2127 	__le32						data;
2128 #define INIT_ARRAY_RAW_HDR_TYPE_MASK			0xF
2129 #define INIT_ARRAY_RAW_HDR_TYPE_SHIFT			0
2130 #define INIT_ARRAY_RAW_HDR_PARAMS_MASK			0xFFFFFFF
2131 #define INIT_ARRAY_RAW_HDR_PARAMS_SHIFT			4
2132 };
2133 
2134 /* init array header: standard */
2135 struct init_array_standard_hdr {
2136 	__le32						data;
2137 #define INIT_ARRAY_STANDARD_HDR_TYPE_MASK		0xF
2138 #define INIT_ARRAY_STANDARD_HDR_TYPE_SHIFT		0
2139 #define INIT_ARRAY_STANDARD_HDR_SIZE_MASK		0xFFFFFFF
2140 #define INIT_ARRAY_STANDARD_HDR_SIZE_SHIFT		4
2141 };
2142 
2143 /* init array header: zipped */
2144 struct init_array_zipped_hdr {
2145 	__le32						data;
2146 #define INIT_ARRAY_ZIPPED_HDR_TYPE_MASK			0xF
2147 #define INIT_ARRAY_ZIPPED_HDR_TYPE_SHIFT		0
2148 #define INIT_ARRAY_ZIPPED_HDR_ZIPPED_SIZE_MASK		0xFFFFFFF
2149 #define INIT_ARRAY_ZIPPED_HDR_ZIPPED_SIZE_SHIFT		4
2150 };
2151 
2152 /* init array header: pattern */
2153 struct init_array_pattern_hdr {
2154 	__le32						data;
2155 #define INIT_ARRAY_PATTERN_HDR_TYPE_MASK		0xF
2156 #define INIT_ARRAY_PATTERN_HDR_TYPE_SHIFT		0
2157 #define INIT_ARRAY_PATTERN_HDR_PATTERN_SIZE_MASK	0xF
2158 #define INIT_ARRAY_PATTERN_HDR_PATTERN_SIZE_SHIFT	4
2159 #define INIT_ARRAY_PATTERN_HDR_REPETITIONS_MASK		0xFFFFFF
2160 #define INIT_ARRAY_PATTERN_HDR_REPETITIONS_SHIFT	8
2161 };
2162 
2163 /* init array header union */
2164 union init_array_hdr {
2165 	struct init_array_raw_hdr			raw;
2166 	struct init_array_standard_hdr			standard;
2167 	struct init_array_zipped_hdr			zipped;
2168 	struct init_array_pattern_hdr			pattern;
2169 };
2170 
2171 /* init array types */
2172 enum init_array_types {
2173 	INIT_ARR_STANDARD,
2174 	INIT_ARR_ZIPPED,
2175 	INIT_ARR_PATTERN,
2176 	MAX_INIT_ARRAY_TYPES
2177 };
2178 
2179 /* init operation: callback */
2180 struct init_callback_op {
2181 	__le32						op_data;
2182 #define INIT_CALLBACK_OP_OP_MASK			0xF
2183 #define INIT_CALLBACK_OP_OP_SHIFT			0
2184 #define INIT_CALLBACK_OP_RESERVED_MASK			0xFFFFFFF
2185 #define INIT_CALLBACK_OP_RESERVED_SHIFT			4
2186 	__le16						callback_id;
2187 	__le16						block_id;
2188 };
2189 
2190 /* init operation: delay */
2191 struct init_delay_op {
2192 	__le32						op_data;
2193 #define INIT_DELAY_OP_OP_MASK				0xF
2194 #define INIT_DELAY_OP_OP_SHIFT				0
2195 #define INIT_DELAY_OP_RESERVED_MASK			0xFFFFFFF
2196 #define INIT_DELAY_OP_RESERVED_SHIFT			4
2197 	__le32						delay;
2198 };
2199 
2200 /* init operation: if_mode */
2201 struct init_if_mode_op {
2202 	__le32						op_data;
2203 #define INIT_IF_MODE_OP_OP_MASK				0xF
2204 #define INIT_IF_MODE_OP_OP_SHIFT			0
2205 #define INIT_IF_MODE_OP_RESERVED1_MASK			0xFFF
2206 #define INIT_IF_MODE_OP_RESERVED1_SHIFT			4
2207 #define INIT_IF_MODE_OP_CMD_OFFSET_MASK			0xFFFF
2208 #define INIT_IF_MODE_OP_CMD_OFFSET_SHIFT		16
2209 	__le16						reserved2;
2210 	__le16						modes_buf_offset;
2211 };
2212 
2213 /* init operation: if_phase */
2214 struct init_if_phase_op {
2215 	__le32						op_data;
2216 #define INIT_IF_PHASE_OP_OP_MASK			0xF
2217 #define INIT_IF_PHASE_OP_OP_SHIFT			0
2218 #define INIT_IF_PHASE_OP_RESERVED1_MASK			0xFFF
2219 #define INIT_IF_PHASE_OP_RESERVED1_SHIFT		4
2220 #define INIT_IF_PHASE_OP_CMD_OFFSET_MASK		0xFFFF
2221 #define INIT_IF_PHASE_OP_CMD_OFFSET_SHIFT		16
2222 	__le32						phase_data;
2223 #define INIT_IF_PHASE_OP_PHASE_MASK			0xFF
2224 #define INIT_IF_PHASE_OP_PHASE_SHIFT			0
2225 #define INIT_IF_PHASE_OP_RESERVED2_MASK			0xFF
2226 #define INIT_IF_PHASE_OP_RESERVED2_SHIFT		8
2227 #define INIT_IF_PHASE_OP_PHASE_ID_MASK			0xFFFF
2228 #define INIT_IF_PHASE_OP_PHASE_ID_SHIFT			16
2229 };
2230 
2231 /* init mode operators */
2232 enum init_mode_ops {
2233 	INIT_MODE_OP_NOT,
2234 	INIT_MODE_OP_OR,
2235 	INIT_MODE_OP_AND,
2236 	MAX_INIT_MODE_OPS
2237 };
2238 
2239 /* init operation: raw */
2240 struct init_raw_op {
2241 	__le32						op_data;
2242 #define INIT_RAW_OP_OP_MASK				0xF
2243 #define INIT_RAW_OP_OP_SHIFT				0
2244 #define INIT_RAW_OP_PARAM1_MASK				0xFFFFFFF
2245 #define INIT_RAW_OP_PARAM1_SHIFT			4
2246 	__le32						param2;
2247 };
2248 
2249 /* init array params */
2250 struct init_op_array_params {
2251 	__le16						size;
2252 	__le16						offset;
2253 };
2254 
2255 /* Write init operation arguments */
2256 union init_write_args {
2257 	__le32						inline_val;
2258 	__le32						zeros_count;
2259 	__le32						array_offset;
2260 	struct init_op_array_params			runtime;
2261 };
2262 
2263 /* init operation: write */
2264 struct init_write_op {
2265 	__le32						data;
2266 #define INIT_WRITE_OP_OP_MASK				0xF
2267 #define INIT_WRITE_OP_OP_SHIFT				0
2268 #define INIT_WRITE_OP_SOURCE_MASK			0x7
2269 #define INIT_WRITE_OP_SOURCE_SHIFT			4
2270 #define INIT_WRITE_OP_RESERVED_MASK			0x1
2271 #define INIT_WRITE_OP_RESERVED_SHIFT			7
2272 #define INIT_WRITE_OP_WIDE_BUS_MASK			0x1
2273 #define INIT_WRITE_OP_WIDE_BUS_SHIFT			8
2274 #define INIT_WRITE_OP_ADDRESS_MASK			0x7FFFFF
2275 #define INIT_WRITE_OP_ADDRESS_SHIFT			9
2276 	union init_write_args				args;
2277 };
2278 
2279 /* init operation: read */
2280 struct init_read_op {
2281 	__le32						op_data;
2282 #define INIT_READ_OP_OP_MASK				0xF
2283 #define INIT_READ_OP_OP_SHIFT				0
2284 #define INIT_READ_OP_POLL_TYPE_MASK			0xF
2285 #define INIT_READ_OP_POLL_TYPE_SHIFT			4
2286 #define INIT_READ_OP_RESERVED_MASK			0x1
2287 #define INIT_READ_OP_RESERVED_SHIFT			8
2288 #define INIT_READ_OP_ADDRESS_MASK			0x7FFFFF
2289 #define INIT_READ_OP_ADDRESS_SHIFT			9
2290 	__le32						expected_val;
2291 };
2292 
2293 /* Init operations union */
2294 union init_op {
2295 	struct init_raw_op				raw;
2296 	struct init_write_op				write;
2297 	struct init_read_op				read;
2298 	struct init_if_mode_op				if_mode;
2299 	struct init_if_phase_op				if_phase;
2300 	struct init_callback_op				callback;
2301 	struct init_delay_op				delay;
2302 };
2303 
2304 /* Init command operation types */
2305 enum init_op_types {
2306 	INIT_OP_READ,
2307 	INIT_OP_WRITE,
2308 	INIT_OP_IF_MODE,
2309 	INIT_OP_IF_PHASE,
2310 	INIT_OP_DELAY,
2311 	INIT_OP_CALLBACK,
2312 	MAX_INIT_OP_TYPES
2313 };
2314 
2315 /* init polling types */
2316 enum init_poll_types {
2317 	INIT_POLL_NONE,
2318 	INIT_POLL_EQ,
2319 	INIT_POLL_OR,
2320 	INIT_POLL_AND,
2321 	MAX_INIT_POLL_TYPES
2322 };
2323 
2324 /* init source types */
2325 enum init_source_types {
2326 	INIT_SRC_INLINE,
2327 	INIT_SRC_ZEROS,
2328 	INIT_SRC_ARRAY,
2329 	INIT_SRC_RUNTIME,
2330 	MAX_INIT_SOURCE_TYPES
2331 };
2332 
2333 /* Internal RAM Offsets macro data */
2334 struct iro {
2335 	u32 base;
2336 	u16 m1;
2337 	u16 m2;
2338 	u16 m3;
2339 	u16 size;
2340 };
2341 
2342 /* Win 2 */
2343 #define GTT_BAR0_MAP_REG_IGU_CMD	0x00f000UL
2344 
2345 /* Win 3 */
2346 #define GTT_BAR0_MAP_REG_TSDM_RAM	0x010000UL
2347 
2348 /* Win 4 */
2349 #define GTT_BAR0_MAP_REG_MSDM_RAM	0x011000UL
2350 
2351 /* Win 5 */
2352 #define GTT_BAR0_MAP_REG_MSDM_RAM_1024	0x012000UL
2353 
2354 /* Win 6 */
2355 #define GTT_BAR0_MAP_REG_MSDM_RAM_2048	0x013000UL
2356 
2357 /* Win 7 */
2358 #define GTT_BAR0_MAP_REG_USDM_RAM	0x014000UL
2359 
2360 /* Win 8 */
2361 #define GTT_BAR0_MAP_REG_USDM_RAM_1024	0x015000UL
2362 
2363 /* Win 9 */
2364 #define GTT_BAR0_MAP_REG_USDM_RAM_2048	0x016000UL
2365 
2366 /* Win 10 */
2367 #define GTT_BAR0_MAP_REG_XSDM_RAM	0x017000UL
2368 
2369 /* Win 11 */
2370 #define GTT_BAR0_MAP_REG_XSDM_RAM_1024	0x018000UL
2371 
2372 /* Win 12 */
2373 #define GTT_BAR0_MAP_REG_YSDM_RAM	0x019000UL
2374 
2375 /* Win 13 */
2376 #define GTT_BAR0_MAP_REG_PSDM_RAM	0x01a000UL
2377 
2378 /* Returns the VOQ based on port and TC */
2379 #define VOQ(port, tc, max_phys_tcs_per_port)   ((tc) ==                       \
2380 						PURE_LB_TC ? NUM_OF_PHYS_TCS *\
2381 						MAX_NUM_PORTS_BB +            \
2382 						(port) : (port) *             \
2383 						(max_phys_tcs_per_port) + (tc))
2384 
2385 struct init_qm_pq_params;
2386 
2387 /**
2388  * qed_qm_pf_mem_size(): Prepare QM ILT sizes.
2389  *
2390  * @num_pf_cids: Number of connections used by this PF.
2391  * @num_vf_cids: Number of connections used by VFs of this PF.
2392  * @num_tids: Number of tasks used by this PF.
2393  * @num_pf_pqs: Number of PQs used by this PF.
2394  * @num_vf_pqs: Number of PQs used by VFs of this PF.
2395  *
2396  * Return: The required host memory size in 4KB units.
2397  *
2398  * Returns the required host memory size in 4KB units.
2399  * Must be called before all QM init HSI functions.
2400  */
2401 u32 qed_qm_pf_mem_size(u32 num_pf_cids,
2402 		       u32 num_vf_cids,
2403 		       u32 num_tids, u16 num_pf_pqs, u16 num_vf_pqs);
2404 
2405 struct qed_qm_common_rt_init_params {
2406 	u8 max_ports_per_engine;
2407 	u8 max_phys_tcs_per_port;
2408 	bool pf_rl_en;
2409 	bool pf_wfq_en;
2410 	bool global_rl_en;
2411 	bool vport_wfq_en;
2412 	struct init_qm_port_params *port_params;
2413 	struct init_qm_global_rl_params
2414 	global_rl_params[COMMON_MAX_QM_GLOBAL_RLS];
2415 };
2416 
2417 /**
2418  * qed_qm_common_rt_init(): Prepare QM runtime init values for the
2419  *                          engine phase.
2420  *
2421  * @p_hwfn: HW device data.
2422  * @p_params: Parameters.
2423  *
2424  * Return: 0 on success, -1 on error.
2425  */
2426 int qed_qm_common_rt_init(struct qed_hwfn *p_hwfn,
2427 			  struct qed_qm_common_rt_init_params *p_params);
2428 
2429 struct qed_qm_pf_rt_init_params {
2430 	u8 port_id;
2431 	u8 pf_id;
2432 	u8 max_phys_tcs_per_port;
2433 	bool is_pf_loading;
2434 	u32 num_pf_cids;
2435 	u32 num_vf_cids;
2436 	u32 num_tids;
2437 	u16 start_pq;
2438 	u16 num_pf_pqs;
2439 	u16 num_vf_pqs;
2440 	u16 start_vport;
2441 	u16 num_vports;
2442 	u16 start_rl;
2443 	u16 num_rls;
2444 	u16 pf_wfq;
2445 	u32 pf_rl;
2446 	u32 link_speed;
2447 	struct init_qm_pq_params *pq_params;
2448 	struct init_qm_vport_params *vport_params;
2449 	struct init_qm_rl_params *rl_params;
2450 };
2451 
2452 /**
2453  * qed_qm_pf_rt_init(): Prepare QM runtime init values for the PF phase.
2454  *
2455  * @p_hwfn:  HW device data.
2456  * @p_ptt: Ptt window used for writing the registers
2457  * @p_params: Parameters.
2458  *
2459  * Return: 0 on success, -1 on error.
2460  */
2461 int qed_qm_pf_rt_init(struct qed_hwfn *p_hwfn,
2462 		      struct qed_ptt *p_ptt,
2463 		      struct qed_qm_pf_rt_init_params *p_params);
2464 
2465 /**
2466  * qed_init_pf_wfq(): Initializes the WFQ weight of the specified PF.
2467  *
2468  * @p_hwfn: HW device data.
2469  * @p_ptt: Ptt window used for writing the registers
2470  * @pf_id: PF ID
2471  * @pf_wfq: WFQ weight. Must be non-zero.
2472  *
2473  * Return: 0 on success, -1 on error.
2474  */
2475 int qed_init_pf_wfq(struct qed_hwfn *p_hwfn,
2476 		    struct qed_ptt *p_ptt, u8 pf_id, u16 pf_wfq);
2477 
2478 /**
2479  * qed_init_pf_rl(): Initializes the rate limit of the specified PF
2480  *
2481  * @p_hwfn: HW device data.
2482  * @p_ptt: Ptt window used for writing the registers.
2483  * @pf_id: PF ID.
2484  * @pf_rl: rate limit in Mb/sec units
2485  *
2486  * Return: 0 on success, -1 on error.
2487  */
2488 int qed_init_pf_rl(struct qed_hwfn *p_hwfn,
2489 		   struct qed_ptt *p_ptt, u8 pf_id, u32 pf_rl);
2490 
2491 /**
2492  * qed_init_vport_wfq(): Initializes the WFQ weight of the specified VPORT
2493  *
2494  * @p_hwfn: HW device data.
2495  * @p_ptt: Ptt window used for writing the registers
2496  * @first_tx_pq_id: An array containing the first Tx PQ ID associated
2497  *                  with the VPORT for each TC. This array is filled by
2498  *                  qed_qm_pf_rt_init
2499  * @wfq: WFQ weight. Must be non-zero.
2500  *
2501  * Return: 0 on success, -1 on error.
2502  */
2503 int qed_init_vport_wfq(struct qed_hwfn *p_hwfn,
2504 		       struct qed_ptt *p_ptt,
2505 		       u16 first_tx_pq_id[NUM_OF_TCS], u16 wfq);
2506 
2507 /**
2508  * qed_init_vport_tc_wfq(): Initializes the WFQ weight of the specified
2509  *                          VPORT and TC.
2510  *
2511  * @p_hwfn: HW device data.
2512  * @p_ptt: Ptt window used for writing the registers.
2513  * @first_tx_pq_id: The first Tx PQ ID associated with the VPORT and TC.
2514  *                  (filled by qed_qm_pf_rt_init).
2515  * @weight: VPORT+TC WFQ weight.
2516  *
2517  * Return: 0 on success, -1 on error.
2518  */
2519 int qed_init_vport_tc_wfq(struct qed_hwfn *p_hwfn,
2520 			  struct qed_ptt *p_ptt,
2521 			  u16 first_tx_pq_id, u16 weight);
2522 
2523 /**
2524  * qed_init_global_rl():  Initializes the rate limit of the specified
2525  * rate limiter.
2526  *
2527  * @p_hwfn: HW device data.
2528  * @p_ptt: Ptt window used for writing the registers.
2529  * @rl_id: RL ID.
2530  * @rate_limit: Rate limit in Mb/sec units
2531  * @vport_rl_type: Vport RL type.
2532  *
2533  * Return: 0 on success, -1 on error.
2534  */
2535 int qed_init_global_rl(struct qed_hwfn *p_hwfn,
2536 		       struct qed_ptt *p_ptt,
2537 		       u16 rl_id, u32 rate_limit,
2538 		       enum init_qm_rl_type vport_rl_type);
2539 
2540 /**
2541  * qed_send_qm_stop_cmd(): Sends a stop command to the QM.
2542  *
2543  * @p_hwfn: HW device data.
2544  * @p_ptt: Ptt window used for writing the registers.
2545  * @is_release_cmd: true for release, false for stop.
2546  * @is_tx_pq: true for Tx PQs, false for Other PQs.
2547  * @start_pq: first PQ ID to stop
2548  * @num_pqs: Number of PQs to stop, starting from start_pq.
2549  *
2550  * Return: Bool, true if successful, false if timeout occurred while waiting
2551  *         for QM command done.
2552  */
2553 bool qed_send_qm_stop_cmd(struct qed_hwfn *p_hwfn,
2554 			  struct qed_ptt *p_ptt,
2555 			  bool is_release_cmd,
2556 			  bool is_tx_pq, u16 start_pq, u16 num_pqs);
2557 
2558 /**
2559  * qed_set_vxlan_dest_port(): Initializes vxlan tunnel destination udp port.
2560  *
2561  * @p_hwfn: HW device data.
2562  * @p_ptt: Ptt window used for writing the registers.
2563  * @dest_port: vxlan destination udp port.
2564  *
2565  * Return: Void.
2566  */
2567 void qed_set_vxlan_dest_port(struct qed_hwfn *p_hwfn,
2568 			     struct qed_ptt *p_ptt, u16 dest_port);
2569 
2570 /**
2571  * qed_set_vxlan_enable(): Enable or disable VXLAN tunnel in HW.
2572  *
2573  * @p_hwfn: HW device data.
2574  * @p_ptt: Ptt window used for writing the registers.
2575  * @vxlan_enable: vxlan enable flag.
2576  *
2577  * Return: Void.
2578  */
2579 void qed_set_vxlan_enable(struct qed_hwfn *p_hwfn,
2580 			  struct qed_ptt *p_ptt, bool vxlan_enable);
2581 
2582 /**
2583  * qed_set_gre_enable(): Enable or disable GRE tunnel in HW.
2584  *
2585  * @p_hwfn: HW device data.
2586  * @p_ptt: Ptt window used for writing the registers.
2587  * @eth_gre_enable: Eth GRE enable flag.
2588  * @ip_gre_enable: IP GRE enable flag.
2589  *
2590  * Return: Void.
2591  */
2592 void qed_set_gre_enable(struct qed_hwfn *p_hwfn,
2593 			struct qed_ptt *p_ptt,
2594 			bool eth_gre_enable, bool ip_gre_enable);
2595 
2596 /**
2597  * qed_set_geneve_dest_port(): Initializes geneve tunnel destination udp port
2598  *
2599  * @p_hwfn: HW device data.
2600  * @p_ptt: Ptt window used for writing the registers.
2601  * @dest_port: Geneve destination udp port.
2602  *
2603  * Retur: Void.
2604  */
2605 void qed_set_geneve_dest_port(struct qed_hwfn *p_hwfn,
2606 			      struct qed_ptt *p_ptt, u16 dest_port);
2607 
2608 /**
2609  * qed_set_geneve_enable(): Enable or disable GRE tunnel in HW.
2610  *
2611  * @p_hwfn: HW device data.
2612  * @p_ptt: Ptt window used for writing the registers.
2613  * @eth_geneve_enable: Eth GENEVE enable flag.
2614  * @ip_geneve_enable: IP GENEVE enable flag.
2615  *
2616  * Return: Void.
2617  */
2618 void qed_set_geneve_enable(struct qed_hwfn *p_hwfn,
2619 			   struct qed_ptt *p_ptt,
2620 			   bool eth_geneve_enable, bool ip_geneve_enable);
2621 
2622 void qed_set_vxlan_no_l2_enable(struct qed_hwfn *p_hwfn,
2623 				struct qed_ptt *p_ptt, bool enable);
2624 
2625 /**
2626  * qed_gft_disable(): Disable GFT.
2627  *
2628  * @p_hwfn: HW device data.
2629  * @p_ptt: Ptt window used for writing the registers.
2630  * @pf_id: PF on which to disable GFT.
2631  *
2632  * Return: Void.
2633  */
2634 void qed_gft_disable(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, u16 pf_id);
2635 
2636 /**
2637  * qed_gft_config(): Enable and configure HW for GFT.
2638  *
2639  * @p_hwfn: HW device data.
2640  * @p_ptt: Ptt window used for writing the registers.
2641  * @pf_id: PF on which to enable GFT.
2642  * @tcp: Set profile tcp packets.
2643  * @udp: Set profile udp  packet.
2644  * @ipv4: Set profile ipv4 packet.
2645  * @ipv6: Set profile ipv6 packet.
2646  * @profile_type: Define packet same fields. Use enum gft_profile_type.
2647  *
2648  * Return: Void.
2649  */
2650 void qed_gft_config(struct qed_hwfn *p_hwfn,
2651 		    struct qed_ptt *p_ptt,
2652 		    u16 pf_id,
2653 		    bool tcp,
2654 		    bool udp,
2655 		    bool ipv4, bool ipv6, enum gft_profile_type profile_type);
2656 
2657 /**
2658  * qed_enable_context_validation(): Enable and configure context
2659  *                                  validation.
2660  *
2661  * @p_hwfn: HW device data.
2662  * @p_ptt: Ptt window used for writing the registers.
2663  *
2664  * Return: Void.
2665  */
2666 void qed_enable_context_validation(struct qed_hwfn *p_hwfn,
2667 				   struct qed_ptt *p_ptt);
2668 
2669 /**
2670  * qed_calc_session_ctx_validation(): Calcualte validation byte for
2671  *                                    session context.
2672  *
2673  * @p_ctx_mem: Pointer to context memory.
2674  * @ctx_size: Context size.
2675  * @ctx_type: Context type.
2676  * @cid: Context cid.
2677  *
2678  * Return: Void.
2679  */
2680 void qed_calc_session_ctx_validation(void *p_ctx_mem,
2681 				     u16 ctx_size, u8 ctx_type, u32 cid);
2682 
2683 /**
2684  * qed_calc_task_ctx_validation(): Calcualte validation byte for task
2685  *                                 context.
2686  *
2687  * @p_ctx_mem: Pointer to context memory.
2688  * @ctx_size: Context size.
2689  * @ctx_type: Context type.
2690  * @tid: Context tid.
2691  *
2692  * Return: Void.
2693  */
2694 void qed_calc_task_ctx_validation(void *p_ctx_mem,
2695 				  u16 ctx_size, u8 ctx_type, u32 tid);
2696 
2697 /**
2698  * qed_memset_session_ctx(): Memset session context to 0 while
2699  *                            preserving validation bytes.
2700  *
2701  * @p_ctx_mem: Pointer to context memory.
2702  * @ctx_size: Size to initialzie.
2703  * @ctx_type: Context type.
2704  *
2705  * Return: Void.
2706  */
2707 void qed_memset_session_ctx(void *p_ctx_mem, u32 ctx_size, u8 ctx_type);
2708 
2709 /**
2710  * qed_memset_task_ctx(): Memset task context to 0 while preserving
2711  *                        validation bytes.
2712  *
2713  * @p_ctx_mem: Pointer to context memory.
2714  * @ctx_size: size to initialzie.
2715  * @ctx_type: context type.
2716  *
2717  * Return: Void.
2718  */
2719 void qed_memset_task_ctx(void *p_ctx_mem, u32 ctx_size, u8 ctx_type);
2720 
2721 #define NUM_STORMS 6
2722 
2723 /**
2724  * qed_set_rdma_error_level(): Sets the RDMA assert level.
2725  *                             If the severity of the error will be
2726  *                             above the level, the FW will assert.
2727  * @p_hwfn: HW device data.
2728  * @p_ptt: Ptt window used for writing the registers.
2729  * @assert_level: An array of assert levels for each storm.
2730  *
2731  * Return: Void.
2732  */
2733 void qed_set_rdma_error_level(struct qed_hwfn *p_hwfn,
2734 			      struct qed_ptt *p_ptt,
2735 			      u8 assert_level[NUM_STORMS]);
2736 /**
2737  * qed_fw_overlay_mem_alloc(): Allocates and fills the FW overlay memory.
2738  *
2739  * @p_hwfn: HW device data.
2740  * @fw_overlay_in_buf: The input FW overlay buffer.
2741  * @buf_size_in_bytes: The size of the input FW overlay buffer in bytes.
2742  *		        must be aligned to dwords.
2743  *
2744  * Return: A pointer to the allocated overlays memory,
2745  * or NULL in case of failures.
2746  */
2747 struct phys_mem_desc *
2748 qed_fw_overlay_mem_alloc(struct qed_hwfn *p_hwfn,
2749 			 const u32 *const fw_overlay_in_buf,
2750 			 u32 buf_size_in_bytes);
2751 
2752 /**
2753  * qed_fw_overlay_init_ram(): Initializes the FW overlay RAM.
2754  *
2755  * @p_hwfn: HW device data.
2756  * @p_ptt: Ptt window used for writing the registers.
2757  * @fw_overlay_mem: the allocated FW overlay memory.
2758  *
2759  * Return: Void.
2760  */
2761 void qed_fw_overlay_init_ram(struct qed_hwfn *p_hwfn,
2762 			     struct qed_ptt *p_ptt,
2763 			     struct phys_mem_desc *fw_overlay_mem);
2764 
2765 /**
2766  * qed_fw_overlay_mem_free(): Frees the FW overlay memory.
2767  *
2768  * @p_hwfn: HW device data.
2769  * @fw_overlay_mem: The allocated FW overlay memory to free.
2770  *
2771  * Return: Void.
2772  */
2773 void qed_fw_overlay_mem_free(struct qed_hwfn *p_hwfn,
2774 			     struct phys_mem_desc **fw_overlay_mem);
2775 
2776 #define PCICFG_OFFSET					0x2000
2777 #define GRC_CONFIG_REG_PF_INIT_VF			0x624
2778 
2779 /* First VF_NUM for PF is encoded in this register.
2780  * The number of VFs assigned to a PF is assumed to be a multiple of 8.
2781  * Software should program these bits based on Total Number of VFs programmed
2782  * for each PF.
2783  * Since registers from 0x000-0x7ff are spilt across functions, each PF will
2784  * have the same location for the same 4 bits
2785  */
2786 #define GRC_CR_PF_INIT_VF_PF_FIRST_VF_NUM_MASK		0xff
2787 
2788 /* Runtime array offsets */
2789 #define DORQ_REG_PF_MAX_ICID_0_RT_OFFSET				0
2790 #define DORQ_REG_PF_MAX_ICID_1_RT_OFFSET				1
2791 #define DORQ_REG_PF_MAX_ICID_2_RT_OFFSET				2
2792 #define DORQ_REG_PF_MAX_ICID_3_RT_OFFSET				3
2793 #define DORQ_REG_PF_MAX_ICID_4_RT_OFFSET				4
2794 #define DORQ_REG_PF_MAX_ICID_5_RT_OFFSET				5
2795 #define DORQ_REG_PF_MAX_ICID_6_RT_OFFSET				6
2796 #define DORQ_REG_PF_MAX_ICID_7_RT_OFFSET				7
2797 #define DORQ_REG_VF_MAX_ICID_0_RT_OFFSET				8
2798 #define DORQ_REG_VF_MAX_ICID_1_RT_OFFSET				9
2799 #define DORQ_REG_VF_MAX_ICID_2_RT_OFFSET				10
2800 #define DORQ_REG_VF_MAX_ICID_3_RT_OFFSET				11
2801 #define DORQ_REG_VF_MAX_ICID_4_RT_OFFSET				12
2802 #define DORQ_REG_VF_MAX_ICID_5_RT_OFFSET				13
2803 #define DORQ_REG_VF_MAX_ICID_6_RT_OFFSET				14
2804 #define DORQ_REG_VF_MAX_ICID_7_RT_OFFSET				15
2805 #define DORQ_REG_VF_ICID_BIT_SHIFT_NORM_RT_OFFSET			16
2806 #define DORQ_REG_PF_WAKE_ALL_RT_OFFSET					17
2807 #define DORQ_REG_TAG1_ETHERTYPE_RT_OFFSET				18
2808 #define IGU_REG_PF_CONFIGURATION_RT_OFFSET				19
2809 #define IGU_REG_VF_CONFIGURATION_RT_OFFSET				20
2810 #define IGU_REG_ATTN_MSG_ADDR_L_RT_OFFSET				21
2811 #define IGU_REG_ATTN_MSG_ADDR_H_RT_OFFSET				22
2812 #define IGU_REG_LEADING_EDGE_LATCH_RT_OFFSET				23
2813 #define IGU_REG_TRAILING_EDGE_LATCH_RT_OFFSET				24
2814 #define CAU_REG_CQE_AGG_UNIT_SIZE_RT_OFFSET				25
2815 #define CAU_REG_SB_VAR_MEMORY_RT_OFFSET					26
2816 #define CAU_REG_SB_VAR_MEMORY_RT_SIZE					736
2817 #define CAU_REG_SB_ADDR_MEMORY_RT_OFFSET				762
2818 #define CAU_REG_SB_ADDR_MEMORY_RT_SIZE					736
2819 #define CAU_REG_PI_MEMORY_RT_OFFSET					1498
2820 #define CAU_REG_PI_MEMORY_RT_SIZE					4416
2821 #define PRS_REG_SEARCH_RESP_INITIATOR_TYPE_RT_OFFSET			5914
2822 #define PRS_REG_TASK_ID_MAX_INITIATOR_PF_RT_OFFSET			5915
2823 #define PRS_REG_TASK_ID_MAX_INITIATOR_VF_RT_OFFSET			5916
2824 #define PRS_REG_TASK_ID_MAX_TARGET_PF_RT_OFFSET				5917
2825 #define PRS_REG_TASK_ID_MAX_TARGET_VF_RT_OFFSET				5918
2826 #define PRS_REG_SEARCH_TCP_RT_OFFSET					5919
2827 #define PRS_REG_SEARCH_FCOE_RT_OFFSET					5920
2828 #define PRS_REG_SEARCH_ROCE_RT_OFFSET					5921
2829 #define PRS_REG_ROCE_DEST_QP_MAX_VF_RT_OFFSET				5922
2830 #define PRS_REG_ROCE_DEST_QP_MAX_PF_RT_OFFSET				5923
2831 #define PRS_REG_SEARCH_OPENFLOW_RT_OFFSET				5924
2832 #define PRS_REG_SEARCH_NON_IP_AS_OPENFLOW_RT_OFFSET			5925
2833 #define PRS_REG_OPENFLOW_SUPPORT_ONLY_KNOWN_OVER_IP_RT_OFFSET		5926
2834 #define PRS_REG_OPENFLOW_SEARCH_KEY_MASK_RT_OFFSET			5927
2835 #define PRS_REG_TAG_ETHERTYPE_0_RT_OFFSET				5928
2836 #define PRS_REG_LIGHT_L2_ETHERTYPE_EN_RT_OFFSET				5929
2837 #define SRC_REG_FIRSTFREE_RT_OFFSET					5930
2838 #define SRC_REG_FIRSTFREE_RT_SIZE					2
2839 #define SRC_REG_LASTFREE_RT_OFFSET					5932
2840 #define SRC_REG_LASTFREE_RT_SIZE					2
2841 #define SRC_REG_COUNTFREE_RT_OFFSET					5934
2842 #define SRC_REG_NUMBER_HASH_BITS_RT_OFFSET				5935
2843 #define PSWRQ2_REG_CDUT_P_SIZE_RT_OFFSET				5936
2844 #define PSWRQ2_REG_CDUC_P_SIZE_RT_OFFSET				5937
2845 #define PSWRQ2_REG_TM_P_SIZE_RT_OFFSET					5938
2846 #define PSWRQ2_REG_QM_P_SIZE_RT_OFFSET					5939
2847 #define PSWRQ2_REG_SRC_P_SIZE_RT_OFFSET					5940
2848 #define PSWRQ2_REG_TSDM_P_SIZE_RT_OFFSET				5941
2849 #define PSWRQ2_REG_TM_FIRST_ILT_RT_OFFSET				5942
2850 #define PSWRQ2_REG_TM_LAST_ILT_RT_OFFSET				5943
2851 #define PSWRQ2_REG_QM_FIRST_ILT_RT_OFFSET				5944
2852 #define PSWRQ2_REG_QM_LAST_ILT_RT_OFFSET				5945
2853 #define PSWRQ2_REG_SRC_FIRST_ILT_RT_OFFSET				5946
2854 #define PSWRQ2_REG_SRC_LAST_ILT_RT_OFFSET				5947
2855 #define PSWRQ2_REG_CDUC_FIRST_ILT_RT_OFFSET				5948
2856 #define PSWRQ2_REG_CDUC_LAST_ILT_RT_OFFSET				5949
2857 #define PSWRQ2_REG_CDUT_FIRST_ILT_RT_OFFSET				5950
2858 #define PSWRQ2_REG_CDUT_LAST_ILT_RT_OFFSET				5951
2859 #define PSWRQ2_REG_TSDM_FIRST_ILT_RT_OFFSET				5952
2860 #define PSWRQ2_REG_TSDM_LAST_ILT_RT_OFFSET				5953
2861 #define PSWRQ2_REG_TM_NUMBER_OF_PF_BLOCKS_RT_OFFSET			5954
2862 #define PSWRQ2_REG_CDUT_NUMBER_OF_PF_BLOCKS_RT_OFFSET			5955
2863 #define PSWRQ2_REG_CDUC_NUMBER_OF_PF_BLOCKS_RT_OFFSET			5956
2864 #define PSWRQ2_REG_TM_VF_BLOCKS_RT_OFFSET				5957
2865 #define PSWRQ2_REG_CDUT_VF_BLOCKS_RT_OFFSET				5958
2866 #define PSWRQ2_REG_CDUC_VF_BLOCKS_RT_OFFSET				5959
2867 #define PSWRQ2_REG_TM_BLOCKS_FACTOR_RT_OFFSET				5960
2868 #define PSWRQ2_REG_CDUT_BLOCKS_FACTOR_RT_OFFSET				5961
2869 #define PSWRQ2_REG_CDUC_BLOCKS_FACTOR_RT_OFFSET				5962
2870 #define PSWRQ2_REG_VF_BASE_RT_OFFSET					5963
2871 #define PSWRQ2_REG_VF_LAST_ILT_RT_OFFSET				5964
2872 #define PSWRQ2_REG_DRAM_ALIGN_WR_RT_OFFSET				5965
2873 #define PSWRQ2_REG_DRAM_ALIGN_RD_RT_OFFSET				5966
2874 #define PSWRQ2_REG_ILT_MEMORY_RT_OFFSET					5967
2875 #define PSWRQ2_REG_ILT_MEMORY_RT_SIZE					22000
2876 #define PGLUE_REG_B_VF_BASE_RT_OFFSET					27967
2877 #define PGLUE_REG_B_MSDM_OFFSET_MASK_B_RT_OFFSET			27968
2878 #define PGLUE_REG_B_MSDM_VF_SHIFT_B_RT_OFFSET				27969
2879 #define PGLUE_REG_B_CACHE_LINE_SIZE_RT_OFFSET				27970
2880 #define PGLUE_REG_B_PF_BAR0_SIZE_RT_OFFSET				27971
2881 #define PGLUE_REG_B_PF_BAR1_SIZE_RT_OFFSET				27972
2882 #define PGLUE_REG_B_VF_BAR1_SIZE_RT_OFFSET				27973
2883 #define TM_REG_VF_ENABLE_CONN_RT_OFFSET					27974
2884 #define TM_REG_PF_ENABLE_CONN_RT_OFFSET					27975
2885 #define TM_REG_PF_ENABLE_TASK_RT_OFFSET					27976
2886 #define TM_REG_GROUP_SIZE_RESOLUTION_CONN_RT_OFFSET			27977
2887 #define TM_REG_GROUP_SIZE_RESOLUTION_TASK_RT_OFFSET			27978
2888 #define TM_REG_CONFIG_CONN_MEM_RT_OFFSET				27979
2889 #define TM_REG_CONFIG_CONN_MEM_RT_SIZE					416
2890 #define TM_REG_CONFIG_TASK_MEM_RT_OFFSET				28395
2891 #define TM_REG_CONFIG_TASK_MEM_RT_SIZE					512
2892 #define QM_REG_MAXPQSIZE_0_RT_OFFSET					28907
2893 #define QM_REG_MAXPQSIZE_1_RT_OFFSET					28908
2894 #define QM_REG_MAXPQSIZE_2_RT_OFFSET					28909
2895 #define QM_REG_MAXPQSIZETXSEL_0_RT_OFFSET				28910
2896 #define QM_REG_MAXPQSIZETXSEL_1_RT_OFFSET				28911
2897 #define QM_REG_MAXPQSIZETXSEL_2_RT_OFFSET				28912
2898 #define QM_REG_MAXPQSIZETXSEL_3_RT_OFFSET				28913
2899 #define QM_REG_MAXPQSIZETXSEL_4_RT_OFFSET				28914
2900 #define QM_REG_MAXPQSIZETXSEL_5_RT_OFFSET				28915
2901 #define QM_REG_MAXPQSIZETXSEL_6_RT_OFFSET				28916
2902 #define QM_REG_MAXPQSIZETXSEL_7_RT_OFFSET				28917
2903 #define QM_REG_MAXPQSIZETXSEL_8_RT_OFFSET				28918
2904 #define QM_REG_MAXPQSIZETXSEL_9_RT_OFFSET				28919
2905 #define QM_REG_MAXPQSIZETXSEL_10_RT_OFFSET				28920
2906 #define QM_REG_MAXPQSIZETXSEL_11_RT_OFFSET				28921
2907 #define QM_REG_MAXPQSIZETXSEL_12_RT_OFFSET				28922
2908 #define QM_REG_MAXPQSIZETXSEL_13_RT_OFFSET				28923
2909 #define QM_REG_MAXPQSIZETXSEL_14_RT_OFFSET				28924
2910 #define QM_REG_MAXPQSIZETXSEL_15_RT_OFFSET				28925
2911 #define QM_REG_MAXPQSIZETXSEL_16_RT_OFFSET				28926
2912 #define QM_REG_MAXPQSIZETXSEL_17_RT_OFFSET				28927
2913 #define QM_REG_MAXPQSIZETXSEL_18_RT_OFFSET				28928
2914 #define QM_REG_MAXPQSIZETXSEL_19_RT_OFFSET				28929
2915 #define QM_REG_MAXPQSIZETXSEL_20_RT_OFFSET				28930
2916 #define QM_REG_MAXPQSIZETXSEL_21_RT_OFFSET				28931
2917 #define QM_REG_MAXPQSIZETXSEL_22_RT_OFFSET				28932
2918 #define QM_REG_MAXPQSIZETXSEL_23_RT_OFFSET				28933
2919 #define QM_REG_MAXPQSIZETXSEL_24_RT_OFFSET				28934
2920 #define QM_REG_MAXPQSIZETXSEL_25_RT_OFFSET				28935
2921 #define QM_REG_MAXPQSIZETXSEL_26_RT_OFFSET				28936
2922 #define QM_REG_MAXPQSIZETXSEL_27_RT_OFFSET				28937
2923 #define QM_REG_MAXPQSIZETXSEL_28_RT_OFFSET				28938
2924 #define QM_REG_MAXPQSIZETXSEL_29_RT_OFFSET				28939
2925 #define QM_REG_MAXPQSIZETXSEL_30_RT_OFFSET				28940
2926 #define QM_REG_MAXPQSIZETXSEL_31_RT_OFFSET				28941
2927 #define QM_REG_MAXPQSIZETXSEL_32_RT_OFFSET				28942
2928 #define QM_REG_MAXPQSIZETXSEL_33_RT_OFFSET				28943
2929 #define QM_REG_MAXPQSIZETXSEL_34_RT_OFFSET				28944
2930 #define QM_REG_MAXPQSIZETXSEL_35_RT_OFFSET				28945
2931 #define QM_REG_MAXPQSIZETXSEL_36_RT_OFFSET				28946
2932 #define QM_REG_MAXPQSIZETXSEL_37_RT_OFFSET				28947
2933 #define QM_REG_MAXPQSIZETXSEL_38_RT_OFFSET				28948
2934 #define QM_REG_MAXPQSIZETXSEL_39_RT_OFFSET				28949
2935 #define QM_REG_MAXPQSIZETXSEL_40_RT_OFFSET				28950
2936 #define QM_REG_MAXPQSIZETXSEL_41_RT_OFFSET				28951
2937 #define QM_REG_MAXPQSIZETXSEL_42_RT_OFFSET				28952
2938 #define QM_REG_MAXPQSIZETXSEL_43_RT_OFFSET				28953
2939 #define QM_REG_MAXPQSIZETXSEL_44_RT_OFFSET				28954
2940 #define QM_REG_MAXPQSIZETXSEL_45_RT_OFFSET				28955
2941 #define QM_REG_MAXPQSIZETXSEL_46_RT_OFFSET				28956
2942 #define QM_REG_MAXPQSIZETXSEL_47_RT_OFFSET				28957
2943 #define QM_REG_MAXPQSIZETXSEL_48_RT_OFFSET				28958
2944 #define QM_REG_MAXPQSIZETXSEL_49_RT_OFFSET				28959
2945 #define QM_REG_MAXPQSIZETXSEL_50_RT_OFFSET				28960
2946 #define QM_REG_MAXPQSIZETXSEL_51_RT_OFFSET				28961
2947 #define QM_REG_MAXPQSIZETXSEL_52_RT_OFFSET				28962
2948 #define QM_REG_MAXPQSIZETXSEL_53_RT_OFFSET				28963
2949 #define QM_REG_MAXPQSIZETXSEL_54_RT_OFFSET				28964
2950 #define QM_REG_MAXPQSIZETXSEL_55_RT_OFFSET				28965
2951 #define QM_REG_MAXPQSIZETXSEL_56_RT_OFFSET				28966
2952 #define QM_REG_MAXPQSIZETXSEL_57_RT_OFFSET				28967
2953 #define QM_REG_MAXPQSIZETXSEL_58_RT_OFFSET				28968
2954 #define QM_REG_MAXPQSIZETXSEL_59_RT_OFFSET				28969
2955 #define QM_REG_MAXPQSIZETXSEL_60_RT_OFFSET				28970
2956 #define QM_REG_MAXPQSIZETXSEL_61_RT_OFFSET				28971
2957 #define QM_REG_MAXPQSIZETXSEL_62_RT_OFFSET				28972
2958 #define QM_REG_MAXPQSIZETXSEL_63_RT_OFFSET				28973
2959 #define QM_REG_BASEADDROTHERPQ_RT_OFFSET				28974
2960 #define QM_REG_BASEADDROTHERPQ_RT_SIZE					128
2961 #define QM_REG_PTRTBLOTHER_RT_OFFSET					29102
2962 #define QM_REG_PTRTBLOTHER_RT_SIZE					256
2963 #define QM_REG_VOQCRDLINE_RT_OFFSET					29358
2964 #define QM_REG_VOQCRDLINE_RT_SIZE					20
2965 #define QM_REG_VOQINITCRDLINE_RT_OFFSET					29378
2966 #define QM_REG_VOQINITCRDLINE_RT_SIZE					20
2967 #define QM_REG_AFULLQMBYPTHRPFWFQ_RT_OFFSET				29398
2968 #define QM_REG_AFULLQMBYPTHRVPWFQ_RT_OFFSET				29399
2969 #define QM_REG_AFULLQMBYPTHRPFRL_RT_OFFSET				29400
2970 #define QM_REG_AFULLQMBYPTHRGLBLRL_RT_OFFSET				29401
2971 #define QM_REG_AFULLOPRTNSTCCRDMASK_RT_OFFSET				29402
2972 #define QM_REG_WRROTHERPQGRP_0_RT_OFFSET				29403
2973 #define QM_REG_WRROTHERPQGRP_1_RT_OFFSET				29404
2974 #define QM_REG_WRROTHERPQGRP_2_RT_OFFSET				29405
2975 #define QM_REG_WRROTHERPQGRP_3_RT_OFFSET				29406
2976 #define QM_REG_WRROTHERPQGRP_4_RT_OFFSET				29407
2977 #define QM_REG_WRROTHERPQGRP_5_RT_OFFSET				29408
2978 #define QM_REG_WRROTHERPQGRP_6_RT_OFFSET				29409
2979 #define QM_REG_WRROTHERPQGRP_7_RT_OFFSET				29410
2980 #define QM_REG_WRROTHERPQGRP_8_RT_OFFSET				29411
2981 #define QM_REG_WRROTHERPQGRP_9_RT_OFFSET				29412
2982 #define QM_REG_WRROTHERPQGRP_10_RT_OFFSET				29413
2983 #define QM_REG_WRROTHERPQGRP_11_RT_OFFSET				29414
2984 #define QM_REG_WRROTHERPQGRP_12_RT_OFFSET				29415
2985 #define QM_REG_WRROTHERPQGRP_13_RT_OFFSET				29416
2986 #define QM_REG_WRROTHERPQGRP_14_RT_OFFSET				29417
2987 #define QM_REG_WRROTHERPQGRP_15_RT_OFFSET				29418
2988 #define QM_REG_WRROTHERGRPWEIGHT_0_RT_OFFSET				29419
2989 #define QM_REG_WRROTHERGRPWEIGHT_1_RT_OFFSET				29420
2990 #define QM_REG_WRROTHERGRPWEIGHT_2_RT_OFFSET				29421
2991 #define QM_REG_WRROTHERGRPWEIGHT_3_RT_OFFSET				29422
2992 #define QM_REG_WRRTXGRPWEIGHT_0_RT_OFFSET				29423
2993 #define QM_REG_WRRTXGRPWEIGHT_1_RT_OFFSET				29424
2994 #define QM_REG_PQTX2PF_0_RT_OFFSET					29425
2995 #define QM_REG_PQTX2PF_1_RT_OFFSET					29426
2996 #define QM_REG_PQTX2PF_2_RT_OFFSET					29427
2997 #define QM_REG_PQTX2PF_3_RT_OFFSET					29428
2998 #define QM_REG_PQTX2PF_4_RT_OFFSET					29429
2999 #define QM_REG_PQTX2PF_5_RT_OFFSET					29430
3000 #define QM_REG_PQTX2PF_6_RT_OFFSET					29431
3001 #define QM_REG_PQTX2PF_7_RT_OFFSET					29432
3002 #define QM_REG_PQTX2PF_8_RT_OFFSET					29433
3003 #define QM_REG_PQTX2PF_9_RT_OFFSET					29434
3004 #define QM_REG_PQTX2PF_10_RT_OFFSET					29435
3005 #define QM_REG_PQTX2PF_11_RT_OFFSET					29436
3006 #define QM_REG_PQTX2PF_12_RT_OFFSET					29437
3007 #define QM_REG_PQTX2PF_13_RT_OFFSET					29438
3008 #define QM_REG_PQTX2PF_14_RT_OFFSET					29439
3009 #define QM_REG_PQTX2PF_15_RT_OFFSET					29440
3010 #define QM_REG_PQTX2PF_16_RT_OFFSET					29441
3011 #define QM_REG_PQTX2PF_17_RT_OFFSET					29442
3012 #define QM_REG_PQTX2PF_18_RT_OFFSET					29443
3013 #define QM_REG_PQTX2PF_19_RT_OFFSET					29444
3014 #define QM_REG_PQTX2PF_20_RT_OFFSET					29445
3015 #define QM_REG_PQTX2PF_21_RT_OFFSET					29446
3016 #define QM_REG_PQTX2PF_22_RT_OFFSET					29447
3017 #define QM_REG_PQTX2PF_23_RT_OFFSET					29448
3018 #define QM_REG_PQTX2PF_24_RT_OFFSET					29449
3019 #define QM_REG_PQTX2PF_25_RT_OFFSET					29450
3020 #define QM_REG_PQTX2PF_26_RT_OFFSET					29451
3021 #define QM_REG_PQTX2PF_27_RT_OFFSET					29452
3022 #define QM_REG_PQTX2PF_28_RT_OFFSET					29453
3023 #define QM_REG_PQTX2PF_29_RT_OFFSET					29454
3024 #define QM_REG_PQTX2PF_30_RT_OFFSET					29455
3025 #define QM_REG_PQTX2PF_31_RT_OFFSET					29456
3026 #define QM_REG_PQTX2PF_32_RT_OFFSET					29457
3027 #define QM_REG_PQTX2PF_33_RT_OFFSET					29458
3028 #define QM_REG_PQTX2PF_34_RT_OFFSET					29459
3029 #define QM_REG_PQTX2PF_35_RT_OFFSET					29460
3030 #define QM_REG_PQTX2PF_36_RT_OFFSET					29461
3031 #define QM_REG_PQTX2PF_37_RT_OFFSET					29462
3032 #define QM_REG_PQTX2PF_38_RT_OFFSET					29463
3033 #define QM_REG_PQTX2PF_39_RT_OFFSET					29464
3034 #define QM_REG_PQTX2PF_40_RT_OFFSET					29465
3035 #define QM_REG_PQTX2PF_41_RT_OFFSET					29466
3036 #define QM_REG_PQTX2PF_42_RT_OFFSET					29467
3037 #define QM_REG_PQTX2PF_43_RT_OFFSET					29468
3038 #define QM_REG_PQTX2PF_44_RT_OFFSET					29469
3039 #define QM_REG_PQTX2PF_45_RT_OFFSET					29470
3040 #define QM_REG_PQTX2PF_46_RT_OFFSET					29471
3041 #define QM_REG_PQTX2PF_47_RT_OFFSET					29472
3042 #define QM_REG_PQTX2PF_48_RT_OFFSET					29473
3043 #define QM_REG_PQTX2PF_49_RT_OFFSET					29474
3044 #define QM_REG_PQTX2PF_50_RT_OFFSET					29475
3045 #define QM_REG_PQTX2PF_51_RT_OFFSET					29476
3046 #define QM_REG_PQTX2PF_52_RT_OFFSET					29477
3047 #define QM_REG_PQTX2PF_53_RT_OFFSET					29478
3048 #define QM_REG_PQTX2PF_54_RT_OFFSET					29479
3049 #define QM_REG_PQTX2PF_55_RT_OFFSET					29480
3050 #define QM_REG_PQTX2PF_56_RT_OFFSET					29481
3051 #define QM_REG_PQTX2PF_57_RT_OFFSET					29482
3052 #define QM_REG_PQTX2PF_58_RT_OFFSET					29483
3053 #define QM_REG_PQTX2PF_59_RT_OFFSET					29484
3054 #define QM_REG_PQTX2PF_60_RT_OFFSET					29485
3055 #define QM_REG_PQTX2PF_61_RT_OFFSET					29486
3056 #define QM_REG_PQTX2PF_62_RT_OFFSET					29487
3057 #define QM_REG_PQTX2PF_63_RT_OFFSET					29488
3058 #define QM_REG_PQOTHER2PF_0_RT_OFFSET					29489
3059 #define QM_REG_PQOTHER2PF_1_RT_OFFSET					29490
3060 #define QM_REG_PQOTHER2PF_2_RT_OFFSET					29491
3061 #define QM_REG_PQOTHER2PF_3_RT_OFFSET					29492
3062 #define QM_REG_PQOTHER2PF_4_RT_OFFSET					29493
3063 #define QM_REG_PQOTHER2PF_5_RT_OFFSET					29494
3064 #define QM_REG_PQOTHER2PF_6_RT_OFFSET					29495
3065 #define QM_REG_PQOTHER2PF_7_RT_OFFSET					29496
3066 #define QM_REG_PQOTHER2PF_8_RT_OFFSET					29497
3067 #define QM_REG_PQOTHER2PF_9_RT_OFFSET					29498
3068 #define QM_REG_PQOTHER2PF_10_RT_OFFSET					29499
3069 #define QM_REG_PQOTHER2PF_11_RT_OFFSET					29500
3070 #define QM_REG_PQOTHER2PF_12_RT_OFFSET					29501
3071 #define QM_REG_PQOTHER2PF_13_RT_OFFSET					29502
3072 #define QM_REG_PQOTHER2PF_14_RT_OFFSET					29503
3073 #define QM_REG_PQOTHER2PF_15_RT_OFFSET					29504
3074 #define QM_REG_RLGLBLPERIOD_0_RT_OFFSET					29505
3075 #define QM_REG_RLGLBLPERIOD_1_RT_OFFSET					29506
3076 #define QM_REG_RLGLBLPERIODTIMER_0_RT_OFFSET				29507
3077 #define QM_REG_RLGLBLPERIODTIMER_1_RT_OFFSET				29508
3078 #define QM_REG_RLGLBLPERIODSEL_0_RT_OFFSET				29509
3079 #define QM_REG_RLGLBLPERIODSEL_1_RT_OFFSET				29510
3080 #define QM_REG_RLGLBLPERIODSEL_2_RT_OFFSET				29511
3081 #define QM_REG_RLGLBLPERIODSEL_3_RT_OFFSET				29512
3082 #define QM_REG_RLGLBLPERIODSEL_4_RT_OFFSET				29513
3083 #define QM_REG_RLGLBLPERIODSEL_5_RT_OFFSET				29514
3084 #define QM_REG_RLGLBLPERIODSEL_6_RT_OFFSET				29515
3085 #define QM_REG_RLGLBLPERIODSEL_7_RT_OFFSET				29516
3086 #define QM_REG_RLGLBLINCVAL_RT_OFFSET					29517
3087 #define QM_REG_RLGLBLINCVAL_RT_SIZE					256
3088 #define QM_REG_RLGLBLUPPERBOUND_RT_OFFSET				29773
3089 #define QM_REG_RLGLBLUPPERBOUND_RT_SIZE					256
3090 #define QM_REG_RLGLBLCRD_RT_OFFSET					30029
3091 #define QM_REG_RLGLBLCRD_RT_SIZE					256
3092 #define QM_REG_RLGLBLENABLE_RT_OFFSET					30285
3093 #define QM_REG_RLPFPERIOD_RT_OFFSET					30286
3094 #define QM_REG_RLPFPERIODTIMER_RT_OFFSET				30287
3095 #define QM_REG_RLPFINCVAL_RT_OFFSET					30288
3096 #define QM_REG_RLPFINCVAL_RT_SIZE					16
3097 #define QM_REG_RLPFUPPERBOUND_RT_OFFSET					30304
3098 #define QM_REG_RLPFUPPERBOUND_RT_SIZE					16
3099 #define QM_REG_RLPFCRD_RT_OFFSET					30320
3100 #define QM_REG_RLPFCRD_RT_SIZE						16
3101 #define QM_REG_RLPFENABLE_RT_OFFSET					30336
3102 #define QM_REG_RLPFVOQENABLE_RT_OFFSET					30337
3103 #define QM_REG_WFQPFWEIGHT_RT_OFFSET					30338
3104 #define QM_REG_WFQPFWEIGHT_RT_SIZE					16
3105 #define QM_REG_WFQPFUPPERBOUND_RT_OFFSET				30354
3106 #define QM_REG_WFQPFUPPERBOUND_RT_SIZE					16
3107 #define QM_REG_WFQPFCRD_RT_OFFSET					30370
3108 #define QM_REG_WFQPFCRD_RT_SIZE						160
3109 #define QM_REG_WFQPFENABLE_RT_OFFSET					30530
3110 #define QM_REG_WFQVPENABLE_RT_OFFSET					30531
3111 #define QM_REG_BASEADDRTXPQ_RT_OFFSET					30532
3112 #define QM_REG_BASEADDRTXPQ_RT_SIZE					512
3113 #define QM_REG_TXPQMAP_RT_OFFSET					31044
3114 #define QM_REG_TXPQMAP_RT_SIZE						512
3115 #define QM_REG_WFQVPWEIGHT_RT_OFFSET					31556
3116 #define QM_REG_WFQVPWEIGHT_RT_SIZE					512
3117 #define QM_REG_WFQVPUPPERBOUND_RT_OFFSET				32068
3118 #define QM_REG_WFQVPUPPERBOUND_RT_SIZE					512
3119 #define QM_REG_WFQVPCRD_RT_OFFSET					32580
3120 #define QM_REG_WFQVPCRD_RT_SIZE						512
3121 #define QM_REG_WFQVPMAP_RT_OFFSET					33092
3122 #define QM_REG_WFQVPMAP_RT_SIZE						512
3123 #define QM_REG_PTRTBLTX_RT_OFFSET					33604
3124 #define QM_REG_PTRTBLTX_RT_SIZE						1024
3125 #define QM_REG_WFQPFCRD_MSB_RT_OFFSET					34628
3126 #define QM_REG_WFQPFCRD_MSB_RT_SIZE					160
3127 #define NIG_REG_TAG_ETHERTYPE_0_RT_OFFSET				34788
3128 #define NIG_REG_BRB_GATE_DNTFWD_PORT_RT_OFFSET				34789
3129 #define NIG_REG_OUTER_TAG_VALUE_LIST0_RT_OFFSET				34790
3130 #define NIG_REG_OUTER_TAG_VALUE_LIST1_RT_OFFSET				34791
3131 #define NIG_REG_OUTER_TAG_VALUE_LIST2_RT_OFFSET				34792
3132 #define NIG_REG_OUTER_TAG_VALUE_LIST3_RT_OFFSET				34793
3133 #define NIG_REG_LLH_FUNC_TAGMAC_CLS_TYPE_RT_OFFSET			34794
3134 #define NIG_REG_LLH_FUNC_TAG_EN_RT_OFFSET				34795
3135 #define NIG_REG_LLH_FUNC_TAG_EN_RT_SIZE					4
3136 #define NIG_REG_LLH_FUNC_TAG_VALUE_RT_OFFSET				34799
3137 #define NIG_REG_LLH_FUNC_TAG_VALUE_RT_SIZE				4
3138 #define NIG_REG_LLH_FUNC_FILTER_VALUE_RT_OFFSET				34803
3139 #define NIG_REG_LLH_FUNC_FILTER_VALUE_RT_SIZE				32
3140 #define NIG_REG_LLH_FUNC_FILTER_EN_RT_OFFSET				34835
3141 #define NIG_REG_LLH_FUNC_FILTER_EN_RT_SIZE				16
3142 #define NIG_REG_LLH_FUNC_FILTER_MODE_RT_OFFSET				34851
3143 #define NIG_REG_LLH_FUNC_FILTER_MODE_RT_SIZE				16
3144 #define NIG_REG_LLH_FUNC_FILTER_PROTOCOL_TYPE_RT_OFFSET			34867
3145 #define NIG_REG_LLH_FUNC_FILTER_PROTOCOL_TYPE_RT_SIZE			16
3146 #define NIG_REG_LLH_FUNC_FILTER_HDR_SEL_RT_OFFSET			34883
3147 #define NIG_REG_LLH_FUNC_FILTER_HDR_SEL_RT_SIZE				16
3148 #define NIG_REG_TX_EDPM_CTRL_RT_OFFSET					34899
3149 #define NIG_REG_PPF_TO_ENGINE_SEL_RT_OFFSET				34900
3150 #define NIG_REG_PPF_TO_ENGINE_SEL_RT_SIZE				8
3151 #define CDU_REG_CID_ADDR_PARAMS_RT_OFFSET				34908
3152 #define CDU_REG_SEGMENT0_PARAMS_RT_OFFSET				34909
3153 #define CDU_REG_SEGMENT1_PARAMS_RT_OFFSET				34910
3154 #define CDU_REG_PF_SEG0_TYPE_OFFSET_RT_OFFSET				34911
3155 #define CDU_REG_PF_SEG1_TYPE_OFFSET_RT_OFFSET				34912
3156 #define CDU_REG_PF_SEG2_TYPE_OFFSET_RT_OFFSET				34913
3157 #define CDU_REG_PF_SEG3_TYPE_OFFSET_RT_OFFSET				34914
3158 #define CDU_REG_PF_FL_SEG0_TYPE_OFFSET_RT_OFFSET			34915
3159 #define CDU_REG_PF_FL_SEG1_TYPE_OFFSET_RT_OFFSET			34916
3160 #define CDU_REG_PF_FL_SEG2_TYPE_OFFSET_RT_OFFSET			34917
3161 #define CDU_REG_PF_FL_SEG3_TYPE_OFFSET_RT_OFFSET			34918
3162 #define CDU_REG_VF_SEG_TYPE_OFFSET_RT_OFFSET				34919
3163 #define CDU_REG_VF_FL_SEG_TYPE_OFFSET_RT_OFFSET				34920
3164 #define PBF_REG_TAG_ETHERTYPE_0_RT_OFFSET				34921
3165 #define PBF_REG_BTB_SHARED_AREA_SIZE_RT_OFFSET				34922
3166 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ0_RT_OFFSET			34923
3167 #define PBF_REG_BTB_GUARANTEED_VOQ0_RT_OFFSET				34924
3168 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ0_RT_OFFSET			34925
3169 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ1_RT_OFFSET			34926
3170 #define PBF_REG_BTB_GUARANTEED_VOQ1_RT_OFFSET				34927
3171 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ1_RT_OFFSET			34928
3172 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ2_RT_OFFSET			34929
3173 #define PBF_REG_BTB_GUARANTEED_VOQ2_RT_OFFSET				34930
3174 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ2_RT_OFFSET			34931
3175 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ3_RT_OFFSET			34932
3176 #define PBF_REG_BTB_GUARANTEED_VOQ3_RT_OFFSET				34933
3177 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ3_RT_OFFSET			34934
3178 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ4_RT_OFFSET			34935
3179 #define PBF_REG_BTB_GUARANTEED_VOQ4_RT_OFFSET				34936
3180 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ4_RT_OFFSET			34937
3181 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ5_RT_OFFSET			34938
3182 #define PBF_REG_BTB_GUARANTEED_VOQ5_RT_OFFSET				34939
3183 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ5_RT_OFFSET			34940
3184 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ6_RT_OFFSET			34941
3185 #define PBF_REG_BTB_GUARANTEED_VOQ6_RT_OFFSET				34942
3186 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ6_RT_OFFSET			34943
3187 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ7_RT_OFFSET			34944
3188 #define PBF_REG_BTB_GUARANTEED_VOQ7_RT_OFFSET				34945
3189 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ7_RT_OFFSET			34946
3190 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ8_RT_OFFSET			34947
3191 #define PBF_REG_BTB_GUARANTEED_VOQ8_RT_OFFSET				34948
3192 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ8_RT_OFFSET			34949
3193 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ9_RT_OFFSET			34950
3194 #define PBF_REG_BTB_GUARANTEED_VOQ9_RT_OFFSET				34951
3195 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ9_RT_OFFSET			34952
3196 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ10_RT_OFFSET			34953
3197 #define PBF_REG_BTB_GUARANTEED_VOQ10_RT_OFFSET				34954
3198 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ10_RT_OFFSET			34955
3199 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ11_RT_OFFSET			34956
3200 #define PBF_REG_BTB_GUARANTEED_VOQ11_RT_OFFSET				34957
3201 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ11_RT_OFFSET			34958
3202 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ12_RT_OFFSET			34959
3203 #define PBF_REG_BTB_GUARANTEED_VOQ12_RT_OFFSET				34960
3204 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ12_RT_OFFSET			34961
3205 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ13_RT_OFFSET			34962
3206 #define PBF_REG_BTB_GUARANTEED_VOQ13_RT_OFFSET				34963
3207 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ13_RT_OFFSET			34964
3208 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ14_RT_OFFSET			34965
3209 #define PBF_REG_BTB_GUARANTEED_VOQ14_RT_OFFSET				34966
3210 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ14_RT_OFFSET			34967
3211 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ15_RT_OFFSET			34968
3212 #define PBF_REG_BTB_GUARANTEED_VOQ15_RT_OFFSET				34969
3213 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ15_RT_OFFSET			34970
3214 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ16_RT_OFFSET			34971
3215 #define PBF_REG_BTB_GUARANTEED_VOQ16_RT_OFFSET				34972
3216 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ16_RT_OFFSET			34973
3217 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ17_RT_OFFSET			34974
3218 #define PBF_REG_BTB_GUARANTEED_VOQ17_RT_OFFSET				34975
3219 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ17_RT_OFFSET			34976
3220 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ18_RT_OFFSET			34977
3221 #define PBF_REG_BTB_GUARANTEED_VOQ18_RT_OFFSET				34978
3222 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ18_RT_OFFSET			34979
3223 #define PBF_REG_YCMD_QS_NUM_LINES_VOQ19_RT_OFFSET			34980
3224 #define PBF_REG_BTB_GUARANTEED_VOQ19_RT_OFFSET				34981
3225 #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ19_RT_OFFSET			34982
3226 #define XCM_REG_CON_PHY_Q3_RT_OFFSET					34983
3227 
3228 #define RUNTIME_ARRAY_SIZE						34984
3229 
3230 /* Init Callbacks */
3231 #define DMAE_READY_CB	0
3232 
3233 /* The eth storm context for the Tstorm */
3234 struct tstorm_eth_conn_st_ctx {
3235 	__le32 reserved[4];
3236 };
3237 
3238 /* The eth storm context for the Pstorm */
3239 struct pstorm_eth_conn_st_ctx {
3240 	__le32 reserved[8];
3241 };
3242 
3243 /* The eth storm context for the Xstorm */
3244 struct xstorm_eth_conn_st_ctx {
3245 	__le32 reserved[60];
3246 };
3247 
3248 struct xstorm_eth_conn_ag_ctx {
3249 	u8 reserved0;
3250 	u8 state;
3251 	u8 flags0;
3252 #define XSTORM_ETH_CONN_AG_CTX_EXIST_IN_QM0_MASK	0x1
3253 #define XSTORM_ETH_CONN_AG_CTX_EXIST_IN_QM0_SHIFT	0
3254 #define XSTORM_ETH_CONN_AG_CTX_RESERVED1_MASK	0x1
3255 #define XSTORM_ETH_CONN_AG_CTX_RESERVED1_SHIFT	1
3256 #define XSTORM_ETH_CONN_AG_CTX_RESERVED2_MASK	0x1
3257 #define XSTORM_ETH_CONN_AG_CTX_RESERVED2_SHIFT	2
3258 #define XSTORM_ETH_CONN_AG_CTX_EXIST_IN_QM3_MASK	0x1
3259 #define XSTORM_ETH_CONN_AG_CTX_EXIST_IN_QM3_SHIFT	3
3260 #define XSTORM_ETH_CONN_AG_CTX_RESERVED3_MASK	0x1
3261 #define XSTORM_ETH_CONN_AG_CTX_RESERVED3_SHIFT	4
3262 #define XSTORM_ETH_CONN_AG_CTX_RESERVED4_MASK	0x1
3263 #define XSTORM_ETH_CONN_AG_CTX_RESERVED4_SHIFT	5
3264 #define XSTORM_ETH_CONN_AG_CTX_RESERVED5_MASK	0x1
3265 #define XSTORM_ETH_CONN_AG_CTX_RESERVED5_SHIFT	6
3266 #define XSTORM_ETH_CONN_AG_CTX_RESERVED6_MASK	0x1
3267 #define XSTORM_ETH_CONN_AG_CTX_RESERVED6_SHIFT	7
3268 		u8 flags1;
3269 #define XSTORM_ETH_CONN_AG_CTX_RESERVED7_MASK	0x1
3270 #define XSTORM_ETH_CONN_AG_CTX_RESERVED7_SHIFT	0
3271 #define XSTORM_ETH_CONN_AG_CTX_RESERVED8_MASK	0x1
3272 #define XSTORM_ETH_CONN_AG_CTX_RESERVED8_SHIFT	1
3273 #define XSTORM_ETH_CONN_AG_CTX_RESERVED9_MASK	0x1
3274 #define XSTORM_ETH_CONN_AG_CTX_RESERVED9_SHIFT	2
3275 #define XSTORM_ETH_CONN_AG_CTX_BIT11_MASK		0x1
3276 #define XSTORM_ETH_CONN_AG_CTX_BIT11_SHIFT		3
3277 #define XSTORM_ETH_CONN_AG_CTX_E5_RESERVED2_MASK	0x1
3278 #define XSTORM_ETH_CONN_AG_CTX_E5_RESERVED2_SHIFT	4
3279 #define XSTORM_ETH_CONN_AG_CTX_E5_RESERVED3_MASK	0x1
3280 #define XSTORM_ETH_CONN_AG_CTX_E5_RESERVED3_SHIFT	5
3281 #define XSTORM_ETH_CONN_AG_CTX_TX_RULE_ACTIVE_MASK	0x1
3282 #define XSTORM_ETH_CONN_AG_CTX_TX_RULE_ACTIVE_SHIFT	6
3283 #define XSTORM_ETH_CONN_AG_CTX_DQ_CF_ACTIVE_MASK	0x1
3284 #define XSTORM_ETH_CONN_AG_CTX_DQ_CF_ACTIVE_SHIFT	7
3285 	u8 flags2;
3286 #define XSTORM_ETH_CONN_AG_CTX_CF0_MASK	0x3
3287 #define XSTORM_ETH_CONN_AG_CTX_CF0_SHIFT	0
3288 #define XSTORM_ETH_CONN_AG_CTX_CF1_MASK	0x3
3289 #define XSTORM_ETH_CONN_AG_CTX_CF1_SHIFT	2
3290 #define XSTORM_ETH_CONN_AG_CTX_CF2_MASK	0x3
3291 #define XSTORM_ETH_CONN_AG_CTX_CF2_SHIFT	4
3292 #define XSTORM_ETH_CONN_AG_CTX_CF3_MASK	0x3
3293 #define XSTORM_ETH_CONN_AG_CTX_CF3_SHIFT	6
3294 	u8 flags3;
3295 #define XSTORM_ETH_CONN_AG_CTX_CF4_MASK	0x3
3296 #define XSTORM_ETH_CONN_AG_CTX_CF4_SHIFT	0
3297 #define XSTORM_ETH_CONN_AG_CTX_CF5_MASK	0x3
3298 #define XSTORM_ETH_CONN_AG_CTX_CF5_SHIFT	2
3299 #define XSTORM_ETH_CONN_AG_CTX_CF6_MASK	0x3
3300 #define XSTORM_ETH_CONN_AG_CTX_CF6_SHIFT	4
3301 #define XSTORM_ETH_CONN_AG_CTX_CF7_MASK	0x3
3302 #define XSTORM_ETH_CONN_AG_CTX_CF7_SHIFT	6
3303 		u8 flags4;
3304 #define XSTORM_ETH_CONN_AG_CTX_CF8_MASK	0x3
3305 #define XSTORM_ETH_CONN_AG_CTX_CF8_SHIFT	0
3306 #define XSTORM_ETH_CONN_AG_CTX_CF9_MASK	0x3
3307 #define XSTORM_ETH_CONN_AG_CTX_CF9_SHIFT	2
3308 #define XSTORM_ETH_CONN_AG_CTX_CF10_MASK	0x3
3309 #define XSTORM_ETH_CONN_AG_CTX_CF10_SHIFT	4
3310 #define XSTORM_ETH_CONN_AG_CTX_CF11_MASK	0x3
3311 #define XSTORM_ETH_CONN_AG_CTX_CF11_SHIFT	6
3312 	u8 flags5;
3313 #define XSTORM_ETH_CONN_AG_CTX_CF12_MASK	0x3
3314 #define XSTORM_ETH_CONN_AG_CTX_CF12_SHIFT	0
3315 #define XSTORM_ETH_CONN_AG_CTX_CF13_MASK	0x3
3316 #define XSTORM_ETH_CONN_AG_CTX_CF13_SHIFT	2
3317 #define XSTORM_ETH_CONN_AG_CTX_CF14_MASK	0x3
3318 #define XSTORM_ETH_CONN_AG_CTX_CF14_SHIFT	4
3319 #define XSTORM_ETH_CONN_AG_CTX_CF15_MASK	0x3
3320 #define XSTORM_ETH_CONN_AG_CTX_CF15_SHIFT	6
3321 	u8 flags6;
3322 #define XSTORM_ETH_CONN_AG_CTX_GO_TO_BD_CONS_CF_MASK		0x3
3323 #define XSTORM_ETH_CONN_AG_CTX_GO_TO_BD_CONS_CF_SHIFT	0
3324 #define XSTORM_ETH_CONN_AG_CTX_MULTI_UNICAST_CF_MASK		0x3
3325 #define XSTORM_ETH_CONN_AG_CTX_MULTI_UNICAST_CF_SHIFT	2
3326 #define XSTORM_ETH_CONN_AG_CTX_DQ_CF_MASK			0x3
3327 #define XSTORM_ETH_CONN_AG_CTX_DQ_CF_SHIFT			4
3328 #define XSTORM_ETH_CONN_AG_CTX_TERMINATE_CF_MASK		0x3
3329 #define XSTORM_ETH_CONN_AG_CTX_TERMINATE_CF_SHIFT		6
3330 	u8 flags7;
3331 #define XSTORM_ETH_CONN_AG_CTX_FLUSH_Q0_MASK		0x3
3332 #define XSTORM_ETH_CONN_AG_CTX_FLUSH_Q0_SHIFT	0
3333 #define XSTORM_ETH_CONN_AG_CTX_RESERVED10_MASK	0x3
3334 #define XSTORM_ETH_CONN_AG_CTX_RESERVED10_SHIFT	2
3335 #define XSTORM_ETH_CONN_AG_CTX_SLOW_PATH_MASK	0x3
3336 #define XSTORM_ETH_CONN_AG_CTX_SLOW_PATH_SHIFT	4
3337 #define XSTORM_ETH_CONN_AG_CTX_CF0EN_MASK		0x1
3338 #define XSTORM_ETH_CONN_AG_CTX_CF0EN_SHIFT		6
3339 #define XSTORM_ETH_CONN_AG_CTX_CF1EN_MASK		0x1
3340 #define XSTORM_ETH_CONN_AG_CTX_CF1EN_SHIFT		7
3341 	u8 flags8;
3342 #define XSTORM_ETH_CONN_AG_CTX_CF2EN_MASK	0x1
3343 #define XSTORM_ETH_CONN_AG_CTX_CF2EN_SHIFT	0
3344 #define XSTORM_ETH_CONN_AG_CTX_CF3EN_MASK	0x1
3345 #define XSTORM_ETH_CONN_AG_CTX_CF3EN_SHIFT	1
3346 #define XSTORM_ETH_CONN_AG_CTX_CF4EN_MASK	0x1
3347 #define XSTORM_ETH_CONN_AG_CTX_CF4EN_SHIFT	2
3348 #define XSTORM_ETH_CONN_AG_CTX_CF5EN_MASK	0x1
3349 #define XSTORM_ETH_CONN_AG_CTX_CF5EN_SHIFT	3
3350 #define XSTORM_ETH_CONN_AG_CTX_CF6EN_MASK	0x1
3351 #define XSTORM_ETH_CONN_AG_CTX_CF6EN_SHIFT	4
3352 #define XSTORM_ETH_CONN_AG_CTX_CF7EN_MASK	0x1
3353 #define XSTORM_ETH_CONN_AG_CTX_CF7EN_SHIFT	5
3354 #define XSTORM_ETH_CONN_AG_CTX_CF8EN_MASK	0x1
3355 #define XSTORM_ETH_CONN_AG_CTX_CF8EN_SHIFT	6
3356 #define XSTORM_ETH_CONN_AG_CTX_CF9EN_MASK	0x1
3357 #define XSTORM_ETH_CONN_AG_CTX_CF9EN_SHIFT	7
3358 	u8 flags9;
3359 #define XSTORM_ETH_CONN_AG_CTX_CF10EN_MASK			0x1
3360 #define XSTORM_ETH_CONN_AG_CTX_CF10EN_SHIFT			0
3361 #define XSTORM_ETH_CONN_AG_CTX_CF11EN_MASK			0x1
3362 #define XSTORM_ETH_CONN_AG_CTX_CF11EN_SHIFT			1
3363 #define XSTORM_ETH_CONN_AG_CTX_CF12EN_MASK			0x1
3364 #define XSTORM_ETH_CONN_AG_CTX_CF12EN_SHIFT			2
3365 #define XSTORM_ETH_CONN_AG_CTX_CF13EN_MASK			0x1
3366 #define XSTORM_ETH_CONN_AG_CTX_CF13EN_SHIFT			3
3367 #define XSTORM_ETH_CONN_AG_CTX_CF14EN_MASK			0x1
3368 #define XSTORM_ETH_CONN_AG_CTX_CF14EN_SHIFT			4
3369 #define XSTORM_ETH_CONN_AG_CTX_CF15EN_MASK			0x1
3370 #define XSTORM_ETH_CONN_AG_CTX_CF15EN_SHIFT			5
3371 #define XSTORM_ETH_CONN_AG_CTX_GO_TO_BD_CONS_CF_EN_MASK	0x1
3372 #define XSTORM_ETH_CONN_AG_CTX_GO_TO_BD_CONS_CF_EN_SHIFT	6
3373 #define XSTORM_ETH_CONN_AG_CTX_MULTI_UNICAST_CF_EN_MASK	0x1
3374 #define XSTORM_ETH_CONN_AG_CTX_MULTI_UNICAST_CF_EN_SHIFT	7
3375 	u8 flags10;
3376 #define XSTORM_ETH_CONN_AG_CTX_DQ_CF_EN_MASK			0x1
3377 #define XSTORM_ETH_CONN_AG_CTX_DQ_CF_EN_SHIFT		0
3378 #define XSTORM_ETH_CONN_AG_CTX_TERMINATE_CF_EN_MASK		0x1
3379 #define XSTORM_ETH_CONN_AG_CTX_TERMINATE_CF_EN_SHIFT		1
3380 #define XSTORM_ETH_CONN_AG_CTX_FLUSH_Q0_EN_MASK		0x1
3381 #define XSTORM_ETH_CONN_AG_CTX_FLUSH_Q0_EN_SHIFT		2
3382 #define XSTORM_ETH_CONN_AG_CTX_RESERVED11_MASK		0x1
3383 #define XSTORM_ETH_CONN_AG_CTX_RESERVED11_SHIFT		3
3384 #define XSTORM_ETH_CONN_AG_CTX_SLOW_PATH_EN_MASK		0x1
3385 #define XSTORM_ETH_CONN_AG_CTX_SLOW_PATH_EN_SHIFT		4
3386 #define XSTORM_ETH_CONN_AG_CTX_TPH_ENABLE_EN_RESERVED_MASK	0x1
3387 #define XSTORM_ETH_CONN_AG_CTX_TPH_ENABLE_EN_RESERVED_SHIFT	5
3388 #define XSTORM_ETH_CONN_AG_CTX_RESERVED12_MASK		0x1
3389 #define XSTORM_ETH_CONN_AG_CTX_RESERVED12_SHIFT		6
3390 #define XSTORM_ETH_CONN_AG_CTX_RESERVED13_MASK		0x1
3391 #define XSTORM_ETH_CONN_AG_CTX_RESERVED13_SHIFT		7
3392 	u8 flags11;
3393 #define XSTORM_ETH_CONN_AG_CTX_RESERVED14_MASK	0x1
3394 #define XSTORM_ETH_CONN_AG_CTX_RESERVED14_SHIFT	0
3395 #define XSTORM_ETH_CONN_AG_CTX_RESERVED15_MASK	0x1
3396 #define XSTORM_ETH_CONN_AG_CTX_RESERVED15_SHIFT	1
3397 #define XSTORM_ETH_CONN_AG_CTX_TX_DEC_RULE_EN_MASK	0x1
3398 #define XSTORM_ETH_CONN_AG_CTX_TX_DEC_RULE_EN_SHIFT	2
3399 #define XSTORM_ETH_CONN_AG_CTX_RULE5EN_MASK		0x1
3400 #define XSTORM_ETH_CONN_AG_CTX_RULE5EN_SHIFT		3
3401 #define XSTORM_ETH_CONN_AG_CTX_RULE6EN_MASK		0x1
3402 #define XSTORM_ETH_CONN_AG_CTX_RULE6EN_SHIFT		4
3403 #define XSTORM_ETH_CONN_AG_CTX_RULE7EN_MASK		0x1
3404 #define XSTORM_ETH_CONN_AG_CTX_RULE7EN_SHIFT		5
3405 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED1_MASK	0x1
3406 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED1_SHIFT	6
3407 #define XSTORM_ETH_CONN_AG_CTX_RULE9EN_MASK		0x1
3408 #define XSTORM_ETH_CONN_AG_CTX_RULE9EN_SHIFT		7
3409 	u8 flags12;
3410 #define XSTORM_ETH_CONN_AG_CTX_RULE10EN_MASK		0x1
3411 #define XSTORM_ETH_CONN_AG_CTX_RULE10EN_SHIFT	0
3412 #define XSTORM_ETH_CONN_AG_CTX_RULE11EN_MASK		0x1
3413 #define XSTORM_ETH_CONN_AG_CTX_RULE11EN_SHIFT	1
3414 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED2_MASK	0x1
3415 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED2_SHIFT	2
3416 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED3_MASK	0x1
3417 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED3_SHIFT	3
3418 #define XSTORM_ETH_CONN_AG_CTX_RULE14EN_MASK		0x1
3419 #define XSTORM_ETH_CONN_AG_CTX_RULE14EN_SHIFT	4
3420 #define XSTORM_ETH_CONN_AG_CTX_RULE15EN_MASK		0x1
3421 #define XSTORM_ETH_CONN_AG_CTX_RULE15EN_SHIFT	5
3422 #define XSTORM_ETH_CONN_AG_CTX_RULE16EN_MASK		0x1
3423 #define XSTORM_ETH_CONN_AG_CTX_RULE16EN_SHIFT	6
3424 #define XSTORM_ETH_CONN_AG_CTX_RULE17EN_MASK		0x1
3425 #define XSTORM_ETH_CONN_AG_CTX_RULE17EN_SHIFT	7
3426 	u8 flags13;
3427 #define XSTORM_ETH_CONN_AG_CTX_RULE18EN_MASK		0x1
3428 #define XSTORM_ETH_CONN_AG_CTX_RULE18EN_SHIFT	0
3429 #define XSTORM_ETH_CONN_AG_CTX_RULE19EN_MASK		0x1
3430 #define XSTORM_ETH_CONN_AG_CTX_RULE19EN_SHIFT	1
3431 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED4_MASK	0x1
3432 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED4_SHIFT	2
3433 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED5_MASK	0x1
3434 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED5_SHIFT	3
3435 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED6_MASK	0x1
3436 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED6_SHIFT	4
3437 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED7_MASK	0x1
3438 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED7_SHIFT	5
3439 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED8_MASK	0x1
3440 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED8_SHIFT	6
3441 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED9_MASK	0x1
3442 #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED9_SHIFT	7
3443 	u8 flags14;
3444 #define XSTORM_ETH_CONN_AG_CTX_EDPM_USE_EXT_HDR_MASK		0x1
3445 #define XSTORM_ETH_CONN_AG_CTX_EDPM_USE_EXT_HDR_SHIFT	0
3446 #define XSTORM_ETH_CONN_AG_CTX_EDPM_SEND_RAW_L3L4_MASK	0x1
3447 #define XSTORM_ETH_CONN_AG_CTX_EDPM_SEND_RAW_L3L4_SHIFT	1
3448 #define XSTORM_ETH_CONN_AG_CTX_EDPM_INBAND_PROP_HDR_MASK	0x1
3449 #define XSTORM_ETH_CONN_AG_CTX_EDPM_INBAND_PROP_HDR_SHIFT	2
3450 #define XSTORM_ETH_CONN_AG_CTX_EDPM_SEND_EXT_TUNNEL_MASK	0x1
3451 #define XSTORM_ETH_CONN_AG_CTX_EDPM_SEND_EXT_TUNNEL_SHIFT	3
3452 #define XSTORM_ETH_CONN_AG_CTX_L2_EDPM_ENABLE_MASK		0x1
3453 #define XSTORM_ETH_CONN_AG_CTX_L2_EDPM_ENABLE_SHIFT		4
3454 #define XSTORM_ETH_CONN_AG_CTX_ROCE_EDPM_ENABLE_MASK		0x1
3455 #define XSTORM_ETH_CONN_AG_CTX_ROCE_EDPM_ENABLE_SHIFT	5
3456 #define XSTORM_ETH_CONN_AG_CTX_TPH_ENABLE_MASK		0x3
3457 #define XSTORM_ETH_CONN_AG_CTX_TPH_ENABLE_SHIFT		6
3458 	u8 edpm_event_id;
3459 	__le16 physical_q0;
3460 	__le16 e5_reserved1;
3461 	__le16 edpm_num_bds;
3462 	__le16 tx_bd_cons;
3463 	__le16 tx_bd_prod;
3464 	__le16 updated_qm_pq_id;
3465 	__le16 conn_dpi;
3466 	u8 byte3;
3467 	u8 byte4;
3468 	u8 byte5;
3469 	u8 byte6;
3470 	__le32 reg0;
3471 	__le32 reg1;
3472 	__le32 reg2;
3473 	__le32 reg3;
3474 	__le32 reg4;
3475 	__le32 reg5;
3476 	__le32 reg6;
3477 	__le16 word7;
3478 	__le16 word8;
3479 	__le16 word9;
3480 	__le16 word10;
3481 	__le32 reg7;
3482 	__le32 reg8;
3483 	__le32 reg9;
3484 	u8 byte7;
3485 	u8 byte8;
3486 	u8 byte9;
3487 	u8 byte10;
3488 	u8 byte11;
3489 	u8 byte12;
3490 	u8 byte13;
3491 	u8 byte14;
3492 	u8 byte15;
3493 	u8 e5_reserved;
3494 	__le16 word11;
3495 	__le32 reg10;
3496 	__le32 reg11;
3497 	__le32 reg12;
3498 	__le32 reg13;
3499 	__le32 reg14;
3500 	__le32 reg15;
3501 	__le32 reg16;
3502 	__le32 reg17;
3503 	__le32 reg18;
3504 	__le32 reg19;
3505 	__le16 word12;
3506 	__le16 word13;
3507 	__le16 word14;
3508 	__le16 word15;
3509 };
3510 
3511 /* The eth storm context for the Ystorm */
3512 struct ystorm_eth_conn_st_ctx {
3513 	__le32 reserved[8];
3514 };
3515 
3516 struct ystorm_eth_conn_ag_ctx {
3517 	u8 byte0;
3518 	u8 state;
3519 	u8 flags0;
3520 #define YSTORM_ETH_CONN_AG_CTX_BIT0_MASK			0x1
3521 #define YSTORM_ETH_CONN_AG_CTX_BIT0_SHIFT			0
3522 #define YSTORM_ETH_CONN_AG_CTX_BIT1_MASK			0x1
3523 #define YSTORM_ETH_CONN_AG_CTX_BIT1_SHIFT			1
3524 #define YSTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_MASK	0x3
3525 #define YSTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_SHIFT	2
3526 #define YSTORM_ETH_CONN_AG_CTX_PMD_TERMINATE_CF_MASK		0x3
3527 #define YSTORM_ETH_CONN_AG_CTX_PMD_TERMINATE_CF_SHIFT	4
3528 #define YSTORM_ETH_CONN_AG_CTX_CF2_MASK			0x3
3529 #define YSTORM_ETH_CONN_AG_CTX_CF2_SHIFT			6
3530 	u8 flags1;
3531 #define YSTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_EN_MASK	0x1
3532 #define YSTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_EN_SHIFT	0
3533 #define YSTORM_ETH_CONN_AG_CTX_PMD_TERMINATE_CF_EN_MASK	0x1
3534 #define YSTORM_ETH_CONN_AG_CTX_PMD_TERMINATE_CF_EN_SHIFT	1
3535 #define YSTORM_ETH_CONN_AG_CTX_CF2EN_MASK			0x1
3536 #define YSTORM_ETH_CONN_AG_CTX_CF2EN_SHIFT			2
3537 #define YSTORM_ETH_CONN_AG_CTX_RULE0EN_MASK			0x1
3538 #define YSTORM_ETH_CONN_AG_CTX_RULE0EN_SHIFT			3
3539 #define YSTORM_ETH_CONN_AG_CTX_RULE1EN_MASK			0x1
3540 #define YSTORM_ETH_CONN_AG_CTX_RULE1EN_SHIFT			4
3541 #define YSTORM_ETH_CONN_AG_CTX_RULE2EN_MASK			0x1
3542 #define YSTORM_ETH_CONN_AG_CTX_RULE2EN_SHIFT			5
3543 #define YSTORM_ETH_CONN_AG_CTX_RULE3EN_MASK			0x1
3544 #define YSTORM_ETH_CONN_AG_CTX_RULE3EN_SHIFT			6
3545 #define YSTORM_ETH_CONN_AG_CTX_RULE4EN_MASK			0x1
3546 #define YSTORM_ETH_CONN_AG_CTX_RULE4EN_SHIFT			7
3547 	u8 tx_q0_int_coallecing_timeset;
3548 	u8 byte3;
3549 	__le16 word0;
3550 	__le32 terminate_spqe;
3551 	__le32 reg1;
3552 	__le16 tx_bd_cons_upd;
3553 	__le16 word2;
3554 	__le16 word3;
3555 	__le16 word4;
3556 	__le32 reg2;
3557 	__le32 reg3;
3558 };
3559 
3560 struct tstorm_eth_conn_ag_ctx {
3561 	u8 byte0;
3562 	u8 byte1;
3563 	u8 flags0;
3564 #define TSTORM_ETH_CONN_AG_CTX_BIT0_MASK	0x1
3565 #define TSTORM_ETH_CONN_AG_CTX_BIT0_SHIFT	0
3566 #define TSTORM_ETH_CONN_AG_CTX_BIT1_MASK	0x1
3567 #define TSTORM_ETH_CONN_AG_CTX_BIT1_SHIFT	1
3568 #define TSTORM_ETH_CONN_AG_CTX_BIT2_MASK	0x1
3569 #define TSTORM_ETH_CONN_AG_CTX_BIT2_SHIFT	2
3570 #define TSTORM_ETH_CONN_AG_CTX_BIT3_MASK	0x1
3571 #define TSTORM_ETH_CONN_AG_CTX_BIT3_SHIFT	3
3572 #define TSTORM_ETH_CONN_AG_CTX_BIT4_MASK	0x1
3573 #define TSTORM_ETH_CONN_AG_CTX_BIT4_SHIFT	4
3574 #define TSTORM_ETH_CONN_AG_CTX_BIT5_MASK	0x1
3575 #define TSTORM_ETH_CONN_AG_CTX_BIT5_SHIFT	5
3576 #define TSTORM_ETH_CONN_AG_CTX_CF0_MASK	0x3
3577 #define TSTORM_ETH_CONN_AG_CTX_CF0_SHIFT	6
3578 	u8 flags1;
3579 #define TSTORM_ETH_CONN_AG_CTX_CF1_MASK	0x3
3580 #define TSTORM_ETH_CONN_AG_CTX_CF1_SHIFT	0
3581 #define TSTORM_ETH_CONN_AG_CTX_CF2_MASK	0x3
3582 #define TSTORM_ETH_CONN_AG_CTX_CF2_SHIFT	2
3583 #define TSTORM_ETH_CONN_AG_CTX_CF3_MASK	0x3
3584 #define TSTORM_ETH_CONN_AG_CTX_CF3_SHIFT	4
3585 #define TSTORM_ETH_CONN_AG_CTX_CF4_MASK	0x3
3586 #define TSTORM_ETH_CONN_AG_CTX_CF4_SHIFT	6
3587 	u8 flags2;
3588 #define TSTORM_ETH_CONN_AG_CTX_CF5_MASK	0x3
3589 #define TSTORM_ETH_CONN_AG_CTX_CF5_SHIFT	0
3590 #define TSTORM_ETH_CONN_AG_CTX_CF6_MASK	0x3
3591 #define TSTORM_ETH_CONN_AG_CTX_CF6_SHIFT	2
3592 #define TSTORM_ETH_CONN_AG_CTX_CF7_MASK	0x3
3593 #define TSTORM_ETH_CONN_AG_CTX_CF7_SHIFT	4
3594 #define TSTORM_ETH_CONN_AG_CTX_CF8_MASK	0x3
3595 #define TSTORM_ETH_CONN_AG_CTX_CF8_SHIFT	6
3596 	u8 flags3;
3597 #define TSTORM_ETH_CONN_AG_CTX_CF9_MASK	0x3
3598 #define TSTORM_ETH_CONN_AG_CTX_CF9_SHIFT	0
3599 #define TSTORM_ETH_CONN_AG_CTX_CF10_MASK	0x3
3600 #define TSTORM_ETH_CONN_AG_CTX_CF10_SHIFT	2
3601 #define TSTORM_ETH_CONN_AG_CTX_CF0EN_MASK	0x1
3602 #define TSTORM_ETH_CONN_AG_CTX_CF0EN_SHIFT	4
3603 #define TSTORM_ETH_CONN_AG_CTX_CF1EN_MASK	0x1
3604 #define TSTORM_ETH_CONN_AG_CTX_CF1EN_SHIFT	5
3605 #define TSTORM_ETH_CONN_AG_CTX_CF2EN_MASK	0x1
3606 #define TSTORM_ETH_CONN_AG_CTX_CF2EN_SHIFT	6
3607 #define TSTORM_ETH_CONN_AG_CTX_CF3EN_MASK	0x1
3608 #define TSTORM_ETH_CONN_AG_CTX_CF3EN_SHIFT	7
3609 	u8 flags4;
3610 #define TSTORM_ETH_CONN_AG_CTX_CF4EN_MASK	0x1
3611 #define TSTORM_ETH_CONN_AG_CTX_CF4EN_SHIFT	0
3612 #define TSTORM_ETH_CONN_AG_CTX_CF5EN_MASK	0x1
3613 #define TSTORM_ETH_CONN_AG_CTX_CF5EN_SHIFT	1
3614 #define TSTORM_ETH_CONN_AG_CTX_CF6EN_MASK	0x1
3615 #define TSTORM_ETH_CONN_AG_CTX_CF6EN_SHIFT	2
3616 #define TSTORM_ETH_CONN_AG_CTX_CF7EN_MASK	0x1
3617 #define TSTORM_ETH_CONN_AG_CTX_CF7EN_SHIFT	3
3618 #define TSTORM_ETH_CONN_AG_CTX_CF8EN_MASK	0x1
3619 #define TSTORM_ETH_CONN_AG_CTX_CF8EN_SHIFT	4
3620 #define TSTORM_ETH_CONN_AG_CTX_CF9EN_MASK	0x1
3621 #define TSTORM_ETH_CONN_AG_CTX_CF9EN_SHIFT	5
3622 #define TSTORM_ETH_CONN_AG_CTX_CF10EN_MASK	0x1
3623 #define TSTORM_ETH_CONN_AG_CTX_CF10EN_SHIFT	6
3624 #define TSTORM_ETH_CONN_AG_CTX_RULE0EN_MASK	0x1
3625 #define TSTORM_ETH_CONN_AG_CTX_RULE0EN_SHIFT	7
3626 	u8 flags5;
3627 #define TSTORM_ETH_CONN_AG_CTX_RULE1EN_MASK		0x1
3628 #define TSTORM_ETH_CONN_AG_CTX_RULE1EN_SHIFT		0
3629 #define TSTORM_ETH_CONN_AG_CTX_RULE2EN_MASK		0x1
3630 #define TSTORM_ETH_CONN_AG_CTX_RULE2EN_SHIFT		1
3631 #define TSTORM_ETH_CONN_AG_CTX_RULE3EN_MASK		0x1
3632 #define TSTORM_ETH_CONN_AG_CTX_RULE3EN_SHIFT		2
3633 #define TSTORM_ETH_CONN_AG_CTX_RULE4EN_MASK		0x1
3634 #define TSTORM_ETH_CONN_AG_CTX_RULE4EN_SHIFT		3
3635 #define TSTORM_ETH_CONN_AG_CTX_RULE5EN_MASK		0x1
3636 #define TSTORM_ETH_CONN_AG_CTX_RULE5EN_SHIFT		4
3637 #define TSTORM_ETH_CONN_AG_CTX_RX_BD_EN_MASK		0x1
3638 #define TSTORM_ETH_CONN_AG_CTX_RX_BD_EN_SHIFT	5
3639 #define TSTORM_ETH_CONN_AG_CTX_RULE7EN_MASK		0x1
3640 #define TSTORM_ETH_CONN_AG_CTX_RULE7EN_SHIFT		6
3641 #define TSTORM_ETH_CONN_AG_CTX_RULE8EN_MASK		0x1
3642 #define TSTORM_ETH_CONN_AG_CTX_RULE8EN_SHIFT		7
3643 	__le32 reg0;
3644 	__le32 reg1;
3645 	__le32 reg2;
3646 	__le32 reg3;
3647 	__le32 reg4;
3648 	__le32 reg5;
3649 	__le32 reg6;
3650 	__le32 reg7;
3651 	__le32 reg8;
3652 	u8 byte2;
3653 	u8 byte3;
3654 	__le16 rx_bd_cons;
3655 	u8 byte4;
3656 	u8 byte5;
3657 	__le16 rx_bd_prod;
3658 	__le16 word2;
3659 	__le16 word3;
3660 	__le32 reg9;
3661 	__le32 reg10;
3662 };
3663 
3664 struct ustorm_eth_conn_ag_ctx {
3665 	u8 byte0;
3666 	u8 byte1;
3667 	u8 flags0;
3668 #define USTORM_ETH_CONN_AG_CTX_BIT0_MASK			0x1
3669 #define USTORM_ETH_CONN_AG_CTX_BIT0_SHIFT			0
3670 #define USTORM_ETH_CONN_AG_CTX_BIT1_MASK			0x1
3671 #define USTORM_ETH_CONN_AG_CTX_BIT1_SHIFT			1
3672 #define USTORM_ETH_CONN_AG_CTX_TX_PMD_TERMINATE_CF_MASK	0x3
3673 #define USTORM_ETH_CONN_AG_CTX_TX_PMD_TERMINATE_CF_SHIFT	2
3674 #define USTORM_ETH_CONN_AG_CTX_RX_PMD_TERMINATE_CF_MASK	0x3
3675 #define USTORM_ETH_CONN_AG_CTX_RX_PMD_TERMINATE_CF_SHIFT	4
3676 #define USTORM_ETH_CONN_AG_CTX_CF2_MASK			0x3
3677 #define USTORM_ETH_CONN_AG_CTX_CF2_SHIFT			6
3678 	u8 flags1;
3679 #define USTORM_ETH_CONN_AG_CTX_CF3_MASK			0x3
3680 #define USTORM_ETH_CONN_AG_CTX_CF3_SHIFT			0
3681 #define USTORM_ETH_CONN_AG_CTX_TX_ARM_CF_MASK		0x3
3682 #define USTORM_ETH_CONN_AG_CTX_TX_ARM_CF_SHIFT		2
3683 #define USTORM_ETH_CONN_AG_CTX_RX_ARM_CF_MASK		0x3
3684 #define USTORM_ETH_CONN_AG_CTX_RX_ARM_CF_SHIFT		4
3685 #define USTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_MASK	0x3
3686 #define USTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_SHIFT	6
3687 	u8 flags2;
3688 #define USTORM_ETH_CONN_AG_CTX_TX_PMD_TERMINATE_CF_EN_MASK	0x1
3689 #define USTORM_ETH_CONN_AG_CTX_TX_PMD_TERMINATE_CF_EN_SHIFT	0
3690 #define USTORM_ETH_CONN_AG_CTX_RX_PMD_TERMINATE_CF_EN_MASK	0x1
3691 #define USTORM_ETH_CONN_AG_CTX_RX_PMD_TERMINATE_CF_EN_SHIFT	1
3692 #define USTORM_ETH_CONN_AG_CTX_CF2EN_MASK			0x1
3693 #define USTORM_ETH_CONN_AG_CTX_CF2EN_SHIFT			2
3694 #define USTORM_ETH_CONN_AG_CTX_CF3EN_MASK			0x1
3695 #define USTORM_ETH_CONN_AG_CTX_CF3EN_SHIFT			3
3696 #define USTORM_ETH_CONN_AG_CTX_TX_ARM_CF_EN_MASK		0x1
3697 #define USTORM_ETH_CONN_AG_CTX_TX_ARM_CF_EN_SHIFT		4
3698 #define USTORM_ETH_CONN_AG_CTX_RX_ARM_CF_EN_MASK		0x1
3699 #define USTORM_ETH_CONN_AG_CTX_RX_ARM_CF_EN_SHIFT		5
3700 #define USTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_EN_MASK	0x1
3701 #define USTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_EN_SHIFT	6
3702 #define USTORM_ETH_CONN_AG_CTX_RULE0EN_MASK			0x1
3703 #define USTORM_ETH_CONN_AG_CTX_RULE0EN_SHIFT			7
3704 	u8 flags3;
3705 #define USTORM_ETH_CONN_AG_CTX_RULE1EN_MASK	0x1
3706 #define USTORM_ETH_CONN_AG_CTX_RULE1EN_SHIFT	0
3707 #define USTORM_ETH_CONN_AG_CTX_RULE2EN_MASK	0x1
3708 #define USTORM_ETH_CONN_AG_CTX_RULE2EN_SHIFT	1
3709 #define USTORM_ETH_CONN_AG_CTX_RULE3EN_MASK	0x1
3710 #define USTORM_ETH_CONN_AG_CTX_RULE3EN_SHIFT	2
3711 #define USTORM_ETH_CONN_AG_CTX_RULE4EN_MASK	0x1
3712 #define USTORM_ETH_CONN_AG_CTX_RULE4EN_SHIFT	3
3713 #define USTORM_ETH_CONN_AG_CTX_RULE5EN_MASK	0x1
3714 #define USTORM_ETH_CONN_AG_CTX_RULE5EN_SHIFT	4
3715 #define USTORM_ETH_CONN_AG_CTX_RULE6EN_MASK	0x1
3716 #define USTORM_ETH_CONN_AG_CTX_RULE6EN_SHIFT	5
3717 #define USTORM_ETH_CONN_AG_CTX_RULE7EN_MASK	0x1
3718 #define USTORM_ETH_CONN_AG_CTX_RULE7EN_SHIFT	6
3719 #define USTORM_ETH_CONN_AG_CTX_RULE8EN_MASK	0x1
3720 #define USTORM_ETH_CONN_AG_CTX_RULE8EN_SHIFT	7
3721 	u8 byte2;
3722 	u8 byte3;
3723 	__le16 word0;
3724 	__le16 tx_bd_cons;
3725 	__le32 reg0;
3726 	__le32 reg1;
3727 	__le32 reg2;
3728 	__le32 tx_int_coallecing_timeset;
3729 	__le16 tx_drv_bd_cons;
3730 	__le16 rx_drv_cqe_cons;
3731 };
3732 
3733 /* The eth storm context for the Ustorm */
3734 struct ustorm_eth_conn_st_ctx {
3735 	__le32 reserved[40];
3736 };
3737 
3738 /* The eth storm context for the Mstorm */
3739 struct mstorm_eth_conn_st_ctx {
3740 	__le32 reserved[8];
3741 };
3742 
3743 /* eth connection context */
3744 struct eth_conn_context {
3745 	struct tstorm_eth_conn_st_ctx tstorm_st_context;
3746 	struct regpair tstorm_st_padding[2];
3747 	struct pstorm_eth_conn_st_ctx pstorm_st_context;
3748 	struct xstorm_eth_conn_st_ctx xstorm_st_context;
3749 	struct xstorm_eth_conn_ag_ctx xstorm_ag_context;
3750 	struct tstorm_eth_conn_ag_ctx tstorm_ag_context;
3751 	struct ystorm_eth_conn_st_ctx ystorm_st_context;
3752 	struct ystorm_eth_conn_ag_ctx ystorm_ag_context;
3753 	struct ustorm_eth_conn_ag_ctx ustorm_ag_context;
3754 	struct ustorm_eth_conn_st_ctx ustorm_st_context;
3755 	struct mstorm_eth_conn_st_ctx mstorm_st_context;
3756 };
3757 
3758 /* Ethernet filter types: mac/vlan/pair */
3759 enum eth_error_code {
3760 	ETH_OK = 0x00,
3761 	ETH_FILTERS_MAC_ADD_FAIL_FULL,
3762 	ETH_FILTERS_MAC_ADD_FAIL_FULL_MTT2,
3763 	ETH_FILTERS_MAC_ADD_FAIL_DUP_MTT2,
3764 	ETH_FILTERS_MAC_ADD_FAIL_DUP_STT2,
3765 	ETH_FILTERS_MAC_DEL_FAIL_NOF,
3766 	ETH_FILTERS_MAC_DEL_FAIL_NOF_MTT2,
3767 	ETH_FILTERS_MAC_DEL_FAIL_NOF_STT2,
3768 	ETH_FILTERS_MAC_ADD_FAIL_ZERO_MAC,
3769 	ETH_FILTERS_VLAN_ADD_FAIL_FULL,
3770 	ETH_FILTERS_VLAN_ADD_FAIL_DUP,
3771 	ETH_FILTERS_VLAN_DEL_FAIL_NOF,
3772 	ETH_FILTERS_VLAN_DEL_FAIL_NOF_TT1,
3773 	ETH_FILTERS_PAIR_ADD_FAIL_DUP,
3774 	ETH_FILTERS_PAIR_ADD_FAIL_FULL,
3775 	ETH_FILTERS_PAIR_ADD_FAIL_FULL_MAC,
3776 	ETH_FILTERS_PAIR_DEL_FAIL_NOF,
3777 	ETH_FILTERS_PAIR_DEL_FAIL_NOF_TT1,
3778 	ETH_FILTERS_PAIR_ADD_FAIL_ZERO_MAC,
3779 	ETH_FILTERS_VNI_ADD_FAIL_FULL,
3780 	ETH_FILTERS_VNI_ADD_FAIL_DUP,
3781 	ETH_FILTERS_GFT_UPDATE_FAIL,
3782 	ETH_RX_QUEUE_FAIL_LOAD_VF_DATA,
3783 	ETH_FILTERS_GFS_ADD_FILTER_FAIL_MAX_HOPS,
3784 	ETH_FILTERS_GFS_ADD_FILTER_FAIL_NO_FREE_ENRTY,
3785 	ETH_FILTERS_GFS_ADD_FILTER_FAIL_ALREADY_EXISTS,
3786 	ETH_FILTERS_GFS_ADD_FILTER_FAIL_PCI_ERROR,
3787 	ETH_FILTERS_GFS_ADD_FINLER_FAIL_MAGIC_NUM_ERROR,
3788 	ETH_FILTERS_GFS_DEL_FILTER_FAIL_MAX_HOPS,
3789 	ETH_FILTERS_GFS_DEL_FILTER_FAIL_NO_MATCH_ENRTY,
3790 	ETH_FILTERS_GFS_DEL_FILTER_FAIL_PCI_ERROR,
3791 	ETH_FILTERS_GFS_DEL_FILTER_FAIL_MAGIC_NUM_ERROR,
3792 	MAX_ETH_ERROR_CODE
3793 };
3794 
3795 /* Opcodes for the event ring */
3796 enum eth_event_opcode {
3797 	ETH_EVENT_UNUSED,
3798 	ETH_EVENT_VPORT_START,
3799 	ETH_EVENT_VPORT_UPDATE,
3800 	ETH_EVENT_VPORT_STOP,
3801 	ETH_EVENT_TX_QUEUE_START,
3802 	ETH_EVENT_TX_QUEUE_STOP,
3803 	ETH_EVENT_RX_QUEUE_START,
3804 	ETH_EVENT_RX_QUEUE_UPDATE,
3805 	ETH_EVENT_RX_QUEUE_STOP,
3806 	ETH_EVENT_FILTERS_UPDATE,
3807 	ETH_EVENT_RX_ADD_OPENFLOW_FILTER,
3808 	ETH_EVENT_RX_DELETE_OPENFLOW_FILTER,
3809 	ETH_EVENT_RX_CREATE_OPENFLOW_ACTION,
3810 	ETH_EVENT_RX_ADD_UDP_FILTER,
3811 	ETH_EVENT_RX_DELETE_UDP_FILTER,
3812 	ETH_EVENT_RX_CREATE_GFT_ACTION,
3813 	ETH_EVENT_RX_GFT_UPDATE_FILTER,
3814 	ETH_EVENT_TX_QUEUE_UPDATE,
3815 	ETH_EVENT_RGFS_ADD_FILTER,
3816 	ETH_EVENT_RGFS_DEL_FILTER,
3817 	ETH_EVENT_TGFS_ADD_FILTER,
3818 	ETH_EVENT_TGFS_DEL_FILTER,
3819 	ETH_EVENT_GFS_COUNTERS_REPORT_REQUEST,
3820 	MAX_ETH_EVENT_OPCODE
3821 };
3822 
3823 /* Classify rule types in E2/E3 */
3824 enum eth_filter_action {
3825 	ETH_FILTER_ACTION_UNUSED,
3826 	ETH_FILTER_ACTION_REMOVE,
3827 	ETH_FILTER_ACTION_ADD,
3828 	ETH_FILTER_ACTION_REMOVE_ALL,
3829 	MAX_ETH_FILTER_ACTION
3830 };
3831 
3832 /* Command for adding/removing a classification rule $$KEEP_ENDIANNESS$$ */
3833 struct eth_filter_cmd {
3834 	u8 type;
3835 	u8 vport_id;
3836 	u8 action;
3837 	u8 reserved0;
3838 	__le32 vni;
3839 	__le16 mac_lsb;
3840 	__le16 mac_mid;
3841 	__le16 mac_msb;
3842 	__le16 vlan_id;
3843 };
3844 
3845 /*	$$KEEP_ENDIANNESS$$ */
3846 struct eth_filter_cmd_header {
3847 	u8 rx;
3848 	u8 tx;
3849 	u8 cmd_cnt;
3850 	u8 assert_on_error;
3851 	u8 reserved1[4];
3852 };
3853 
3854 /* Ethernet filter types: mac/vlan/pair */
3855 enum eth_filter_type {
3856 	ETH_FILTER_TYPE_UNUSED,
3857 	ETH_FILTER_TYPE_MAC,
3858 	ETH_FILTER_TYPE_VLAN,
3859 	ETH_FILTER_TYPE_PAIR,
3860 	ETH_FILTER_TYPE_INNER_MAC,
3861 	ETH_FILTER_TYPE_INNER_VLAN,
3862 	ETH_FILTER_TYPE_INNER_PAIR,
3863 	ETH_FILTER_TYPE_INNER_MAC_VNI_PAIR,
3864 	ETH_FILTER_TYPE_MAC_VNI_PAIR,
3865 	ETH_FILTER_TYPE_VNI,
3866 	MAX_ETH_FILTER_TYPE
3867 };
3868 
3869 /* inner to inner vlan priority translation configurations */
3870 struct eth_in_to_in_pri_map_cfg {
3871 	u8 inner_vlan_pri_remap_en;
3872 	u8 reserved[7];
3873 	u8 non_rdma_in_to_in_pri_map[8];
3874 	u8 rdma_in_to_in_pri_map[8];
3875 };
3876 
3877 /* Eth IPv4 Fragment Type */
3878 enum eth_ipv4_frag_type {
3879 	ETH_IPV4_NOT_FRAG,
3880 	ETH_IPV4_FIRST_FRAG,
3881 	ETH_IPV4_NON_FIRST_FRAG,
3882 	MAX_ETH_IPV4_FRAG_TYPE
3883 };
3884 
3885 /* eth IPv4 Fragment Type */
3886 enum eth_ip_type {
3887 	ETH_IPV4,
3888 	ETH_IPV6,
3889 	MAX_ETH_IP_TYPE
3890 };
3891 
3892 /* Ethernet Ramrod Command IDs */
3893 enum eth_ramrod_cmd_id {
3894 	ETH_RAMROD_UNUSED,
3895 	ETH_RAMROD_VPORT_START,
3896 	ETH_RAMROD_VPORT_UPDATE,
3897 	ETH_RAMROD_VPORT_STOP,
3898 	ETH_RAMROD_RX_QUEUE_START,
3899 	ETH_RAMROD_RX_QUEUE_STOP,
3900 	ETH_RAMROD_TX_QUEUE_START,
3901 	ETH_RAMROD_TX_QUEUE_STOP,
3902 	ETH_RAMROD_FILTERS_UPDATE,
3903 	ETH_RAMROD_RX_QUEUE_UPDATE,
3904 	ETH_RAMROD_RX_CREATE_OPENFLOW_ACTION,
3905 	ETH_RAMROD_RX_ADD_OPENFLOW_FILTER,
3906 	ETH_RAMROD_RX_DELETE_OPENFLOW_FILTER,
3907 	ETH_RAMROD_RX_ADD_UDP_FILTER,
3908 	ETH_RAMROD_RX_DELETE_UDP_FILTER,
3909 	ETH_RAMROD_RX_CREATE_GFT_ACTION,
3910 	ETH_RAMROD_RX_UPDATE_GFT_FILTER,
3911 	ETH_RAMROD_TX_QUEUE_UPDATE,
3912 	ETH_RAMROD_RGFS_FILTER_ADD,
3913 	ETH_RAMROD_RGFS_FILTER_DEL,
3914 	ETH_RAMROD_TGFS_FILTER_ADD,
3915 	ETH_RAMROD_TGFS_FILTER_DEL,
3916 	ETH_RAMROD_GFS_COUNTERS_REPORT_REQUEST,
3917 	MAX_ETH_RAMROD_CMD_ID
3918 };
3919 
3920 /* Return code from eth sp ramrods */
3921 struct eth_return_code {
3922 	u8 value;
3923 #define ETH_RETURN_CODE_ERR_CODE_MASK  0x3F
3924 #define ETH_RETURN_CODE_ERR_CODE_SHIFT 0
3925 #define ETH_RETURN_CODE_RESERVED_MASK  0x1
3926 #define ETH_RETURN_CODE_RESERVED_SHIFT 6
3927 #define ETH_RETURN_CODE_RX_TX_MASK     0x1
3928 #define ETH_RETURN_CODE_RX_TX_SHIFT    7
3929 };
3930 
3931 /* tx destination enum */
3932 enum eth_tx_dst_mode_config_enum {
3933 	ETH_TX_DST_MODE_CONFIG_DISABLE,
3934 	ETH_TX_DST_MODE_CONFIG_FORWARD_DATA_IN_BD,
3935 	ETH_TX_DST_MODE_CONFIG_FORWARD_DATA_IN_VPORT,
3936 	MAX_ETH_TX_DST_MODE_CONFIG_ENUM
3937 };
3938 
3939 /* What to do in case an error occurs */
3940 enum eth_tx_err {
3941 	ETH_TX_ERR_DROP,
3942 	ETH_TX_ERR_ASSERT_MALICIOUS,
3943 	MAX_ETH_TX_ERR
3944 };
3945 
3946 /* Array of the different error type behaviors */
3947 struct eth_tx_err_vals {
3948 	__le16 values;
3949 #define ETH_TX_ERR_VALS_ILLEGAL_VLAN_MODE_MASK			0x1
3950 #define ETH_TX_ERR_VALS_ILLEGAL_VLAN_MODE_SHIFT			0
3951 #define ETH_TX_ERR_VALS_PACKET_TOO_SMALL_MASK			0x1
3952 #define ETH_TX_ERR_VALS_PACKET_TOO_SMALL_SHIFT			1
3953 #define ETH_TX_ERR_VALS_ANTI_SPOOFING_ERR_MASK			0x1
3954 #define ETH_TX_ERR_VALS_ANTI_SPOOFING_ERR_SHIFT			2
3955 #define ETH_TX_ERR_VALS_ILLEGAL_INBAND_TAGS_MASK		0x1
3956 #define ETH_TX_ERR_VALS_ILLEGAL_INBAND_TAGS_SHIFT		3
3957 #define ETH_TX_ERR_VALS_VLAN_INSERTION_W_INBAND_TAG_MASK	0x1
3958 #define ETH_TX_ERR_VALS_VLAN_INSERTION_W_INBAND_TAG_SHIFT	4
3959 #define ETH_TX_ERR_VALS_MTU_VIOLATION_MASK			0x1
3960 #define ETH_TX_ERR_VALS_MTU_VIOLATION_SHIFT			5
3961 #define ETH_TX_ERR_VALS_ILLEGAL_CONTROL_FRAME_MASK		0x1
3962 #define ETH_TX_ERR_VALS_ILLEGAL_CONTROL_FRAME_SHIFT		6
3963 #define ETH_TX_ERR_VALS_ILLEGAL_BD_FLAGS_MASK			0x1
3964 #define ETH_TX_ERR_VALS_ILLEGAL_BD_FLAGS_SHIFT			7
3965 #define ETH_TX_ERR_VALS_RESERVED_MASK				0xFF
3966 #define ETH_TX_ERR_VALS_RESERVED_SHIFT				8
3967 };
3968 
3969 /* vport rss configuration data */
3970 struct eth_vport_rss_config {
3971 	__le16 capabilities;
3972 #define ETH_VPORT_RSS_CONFIG_IPV4_CAPABILITY_MASK		0x1
3973 #define ETH_VPORT_RSS_CONFIG_IPV4_CAPABILITY_SHIFT		0
3974 #define ETH_VPORT_RSS_CONFIG_IPV6_CAPABILITY_MASK		0x1
3975 #define ETH_VPORT_RSS_CONFIG_IPV6_CAPABILITY_SHIFT		1
3976 #define ETH_VPORT_RSS_CONFIG_IPV4_TCP_CAPABILITY_MASK		0x1
3977 #define ETH_VPORT_RSS_CONFIG_IPV4_TCP_CAPABILITY_SHIFT		2
3978 #define ETH_VPORT_RSS_CONFIG_IPV6_TCP_CAPABILITY_MASK		0x1
3979 #define ETH_VPORT_RSS_CONFIG_IPV6_TCP_CAPABILITY_SHIFT		3
3980 #define ETH_VPORT_RSS_CONFIG_IPV4_UDP_CAPABILITY_MASK		0x1
3981 #define ETH_VPORT_RSS_CONFIG_IPV4_UDP_CAPABILITY_SHIFT		4
3982 #define ETH_VPORT_RSS_CONFIG_IPV6_UDP_CAPABILITY_MASK		0x1
3983 #define ETH_VPORT_RSS_CONFIG_IPV6_UDP_CAPABILITY_SHIFT		5
3984 #define ETH_VPORT_RSS_CONFIG_EN_5_TUPLE_CAPABILITY_MASK		0x1
3985 #define ETH_VPORT_RSS_CONFIG_EN_5_TUPLE_CAPABILITY_SHIFT	6
3986 #define ETH_VPORT_RSS_CONFIG_RESERVED0_MASK			0x1FF
3987 #define ETH_VPORT_RSS_CONFIG_RESERVED0_SHIFT			7
3988 	u8 rss_id;
3989 	u8 rss_mode;
3990 	u8 update_rss_key;
3991 	u8 update_rss_ind_table;
3992 	u8 update_rss_capabilities;
3993 	u8 tbl_size;
3994 	u8 ind_table_mask_valid;
3995 	u8 reserved2[3];
3996 	__le16 indirection_table[ETH_RSS_IND_TABLE_ENTRIES_NUM];
3997 	__le32 ind_table_mask[ETH_RSS_IND_TABLE_MASK_SIZE_REGS];
3998 	__le32 rss_key[ETH_RSS_KEY_SIZE_REGS];
3999 	__le32 reserved3;
4000 };
4001 
4002 /* eth vport RSS mode */
4003 enum eth_vport_rss_mode {
4004 	ETH_VPORT_RSS_MODE_DISABLED,
4005 	ETH_VPORT_RSS_MODE_REGULAR,
4006 	MAX_ETH_VPORT_RSS_MODE
4007 };
4008 
4009 /* Command for setting classification flags for a vport $$KEEP_ENDIANNESS$$ */
4010 struct eth_vport_rx_mode {
4011 	__le16 state;
4012 #define ETH_VPORT_RX_MODE_UCAST_DROP_ALL_MASK		0x1
4013 #define ETH_VPORT_RX_MODE_UCAST_DROP_ALL_SHIFT		0
4014 #define ETH_VPORT_RX_MODE_UCAST_ACCEPT_ALL_MASK		0x1
4015 #define ETH_VPORT_RX_MODE_UCAST_ACCEPT_ALL_SHIFT	1
4016 #define ETH_VPORT_RX_MODE_UCAST_ACCEPT_UNMATCHED_MASK	0x1
4017 #define ETH_VPORT_RX_MODE_UCAST_ACCEPT_UNMATCHED_SHIFT	2
4018 #define ETH_VPORT_RX_MODE_MCAST_DROP_ALL_MASK		0x1
4019 #define ETH_VPORT_RX_MODE_MCAST_DROP_ALL_SHIFT		3
4020 #define ETH_VPORT_RX_MODE_MCAST_ACCEPT_ALL_MASK		0x1
4021 #define ETH_VPORT_RX_MODE_MCAST_ACCEPT_ALL_SHIFT	4
4022 #define ETH_VPORT_RX_MODE_BCAST_ACCEPT_ALL_MASK		0x1
4023 #define ETH_VPORT_RX_MODE_BCAST_ACCEPT_ALL_SHIFT	5
4024 #define ETH_VPORT_RX_MODE_ACCEPT_ANY_VNI_MASK		0x1
4025 #define ETH_VPORT_RX_MODE_ACCEPT_ANY_VNI_SHIFT		6
4026 #define ETH_VPORT_RX_MODE_RESERVED1_MASK		0x1FF
4027 #define ETH_VPORT_RX_MODE_RESERVED1_SHIFT		7
4028 };
4029 
4030 /* Command for setting tpa parameters */
4031 struct eth_vport_tpa_param {
4032 	u8 tpa_ipv4_en_flg;
4033 	u8 tpa_ipv6_en_flg;
4034 	u8 tpa_ipv4_tunn_en_flg;
4035 	u8 tpa_ipv6_tunn_en_flg;
4036 	u8 tpa_pkt_split_flg;
4037 	u8 tpa_hdr_data_split_flg;
4038 	u8 tpa_gro_consistent_flg;
4039 
4040 	u8 tpa_max_aggs_num;
4041 
4042 	__le16 tpa_max_size;
4043 	__le16 tpa_min_size_to_start;
4044 
4045 	__le16 tpa_min_size_to_cont;
4046 	u8 max_buff_num;
4047 	u8 reserved;
4048 };
4049 
4050 /* Command for setting classification flags for a vport $$KEEP_ENDIANNESS$$ */
4051 struct eth_vport_tx_mode {
4052 	__le16 state;
4053 #define ETH_VPORT_TX_MODE_UCAST_DROP_ALL_MASK		0x1
4054 #define ETH_VPORT_TX_MODE_UCAST_DROP_ALL_SHIFT		0
4055 #define ETH_VPORT_TX_MODE_UCAST_ACCEPT_ALL_MASK		0x1
4056 #define ETH_VPORT_TX_MODE_UCAST_ACCEPT_ALL_SHIFT	1
4057 #define ETH_VPORT_TX_MODE_MCAST_DROP_ALL_MASK		0x1
4058 #define ETH_VPORT_TX_MODE_MCAST_DROP_ALL_SHIFT		2
4059 #define ETH_VPORT_TX_MODE_MCAST_ACCEPT_ALL_MASK		0x1
4060 #define ETH_VPORT_TX_MODE_MCAST_ACCEPT_ALL_SHIFT	3
4061 #define ETH_VPORT_TX_MODE_BCAST_ACCEPT_ALL_MASK		0x1
4062 #define ETH_VPORT_TX_MODE_BCAST_ACCEPT_ALL_SHIFT	4
4063 #define ETH_VPORT_TX_MODE_RESERVED1_MASK		0x7FF
4064 #define ETH_VPORT_TX_MODE_RESERVED1_SHIFT		5
4065 };
4066 
4067 /* GFT filter update action type */
4068 enum gft_filter_update_action {
4069 	GFT_ADD_FILTER,
4070 	GFT_DELETE_FILTER,
4071 	MAX_GFT_FILTER_UPDATE_ACTION
4072 };
4073 
4074 /* Ramrod data for rx create gft action */
4075 struct rx_create_gft_action_ramrod_data {
4076 	u8 vport_id;
4077 	u8 reserved[7];
4078 };
4079 
4080 /* Ramrod data for rx create openflow action */
4081 struct rx_create_openflow_action_ramrod_data {
4082 	u8 vport_id;
4083 	u8 reserved[7];
4084 };
4085 
4086 /* Ramrod data for rx add openflow filter */
4087 struct rx_openflow_filter_ramrod_data {
4088 	__le16 action_icid;
4089 	u8 priority;
4090 	u8 reserved0;
4091 	__le32 tenant_id;
4092 	__le16 dst_mac_hi;
4093 	__le16 dst_mac_mid;
4094 	__le16 dst_mac_lo;
4095 	__le16 src_mac_hi;
4096 	__le16 src_mac_mid;
4097 	__le16 src_mac_lo;
4098 	__le16 vlan_id;
4099 	__le16 l2_eth_type;
4100 	u8 ipv4_dscp;
4101 	u8 ipv4_frag_type;
4102 	u8 ipv4_over_ip;
4103 	u8 tenant_id_exists;
4104 	__le32 ipv4_dst_addr;
4105 	__le32 ipv4_src_addr;
4106 	__le16 l4_dst_port;
4107 	__le16 l4_src_port;
4108 };
4109 
4110 /* Ramrod data for rx queue start ramrod */
4111 struct rx_queue_start_ramrod_data {
4112 	__le16 rx_queue_id;
4113 	__le16 num_of_pbl_pages;
4114 	__le16 bd_max_bytes;
4115 	__le16 sb_id;
4116 	u8 sb_index;
4117 	u8 vport_id;
4118 	u8 default_rss_queue_flg;
4119 	u8 complete_cqe_flg;
4120 	u8 complete_event_flg;
4121 	u8 stats_counter_id;
4122 	u8 pin_context;
4123 	u8 pxp_tph_valid_bd;
4124 	u8 pxp_tph_valid_pkt;
4125 	u8 pxp_st_hint;
4126 
4127 	__le16 pxp_st_index;
4128 	u8 pmd_mode;
4129 
4130 	u8 notify_en;
4131 	u8 toggle_val;
4132 
4133 	u8 vf_rx_prod_index;
4134 	u8 vf_rx_prod_use_zone_a;
4135 	u8 reserved[5];
4136 	__le16 reserved1;
4137 	struct regpair cqe_pbl_addr;
4138 	struct regpair bd_base;
4139 	struct regpair reserved2;
4140 };
4141 
4142 /* Ramrod data for rx queue stop ramrod */
4143 struct rx_queue_stop_ramrod_data {
4144 	__le16 rx_queue_id;
4145 	u8 complete_cqe_flg;
4146 	u8 complete_event_flg;
4147 	u8 vport_id;
4148 	u8 reserved[3];
4149 };
4150 
4151 /* Ramrod data for rx queue update ramrod */
4152 struct rx_queue_update_ramrod_data {
4153 	__le16 rx_queue_id;
4154 	u8 complete_cqe_flg;
4155 	u8 complete_event_flg;
4156 	u8 vport_id;
4157 	u8 set_default_rss_queue;
4158 	u8 reserved[3];
4159 	u8 reserved1;
4160 	u8 reserved2;
4161 	u8 reserved3;
4162 	__le16 reserved4;
4163 	__le16 reserved5;
4164 	struct regpair reserved6;
4165 };
4166 
4167 /* Ramrod data for rx Add UDP Filter */
4168 struct rx_udp_filter_ramrod_data {
4169 	__le16 action_icid;
4170 	__le16 vlan_id;
4171 	u8 ip_type;
4172 	u8 tenant_id_exists;
4173 	__le16 reserved1;
4174 	__le32 ip_dst_addr[4];
4175 	__le32 ip_src_addr[4];
4176 	__le16 udp_dst_port;
4177 	__le16 udp_src_port;
4178 	__le32 tenant_id;
4179 };
4180 
4181 /* Add or delete GFT filter - filter is packet header of type of packet wished
4182  * to pass certain FW flow.
4183  */
4184 struct rx_update_gft_filter_ramrod_data {
4185 	struct regpair pkt_hdr_addr;
4186 	__le16 pkt_hdr_length;
4187 	__le16 action_icid;
4188 	__le16 rx_qid;
4189 	__le16 flow_id;
4190 	__le16 vport_id;
4191 	u8 action_icid_valid;
4192 	u8 rx_qid_valid;
4193 	u8 flow_id_valid;
4194 	u8 filter_action;
4195 	u8 assert_on_error;
4196 	u8 inner_vlan_removal_en;
4197 };
4198 
4199 /* Ramrod data for tx queue start ramrod */
4200 struct tx_queue_start_ramrod_data {
4201 	__le16 sb_id;
4202 	u8 sb_index;
4203 	u8 vport_id;
4204 	u8 reserved0;
4205 	u8 stats_counter_id;
4206 	__le16 qm_pq_id;
4207 	u8 flags;
4208 #define TX_QUEUE_START_RAMROD_DATA_DISABLE_OPPORTUNISTIC_MASK	0x1
4209 #define TX_QUEUE_START_RAMROD_DATA_DISABLE_OPPORTUNISTIC_SHIFT	0
4210 #define TX_QUEUE_START_RAMROD_DATA_TEST_MODE_PKT_DUP_MASK	0x1
4211 #define TX_QUEUE_START_RAMROD_DATA_TEST_MODE_PKT_DUP_SHIFT	1
4212 #define TX_QUEUE_START_RAMROD_DATA_PMD_MODE_MASK		0x1
4213 #define TX_QUEUE_START_RAMROD_DATA_PMD_MODE_SHIFT		2
4214 #define TX_QUEUE_START_RAMROD_DATA_NOTIFY_EN_MASK		0x1
4215 #define TX_QUEUE_START_RAMROD_DATA_NOTIFY_EN_SHIFT		3
4216 #define TX_QUEUE_START_RAMROD_DATA_PIN_CONTEXT_MASK		0x1
4217 #define TX_QUEUE_START_RAMROD_DATA_PIN_CONTEXT_SHIFT		4
4218 #define TX_QUEUE_START_RAMROD_DATA_RESERVED1_MASK		0x7
4219 #define TX_QUEUE_START_RAMROD_DATA_RESERVED1_SHIFT		5
4220 	u8 pxp_st_hint;
4221 	u8 pxp_tph_valid_bd;
4222 	u8 pxp_tph_valid_pkt;
4223 	__le16 pxp_st_index;
4224 	u8 comp_agg_size;
4225 	u8 reserved3;
4226 	__le16 queue_zone_id;
4227 	__le16 reserved2;
4228 	__le16 pbl_size;
4229 	__le16 tx_queue_id;
4230 	__le16 same_as_last_id;
4231 	__le16 reserved[3];
4232 	struct regpair pbl_base_addr;
4233 	struct regpair bd_cons_address;
4234 };
4235 
4236 /* Ramrod data for tx queue stop ramrod */
4237 struct tx_queue_stop_ramrod_data {
4238 	__le16 reserved[4];
4239 };
4240 
4241 /* Ramrod data for tx queue update ramrod */
4242 struct tx_queue_update_ramrod_data {
4243 	__le16 update_qm_pq_id_flg;
4244 	__le16 qm_pq_id;
4245 	__le32 reserved0;
4246 	struct regpair reserved1[5];
4247 };
4248 
4249 /* Inner to Inner VLAN priority map update mode */
4250 enum update_in_to_in_pri_map_mode_enum {
4251 	ETH_IN_TO_IN_PRI_MAP_UPDATE_DISABLED,
4252 	ETH_IN_TO_IN_PRI_MAP_UPDATE_NON_RDMA_TBL,
4253 	ETH_IN_TO_IN_PRI_MAP_UPDATE_RDMA_TBL,
4254 	MAX_UPDATE_IN_TO_IN_PRI_MAP_MODE_ENUM
4255 };
4256 
4257 /* Ramrod data for vport update ramrod */
4258 struct vport_filter_update_ramrod_data {
4259 	struct eth_filter_cmd_header filter_cmd_hdr;
4260 	struct eth_filter_cmd filter_cmds[ETH_FILTER_RULES_COUNT];
4261 };
4262 
4263 /* Ramrod data for vport start ramrod */
4264 struct vport_start_ramrod_data {
4265 	u8 vport_id;
4266 	u8 sw_fid;
4267 	__le16 mtu;
4268 	u8 drop_ttl0_en;
4269 	u8 inner_vlan_removal_en;
4270 	struct eth_vport_rx_mode rx_mode;
4271 	struct eth_vport_tx_mode tx_mode;
4272 	struct eth_vport_tpa_param tpa_param;
4273 	__le16 default_vlan;
4274 	u8 tx_switching_en;
4275 	u8 anti_spoofing_en;
4276 	u8 default_vlan_en;
4277 	u8 handle_ptp_pkts;
4278 	u8 silent_vlan_removal_en;
4279 	u8 untagged;
4280 	struct eth_tx_err_vals tx_err_behav;
4281 	u8 zero_placement_offset;
4282 	u8 ctl_frame_mac_check_en;
4283 	u8 ctl_frame_ethtype_check_en;
4284 	u8 reserved0;
4285 	u8 reserved1;
4286 	u8 tx_dst_port_mode_config;
4287 	u8 dst_vport_id;
4288 	u8 tx_dst_port_mode;
4289 	u8 dst_vport_id_valid;
4290 	u8 wipe_inner_vlan_pri_en;
4291 	u8 reserved2[2];
4292 	struct eth_in_to_in_pri_map_cfg in_to_in_vlan_pri_map_cfg;
4293 };
4294 
4295 /* Ramrod data for vport stop ramrod */
4296 struct vport_stop_ramrod_data {
4297 	u8 vport_id;
4298 	u8 reserved[7];
4299 };
4300 
4301 /* Ramrod data for vport update ramrod */
4302 struct vport_update_ramrod_data_cmn {
4303 	u8 vport_id;
4304 	u8 update_rx_active_flg;
4305 	u8 rx_active_flg;
4306 	u8 update_tx_active_flg;
4307 	u8 tx_active_flg;
4308 	u8 update_rx_mode_flg;
4309 	u8 update_tx_mode_flg;
4310 	u8 update_approx_mcast_flg;
4311 
4312 	u8 update_rss_flg;
4313 	u8 update_inner_vlan_removal_en_flg;
4314 
4315 	u8 inner_vlan_removal_en;
4316 	u8 update_tpa_param_flg;
4317 	u8 update_tpa_en_flg;
4318 	u8 update_tx_switching_en_flg;
4319 
4320 	u8 tx_switching_en;
4321 	u8 update_anti_spoofing_en_flg;
4322 
4323 	u8 anti_spoofing_en;
4324 	u8 update_handle_ptp_pkts;
4325 
4326 	u8 handle_ptp_pkts;
4327 	u8 update_default_vlan_en_flg;
4328 
4329 	u8 default_vlan_en;
4330 
4331 	u8 update_default_vlan_flg;
4332 
4333 	__le16 default_vlan;
4334 	u8 update_accept_any_vlan_flg;
4335 
4336 	u8 accept_any_vlan;
4337 	u8 silent_vlan_removal_en;
4338 	u8 update_mtu_flg;
4339 
4340 	__le16 mtu;
4341 	u8 update_ctl_frame_checks_en_flg;
4342 	u8 ctl_frame_mac_check_en;
4343 	u8 ctl_frame_ethtype_check_en;
4344 	u8 update_in_to_in_pri_map_mode;
4345 	u8 in_to_in_pri_map[8];
4346 	u8 update_tx_dst_port_mode_flg;
4347 	u8 tx_dst_port_mode_config;
4348 	u8 dst_vport_id;
4349 	u8 tx_dst_port_mode;
4350 	u8 dst_vport_id_valid;
4351 	u8 reserved[1];
4352 };
4353 
4354 struct vport_update_ramrod_mcast {
4355 	__le32 bins[ETH_MULTICAST_MAC_BINS_IN_REGS];
4356 };
4357 
4358 /* Ramrod data for vport update ramrod */
4359 struct vport_update_ramrod_data {
4360 	struct vport_update_ramrod_data_cmn common;
4361 
4362 	struct eth_vport_rx_mode rx_mode;
4363 	struct eth_vport_tx_mode tx_mode;
4364 	__le32 reserved[3];
4365 	struct eth_vport_tpa_param tpa_param;
4366 	struct vport_update_ramrod_mcast approx_mcast;
4367 	struct eth_vport_rss_config rss_config;
4368 };
4369 
4370 struct xstorm_eth_conn_ag_ctx_dq_ext_ldpart {
4371 	u8 reserved0;
4372 	u8 state;
4373 	u8 flags0;
4374 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_EXIST_IN_QM0_MASK	0x1
4375 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_EXIST_IN_QM0_SHIFT	0
4376 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED1_MASK		0x1
4377 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED1_SHIFT		1
4378 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED2_MASK		0x1
4379 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED2_SHIFT		2
4380 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_EXIST_IN_QM3_MASK	0x1
4381 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_EXIST_IN_QM3_SHIFT	3
4382 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED3_MASK		0x1
4383 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED3_SHIFT		4
4384 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED4_MASK		0x1
4385 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED4_SHIFT		5
4386 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED5_MASK		0x1
4387 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED5_SHIFT		6
4388 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED6_MASK		0x1
4389 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED6_SHIFT		7
4390 	u8 flags1;
4391 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED7_MASK		0x1
4392 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED7_SHIFT		0
4393 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED8_MASK		0x1
4394 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED8_SHIFT		1
4395 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED9_MASK		0x1
4396 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED9_SHIFT		2
4397 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_BIT11_MASK		0x1
4398 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_BIT11_SHIFT		3
4399 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_E5_RESERVED2_MASK	0x1
4400 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_E5_RESERVED2_SHIFT	4
4401 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_E5_RESERVED3_MASK	0x1
4402 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_E5_RESERVED3_SHIFT	5
4403 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_TX_RULE_ACTIVE_MASK	0x1
4404 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_TX_RULE_ACTIVE_SHIFT	6
4405 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_DQ_CF_ACTIVE_MASK	0x1
4406 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_DQ_CF_ACTIVE_SHIFT	7
4407 	u8 flags2;
4408 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF0_MASK	0x3
4409 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF0_SHIFT	0
4410 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF1_MASK	0x3
4411 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF1_SHIFT	2
4412 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF2_MASK	0x3
4413 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF2_SHIFT	4
4414 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF3_MASK	0x3
4415 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF3_SHIFT	6
4416 	u8 flags3;
4417 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF4_MASK	0x3
4418 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF4_SHIFT	0
4419 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF5_MASK	0x3
4420 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF5_SHIFT	2
4421 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF6_MASK	0x3
4422 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF6_SHIFT	4
4423 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF7_MASK	0x3
4424 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF7_SHIFT	6
4425 	u8 flags4;
4426 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF8_MASK	0x3
4427 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF8_SHIFT	0
4428 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF9_MASK	0x3
4429 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF9_SHIFT	2
4430 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF10_MASK	0x3
4431 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF10_SHIFT	4
4432 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF11_MASK	0x3
4433 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF11_SHIFT	6
4434 	u8 flags5;
4435 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF12_MASK	0x3
4436 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF12_SHIFT	0
4437 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF13_MASK	0x3
4438 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF13_SHIFT	2
4439 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF14_MASK	0x3
4440 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF14_SHIFT	4
4441 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF15_MASK	0x3
4442 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF15_SHIFT	6
4443 	u8 flags6;
4444 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_GO_TO_BD_CONS_CF_MASK	0x3
4445 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_GO_TO_BD_CONS_CF_SHIFT	0
4446 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_MULTI_UNICAST_CF_MASK	0x3
4447 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_MULTI_UNICAST_CF_SHIFT	2
4448 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_DQ_CF_MASK		0x3
4449 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_DQ_CF_SHIFT		4
4450 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_TERMINATE_CF_MASK	0x3
4451 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_TERMINATE_CF_SHIFT	6
4452 	u8 flags7;
4453 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_FLUSH_Q0_MASK		0x3
4454 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_FLUSH_Q0_SHIFT		0
4455 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED10_MASK		0x3
4456 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED10_SHIFT	2
4457 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_SLOW_PATH_MASK		0x3
4458 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_SLOW_PATH_SHIFT		4
4459 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF0EN_MASK		0x1
4460 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF0EN_SHIFT		6
4461 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF1EN_MASK		0x1
4462 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF1EN_SHIFT		7
4463 	u8 flags8;
4464 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF2EN_MASK	0x1
4465 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF2EN_SHIFT	0
4466 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF3EN_MASK	0x1
4467 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF3EN_SHIFT	1
4468 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF4EN_MASK	0x1
4469 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF4EN_SHIFT	2
4470 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF5EN_MASK	0x1
4471 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF5EN_SHIFT	3
4472 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF6EN_MASK	0x1
4473 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF6EN_SHIFT	4
4474 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF7EN_MASK	0x1
4475 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF7EN_SHIFT	5
4476 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF8EN_MASK	0x1
4477 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF8EN_SHIFT	6
4478 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF9EN_MASK	0x1
4479 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF9EN_SHIFT	7
4480 	u8 flags9;
4481 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF10EN_MASK			0x1
4482 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF10EN_SHIFT			0
4483 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF11EN_MASK			0x1
4484 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF11EN_SHIFT			1
4485 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF12EN_MASK			0x1
4486 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF12EN_SHIFT			2
4487 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF13EN_MASK			0x1
4488 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF13EN_SHIFT			3
4489 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF14EN_MASK			0x1
4490 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF14EN_SHIFT			4
4491 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF15EN_MASK			0x1
4492 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_CF15EN_SHIFT			5
4493 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_GO_TO_BD_CONS_CF_EN_MASK	0x1
4494 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_GO_TO_BD_CONS_CF_EN_SHIFT	6
4495 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_MULTI_UNICAST_CF_EN_MASK	0x1
4496 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_MULTI_UNICAST_CF_EN_SHIFT	7
4497 	u8 flags10;
4498 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_DQ_CF_EN_MASK			0x1
4499 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_DQ_CF_EN_SHIFT			0
4500 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_TERMINATE_CF_EN_MASK		0x1
4501 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_TERMINATE_CF_EN_SHIFT		1
4502 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_FLUSH_Q0_EN_MASK		0x1
4503 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_FLUSH_Q0_EN_SHIFT		2
4504 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED11_MASK			0x1
4505 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED11_SHIFT		3
4506 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_SLOW_PATH_EN_MASK		0x1
4507 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_SLOW_PATH_EN_SHIFT		4
4508 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_TPH_ENABLE_EN_RESERVED_MASK	0x1
4509 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_TPH_ENABLE_EN_RESERVED_SHIFT	5
4510 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED12_MASK			0x1
4511 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED12_SHIFT		6
4512 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED13_MASK			0x1
4513 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED13_SHIFT		7
4514 	u8 flags11;
4515 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED14_MASK		0x1
4516 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED14_SHIFT	0
4517 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED15_MASK		0x1
4518 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RESERVED15_SHIFT	1
4519 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_TX_DEC_RULE_EN_MASK	0x1
4520 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_TX_DEC_RULE_EN_SHIFT	2
4521 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE5EN_MASK		0x1
4522 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE5EN_SHIFT		3
4523 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE6EN_MASK		0x1
4524 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE6EN_SHIFT		4
4525 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE7EN_MASK		0x1
4526 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE7EN_SHIFT		5
4527 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_A0_RESERVED1_MASK	0x1
4528 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_A0_RESERVED1_SHIFT	6
4529 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE9EN_MASK		0x1
4530 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE9EN_SHIFT		7
4531 	u8 flags12;
4532 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE10EN_MASK		0x1
4533 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE10EN_SHIFT		0
4534 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE11EN_MASK		0x1
4535 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE11EN_SHIFT		1
4536 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_A0_RESERVED2_MASK	0x1
4537 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_A0_RESERVED2_SHIFT	2
4538 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_A0_RESERVED3_MASK	0x1
4539 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_A0_RESERVED3_SHIFT	3
4540 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE14EN_MASK		0x1
4541 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE14EN_SHIFT		4
4542 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE15EN_MASK		0x1
4543 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE15EN_SHIFT		5
4544 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE16EN_MASK		0x1
4545 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE16EN_SHIFT		6
4546 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE17EN_MASK		0x1
4547 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE17EN_SHIFT		7
4548 	u8 flags13;
4549 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE18EN_MASK		0x1
4550 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE18EN_SHIFT		0
4551 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE19EN_MASK		0x1
4552 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_RULE19EN_SHIFT		1
4553 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_A0_RESERVED4_MASK	0x1
4554 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_A0_RESERVED4_SHIFT	2
4555 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_A0_RESERVED5_MASK	0x1
4556 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_A0_RESERVED5_SHIFT	3
4557 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_A0_RESERVED6_MASK	0x1
4558 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_A0_RESERVED6_SHIFT	4
4559 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_A0_RESERVED7_MASK	0x1
4560 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_A0_RESERVED7_SHIFT	5
4561 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_A0_RESERVED8_MASK	0x1
4562 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_A0_RESERVED8_SHIFT	6
4563 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_A0_RESERVED9_MASK	0x1
4564 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_A0_RESERVED9_SHIFT	7
4565 	u8 flags14;
4566 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_EDPM_USE_EXT_HDR_MASK		0x1
4567 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_EDPM_USE_EXT_HDR_SHIFT		0
4568 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_EDPM_SEND_RAW_L3L4_MASK		0x1
4569 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_EDPM_SEND_RAW_L3L4_SHIFT	1
4570 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_EDPM_INBAND_PROP_HDR_MASK	0x1
4571 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_EDPM_INBAND_PROP_HDR_SHIFT	2
4572 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_EDPM_SEND_EXT_TUNNEL_MASK	0x1
4573 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_EDPM_SEND_EXT_TUNNEL_SHIFT	3
4574 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_L2_EDPM_ENABLE_MASK		0x1
4575 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_L2_EDPM_ENABLE_SHIFT		4
4576 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_ROCE_EDPM_ENABLE_MASK		0x1
4577 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_ROCE_EDPM_ENABLE_SHIFT		5
4578 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_TPH_ENABLE_MASK			0x3
4579 #define E4XSTORMETHCONNAGCTXDQEXTLDPART_TPH_ENABLE_SHIFT		6
4580 	u8 edpm_event_id;
4581 	__le16 physical_q0;
4582 	__le16 e5_reserved1;
4583 	__le16 edpm_num_bds;
4584 	__le16 tx_bd_cons;
4585 	__le16 tx_bd_prod;
4586 	__le16 updated_qm_pq_id;
4587 	__le16 conn_dpi;
4588 	u8 byte3;
4589 	u8 byte4;
4590 	u8 byte5;
4591 	u8 byte6;
4592 	__le32 reg0;
4593 	__le32 reg1;
4594 	__le32 reg2;
4595 	__le32 reg3;
4596 	__le32 reg4;
4597 };
4598 
4599 struct mstorm_eth_conn_ag_ctx {
4600 	u8 byte0;
4601 	u8 byte1;
4602 	u8 flags0;
4603 #define MSTORM_ETH_CONN_AG_CTX_EXIST_IN_QM0_MASK	0x1
4604 #define MSTORM_ETH_CONN_AG_CTX_EXIST_IN_QM0_SHIFT	 0
4605 #define MSTORM_ETH_CONN_AG_CTX_BIT1_MASK		0x1
4606 #define MSTORM_ETH_CONN_AG_CTX_BIT1_SHIFT		1
4607 #define MSTORM_ETH_CONN_AG_CTX_CF0_MASK		0x3
4608 #define MSTORM_ETH_CONN_AG_CTX_CF0_SHIFT		2
4609 #define MSTORM_ETH_CONN_AG_CTX_CF1_MASK		0x3
4610 #define MSTORM_ETH_CONN_AG_CTX_CF1_SHIFT		4
4611 #define MSTORM_ETH_CONN_AG_CTX_CF2_MASK		0x3
4612 #define MSTORM_ETH_CONN_AG_CTX_CF2_SHIFT		6
4613 	u8 flags1;
4614 #define MSTORM_ETH_CONN_AG_CTX_CF0EN_MASK	0x1
4615 #define MSTORM_ETH_CONN_AG_CTX_CF0EN_SHIFT	0
4616 #define MSTORM_ETH_CONN_AG_CTX_CF1EN_MASK	0x1
4617 #define MSTORM_ETH_CONN_AG_CTX_CF1EN_SHIFT	1
4618 #define MSTORM_ETH_CONN_AG_CTX_CF2EN_MASK	0x1
4619 #define MSTORM_ETH_CONN_AG_CTX_CF2EN_SHIFT	2
4620 #define MSTORM_ETH_CONN_AG_CTX_RULE0EN_MASK	0x1
4621 #define MSTORM_ETH_CONN_AG_CTX_RULE0EN_SHIFT	3
4622 #define MSTORM_ETH_CONN_AG_CTX_RULE1EN_MASK	0x1
4623 #define MSTORM_ETH_CONN_AG_CTX_RULE1EN_SHIFT	4
4624 #define MSTORM_ETH_CONN_AG_CTX_RULE2EN_MASK	0x1
4625 #define MSTORM_ETH_CONN_AG_CTX_RULE2EN_SHIFT	5
4626 #define MSTORM_ETH_CONN_AG_CTX_RULE3EN_MASK	0x1
4627 #define MSTORM_ETH_CONN_AG_CTX_RULE3EN_SHIFT	6
4628 #define MSTORM_ETH_CONN_AG_CTX_RULE4EN_MASK	0x1
4629 #define MSTORM_ETH_CONN_AG_CTX_RULE4EN_SHIFT	7
4630 	__le16 word0;
4631 	__le16 word1;
4632 	__le32 reg0;
4633 	__le32 reg1;
4634 };
4635 
4636 struct xstorm_eth_hw_conn_ag_ctx {
4637 	u8 reserved0;
4638 	u8 state;
4639 	u8 flags0;
4640 #define XSTORM_ETH_HW_CONN_AG_CTX_EXIST_IN_QM0_MASK	0x1
4641 #define XSTORM_ETH_HW_CONN_AG_CTX_EXIST_IN_QM0_SHIFT	0
4642 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED1_MASK	0x1
4643 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED1_SHIFT	1
4644 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED2_MASK	0x1
4645 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED2_SHIFT	2
4646 #define XSTORM_ETH_HW_CONN_AG_CTX_EXIST_IN_QM3_MASK	0x1
4647 #define XSTORM_ETH_HW_CONN_AG_CTX_EXIST_IN_QM3_SHIFT	3
4648 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED3_MASK	0x1
4649 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED3_SHIFT	4
4650 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED4_MASK	0x1
4651 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED4_SHIFT	5
4652 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED5_MASK	0x1
4653 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED5_SHIFT	6
4654 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED6_MASK	0x1
4655 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED6_SHIFT	7
4656 	u8 flags1;
4657 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED7_MASK		0x1
4658 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED7_SHIFT		0
4659 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED8_MASK		0x1
4660 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED8_SHIFT		1
4661 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED9_MASK		0x1
4662 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED9_SHIFT		2
4663 #define XSTORM_ETH_HW_CONN_AG_CTX_BIT11_MASK			0x1
4664 #define XSTORM_ETH_HW_CONN_AG_CTX_BIT11_SHIFT		3
4665 #define XSTORM_ETH_HW_CONN_AG_CTX_E5_RESERVED2_MASK		0x1
4666 #define XSTORM_ETH_HW_CONN_AG_CTX_E5_RESERVED2_SHIFT		4
4667 #define XSTORM_ETH_HW_CONN_AG_CTX_E5_RESERVED3_MASK		0x1
4668 #define XSTORM_ETH_HW_CONN_AG_CTX_E5_RESERVED3_SHIFT		5
4669 #define XSTORM_ETH_HW_CONN_AG_CTX_TX_RULE_ACTIVE_MASK	0x1
4670 #define XSTORM_ETH_HW_CONN_AG_CTX_TX_RULE_ACTIVE_SHIFT	6
4671 #define XSTORM_ETH_HW_CONN_AG_CTX_DQ_CF_ACTIVE_MASK		0x1
4672 #define XSTORM_ETH_HW_CONN_AG_CTX_DQ_CF_ACTIVE_SHIFT		7
4673 	u8 flags2;
4674 #define XSTORM_ETH_HW_CONN_AG_CTX_CF0_MASK	0x3
4675 #define XSTORM_ETH_HW_CONN_AG_CTX_CF0_SHIFT	0
4676 #define XSTORM_ETH_HW_CONN_AG_CTX_CF1_MASK	0x3
4677 #define XSTORM_ETH_HW_CONN_AG_CTX_CF1_SHIFT	2
4678 #define XSTORM_ETH_HW_CONN_AG_CTX_CF2_MASK	0x3
4679 #define XSTORM_ETH_HW_CONN_AG_CTX_CF2_SHIFT	4
4680 #define XSTORM_ETH_HW_CONN_AG_CTX_CF3_MASK	0x3
4681 #define XSTORM_ETH_HW_CONN_AG_CTX_CF3_SHIFT	6
4682 	u8 flags3;
4683 #define XSTORM_ETH_HW_CONN_AG_CTX_CF4_MASK	0x3
4684 #define XSTORM_ETH_HW_CONN_AG_CTX_CF4_SHIFT	0
4685 #define XSTORM_ETH_HW_CONN_AG_CTX_CF5_MASK	0x3
4686 #define XSTORM_ETH_HW_CONN_AG_CTX_CF5_SHIFT	2
4687 #define XSTORM_ETH_HW_CONN_AG_CTX_CF6_MASK	0x3
4688 #define XSTORM_ETH_HW_CONN_AG_CTX_CF6_SHIFT	4
4689 #define XSTORM_ETH_HW_CONN_AG_CTX_CF7_MASK	0x3
4690 #define XSTORM_ETH_HW_CONN_AG_CTX_CF7_SHIFT	6
4691 	u8 flags4;
4692 #define XSTORM_ETH_HW_CONN_AG_CTX_CF8_MASK	0x3
4693 #define XSTORM_ETH_HW_CONN_AG_CTX_CF8_SHIFT	0
4694 #define XSTORM_ETH_HW_CONN_AG_CTX_CF9_MASK	0x3
4695 #define XSTORM_ETH_HW_CONN_AG_CTX_CF9_SHIFT	2
4696 #define XSTORM_ETH_HW_CONN_AG_CTX_CF10_MASK	0x3
4697 #define XSTORM_ETH_HW_CONN_AG_CTX_CF10_SHIFT	4
4698 #define XSTORM_ETH_HW_CONN_AG_CTX_CF11_MASK	0x3
4699 #define XSTORM_ETH_HW_CONN_AG_CTX_CF11_SHIFT	6
4700 	u8 flags5;
4701 #define XSTORM_ETH_HW_CONN_AG_CTX_CF12_MASK	0x3
4702 #define XSTORM_ETH_HW_CONN_AG_CTX_CF12_SHIFT	0
4703 #define XSTORM_ETH_HW_CONN_AG_CTX_CF13_MASK	0x3
4704 #define XSTORM_ETH_HW_CONN_AG_CTX_CF13_SHIFT	2
4705 #define XSTORM_ETH_HW_CONN_AG_CTX_CF14_MASK	0x3
4706 #define XSTORM_ETH_HW_CONN_AG_CTX_CF14_SHIFT	4
4707 #define XSTORM_ETH_HW_CONN_AG_CTX_CF15_MASK	0x3
4708 #define XSTORM_ETH_HW_CONN_AG_CTX_CF15_SHIFT	6
4709 	u8 flags6;
4710 #define XSTORM_ETH_HW_CONN_AG_CTX_GO_TO_BD_CONS_CF_MASK	0x3
4711 #define XSTORM_ETH_HW_CONN_AG_CTX_GO_TO_BD_CONS_CF_SHIFT	0
4712 #define XSTORM_ETH_HW_CONN_AG_CTX_MULTI_UNICAST_CF_MASK	0x3
4713 #define XSTORM_ETH_HW_CONN_AG_CTX_MULTI_UNICAST_CF_SHIFT	2
4714 #define XSTORM_ETH_HW_CONN_AG_CTX_DQ_CF_MASK			0x3
4715 #define XSTORM_ETH_HW_CONN_AG_CTX_DQ_CF_SHIFT		4
4716 #define XSTORM_ETH_HW_CONN_AG_CTX_TERMINATE_CF_MASK		0x3
4717 #define XSTORM_ETH_HW_CONN_AG_CTX_TERMINATE_CF_SHIFT		6
4718 	u8 flags7;
4719 #define XSTORM_ETH_HW_CONN_AG_CTX_FLUSH_Q0_MASK	0x3
4720 #define XSTORM_ETH_HW_CONN_AG_CTX_FLUSH_Q0_SHIFT	0
4721 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED10_MASK	0x3
4722 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED10_SHIFT	2
4723 #define XSTORM_ETH_HW_CONN_AG_CTX_SLOW_PATH_MASK	0x3
4724 #define XSTORM_ETH_HW_CONN_AG_CTX_SLOW_PATH_SHIFT	4
4725 #define XSTORM_ETH_HW_CONN_AG_CTX_CF0EN_MASK		0x1
4726 #define XSTORM_ETH_HW_CONN_AG_CTX_CF0EN_SHIFT	6
4727 #define XSTORM_ETH_HW_CONN_AG_CTX_CF1EN_MASK		0x1
4728 #define XSTORM_ETH_HW_CONN_AG_CTX_CF1EN_SHIFT	7
4729 	u8 flags8;
4730 #define XSTORM_ETH_HW_CONN_AG_CTX_CF2EN_MASK		0x1
4731 #define XSTORM_ETH_HW_CONN_AG_CTX_CF2EN_SHIFT	0
4732 #define XSTORM_ETH_HW_CONN_AG_CTX_CF3EN_MASK		0x1
4733 #define XSTORM_ETH_HW_CONN_AG_CTX_CF3EN_SHIFT	1
4734 #define XSTORM_ETH_HW_CONN_AG_CTX_CF4EN_MASK		0x1
4735 #define XSTORM_ETH_HW_CONN_AG_CTX_CF4EN_SHIFT	2
4736 #define XSTORM_ETH_HW_CONN_AG_CTX_CF5EN_MASK		0x1
4737 #define XSTORM_ETH_HW_CONN_AG_CTX_CF5EN_SHIFT	3
4738 #define XSTORM_ETH_HW_CONN_AG_CTX_CF6EN_MASK		0x1
4739 #define XSTORM_ETH_HW_CONN_AG_CTX_CF6EN_SHIFT	4
4740 #define XSTORM_ETH_HW_CONN_AG_CTX_CF7EN_MASK		0x1
4741 #define XSTORM_ETH_HW_CONN_AG_CTX_CF7EN_SHIFT	5
4742 #define XSTORM_ETH_HW_CONN_AG_CTX_CF8EN_MASK		0x1
4743 #define XSTORM_ETH_HW_CONN_AG_CTX_CF8EN_SHIFT	6
4744 #define XSTORM_ETH_HW_CONN_AG_CTX_CF9EN_MASK		0x1
4745 #define XSTORM_ETH_HW_CONN_AG_CTX_CF9EN_SHIFT	7
4746 	u8 flags9;
4747 #define XSTORM_ETH_HW_CONN_AG_CTX_CF10EN_MASK		0x1
4748 #define XSTORM_ETH_HW_CONN_AG_CTX_CF10EN_SHIFT		0
4749 #define XSTORM_ETH_HW_CONN_AG_CTX_CF11EN_MASK		0x1
4750 #define XSTORM_ETH_HW_CONN_AG_CTX_CF11EN_SHIFT		1
4751 #define XSTORM_ETH_HW_CONN_AG_CTX_CF12EN_MASK		0x1
4752 #define XSTORM_ETH_HW_CONN_AG_CTX_CF12EN_SHIFT		2
4753 #define XSTORM_ETH_HW_CONN_AG_CTX_CF13EN_MASK		0x1
4754 #define XSTORM_ETH_HW_CONN_AG_CTX_CF13EN_SHIFT		3
4755 #define XSTORM_ETH_HW_CONN_AG_CTX_CF14EN_MASK		0x1
4756 #define XSTORM_ETH_HW_CONN_AG_CTX_CF14EN_SHIFT		4
4757 #define XSTORM_ETH_HW_CONN_AG_CTX_CF15EN_MASK		0x1
4758 #define XSTORM_ETH_HW_CONN_AG_CTX_CF15EN_SHIFT		5
4759 #define XSTORM_ETH_HW_CONN_AG_CTX_GO_TO_BD_CONS_CF_EN_MASK	0x1
4760 #define XSTORM_ETH_HW_CONN_AG_CTX_GO_TO_BD_CONS_CF_EN_SHIFT	6
4761 #define XSTORM_ETH_HW_CONN_AG_CTX_MULTI_UNICAST_CF_EN_MASK	0x1
4762 #define XSTORM_ETH_HW_CONN_AG_CTX_MULTI_UNICAST_CF_EN_SHIFT	7
4763 	u8 flags10;
4764 #define XSTORM_ETH_HW_CONN_AG_CTX_DQ_CF_EN_MASK			0x1
4765 #define XSTORM_ETH_HW_CONN_AG_CTX_DQ_CF_EN_SHIFT			0
4766 #define XSTORM_ETH_HW_CONN_AG_CTX_TERMINATE_CF_EN_MASK		0x1
4767 #define XSTORM_ETH_HW_CONN_AG_CTX_TERMINATE_CF_EN_SHIFT		1
4768 #define XSTORM_ETH_HW_CONN_AG_CTX_FLUSH_Q0_EN_MASK			0x1
4769 #define XSTORM_ETH_HW_CONN_AG_CTX_FLUSH_Q0_EN_SHIFT			2
4770 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED11_MASK			0x1
4771 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED11_SHIFT			3
4772 #define XSTORM_ETH_HW_CONN_AG_CTX_SLOW_PATH_EN_MASK			0x1
4773 #define XSTORM_ETH_HW_CONN_AG_CTX_SLOW_PATH_EN_SHIFT			4
4774 #define XSTORM_ETH_HW_CONN_AG_CTX_TPH_ENABLE_EN_RESERVED_MASK	0x1
4775 #define XSTORM_ETH_HW_CONN_AG_CTX_TPH_ENABLE_EN_RESERVED_SHIFT	5
4776 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED12_MASK			0x1
4777 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED12_SHIFT			6
4778 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED13_MASK			0x1
4779 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED13_SHIFT			7
4780 	u8 flags11;
4781 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED14_MASK		0x1
4782 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED14_SHIFT		0
4783 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED15_MASK		0x1
4784 #define XSTORM_ETH_HW_CONN_AG_CTX_RESERVED15_SHIFT		1
4785 #define XSTORM_ETH_HW_CONN_AG_CTX_TX_DEC_RULE_EN_MASK	0x1
4786 #define XSTORM_ETH_HW_CONN_AG_CTX_TX_DEC_RULE_EN_SHIFT	2
4787 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE5EN_MASK		0x1
4788 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE5EN_SHIFT		3
4789 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE6EN_MASK		0x1
4790 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE6EN_SHIFT		4
4791 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE7EN_MASK		0x1
4792 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE7EN_SHIFT		5
4793 #define XSTORM_ETH_HW_CONN_AG_CTX_A0_RESERVED1_MASK		0x1
4794 #define XSTORM_ETH_HW_CONN_AG_CTX_A0_RESERVED1_SHIFT		6
4795 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE9EN_MASK		0x1
4796 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE9EN_SHIFT		7
4797 	u8 flags12;
4798 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE10EN_MASK	0x1
4799 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE10EN_SHIFT	0
4800 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE11EN_MASK	0x1
4801 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE11EN_SHIFT	1
4802 #define XSTORM_ETH_HW_CONN_AG_CTX_A0_RESERVED2_MASK	0x1
4803 #define XSTORM_ETH_HW_CONN_AG_CTX_A0_RESERVED2_SHIFT	2
4804 #define XSTORM_ETH_HW_CONN_AG_CTX_A0_RESERVED3_MASK	0x1
4805 #define XSTORM_ETH_HW_CONN_AG_CTX_A0_RESERVED3_SHIFT	3
4806 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE14EN_MASK	0x1
4807 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE14EN_SHIFT	4
4808 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE15EN_MASK	0x1
4809 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE15EN_SHIFT	5
4810 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE16EN_MASK	0x1
4811 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE16EN_SHIFT	6
4812 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE17EN_MASK	0x1
4813 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE17EN_SHIFT	7
4814 	u8 flags13;
4815 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE18EN_MASK	0x1
4816 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE18EN_SHIFT	0
4817 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE19EN_MASK	0x1
4818 #define XSTORM_ETH_HW_CONN_AG_CTX_RULE19EN_SHIFT	1
4819 #define XSTORM_ETH_HW_CONN_AG_CTX_A0_RESERVED4_MASK	0x1
4820 #define XSTORM_ETH_HW_CONN_AG_CTX_A0_RESERVED4_SHIFT	2
4821 #define XSTORM_ETH_HW_CONN_AG_CTX_A0_RESERVED5_MASK	0x1
4822 #define XSTORM_ETH_HW_CONN_AG_CTX_A0_RESERVED5_SHIFT	3
4823 #define XSTORM_ETH_HW_CONN_AG_CTX_A0_RESERVED6_MASK	0x1
4824 #define XSTORM_ETH_HW_CONN_AG_CTX_A0_RESERVED6_SHIFT	4
4825 #define XSTORM_ETH_HW_CONN_AG_CTX_A0_RESERVED7_MASK	0x1
4826 #define XSTORM_ETH_HW_CONN_AG_CTX_A0_RESERVED7_SHIFT	5
4827 #define XSTORM_ETH_HW_CONN_AG_CTX_A0_RESERVED8_MASK	0x1
4828 #define XSTORM_ETH_HW_CONN_AG_CTX_A0_RESERVED8_SHIFT	6
4829 #define XSTORM_ETH_HW_CONN_AG_CTX_A0_RESERVED9_MASK	0x1
4830 #define XSTORM_ETH_HW_CONN_AG_CTX_A0_RESERVED9_SHIFT	7
4831 	u8 flags14;
4832 #define XSTORM_ETH_HW_CONN_AG_CTX_EDPM_USE_EXT_HDR_MASK	0x1
4833 #define XSTORM_ETH_HW_CONN_AG_CTX_EDPM_USE_EXT_HDR_SHIFT	0
4834 #define XSTORM_ETH_HW_CONN_AG_CTX_EDPM_SEND_RAW_L3L4_MASK	0x1
4835 #define XSTORM_ETH_HW_CONN_AG_CTX_EDPM_SEND_RAW_L3L4_SHIFT	1
4836 #define XSTORM_ETH_HW_CONN_AG_CTX_EDPM_INBAND_PROP_HDR_MASK	0x1
4837 #define XSTORM_ETH_HW_CONN_AG_CTX_EDPM_INBAND_PROP_HDR_SHIFT	2
4838 #define XSTORM_ETH_HW_CONN_AG_CTX_EDPM_SEND_EXT_TUNNEL_MASK	0x1
4839 #define XSTORM_ETH_HW_CONN_AG_CTX_EDPM_SEND_EXT_TUNNEL_SHIFT	3
4840 #define XSTORM_ETH_HW_CONN_AG_CTX_L2_EDPM_ENABLE_MASK	0x1
4841 #define XSTORM_ETH_HW_CONN_AG_CTX_L2_EDPM_ENABLE_SHIFT	4
4842 #define XSTORM_ETH_HW_CONN_AG_CTX_ROCE_EDPM_ENABLE_MASK	0x1
4843 #define XSTORM_ETH_HW_CONN_AG_CTX_ROCE_EDPM_ENABLE_SHIFT	5
4844 #define XSTORM_ETH_HW_CONN_AG_CTX_TPH_ENABLE_MASK		0x3
4845 #define XSTORM_ETH_HW_CONN_AG_CTX_TPH_ENABLE_SHIFT		6
4846 	u8 edpm_event_id;
4847 	__le16 physical_q0;
4848 	__le16 e5_reserved1;
4849 	__le16 edpm_num_bds;
4850 	__le16 tx_bd_cons;
4851 	__le16 tx_bd_prod;
4852 	__le16 updated_qm_pq_id;
4853 	__le16 conn_dpi;
4854 };
4855 
4856 /* GFT CAM line struct with fields breakout */
4857 struct gft_cam_line_mapped {
4858 	__le32 camline;
4859 #define GFT_CAM_LINE_MAPPED_VALID_MASK				0x1
4860 #define GFT_CAM_LINE_MAPPED_VALID_SHIFT				0
4861 #define GFT_CAM_LINE_MAPPED_IP_VERSION_MASK			0x1
4862 #define GFT_CAM_LINE_MAPPED_IP_VERSION_SHIFT			1
4863 #define GFT_CAM_LINE_MAPPED_TUNNEL_IP_VERSION_MASK		0x1
4864 #define GFT_CAM_LINE_MAPPED_TUNNEL_IP_VERSION_SHIFT		2
4865 #define GFT_CAM_LINE_MAPPED_UPPER_PROTOCOL_TYPE_MASK		0xF
4866 #define GFT_CAM_LINE_MAPPED_UPPER_PROTOCOL_TYPE_SHIFT		3
4867 #define GFT_CAM_LINE_MAPPED_TUNNEL_TYPE_MASK			0xF
4868 #define GFT_CAM_LINE_MAPPED_TUNNEL_TYPE_SHIFT			7
4869 #define GFT_CAM_LINE_MAPPED_PF_ID_MASK				0xF
4870 #define GFT_CAM_LINE_MAPPED_PF_ID_SHIFT				11
4871 #define GFT_CAM_LINE_MAPPED_IP_VERSION_MASK_MASK		0x1
4872 #define GFT_CAM_LINE_MAPPED_IP_VERSION_MASK_SHIFT		15
4873 #define GFT_CAM_LINE_MAPPED_TUNNEL_IP_VERSION_MASK_MASK		0x1
4874 #define GFT_CAM_LINE_MAPPED_TUNNEL_IP_VERSION_MASK_SHIFT	16
4875 #define GFT_CAM_LINE_MAPPED_UPPER_PROTOCOL_TYPE_MASK_MASK	0xF
4876 #define GFT_CAM_LINE_MAPPED_UPPER_PROTOCOL_TYPE_MASK_SHIFT	17
4877 #define GFT_CAM_LINE_MAPPED_TUNNEL_TYPE_MASK_MASK		0xF
4878 #define GFT_CAM_LINE_MAPPED_TUNNEL_TYPE_MASK_SHIFT		21
4879 #define GFT_CAM_LINE_MAPPED_PF_ID_MASK_MASK			0xF
4880 #define GFT_CAM_LINE_MAPPED_PF_ID_MASK_SHIFT			25
4881 #define GFT_CAM_LINE_MAPPED_RESERVED1_MASK			0x7
4882 #define GFT_CAM_LINE_MAPPED_RESERVED1_SHIFT			29
4883 };
4884 
4885 /* Used in gft_profile_key: Indication for ip version */
4886 enum gft_profile_ip_version {
4887 	GFT_PROFILE_IPV4 = 0,
4888 	GFT_PROFILE_IPV6 = 1,
4889 	MAX_GFT_PROFILE_IP_VERSION
4890 };
4891 
4892 /* Profile key stucr fot GFT logic in Prs */
4893 struct gft_profile_key {
4894 	__le16 profile_key;
4895 #define GFT_PROFILE_KEY_IP_VERSION_MASK			0x1
4896 #define GFT_PROFILE_KEY_IP_VERSION_SHIFT		0
4897 #define GFT_PROFILE_KEY_TUNNEL_IP_VERSION_MASK		0x1
4898 #define GFT_PROFILE_KEY_TUNNEL_IP_VERSION_SHIFT		1
4899 #define GFT_PROFILE_KEY_UPPER_PROTOCOL_TYPE_MASK	0xF
4900 #define GFT_PROFILE_KEY_UPPER_PROTOCOL_TYPE_SHIFT	2
4901 #define GFT_PROFILE_KEY_TUNNEL_TYPE_MASK		0xF
4902 #define GFT_PROFILE_KEY_TUNNEL_TYPE_SHIFT		6
4903 #define GFT_PROFILE_KEY_PF_ID_MASK			0xF
4904 #define GFT_PROFILE_KEY_PF_ID_SHIFT			10
4905 #define GFT_PROFILE_KEY_RESERVED0_MASK			0x3
4906 #define GFT_PROFILE_KEY_RESERVED0_SHIFT			14
4907 };
4908 
4909 /* Used in gft_profile_key: Indication for tunnel type */
4910 enum gft_profile_tunnel_type {
4911 	GFT_PROFILE_NO_TUNNEL = 0,
4912 	GFT_PROFILE_VXLAN_TUNNEL = 1,
4913 	GFT_PROFILE_GRE_MAC_OR_NVGRE_TUNNEL = 2,
4914 	GFT_PROFILE_GRE_IP_TUNNEL = 3,
4915 	GFT_PROFILE_GENEVE_MAC_TUNNEL = 4,
4916 	GFT_PROFILE_GENEVE_IP_TUNNEL = 5,
4917 	MAX_GFT_PROFILE_TUNNEL_TYPE
4918 };
4919 
4920 /* Used in gft_profile_key: Indication for protocol type */
4921 enum gft_profile_upper_protocol_type {
4922 	GFT_PROFILE_ROCE_PROTOCOL = 0,
4923 	GFT_PROFILE_RROCE_PROTOCOL = 1,
4924 	GFT_PROFILE_FCOE_PROTOCOL = 2,
4925 	GFT_PROFILE_ICMP_PROTOCOL = 3,
4926 	GFT_PROFILE_ARP_PROTOCOL = 4,
4927 	GFT_PROFILE_USER_TCP_SRC_PORT_1_INNER = 5,
4928 	GFT_PROFILE_USER_TCP_DST_PORT_1_INNER = 6,
4929 	GFT_PROFILE_TCP_PROTOCOL = 7,
4930 	GFT_PROFILE_USER_UDP_DST_PORT_1_INNER = 8,
4931 	GFT_PROFILE_USER_UDP_DST_PORT_2_OUTER = 9,
4932 	GFT_PROFILE_UDP_PROTOCOL = 10,
4933 	GFT_PROFILE_USER_IP_1_INNER = 11,
4934 	GFT_PROFILE_USER_IP_2_OUTER = 12,
4935 	GFT_PROFILE_USER_ETH_1_INNER = 13,
4936 	GFT_PROFILE_USER_ETH_2_OUTER = 14,
4937 	GFT_PROFILE_RAW = 15,
4938 	MAX_GFT_PROFILE_UPPER_PROTOCOL_TYPE
4939 };
4940 
4941 /* GFT RAM line struct */
4942 struct gft_ram_line {
4943 	__le32 lo;
4944 #define GFT_RAM_LINE_VLAN_SELECT_MASK			0x3
4945 #define GFT_RAM_LINE_VLAN_SELECT_SHIFT			0
4946 #define GFT_RAM_LINE_TUNNEL_ENTROPHY_MASK		0x1
4947 #define GFT_RAM_LINE_TUNNEL_ENTROPHY_SHIFT		2
4948 #define GFT_RAM_LINE_TUNNEL_TTL_EQUAL_ONE_MASK		0x1
4949 #define GFT_RAM_LINE_TUNNEL_TTL_EQUAL_ONE_SHIFT		3
4950 #define GFT_RAM_LINE_TUNNEL_TTL_MASK			0x1
4951 #define GFT_RAM_LINE_TUNNEL_TTL_SHIFT			4
4952 #define GFT_RAM_LINE_TUNNEL_ETHERTYPE_MASK		0x1
4953 #define GFT_RAM_LINE_TUNNEL_ETHERTYPE_SHIFT		5
4954 #define GFT_RAM_LINE_TUNNEL_DST_PORT_MASK		0x1
4955 #define GFT_RAM_LINE_TUNNEL_DST_PORT_SHIFT		6
4956 #define GFT_RAM_LINE_TUNNEL_SRC_PORT_MASK		0x1
4957 #define GFT_RAM_LINE_TUNNEL_SRC_PORT_SHIFT		7
4958 #define GFT_RAM_LINE_TUNNEL_DSCP_MASK			0x1
4959 #define GFT_RAM_LINE_TUNNEL_DSCP_SHIFT			8
4960 #define GFT_RAM_LINE_TUNNEL_OVER_IP_PROTOCOL_MASK	0x1
4961 #define GFT_RAM_LINE_TUNNEL_OVER_IP_PROTOCOL_SHIFT	9
4962 #define GFT_RAM_LINE_TUNNEL_DST_IP_MASK			0x1
4963 #define GFT_RAM_LINE_TUNNEL_DST_IP_SHIFT		10
4964 #define GFT_RAM_LINE_TUNNEL_SRC_IP_MASK			0x1
4965 #define GFT_RAM_LINE_TUNNEL_SRC_IP_SHIFT		11
4966 #define GFT_RAM_LINE_TUNNEL_PRIORITY_MASK		0x1
4967 #define GFT_RAM_LINE_TUNNEL_PRIORITY_SHIFT		12
4968 #define GFT_RAM_LINE_TUNNEL_PROVIDER_VLAN_MASK		0x1
4969 #define GFT_RAM_LINE_TUNNEL_PROVIDER_VLAN_SHIFT		13
4970 #define GFT_RAM_LINE_TUNNEL_VLAN_MASK			0x1
4971 #define GFT_RAM_LINE_TUNNEL_VLAN_SHIFT			14
4972 #define GFT_RAM_LINE_TUNNEL_DST_MAC_MASK		0x1
4973 #define GFT_RAM_LINE_TUNNEL_DST_MAC_SHIFT		15
4974 #define GFT_RAM_LINE_TUNNEL_SRC_MAC_MASK		0x1
4975 #define GFT_RAM_LINE_TUNNEL_SRC_MAC_SHIFT		16
4976 #define GFT_RAM_LINE_TTL_EQUAL_ONE_MASK			0x1
4977 #define GFT_RAM_LINE_TTL_EQUAL_ONE_SHIFT		17
4978 #define GFT_RAM_LINE_TTL_MASK				0x1
4979 #define GFT_RAM_LINE_TTL_SHIFT				18
4980 #define GFT_RAM_LINE_ETHERTYPE_MASK			0x1
4981 #define GFT_RAM_LINE_ETHERTYPE_SHIFT			19
4982 #define GFT_RAM_LINE_RESERVED0_MASK			0x1
4983 #define GFT_RAM_LINE_RESERVED0_SHIFT			20
4984 #define GFT_RAM_LINE_TCP_FLAG_FIN_MASK			0x1
4985 #define GFT_RAM_LINE_TCP_FLAG_FIN_SHIFT			21
4986 #define GFT_RAM_LINE_TCP_FLAG_SYN_MASK			0x1
4987 #define GFT_RAM_LINE_TCP_FLAG_SYN_SHIFT			22
4988 #define GFT_RAM_LINE_TCP_FLAG_RST_MASK			0x1
4989 #define GFT_RAM_LINE_TCP_FLAG_RST_SHIFT			23
4990 #define GFT_RAM_LINE_TCP_FLAG_PSH_MASK			0x1
4991 #define GFT_RAM_LINE_TCP_FLAG_PSH_SHIFT			24
4992 #define GFT_RAM_LINE_TCP_FLAG_ACK_MASK			0x1
4993 #define GFT_RAM_LINE_TCP_FLAG_ACK_SHIFT			25
4994 #define GFT_RAM_LINE_TCP_FLAG_URG_MASK			0x1
4995 #define GFT_RAM_LINE_TCP_FLAG_URG_SHIFT			26
4996 #define GFT_RAM_LINE_TCP_FLAG_ECE_MASK			0x1
4997 #define GFT_RAM_LINE_TCP_FLAG_ECE_SHIFT			27
4998 #define GFT_RAM_LINE_TCP_FLAG_CWR_MASK			0x1
4999 #define GFT_RAM_LINE_TCP_FLAG_CWR_SHIFT			28
5000 #define GFT_RAM_LINE_TCP_FLAG_NS_MASK			0x1
5001 #define GFT_RAM_LINE_TCP_FLAG_NS_SHIFT			29
5002 #define GFT_RAM_LINE_DST_PORT_MASK			0x1
5003 #define GFT_RAM_LINE_DST_PORT_SHIFT			30
5004 #define GFT_RAM_LINE_SRC_PORT_MASK			0x1
5005 #define GFT_RAM_LINE_SRC_PORT_SHIFT			31
5006 	__le32 hi;
5007 #define GFT_RAM_LINE_DSCP_MASK				0x1
5008 #define GFT_RAM_LINE_DSCP_SHIFT				0
5009 #define GFT_RAM_LINE_OVER_IP_PROTOCOL_MASK		0x1
5010 #define GFT_RAM_LINE_OVER_IP_PROTOCOL_SHIFT		1
5011 #define GFT_RAM_LINE_DST_IP_MASK			0x1
5012 #define GFT_RAM_LINE_DST_IP_SHIFT			2
5013 #define GFT_RAM_LINE_SRC_IP_MASK			0x1
5014 #define GFT_RAM_LINE_SRC_IP_SHIFT			3
5015 #define GFT_RAM_LINE_PRIORITY_MASK			0x1
5016 #define GFT_RAM_LINE_PRIORITY_SHIFT			4
5017 #define GFT_RAM_LINE_PROVIDER_VLAN_MASK			0x1
5018 #define GFT_RAM_LINE_PROVIDER_VLAN_SHIFT		5
5019 #define GFT_RAM_LINE_VLAN_MASK				0x1
5020 #define GFT_RAM_LINE_VLAN_SHIFT				6
5021 #define GFT_RAM_LINE_DST_MAC_MASK			0x1
5022 #define GFT_RAM_LINE_DST_MAC_SHIFT			7
5023 #define GFT_RAM_LINE_SRC_MAC_MASK			0x1
5024 #define GFT_RAM_LINE_SRC_MAC_SHIFT			8
5025 #define GFT_RAM_LINE_TENANT_ID_MASK			0x1
5026 #define GFT_RAM_LINE_TENANT_ID_SHIFT			9
5027 #define GFT_RAM_LINE_RESERVED1_MASK			0x3FFFFF
5028 #define GFT_RAM_LINE_RESERVED1_SHIFT			10
5029 };
5030 
5031 /* Used in the first 2 bits for gft_ram_line: Indication for vlan mask */
5032 enum gft_vlan_select {
5033 	INNER_PROVIDER_VLAN = 0,
5034 	INNER_VLAN = 1,
5035 	OUTER_PROVIDER_VLAN = 2,
5036 	OUTER_VLAN = 3,
5037 	MAX_GFT_VLAN_SELECT
5038 };
5039 
5040 /* The rdma task context of Mstorm */
5041 struct ystorm_rdma_task_st_ctx {
5042 	struct regpair temp[4];
5043 };
5044 
5045 struct ystorm_rdma_task_ag_ctx {
5046 	u8 reserved;
5047 	u8 byte1;
5048 	__le16 msem_ctx_upd_seq;
5049 	u8 flags0;
5050 #define YSTORM_RDMA_TASK_AG_CTX_CONNECTION_TYPE_MASK		0xF
5051 #define YSTORM_RDMA_TASK_AG_CTX_CONNECTION_TYPE_SHIFT	0
5052 #define YSTORM_RDMA_TASK_AG_CTX_EXIST_IN_QM0_MASK		0x1
5053 #define YSTORM_RDMA_TASK_AG_CTX_EXIST_IN_QM0_SHIFT		4
5054 #define YSTORM_RDMA_TASK_AG_CTX_BIT1_MASK			0x1
5055 #define YSTORM_RDMA_TASK_AG_CTX_BIT1_SHIFT			5
5056 #define YSTORM_RDMA_TASK_AG_CTX_VALID_MASK			0x1
5057 #define YSTORM_RDMA_TASK_AG_CTX_VALID_SHIFT			6
5058 #define YSTORM_RDMA_TASK_AG_CTX_DIF_FIRST_IO_MASK		0x1
5059 #define YSTORM_RDMA_TASK_AG_CTX_DIF_FIRST_IO_SHIFT		7
5060 	u8 flags1;
5061 #define YSTORM_RDMA_TASK_AG_CTX_CF0_MASK		0x3
5062 #define YSTORM_RDMA_TASK_AG_CTX_CF0_SHIFT		0
5063 #define YSTORM_RDMA_TASK_AG_CTX_CF1_MASK		0x3
5064 #define YSTORM_RDMA_TASK_AG_CTX_CF1_SHIFT		2
5065 #define YSTORM_RDMA_TASK_AG_CTX_CF2SPECIAL_MASK	0x3
5066 #define YSTORM_RDMA_TASK_AG_CTX_CF2SPECIAL_SHIFT	4
5067 #define YSTORM_RDMA_TASK_AG_CTX_CF0EN_MASK		0x1
5068 #define YSTORM_RDMA_TASK_AG_CTX_CF0EN_SHIFT		6
5069 #define YSTORM_RDMA_TASK_AG_CTX_CF1EN_MASK		0x1
5070 #define YSTORM_RDMA_TASK_AG_CTX_CF1EN_SHIFT		7
5071 	u8 flags2;
5072 #define YSTORM_RDMA_TASK_AG_CTX_BIT4_MASK		0x1
5073 #define YSTORM_RDMA_TASK_AG_CTX_BIT4_SHIFT		0
5074 #define YSTORM_RDMA_TASK_AG_CTX_RULE0EN_MASK		0x1
5075 #define YSTORM_RDMA_TASK_AG_CTX_RULE0EN_SHIFT	1
5076 #define YSTORM_RDMA_TASK_AG_CTX_RULE1EN_MASK		0x1
5077 #define YSTORM_RDMA_TASK_AG_CTX_RULE1EN_SHIFT	2
5078 #define YSTORM_RDMA_TASK_AG_CTX_RULE2EN_MASK		0x1
5079 #define YSTORM_RDMA_TASK_AG_CTX_RULE2EN_SHIFT	3
5080 #define YSTORM_RDMA_TASK_AG_CTX_RULE3EN_MASK		0x1
5081 #define YSTORM_RDMA_TASK_AG_CTX_RULE3EN_SHIFT	4
5082 #define YSTORM_RDMA_TASK_AG_CTX_RULE4EN_MASK		0x1
5083 #define YSTORM_RDMA_TASK_AG_CTX_RULE4EN_SHIFT	5
5084 #define YSTORM_RDMA_TASK_AG_CTX_RULE5EN_MASK		0x1
5085 #define YSTORM_RDMA_TASK_AG_CTX_RULE5EN_SHIFT	6
5086 #define YSTORM_RDMA_TASK_AG_CTX_RULE6EN_MASK		0x1
5087 #define YSTORM_RDMA_TASK_AG_CTX_RULE6EN_SHIFT	7
5088 	u8 key;
5089 	__le32 mw_cnt_or_qp_id;
5090 	u8 ref_cnt_seq;
5091 	u8 ctx_upd_seq;
5092 	__le16 dif_flags;
5093 	__le16 tx_ref_count;
5094 	__le16 last_used_ltid;
5095 	__le16 parent_mr_lo;
5096 	__le16 parent_mr_hi;
5097 	__le32 fbo_lo;
5098 	__le32 fbo_hi;
5099 };
5100 
5101 struct mstorm_rdma_task_ag_ctx {
5102 	u8 reserved;
5103 	u8 byte1;
5104 	__le16 icid;
5105 	u8 flags0;
5106 #define MSTORM_RDMA_TASK_AG_CTX_CONNECTION_TYPE_MASK		0xF
5107 #define MSTORM_RDMA_TASK_AG_CTX_CONNECTION_TYPE_SHIFT	0
5108 #define MSTORM_RDMA_TASK_AG_CTX_EXIST_IN_QM0_MASK		0x1
5109 #define MSTORM_RDMA_TASK_AG_CTX_EXIST_IN_QM0_SHIFT		4
5110 #define MSTORM_RDMA_TASK_AG_CTX_BIT1_MASK			0x1
5111 #define MSTORM_RDMA_TASK_AG_CTX_BIT1_SHIFT			5
5112 #define MSTORM_RDMA_TASK_AG_CTX_BIT2_MASK			0x1
5113 #define MSTORM_RDMA_TASK_AG_CTX_BIT2_SHIFT			6
5114 #define MSTORM_RDMA_TASK_AG_CTX_DIF_FIRST_IO_MASK		0x1
5115 #define MSTORM_RDMA_TASK_AG_CTX_DIF_FIRST_IO_SHIFT		7
5116 	u8 flags1;
5117 #define MSTORM_RDMA_TASK_AG_CTX_CF0_MASK	0x3
5118 #define MSTORM_RDMA_TASK_AG_CTX_CF0_SHIFT	0
5119 #define MSTORM_RDMA_TASK_AG_CTX_CF1_MASK	0x3
5120 #define MSTORM_RDMA_TASK_AG_CTX_CF1_SHIFT	2
5121 #define MSTORM_RDMA_TASK_AG_CTX_CF2_MASK	0x3
5122 #define MSTORM_RDMA_TASK_AG_CTX_CF2_SHIFT	4
5123 #define MSTORM_RDMA_TASK_AG_CTX_CF0EN_MASK	0x1
5124 #define MSTORM_RDMA_TASK_AG_CTX_CF0EN_SHIFT	6
5125 #define MSTORM_RDMA_TASK_AG_CTX_CF1EN_MASK	0x1
5126 #define MSTORM_RDMA_TASK_AG_CTX_CF1EN_SHIFT	7
5127 	u8 flags2;
5128 #define MSTORM_RDMA_TASK_AG_CTX_CF2EN_MASK		0x1
5129 #define MSTORM_RDMA_TASK_AG_CTX_CF2EN_SHIFT		0
5130 #define MSTORM_RDMA_TASK_AG_CTX_RULE0EN_MASK		0x1
5131 #define MSTORM_RDMA_TASK_AG_CTX_RULE0EN_SHIFT	1
5132 #define MSTORM_RDMA_TASK_AG_CTX_RULE1EN_MASK		0x1
5133 #define MSTORM_RDMA_TASK_AG_CTX_RULE1EN_SHIFT	2
5134 #define MSTORM_RDMA_TASK_AG_CTX_RULE2EN_MASK		0x1
5135 #define MSTORM_RDMA_TASK_AG_CTX_RULE2EN_SHIFT	3
5136 #define MSTORM_RDMA_TASK_AG_CTX_RULE3EN_MASK		0x1
5137 #define MSTORM_RDMA_TASK_AG_CTX_RULE3EN_SHIFT	4
5138 #define MSTORM_RDMA_TASK_AG_CTX_RULE4EN_MASK		0x1
5139 #define MSTORM_RDMA_TASK_AG_CTX_RULE4EN_SHIFT	5
5140 #define MSTORM_RDMA_TASK_AG_CTX_RULE5EN_MASK		0x1
5141 #define MSTORM_RDMA_TASK_AG_CTX_RULE5EN_SHIFT	6
5142 #define MSTORM_RDMA_TASK_AG_CTX_RULE6EN_MASK		0x1
5143 #define MSTORM_RDMA_TASK_AG_CTX_RULE6EN_SHIFT	7
5144 	u8 key;
5145 	__le32 mw_cnt_or_qp_id;
5146 	u8 ref_cnt_seq;
5147 	u8 ctx_upd_seq;
5148 	__le16 dif_flags;
5149 	__le16 tx_ref_count;
5150 	__le16 last_used_ltid;
5151 	__le16 parent_mr_lo;
5152 	__le16 parent_mr_hi;
5153 	__le32 fbo_lo;
5154 	__le32 fbo_hi;
5155 };
5156 
5157 /* The roce task context of Mstorm */
5158 struct mstorm_rdma_task_st_ctx {
5159 	struct regpair temp[4];
5160 };
5161 
5162 /* The roce task context of Ustorm */
5163 struct ustorm_rdma_task_st_ctx {
5164 	struct regpair temp[6];
5165 };
5166 
5167 struct ustorm_rdma_task_ag_ctx {
5168 	u8 reserved;
5169 	u8 state;
5170 	__le16 icid;
5171 	u8 flags0;
5172 #define USTORM_RDMA_TASK_AG_CTX_CONNECTION_TYPE_MASK		0xF
5173 #define USTORM_RDMA_TASK_AG_CTX_CONNECTION_TYPE_SHIFT	0
5174 #define USTORM_RDMA_TASK_AG_CTX_EXIST_IN_QM0_MASK		0x1
5175 #define USTORM_RDMA_TASK_AG_CTX_EXIST_IN_QM0_SHIFT		4
5176 #define USTORM_RDMA_TASK_AG_CTX_BIT1_MASK			0x1
5177 #define USTORM_RDMA_TASK_AG_CTX_BIT1_SHIFT			5
5178 #define USTORM_RDMA_TASK_AG_CTX_DIF_WRITE_RESULT_CF_MASK	0x3
5179 #define USTORM_RDMA_TASK_AG_CTX_DIF_WRITE_RESULT_CF_SHIFT	6
5180 	u8 flags1;
5181 #define USTORM_RDMA_TASK_AG_CTX_DIF_RESULT_TOGGLE_BIT_MASK	0x3
5182 #define USTORM_RDMA_TASK_AG_CTX_DIF_RESULT_TOGGLE_BIT_SHIFT	0
5183 #define USTORM_RDMA_TASK_AG_CTX_DIF_TX_IO_FLG_MASK		0x3
5184 #define USTORM_RDMA_TASK_AG_CTX_DIF_TX_IO_FLG_SHIFT		2
5185 #define USTORM_RDMA_TASK_AG_CTX_DIF_BLOCK_SIZE_MASK          0x3
5186 #define USTORM_RDMA_TASK_AG_CTX_DIF_BLOCK_SIZE_SHIFT         4
5187 #define USTORM_RDMA_TASK_AG_CTX_DIF_ERROR_CF_MASK		0x3
5188 #define USTORM_RDMA_TASK_AG_CTX_DIF_ERROR_CF_SHIFT		6
5189 	u8 flags2;
5190 #define USTORM_RDMA_TASK_AG_CTX_DIF_WRITE_RESULT_CF_EN_MASK	0x1
5191 #define USTORM_RDMA_TASK_AG_CTX_DIF_WRITE_RESULT_CF_EN_SHIFT	0
5192 #define USTORM_RDMA_TASK_AG_CTX_RESERVED2_MASK		0x1
5193 #define USTORM_RDMA_TASK_AG_CTX_RESERVED2_SHIFT		1
5194 #define USTORM_RDMA_TASK_AG_CTX_RESERVED3_MASK		0x1
5195 #define USTORM_RDMA_TASK_AG_CTX_RESERVED3_SHIFT		2
5196 #define USTORM_RDMA_TASK_AG_CTX_RESERVED4_MASK               0x1
5197 #define USTORM_RDMA_TASK_AG_CTX_RESERVED4_SHIFT              3
5198 #define USTORM_RDMA_TASK_AG_CTX_DIF_ERROR_CF_EN_MASK		0x1
5199 #define USTORM_RDMA_TASK_AG_CTX_DIF_ERROR_CF_EN_SHIFT	4
5200 #define USTORM_RDMA_TASK_AG_CTX_RULE0EN_MASK			0x1
5201 #define USTORM_RDMA_TASK_AG_CTX_RULE0EN_SHIFT		5
5202 #define USTORM_RDMA_TASK_AG_CTX_RULE1EN_MASK			0x1
5203 #define USTORM_RDMA_TASK_AG_CTX_RULE1EN_SHIFT		6
5204 #define USTORM_RDMA_TASK_AG_CTX_RULE2EN_MASK			0x1
5205 #define USTORM_RDMA_TASK_AG_CTX_RULE2EN_SHIFT		7
5206 	u8 flags3;
5207 #define USTORM_RDMA_TASK_AG_CTX_DIF_RXMIT_PROD_CONS_EN_MASK	0x1
5208 #define USTORM_RDMA_TASK_AG_CTX_DIF_RXMIT_PROD_CONS_EN_SHIFT	0
5209 #define USTORM_RDMA_TASK_AG_CTX_RULE4EN_MASK			0x1
5210 #define USTORM_RDMA_TASK_AG_CTX_RULE4EN_SHIFT		1
5211 #define USTORM_RDMA_TASK_AG_CTX_DIF_WRITE_PROD_CONS_EN_MASK	0x1
5212 #define USTORM_RDMA_TASK_AG_CTX_DIF_WRITE_PROD_CONS_EN_SHIFT	2
5213 #define USTORM_RDMA_TASK_AG_CTX_RULE6EN_MASK			0x1
5214 #define USTORM_RDMA_TASK_AG_CTX_RULE6EN_SHIFT		3
5215 #define USTORM_RDMA_TASK_AG_CTX_DIF_ERROR_TYPE_MASK		0xF
5216 #define USTORM_RDMA_TASK_AG_CTX_DIF_ERROR_TYPE_SHIFT		4
5217 	__le32 dif_err_intervals;
5218 	__le32 dif_error_1st_interval;
5219 	__le32 dif_rxmit_cons;
5220 	__le32 dif_rxmit_prod;
5221 	__le32 sge_index;
5222 	__le32 sq_cons;
5223 	u8 byte2;
5224 	u8 byte3;
5225 	__le16 dif_write_cons;
5226 	__le16 dif_write_prod;
5227 	__le16 word3;
5228 	__le32 dif_error_buffer_address_lo;
5229 	__le32 dif_error_buffer_address_hi;
5230 };
5231 
5232 /* RDMA task context */
5233 struct rdma_task_context {
5234 	struct ystorm_rdma_task_st_ctx ystorm_st_context;
5235 	struct ystorm_rdma_task_ag_ctx ystorm_ag_context;
5236 	struct tdif_task_context tdif_context;
5237 	struct mstorm_rdma_task_ag_ctx mstorm_ag_context;
5238 	struct mstorm_rdma_task_st_ctx mstorm_st_context;
5239 	struct rdif_task_context rdif_context;
5240 	struct ustorm_rdma_task_st_ctx ustorm_st_context;
5241 	struct regpair ustorm_st_padding[2];
5242 	struct ustorm_rdma_task_ag_ctx ustorm_ag_context;
5243 };
5244 
5245 #define TOE_MAX_RAMROD_PER_PF			8
5246 #define TOE_TX_PAGE_SIZE_BYTES			4096
5247 #define TOE_GRQ_PAGE_SIZE_BYTES			4096
5248 #define TOE_RX_CQ_PAGE_SIZE_BYTES		4096
5249 
5250 #define TOE_RX_MAX_RSS_CHAINS			64
5251 #define TOE_TX_MAX_TSS_CHAINS			64
5252 #define TOE_RSS_INDIRECTION_TABLE_SIZE		128
5253 
5254 /* The toe storm context of Mstorm */
5255 struct mstorm_toe_conn_st_ctx {
5256 	__le32 reserved[24];
5257 };
5258 
5259 /* The toe storm context of Pstorm */
5260 struct pstorm_toe_conn_st_ctx {
5261 	__le32 reserved[36];
5262 };
5263 
5264 /* The toe storm context of Ystorm */
5265 struct ystorm_toe_conn_st_ctx {
5266 	__le32 reserved[8];
5267 };
5268 
5269 /* The toe storm context of Xstorm */
5270 struct xstorm_toe_conn_st_ctx {
5271 	__le32 reserved[44];
5272 };
5273 
5274 struct ystorm_toe_conn_ag_ctx {
5275 	u8 byte0;
5276 	u8 byte1;
5277 	u8 flags0;
5278 #define YSTORM_TOE_CONN_AG_CTX_EXIST_IN_QM0_MASK		0x1
5279 #define YSTORM_TOE_CONN_AG_CTX_EXIST_IN_QM0_SHIFT		0
5280 #define YSTORM_TOE_CONN_AG_CTX_BIT1_MASK			0x1
5281 #define YSTORM_TOE_CONN_AG_CTX_BIT1_SHIFT			1
5282 #define YSTORM_TOE_CONN_AG_CTX_SLOW_PATH_CF_MASK		0x3
5283 #define YSTORM_TOE_CONN_AG_CTX_SLOW_PATH_CF_SHIFT		2
5284 #define YSTORM_TOE_CONN_AG_CTX_RESET_RECEIVED_CF_MASK		0x3
5285 #define YSTORM_TOE_CONN_AG_CTX_RESET_RECEIVED_CF_SHIFT		4
5286 #define YSTORM_TOE_CONN_AG_CTX_CF2_MASK				0x3
5287 #define YSTORM_TOE_CONN_AG_CTX_CF2_SHIFT			6
5288 	u8 flags1;
5289 #define YSTORM_TOE_CONN_AG_CTX_SLOW_PATH_CF_EN_MASK		0x1
5290 #define YSTORM_TOE_CONN_AG_CTX_SLOW_PATH_CF_EN_SHIFT		0
5291 #define YSTORM_TOE_CONN_AG_CTX_RESET_RECEIVED_CF_EN_MASK	0x1
5292 #define YSTORM_TOE_CONN_AG_CTX_RESET_RECEIVED_CF_EN_SHIFT	1
5293 #define YSTORM_TOE_CONN_AG_CTX_CF2EN_MASK			0x1
5294 #define YSTORM_TOE_CONN_AG_CTX_CF2EN_SHIFT			2
5295 #define YSTORM_TOE_CONN_AG_CTX_REL_SEQ_EN_MASK			0x1
5296 #define YSTORM_TOE_CONN_AG_CTX_REL_SEQ_EN_SHIFT			3
5297 #define YSTORM_TOE_CONN_AG_CTX_RULE1EN_MASK			0x1
5298 #define YSTORM_TOE_CONN_AG_CTX_RULE1EN_SHIFT			4
5299 #define YSTORM_TOE_CONN_AG_CTX_RULE2EN_MASK			0x1
5300 #define YSTORM_TOE_CONN_AG_CTX_RULE2EN_SHIFT			5
5301 #define YSTORM_TOE_CONN_AG_CTX_RULE3EN_MASK			0x1
5302 #define YSTORM_TOE_CONN_AG_CTX_RULE3EN_SHIFT			6
5303 #define YSTORM_TOE_CONN_AG_CTX_CONS_PROD_EN_MASK		0x1
5304 #define YSTORM_TOE_CONN_AG_CTX_CONS_PROD_EN_SHIFT		7
5305 	u8 completion_opcode;
5306 	u8 byte3;
5307 	__le16 word0;
5308 	__le32 rel_seq;
5309 	__le32 rel_seq_threshold;
5310 	__le16 app_prod;
5311 	__le16 app_cons;
5312 	__le16 word3;
5313 	__le16 word4;
5314 	__le32 reg2;
5315 	__le32 reg3;
5316 };
5317 
5318 struct xstorm_toe_conn_ag_ctx {
5319 	u8 reserved0;
5320 	u8 state;
5321 	u8 flags0;
5322 #define XSTORM_TOE_CONN_AG_CTX_EXIST_IN_QM0_MASK		0x1
5323 #define XSTORM_TOE_CONN_AG_CTX_EXIST_IN_QM0_SHIFT		0
5324 #define XSTORM_TOE_CONN_AG_CTX_EXIST_IN_QM1_MASK		0x1
5325 #define XSTORM_TOE_CONN_AG_CTX_EXIST_IN_QM1_SHIFT		1
5326 #define XSTORM_TOE_CONN_AG_CTX_RESERVED1_MASK			0x1
5327 #define XSTORM_TOE_CONN_AG_CTX_RESERVED1_SHIFT			2
5328 #define XSTORM_TOE_CONN_AG_CTX_EXIST_IN_QM3_MASK		0x1
5329 #define XSTORM_TOE_CONN_AG_CTX_EXIST_IN_QM3_SHIFT		3
5330 #define XSTORM_TOE_CONN_AG_CTX_TX_DEC_RULE_RES_MASK		0x1
5331 #define XSTORM_TOE_CONN_AG_CTX_TX_DEC_RULE_RES_SHIFT		4
5332 #define XSTORM_TOE_CONN_AG_CTX_RESERVED2_MASK			0x1
5333 #define XSTORM_TOE_CONN_AG_CTX_RESERVED2_SHIFT			5
5334 #define XSTORM_TOE_CONN_AG_CTX_BIT6_MASK			0x1
5335 #define XSTORM_TOE_CONN_AG_CTX_BIT6_SHIFT			6
5336 #define XSTORM_TOE_CONN_AG_CTX_BIT7_MASK			0x1
5337 #define XSTORM_TOE_CONN_AG_CTX_BIT7_SHIFT			7
5338 	u8 flags1;
5339 #define XSTORM_TOE_CONN_AG_CTX_BIT8_MASK			0x1
5340 #define XSTORM_TOE_CONN_AG_CTX_BIT8_SHIFT			0
5341 #define XSTORM_TOE_CONN_AG_CTX_BIT9_MASK			0x1
5342 #define XSTORM_TOE_CONN_AG_CTX_BIT9_SHIFT			1
5343 #define XSTORM_TOE_CONN_AG_CTX_BIT10_MASK			0x1
5344 #define XSTORM_TOE_CONN_AG_CTX_BIT10_SHIFT			2
5345 #define XSTORM_TOE_CONN_AG_CTX_BIT11_MASK			0x1
5346 #define XSTORM_TOE_CONN_AG_CTX_BIT11_SHIFT			3
5347 #define XSTORM_TOE_CONN_AG_CTX_BIT12_MASK			0x1
5348 #define XSTORM_TOE_CONN_AG_CTX_BIT12_SHIFT			4
5349 #define XSTORM_TOE_CONN_AG_CTX_BIT13_MASK			0x1
5350 #define XSTORM_TOE_CONN_AG_CTX_BIT13_SHIFT			5
5351 #define XSTORM_TOE_CONN_AG_CTX_BIT14_MASK			0x1
5352 #define XSTORM_TOE_CONN_AG_CTX_BIT14_SHIFT			6
5353 #define XSTORM_TOE_CONN_AG_CTX_BIT15_MASK			0x1
5354 #define XSTORM_TOE_CONN_AG_CTX_BIT15_SHIFT			7
5355 	u8 flags2;
5356 #define XSTORM_TOE_CONN_AG_CTX_CF0_MASK				0x3
5357 #define XSTORM_TOE_CONN_AG_CTX_CF0_SHIFT			0
5358 #define XSTORM_TOE_CONN_AG_CTX_CF1_MASK				0x3
5359 #define XSTORM_TOE_CONN_AG_CTX_CF1_SHIFT			2
5360 #define XSTORM_TOE_CONN_AG_CTX_CF2_MASK				0x3
5361 #define XSTORM_TOE_CONN_AG_CTX_CF2_SHIFT			4
5362 #define XSTORM_TOE_CONN_AG_CTX_TIMER_STOP_ALL_MASK		0x3
5363 #define XSTORM_TOE_CONN_AG_CTX_TIMER_STOP_ALL_SHIFT		6
5364 	u8 flags3;
5365 #define XSTORM_TOE_CONN_AG_CTX_CF4_MASK				0x3
5366 #define XSTORM_TOE_CONN_AG_CTX_CF4_SHIFT			0
5367 #define XSTORM_TOE_CONN_AG_CTX_CF5_MASK				0x3
5368 #define XSTORM_TOE_CONN_AG_CTX_CF5_SHIFT			2
5369 #define XSTORM_TOE_CONN_AG_CTX_CF6_MASK				0x3
5370 #define XSTORM_TOE_CONN_AG_CTX_CF6_SHIFT			4
5371 #define XSTORM_TOE_CONN_AG_CTX_CF7_MASK				0x3
5372 #define XSTORM_TOE_CONN_AG_CTX_CF7_SHIFT			6
5373 	u8 flags4;
5374 #define XSTORM_TOE_CONN_AG_CTX_CF8_MASK				0x3
5375 #define XSTORM_TOE_CONN_AG_CTX_CF8_SHIFT			0
5376 #define XSTORM_TOE_CONN_AG_CTX_CF9_MASK				0x3
5377 #define XSTORM_TOE_CONN_AG_CTX_CF9_SHIFT			2
5378 #define XSTORM_TOE_CONN_AG_CTX_CF10_MASK			0x3
5379 #define XSTORM_TOE_CONN_AG_CTX_CF10_SHIFT			4
5380 #define XSTORM_TOE_CONN_AG_CTX_CF11_MASK			0x3
5381 #define XSTORM_TOE_CONN_AG_CTX_CF11_SHIFT			6
5382 	u8 flags5;
5383 #define XSTORM_TOE_CONN_AG_CTX_CF12_MASK			0x3
5384 #define XSTORM_TOE_CONN_AG_CTX_CF12_SHIFT			0
5385 #define XSTORM_TOE_CONN_AG_CTX_CF13_MASK			0x3
5386 #define XSTORM_TOE_CONN_AG_CTX_CF13_SHIFT			2
5387 #define XSTORM_TOE_CONN_AG_CTX_CF14_MASK			0x3
5388 #define XSTORM_TOE_CONN_AG_CTX_CF14_SHIFT			4
5389 #define XSTORM_TOE_CONN_AG_CTX_CF15_MASK			0x3
5390 #define XSTORM_TOE_CONN_AG_CTX_CF15_SHIFT			6
5391 	u8 flags6;
5392 #define XSTORM_TOE_CONN_AG_CTX_CF16_MASK			0x3
5393 #define XSTORM_TOE_CONN_AG_CTX_CF16_SHIFT			0
5394 #define XSTORM_TOE_CONN_AG_CTX_CF17_MASK			0x3
5395 #define XSTORM_TOE_CONN_AG_CTX_CF17_SHIFT			2
5396 #define XSTORM_TOE_CONN_AG_CTX_CF18_MASK			0x3
5397 #define XSTORM_TOE_CONN_AG_CTX_CF18_SHIFT			4
5398 #define XSTORM_TOE_CONN_AG_CTX_DQ_FLUSH_MASK			0x3
5399 #define XSTORM_TOE_CONN_AG_CTX_DQ_FLUSH_SHIFT			6
5400 	u8 flags7;
5401 #define XSTORM_TOE_CONN_AG_CTX_FLUSH_Q0_MASK			0x3
5402 #define XSTORM_TOE_CONN_AG_CTX_FLUSH_Q0_SHIFT			0
5403 #define XSTORM_TOE_CONN_AG_CTX_FLUSH_Q1_MASK			0x3
5404 #define XSTORM_TOE_CONN_AG_CTX_FLUSH_Q1_SHIFT			2
5405 #define XSTORM_TOE_CONN_AG_CTX_SLOW_PATH_MASK			0x3
5406 #define XSTORM_TOE_CONN_AG_CTX_SLOW_PATH_SHIFT			4
5407 #define XSTORM_TOE_CONN_AG_CTX_CF0EN_MASK			0x1
5408 #define XSTORM_TOE_CONN_AG_CTX_CF0EN_SHIFT			6
5409 #define XSTORM_TOE_CONN_AG_CTX_CF1EN_MASK			0x1
5410 #define XSTORM_TOE_CONN_AG_CTX_CF1EN_SHIFT			7
5411 	u8 flags8;
5412 #define XSTORM_TOE_CONN_AG_CTX_CF2EN_MASK			0x1
5413 #define XSTORM_TOE_CONN_AG_CTX_CF2EN_SHIFT			0
5414 #define XSTORM_TOE_CONN_AG_CTX_TIMER_STOP_ALL_EN_MASK		0x1
5415 #define XSTORM_TOE_CONN_AG_CTX_TIMER_STOP_ALL_EN_SHIFT		1
5416 #define XSTORM_TOE_CONN_AG_CTX_CF4EN_MASK			0x1
5417 #define XSTORM_TOE_CONN_AG_CTX_CF4EN_SHIFT			2
5418 #define XSTORM_TOE_CONN_AG_CTX_CF5EN_MASK			0x1
5419 #define XSTORM_TOE_CONN_AG_CTX_CF5EN_SHIFT			3
5420 #define XSTORM_TOE_CONN_AG_CTX_CF6EN_MASK			0x1
5421 #define XSTORM_TOE_CONN_AG_CTX_CF6EN_SHIFT			4
5422 #define XSTORM_TOE_CONN_AG_CTX_CF7EN_MASK			0x1
5423 #define XSTORM_TOE_CONN_AG_CTX_CF7EN_SHIFT			5
5424 #define XSTORM_TOE_CONN_AG_CTX_CF8EN_MASK			0x1
5425 #define XSTORM_TOE_CONN_AG_CTX_CF8EN_SHIFT			6
5426 #define XSTORM_TOE_CONN_AG_CTX_CF9EN_MASK			0x1
5427 #define XSTORM_TOE_CONN_AG_CTX_CF9EN_SHIFT			7
5428 	u8 flags9;
5429 #define XSTORM_TOE_CONN_AG_CTX_CF10EN_MASK			0x1
5430 #define XSTORM_TOE_CONN_AG_CTX_CF10EN_SHIFT			0
5431 #define XSTORM_TOE_CONN_AG_CTX_CF11EN_MASK			0x1
5432 #define XSTORM_TOE_CONN_AG_CTX_CF11EN_SHIFT			1
5433 #define XSTORM_TOE_CONN_AG_CTX_CF12EN_MASK			0x1
5434 #define XSTORM_TOE_CONN_AG_CTX_CF12EN_SHIFT			2
5435 #define XSTORM_TOE_CONN_AG_CTX_CF13EN_MASK			0x1
5436 #define XSTORM_TOE_CONN_AG_CTX_CF13EN_SHIFT			3
5437 #define XSTORM_TOE_CONN_AG_CTX_CF14EN_MASK			0x1
5438 #define XSTORM_TOE_CONN_AG_CTX_CF14EN_SHIFT			4
5439 #define XSTORM_TOE_CONN_AG_CTX_CF15EN_MASK			0x1
5440 #define XSTORM_TOE_CONN_AG_CTX_CF15EN_SHIFT			5
5441 #define XSTORM_TOE_CONN_AG_CTX_CF16EN_MASK			0x1
5442 #define XSTORM_TOE_CONN_AG_CTX_CF16EN_SHIFT			6
5443 #define XSTORM_TOE_CONN_AG_CTX_CF17EN_MASK			0x1
5444 #define XSTORM_TOE_CONN_AG_CTX_CF17EN_SHIFT			7
5445 	u8 flags10;
5446 #define XSTORM_TOE_CONN_AG_CTX_CF18EN_MASK			0x1
5447 #define XSTORM_TOE_CONN_AG_CTX_CF18EN_SHIFT			0
5448 #define XSTORM_TOE_CONN_AG_CTX_DQ_FLUSH_EN_MASK			0x1
5449 #define XSTORM_TOE_CONN_AG_CTX_DQ_FLUSH_EN_SHIFT		1
5450 #define XSTORM_TOE_CONN_AG_CTX_FLUSH_Q0_EN_MASK			0x1
5451 #define XSTORM_TOE_CONN_AG_CTX_FLUSH_Q0_EN_SHIFT		2
5452 #define XSTORM_TOE_CONN_AG_CTX_FLUSH_Q1_EN_MASK			0x1
5453 #define XSTORM_TOE_CONN_AG_CTX_FLUSH_Q1_EN_SHIFT		3
5454 #define XSTORM_TOE_CONN_AG_CTX_SLOW_PATH_EN_MASK		0x1
5455 #define XSTORM_TOE_CONN_AG_CTX_SLOW_PATH_EN_SHIFT		4
5456 #define XSTORM_TOE_CONN_AG_CTX_CF23EN_MASK			0x1
5457 #define XSTORM_TOE_CONN_AG_CTX_CF23EN_SHIFT			5
5458 #define XSTORM_TOE_CONN_AG_CTX_RULE0EN_MASK			0x1
5459 #define XSTORM_TOE_CONN_AG_CTX_RULE0EN_SHIFT			6
5460 #define XSTORM_TOE_CONN_AG_CTX_MORE_TO_SEND_RULE_EN_MASK	0x1
5461 #define XSTORM_TOE_CONN_AG_CTX_MORE_TO_SEND_RULE_EN_SHIFT	7
5462 	u8 flags11;
5463 #define XSTORM_TOE_CONN_AG_CTX_TX_BLOCKED_EN_MASK		0x1
5464 #define XSTORM_TOE_CONN_AG_CTX_TX_BLOCKED_EN_SHIFT		0
5465 #define XSTORM_TOE_CONN_AG_CTX_RULE3EN_MASK			0x1
5466 #define XSTORM_TOE_CONN_AG_CTX_RULE3EN_SHIFT			1
5467 #define XSTORM_TOE_CONN_AG_CTX_RESERVED3_MASK			0x1
5468 #define XSTORM_TOE_CONN_AG_CTX_RESERVED3_SHIFT			2
5469 #define XSTORM_TOE_CONN_AG_CTX_RULE5EN_MASK			0x1
5470 #define XSTORM_TOE_CONN_AG_CTX_RULE5EN_SHIFT			3
5471 #define XSTORM_TOE_CONN_AG_CTX_RULE6EN_MASK			0x1
5472 #define XSTORM_TOE_CONN_AG_CTX_RULE6EN_SHIFT			4
5473 #define XSTORM_TOE_CONN_AG_CTX_RULE7EN_MASK			0x1
5474 #define XSTORM_TOE_CONN_AG_CTX_RULE7EN_SHIFT			5
5475 #define XSTORM_TOE_CONN_AG_CTX_A0_RESERVED1_MASK		0x1
5476 #define XSTORM_TOE_CONN_AG_CTX_A0_RESERVED1_SHIFT		6
5477 #define XSTORM_TOE_CONN_AG_CTX_RULE9EN_MASK			0x1
5478 #define XSTORM_TOE_CONN_AG_CTX_RULE9EN_SHIFT			7
5479 	u8 flags12;
5480 #define XSTORM_TOE_CONN_AG_CTX_RULE10EN_MASK			0x1
5481 #define XSTORM_TOE_CONN_AG_CTX_RULE10EN_SHIFT			0
5482 #define XSTORM_TOE_CONN_AG_CTX_RULE11EN_MASK			0x1
5483 #define XSTORM_TOE_CONN_AG_CTX_RULE11EN_SHIFT			1
5484 #define XSTORM_TOE_CONN_AG_CTX_A0_RESERVED2_MASK		0x1
5485 #define XSTORM_TOE_CONN_AG_CTX_A0_RESERVED2_SHIFT		2
5486 #define XSTORM_TOE_CONN_AG_CTX_A0_RESERVED3_MASK		0x1
5487 #define XSTORM_TOE_CONN_AG_CTX_A0_RESERVED3_SHIFT		3
5488 #define XSTORM_TOE_CONN_AG_CTX_RULE14EN_MASK			0x1
5489 #define XSTORM_TOE_CONN_AG_CTX_RULE14EN_SHIFT			4
5490 #define XSTORM_TOE_CONN_AG_CTX_RULE15EN_MASK			0x1
5491 #define XSTORM_TOE_CONN_AG_CTX_RULE15EN_SHIFT			5
5492 #define XSTORM_TOE_CONN_AG_CTX_RULE16EN_MASK			0x1
5493 #define XSTORM_TOE_CONN_AG_CTX_RULE16EN_SHIFT			6
5494 #define XSTORM_TOE_CONN_AG_CTX_RULE17EN_MASK			0x1
5495 #define XSTORM_TOE_CONN_AG_CTX_RULE17EN_SHIFT			7
5496 	u8 flags13;
5497 #define XSTORM_TOE_CONN_AG_CTX_RULE18EN_MASK			0x1
5498 #define XSTORM_TOE_CONN_AG_CTX_RULE18EN_SHIFT			0
5499 #define XSTORM_TOE_CONN_AG_CTX_RULE19EN_MASK			0x1
5500 #define XSTORM_TOE_CONN_AG_CTX_RULE19EN_SHIFT			1
5501 #define XSTORM_TOE_CONN_AG_CTX_A0_RESERVED4_MASK		0x1
5502 #define XSTORM_TOE_CONN_AG_CTX_A0_RESERVED4_SHIFT		2
5503 #define XSTORM_TOE_CONN_AG_CTX_A0_RESERVED5_MASK		0x1
5504 #define XSTORM_TOE_CONN_AG_CTX_A0_RESERVED5_SHIFT		3
5505 #define XSTORM_TOE_CONN_AG_CTX_A0_RESERVED6_MASK		0x1
5506 #define XSTORM_TOE_CONN_AG_CTX_A0_RESERVED6_SHIFT		4
5507 #define XSTORM_TOE_CONN_AG_CTX_A0_RESERVED7_MASK		0x1
5508 #define XSTORM_TOE_CONN_AG_CTX_A0_RESERVED7_SHIFT		5
5509 #define XSTORM_TOE_CONN_AG_CTX_A0_RESERVED8_MASK		0x1
5510 #define XSTORM_TOE_CONN_AG_CTX_A0_RESERVED8_SHIFT		6
5511 #define XSTORM_TOE_CONN_AG_CTX_A0_RESERVED9_MASK		0x1
5512 #define XSTORM_TOE_CONN_AG_CTX_A0_RESERVED9_SHIFT		7
5513 	u8 flags14;
5514 #define XSTORM_TOE_CONN_AG_CTX_BIT16_MASK			0x1
5515 #define XSTORM_TOE_CONN_AG_CTX_BIT16_SHIFT			0
5516 #define XSTORM_TOE_CONN_AG_CTX_BIT17_MASK			0x1
5517 #define XSTORM_TOE_CONN_AG_CTX_BIT17_SHIFT			1
5518 #define XSTORM_TOE_CONN_AG_CTX_BIT18_MASK			0x1
5519 #define XSTORM_TOE_CONN_AG_CTX_BIT18_SHIFT			2
5520 #define XSTORM_TOE_CONN_AG_CTX_BIT19_MASK			0x1
5521 #define XSTORM_TOE_CONN_AG_CTX_BIT19_SHIFT			3
5522 #define XSTORM_TOE_CONN_AG_CTX_BIT20_MASK			0x1
5523 #define XSTORM_TOE_CONN_AG_CTX_BIT20_SHIFT			4
5524 #define XSTORM_TOE_CONN_AG_CTX_BIT21_MASK			0x1
5525 #define XSTORM_TOE_CONN_AG_CTX_BIT21_SHIFT			5
5526 #define XSTORM_TOE_CONN_AG_CTX_CF23_MASK			0x3
5527 #define XSTORM_TOE_CONN_AG_CTX_CF23_SHIFT			6
5528 	u8 byte2;
5529 	__le16 physical_q0;
5530 	__le16 physical_q1;
5531 	__le16 word2;
5532 	__le16 word3;
5533 	__le16 bd_prod;
5534 	__le16 word5;
5535 	__le16 word6;
5536 	u8 byte3;
5537 	u8 byte4;
5538 	u8 byte5;
5539 	u8 byte6;
5540 	__le32 reg0;
5541 	__le32 reg1;
5542 	__le32 reg2;
5543 	__le32 more_to_send_seq;
5544 	__le32 local_adv_wnd_seq;
5545 	__le32 reg5;
5546 	__le32 reg6;
5547 	__le16 word7;
5548 	__le16 word8;
5549 	__le16 word9;
5550 	__le16 word10;
5551 	__le32 reg7;
5552 	__le32 reg8;
5553 	__le32 reg9;
5554 	u8 byte7;
5555 	u8 byte8;
5556 	u8 byte9;
5557 	u8 byte10;
5558 	u8 byte11;
5559 	u8 byte12;
5560 	u8 byte13;
5561 	u8 byte14;
5562 	u8 byte15;
5563 	u8 e5_reserved;
5564 	__le16 word11;
5565 	__le32 reg10;
5566 	__le32 reg11;
5567 	__le32 reg12;
5568 	__le32 reg13;
5569 	__le32 reg14;
5570 	__le32 reg15;
5571 	__le32 reg16;
5572 	__le32 reg17;
5573 };
5574 
5575 struct tstorm_toe_conn_ag_ctx {
5576 	u8 reserved0;
5577 	u8 byte1;
5578 	u8 flags0;
5579 #define TSTORM_TOE_CONN_AG_CTX_EXIST_IN_QM0_MASK		0x1
5580 #define TSTORM_TOE_CONN_AG_CTX_EXIST_IN_QM0_SHIFT		0
5581 #define TSTORM_TOE_CONN_AG_CTX_BIT1_MASK			0x1
5582 #define TSTORM_TOE_CONN_AG_CTX_BIT1_SHIFT			1
5583 #define TSTORM_TOE_CONN_AG_CTX_BIT2_MASK			0x1
5584 #define TSTORM_TOE_CONN_AG_CTX_BIT2_SHIFT			2
5585 #define TSTORM_TOE_CONN_AG_CTX_BIT3_MASK			0x1
5586 #define TSTORM_TOE_CONN_AG_CTX_BIT3_SHIFT			3
5587 #define TSTORM_TOE_CONN_AG_CTX_BIT4_MASK			0x1
5588 #define TSTORM_TOE_CONN_AG_CTX_BIT4_SHIFT			4
5589 #define TSTORM_TOE_CONN_AG_CTX_BIT5_MASK			0x1
5590 #define TSTORM_TOE_CONN_AG_CTX_BIT5_SHIFT			5
5591 #define TSTORM_TOE_CONN_AG_CTX_TIMEOUT_CF_MASK			0x3
5592 #define TSTORM_TOE_CONN_AG_CTX_TIMEOUT_CF_SHIFT			6
5593 	u8 flags1;
5594 #define TSTORM_TOE_CONN_AG_CTX_CF1_MASK				0x3
5595 #define TSTORM_TOE_CONN_AG_CTX_CF1_SHIFT			0
5596 #define TSTORM_TOE_CONN_AG_CTX_CF2_MASK				0x3
5597 #define TSTORM_TOE_CONN_AG_CTX_CF2_SHIFT			2
5598 #define TSTORM_TOE_CONN_AG_CTX_TIMER_STOP_ALL_MASK		0x3
5599 #define TSTORM_TOE_CONN_AG_CTX_TIMER_STOP_ALL_SHIFT		4
5600 #define TSTORM_TOE_CONN_AG_CTX_CF4_MASK				0x3
5601 #define TSTORM_TOE_CONN_AG_CTX_CF4_SHIFT			6
5602 	u8 flags2;
5603 #define TSTORM_TOE_CONN_AG_CTX_CF5_MASK				0x3
5604 #define TSTORM_TOE_CONN_AG_CTX_CF5_SHIFT			0
5605 #define TSTORM_TOE_CONN_AG_CTX_CF6_MASK				0x3
5606 #define TSTORM_TOE_CONN_AG_CTX_CF6_SHIFT			2
5607 #define TSTORM_TOE_CONN_AG_CTX_CF7_MASK				0x3
5608 #define TSTORM_TOE_CONN_AG_CTX_CF7_SHIFT			4
5609 #define TSTORM_TOE_CONN_AG_CTX_CF8_MASK				0x3
5610 #define TSTORM_TOE_CONN_AG_CTX_CF8_SHIFT			6
5611 	u8 flags3;
5612 #define TSTORM_TOE_CONN_AG_CTX_FLUSH_Q0_MASK			0x3
5613 #define TSTORM_TOE_CONN_AG_CTX_FLUSH_Q0_SHIFT			0
5614 #define TSTORM_TOE_CONN_AG_CTX_CF10_MASK			0x3
5615 #define TSTORM_TOE_CONN_AG_CTX_CF10_SHIFT			2
5616 #define TSTORM_TOE_CONN_AG_CTX_TIMEOUT_CF_EN_MASK		0x1
5617 #define TSTORM_TOE_CONN_AG_CTX_TIMEOUT_CF_EN_SHIFT		4
5618 #define TSTORM_TOE_CONN_AG_CTX_CF1EN_MASK			0x1
5619 #define TSTORM_TOE_CONN_AG_CTX_CF1EN_SHIFT			5
5620 #define TSTORM_TOE_CONN_AG_CTX_CF2EN_MASK			0x1
5621 #define TSTORM_TOE_CONN_AG_CTX_CF2EN_SHIFT			6
5622 #define TSTORM_TOE_CONN_AG_CTX_TIMER_STOP_ALL_EN_MASK		0x1
5623 #define TSTORM_TOE_CONN_AG_CTX_TIMER_STOP_ALL_EN_SHIFT		7
5624 	u8 flags4;
5625 #define TSTORM_TOE_CONN_AG_CTX_CF4EN_MASK			0x1
5626 #define TSTORM_TOE_CONN_AG_CTX_CF4EN_SHIFT			0
5627 #define TSTORM_TOE_CONN_AG_CTX_CF5EN_MASK			0x1
5628 #define TSTORM_TOE_CONN_AG_CTX_CF5EN_SHIFT			1
5629 #define TSTORM_TOE_CONN_AG_CTX_CF6EN_MASK			0x1
5630 #define TSTORM_TOE_CONN_AG_CTX_CF6EN_SHIFT			2
5631 #define TSTORM_TOE_CONN_AG_CTX_CF7EN_MASK			0x1
5632 #define TSTORM_TOE_CONN_AG_CTX_CF7EN_SHIFT			3
5633 #define TSTORM_TOE_CONN_AG_CTX_CF8EN_MASK			0x1
5634 #define TSTORM_TOE_CONN_AG_CTX_CF8EN_SHIFT			4
5635 #define TSTORM_TOE_CONN_AG_CTX_FLUSH_Q0_EN_MASK			0x1
5636 #define TSTORM_TOE_CONN_AG_CTX_FLUSH_Q0_EN_SHIFT		5
5637 #define TSTORM_TOE_CONN_AG_CTX_CF10EN_MASK			0x1
5638 #define TSTORM_TOE_CONN_AG_CTX_CF10EN_SHIFT			6
5639 #define TSTORM_TOE_CONN_AG_CTX_RULE0EN_MASK			0x1
5640 #define TSTORM_TOE_CONN_AG_CTX_RULE0EN_SHIFT			7
5641 	u8 flags5;
5642 #define TSTORM_TOE_CONN_AG_CTX_RULE1EN_MASK			0x1
5643 #define TSTORM_TOE_CONN_AG_CTX_RULE1EN_SHIFT			0
5644 #define TSTORM_TOE_CONN_AG_CTX_RULE2EN_MASK			0x1
5645 #define TSTORM_TOE_CONN_AG_CTX_RULE2EN_SHIFT			1
5646 #define TSTORM_TOE_CONN_AG_CTX_RULE3EN_MASK			0x1
5647 #define TSTORM_TOE_CONN_AG_CTX_RULE3EN_SHIFT			2
5648 #define TSTORM_TOE_CONN_AG_CTX_RULE4EN_MASK			0x1
5649 #define TSTORM_TOE_CONN_AG_CTX_RULE4EN_SHIFT			3
5650 #define TSTORM_TOE_CONN_AG_CTX_RULE5EN_MASK			0x1
5651 #define TSTORM_TOE_CONN_AG_CTX_RULE5EN_SHIFT			4
5652 #define TSTORM_TOE_CONN_AG_CTX_RULE6EN_MASK			0x1
5653 #define TSTORM_TOE_CONN_AG_CTX_RULE6EN_SHIFT			5
5654 #define TSTORM_TOE_CONN_AG_CTX_RULE7EN_MASK			0x1
5655 #define TSTORM_TOE_CONN_AG_CTX_RULE7EN_SHIFT			6
5656 #define TSTORM_TOE_CONN_AG_CTX_RULE8EN_MASK			0x1
5657 #define TSTORM_TOE_CONN_AG_CTX_RULE8EN_SHIFT			7
5658 	__le32 reg0;
5659 	__le32 reg1;
5660 	__le32 reg2;
5661 	__le32 reg3;
5662 	__le32 reg4;
5663 	__le32 reg5;
5664 	__le32 reg6;
5665 	__le32 reg7;
5666 	__le32 reg8;
5667 	u8 byte2;
5668 	u8 byte3;
5669 	__le16 word0;
5670 };
5671 
5672 struct ustorm_toe_conn_ag_ctx {
5673 	u8 reserved;
5674 	u8 byte1;
5675 	u8 flags0;
5676 #define USTORM_TOE_CONN_AG_CTX_EXIST_IN_QM0_MASK		0x1
5677 #define USTORM_TOE_CONN_AG_CTX_EXIST_IN_QM0_SHIFT		0
5678 #define USTORM_TOE_CONN_AG_CTX_BIT1_MASK			0x1
5679 #define USTORM_TOE_CONN_AG_CTX_BIT1_SHIFT			1
5680 #define USTORM_TOE_CONN_AG_CTX_CF0_MASK				0x3
5681 #define USTORM_TOE_CONN_AG_CTX_CF0_SHIFT			2
5682 #define USTORM_TOE_CONN_AG_CTX_CF1_MASK				0x3
5683 #define USTORM_TOE_CONN_AG_CTX_CF1_SHIFT			4
5684 #define USTORM_TOE_CONN_AG_CTX_PUSH_TIMER_CF_MASK		0x3
5685 #define USTORM_TOE_CONN_AG_CTX_PUSH_TIMER_CF_SHIFT		6
5686 	u8 flags1;
5687 #define USTORM_TOE_CONN_AG_CTX_TIMER_STOP_ALL_MASK		0x3
5688 #define USTORM_TOE_CONN_AG_CTX_TIMER_STOP_ALL_SHIFT		0
5689 #define USTORM_TOE_CONN_AG_CTX_SLOW_PATH_CF_MASK		0x3
5690 #define USTORM_TOE_CONN_AG_CTX_SLOW_PATH_CF_SHIFT		2
5691 #define USTORM_TOE_CONN_AG_CTX_DQ_CF_MASK			0x3
5692 #define USTORM_TOE_CONN_AG_CTX_DQ_CF_SHIFT			4
5693 #define USTORM_TOE_CONN_AG_CTX_CF6_MASK				0x3
5694 #define USTORM_TOE_CONN_AG_CTX_CF6_SHIFT			6
5695 	u8 flags2;
5696 #define USTORM_TOE_CONN_AG_CTX_CF0EN_MASK			0x1
5697 #define USTORM_TOE_CONN_AG_CTX_CF0EN_SHIFT			0
5698 #define USTORM_TOE_CONN_AG_CTX_CF1EN_MASK			0x1
5699 #define USTORM_TOE_CONN_AG_CTX_CF1EN_SHIFT			1
5700 #define USTORM_TOE_CONN_AG_CTX_PUSH_TIMER_CF_EN_MASK		0x1
5701 #define USTORM_TOE_CONN_AG_CTX_PUSH_TIMER_CF_EN_SHIFT		2
5702 #define USTORM_TOE_CONN_AG_CTX_TIMER_STOP_ALL_EN_MASK		0x1
5703 #define USTORM_TOE_CONN_AG_CTX_TIMER_STOP_ALL_EN_SHIFT		3
5704 #define USTORM_TOE_CONN_AG_CTX_SLOW_PATH_CF_EN_MASK		0x1
5705 #define USTORM_TOE_CONN_AG_CTX_SLOW_PATH_CF_EN_SHIFT		4
5706 #define USTORM_TOE_CONN_AG_CTX_DQ_CF_EN_MASK			0x1
5707 #define USTORM_TOE_CONN_AG_CTX_DQ_CF_EN_SHIFT			5
5708 #define USTORM_TOE_CONN_AG_CTX_CF6EN_MASK			0x1
5709 #define USTORM_TOE_CONN_AG_CTX_CF6EN_SHIFT			6
5710 #define USTORM_TOE_CONN_AG_CTX_RULE0EN_MASK			0x1
5711 #define USTORM_TOE_CONN_AG_CTX_RULE0EN_SHIFT			7
5712 	u8 flags3;
5713 #define USTORM_TOE_CONN_AG_CTX_RULE1EN_MASK			0x1
5714 #define USTORM_TOE_CONN_AG_CTX_RULE1EN_SHIFT			0
5715 #define USTORM_TOE_CONN_AG_CTX_RULE2EN_MASK			0x1
5716 #define USTORM_TOE_CONN_AG_CTX_RULE2EN_SHIFT			1
5717 #define USTORM_TOE_CONN_AG_CTX_RULE3EN_MASK			0x1
5718 #define USTORM_TOE_CONN_AG_CTX_RULE3EN_SHIFT			2
5719 #define USTORM_TOE_CONN_AG_CTX_RULE4EN_MASK			0x1
5720 #define USTORM_TOE_CONN_AG_CTX_RULE4EN_SHIFT			3
5721 #define USTORM_TOE_CONN_AG_CTX_RULE5EN_MASK			0x1
5722 #define USTORM_TOE_CONN_AG_CTX_RULE5EN_SHIFT			4
5723 #define USTORM_TOE_CONN_AG_CTX_RULE6EN_MASK			0x1
5724 #define USTORM_TOE_CONN_AG_CTX_RULE6EN_SHIFT			5
5725 #define USTORM_TOE_CONN_AG_CTX_RULE7EN_MASK			0x1
5726 #define USTORM_TOE_CONN_AG_CTX_RULE7EN_SHIFT			6
5727 #define USTORM_TOE_CONN_AG_CTX_RULE8EN_MASK			0x1
5728 #define USTORM_TOE_CONN_AG_CTX_RULE8EN_SHIFT			7
5729 	u8 byte2;
5730 	u8 byte3;
5731 	__le16 word0;
5732 	__le16 word1;
5733 	__le32 reg0;
5734 	__le32 reg1;
5735 	__le32 reg2;
5736 	__le32 reg3;
5737 	__le16 word2;
5738 	__le16 word3;
5739 };
5740 
5741 /* The toe storm context of Tstorm */
5742 struct tstorm_toe_conn_st_ctx {
5743 	__le32 reserved[16];
5744 };
5745 
5746 /* The toe storm context of Ustorm */
5747 struct ustorm_toe_conn_st_ctx {
5748 	__le32 reserved[52];
5749 };
5750 
5751 /* toe connection context */
5752 struct toe_conn_context {
5753 	struct ystorm_toe_conn_st_ctx ystorm_st_context;
5754 	struct pstorm_toe_conn_st_ctx pstorm_st_context;
5755 	struct regpair pstorm_st_padding[2];
5756 	struct xstorm_toe_conn_st_ctx xstorm_st_context;
5757 	struct regpair xstorm_st_padding[2];
5758 	struct ystorm_toe_conn_ag_ctx ystorm_ag_context;
5759 	struct xstorm_toe_conn_ag_ctx xstorm_ag_context;
5760 	struct tstorm_toe_conn_ag_ctx tstorm_ag_context;
5761 	struct regpair tstorm_ag_padding[2];
5762 	struct timers_context timer_context;
5763 	struct ustorm_toe_conn_ag_ctx ustorm_ag_context;
5764 	struct tstorm_toe_conn_st_ctx tstorm_st_context;
5765 	struct mstorm_toe_conn_st_ctx mstorm_st_context;
5766 	struct ustorm_toe_conn_st_ctx ustorm_st_context;
5767 };
5768 
5769 /* toe init ramrod header */
5770 struct toe_init_ramrod_header {
5771 	u8 first_rss;
5772 	u8 num_rss;
5773 	u8 reserved[6];
5774 };
5775 
5776 /* toe pf init parameters */
5777 struct toe_pf_init_params {
5778 	__le32 push_timeout;
5779 	__le16 grq_buffer_size;
5780 	__le16 grq_sb_id;
5781 	u8 grq_sb_index;
5782 	u8 max_seg_retransmit;
5783 	u8 doubt_reachability;
5784 	u8 ll2_rx_queue_id;
5785 	__le16 grq_fetch_threshold;
5786 	u8 reserved1[2];
5787 	struct regpair grq_page_addr;
5788 };
5789 
5790 /* toe tss parameters */
5791 struct toe_tss_params {
5792 	struct regpair curr_page_addr;
5793 	struct regpair next_page_addr;
5794 	u8 reserved0;
5795 	u8 status_block_index;
5796 	__le16 status_block_id;
5797 	__le16 reserved1[2];
5798 };
5799 
5800 /* toe rss parameters */
5801 struct toe_rss_params {
5802 	struct regpair curr_page_addr;
5803 	struct regpair next_page_addr;
5804 	u8 reserved0;
5805 	u8 status_block_index;
5806 	__le16 status_block_id;
5807 	__le16 reserved1[2];
5808 };
5809 
5810 /* toe init ramrod data */
5811 struct toe_init_ramrod_data {
5812 	struct toe_init_ramrod_header hdr;
5813 	struct tcp_init_params tcp_params;
5814 	struct toe_pf_init_params pf_params;
5815 	struct toe_tss_params tss_params[TOE_TX_MAX_TSS_CHAINS];
5816 	struct toe_rss_params rss_params[TOE_RX_MAX_RSS_CHAINS];
5817 };
5818 
5819 /* toe offload parameters */
5820 struct toe_offload_params {
5821 	struct regpair tx_bd_page_addr;
5822 	struct regpair tx_app_page_addr;
5823 	__le32 more_to_send_seq;
5824 	__le16 rcv_indication_size;
5825 	u8 rss_tss_id;
5826 	u8 ignore_grq_push;
5827 	struct regpair rx_db_data_ptr;
5828 };
5829 
5830 /* TOE offload ramrod data - DMAed by firmware */
5831 struct toe_offload_ramrod_data {
5832 	struct tcp_offload_params tcp_ofld_params;
5833 	struct toe_offload_params toe_ofld_params;
5834 };
5835 
5836 /* TOE ramrod command IDs */
5837 enum toe_ramrod_cmd_id {
5838 	TOE_RAMROD_UNUSED,
5839 	TOE_RAMROD_FUNC_INIT,
5840 	TOE_RAMROD_INITATE_OFFLOAD,
5841 	TOE_RAMROD_FUNC_CLOSE,
5842 	TOE_RAMROD_SEARCHER_DELETE,
5843 	TOE_RAMROD_TERMINATE,
5844 	TOE_RAMROD_QUERY,
5845 	TOE_RAMROD_UPDATE,
5846 	TOE_RAMROD_EMPTY,
5847 	TOE_RAMROD_RESET_SEND,
5848 	TOE_RAMROD_INVALIDATE,
5849 	MAX_TOE_RAMROD_CMD_ID
5850 };
5851 
5852 /* Toe RQ buffer descriptor */
5853 struct toe_rx_bd {
5854 	struct regpair addr;
5855 	__le16 size;
5856 	__le16 flags;
5857 #define TOE_RX_BD_START_MASK		0x1
5858 #define TOE_RX_BD_START_SHIFT		0
5859 #define TOE_RX_BD_END_MASK		0x1
5860 #define TOE_RX_BD_END_SHIFT		1
5861 #define TOE_RX_BD_NO_PUSH_MASK		0x1
5862 #define TOE_RX_BD_NO_PUSH_SHIFT		2
5863 #define TOE_RX_BD_SPLIT_MASK		0x1
5864 #define TOE_RX_BD_SPLIT_SHIFT		3
5865 #define TOE_RX_BD_RESERVED0_MASK	0xFFF
5866 #define TOE_RX_BD_RESERVED0_SHIFT	4
5867 	__le32 reserved1;
5868 };
5869 
5870 /* TOE RX completion queue opcodes (opcode 0 is illegal) */
5871 enum toe_rx_cmp_opcode {
5872 	TOE_RX_CMP_OPCODE_GA = 1,
5873 	TOE_RX_CMP_OPCODE_GR = 2,
5874 	TOE_RX_CMP_OPCODE_GNI = 3,
5875 	TOE_RX_CMP_OPCODE_GAIR = 4,
5876 	TOE_RX_CMP_OPCODE_GAIL = 5,
5877 	TOE_RX_CMP_OPCODE_GRI = 6,
5878 	TOE_RX_CMP_OPCODE_GJ = 7,
5879 	TOE_RX_CMP_OPCODE_DGI = 8,
5880 	TOE_RX_CMP_OPCODE_CMP = 9,
5881 	TOE_RX_CMP_OPCODE_REL = 10,
5882 	TOE_RX_CMP_OPCODE_SKP = 11,
5883 	TOE_RX_CMP_OPCODE_URG = 12,
5884 	TOE_RX_CMP_OPCODE_RT_TO = 13,
5885 	TOE_RX_CMP_OPCODE_KA_TO = 14,
5886 	TOE_RX_CMP_OPCODE_MAX_RT = 15,
5887 	TOE_RX_CMP_OPCODE_DBT_RE = 16,
5888 	TOE_RX_CMP_OPCODE_SYN = 17,
5889 	TOE_RX_CMP_OPCODE_OPT_ERR = 18,
5890 	TOE_RX_CMP_OPCODE_FW2_TO = 19,
5891 	TOE_RX_CMP_OPCODE_2WY_CLS = 20,
5892 	TOE_RX_CMP_OPCODE_RST_RCV = 21,
5893 	TOE_RX_CMP_OPCODE_FIN_RCV = 22,
5894 	TOE_RX_CMP_OPCODE_FIN_UPL = 23,
5895 	TOE_RX_CMP_OPCODE_INIT = 32,
5896 	TOE_RX_CMP_OPCODE_RSS_UPDATE = 33,
5897 	TOE_RX_CMP_OPCODE_CLOSE = 34,
5898 	TOE_RX_CMP_OPCODE_INITIATE_OFFLOAD = 80,
5899 	TOE_RX_CMP_OPCODE_SEARCHER_DELETE = 81,
5900 	TOE_RX_CMP_OPCODE_TERMINATE = 82,
5901 	TOE_RX_CMP_OPCODE_QUERY = 83,
5902 	TOE_RX_CMP_OPCODE_RESET_SEND = 84,
5903 	TOE_RX_CMP_OPCODE_INVALIDATE = 85,
5904 	TOE_RX_CMP_OPCODE_EMPTY = 86,
5905 	TOE_RX_CMP_OPCODE_UPDATE = 87,
5906 	MAX_TOE_RX_CMP_OPCODE
5907 };
5908 
5909 /* TOE rx ooo completion data */
5910 struct toe_rx_cqe_ooo_params {
5911 	__le32 nbytes;
5912 	__le16 grq_buff_id;
5913 	u8 isle_num;
5914 	u8 reserved0;
5915 };
5916 
5917 /* TOE rx in order completion data */
5918 struct toe_rx_cqe_in_order_params {
5919 	__le32 nbytes;
5920 	__le16 grq_buff_id;
5921 	__le16 reserved1;
5922 };
5923 
5924 /* Union for TOE rx completion data */
5925 union toe_rx_cqe_data_union {
5926 	struct toe_rx_cqe_ooo_params ooo_params;
5927 	struct toe_rx_cqe_in_order_params in_order_params;
5928 	struct regpair raw_data;
5929 };
5930 
5931 /* TOE rx completion element */
5932 struct toe_rx_cqe {
5933 	__le16 icid;
5934 	u8 completion_opcode;
5935 	u8 reserved0;
5936 	__le32 reserved1;
5937 	union toe_rx_cqe_data_union data;
5938 };
5939 
5940 /* toe RX doorbel data */
5941 struct toe_rx_db_data {
5942 	__le32 local_adv_wnd_seq;
5943 	__le32 reserved[3];
5944 };
5945 
5946 /* Toe GRQ buffer descriptor */
5947 struct toe_rx_grq_bd {
5948 	struct regpair addr;
5949 	__le16 buff_id;
5950 	__le16 reserved0;
5951 	__le32 reserved1;
5952 };
5953 
5954 /* Toe transmission application buffer descriptor */
5955 struct toe_tx_app_buff_desc {
5956 	__le32 next_buffer_start_seq;
5957 	__le32 reserved;
5958 };
5959 
5960 /* Toe transmission application buffer descriptor page pointer */
5961 struct toe_tx_app_buff_page_pointer {
5962 	struct regpair next_page_addr;
5963 };
5964 
5965 /* Toe transmission buffer descriptor */
5966 struct toe_tx_bd {
5967 	struct regpair addr;
5968 	__le16 size;
5969 	__le16 flags;
5970 #define TOE_TX_BD_PUSH_MASK		0x1
5971 #define TOE_TX_BD_PUSH_SHIFT		0
5972 #define TOE_TX_BD_NOTIFY_MASK		0x1
5973 #define TOE_TX_BD_NOTIFY_SHIFT		1
5974 #define TOE_TX_BD_LARGE_IO_MASK		0x1
5975 #define TOE_TX_BD_LARGE_IO_SHIFT	2
5976 #define TOE_TX_BD_BD_CONS_MASK		0x1FFF
5977 #define TOE_TX_BD_BD_CONS_SHIFT		3
5978 	__le32 next_bd_start_seq;
5979 };
5980 
5981 /* TOE completion opcodes */
5982 enum toe_tx_cmp_opcode {
5983 	TOE_TX_CMP_OPCODE_DATA,
5984 	TOE_TX_CMP_OPCODE_TERMINATE,
5985 	TOE_TX_CMP_OPCODE_EMPTY,
5986 	TOE_TX_CMP_OPCODE_RESET_SEND,
5987 	TOE_TX_CMP_OPCODE_INVALIDATE,
5988 	TOE_TX_CMP_OPCODE_RST_RCV,
5989 	MAX_TOE_TX_CMP_OPCODE
5990 };
5991 
5992 /* Toe transmission completion element */
5993 struct toe_tx_cqe {
5994 	__le16 icid;
5995 	u8 opcode;
5996 	u8 reserved;
5997 	__le32 size;
5998 };
5999 
6000 /* Toe transmission page pointer bd */
6001 struct toe_tx_page_pointer_bd {
6002 	struct regpair next_page_addr;
6003 	struct regpair prev_page_addr;
6004 };
6005 
6006 /* Toe transmission completion element page pointer */
6007 struct toe_tx_page_pointer_cqe {
6008 	struct regpair next_page_addr;
6009 };
6010 
6011 /* toe update parameters */
6012 struct toe_update_params {
6013 	__le16 flags;
6014 #define TOE_UPDATE_PARAMS_RCV_INDICATION_SIZE_CHANGED_MASK	0x1
6015 #define TOE_UPDATE_PARAMS_RCV_INDICATION_SIZE_CHANGED_SHIFT	0
6016 #define TOE_UPDATE_PARAMS_RESERVED_MASK				0x7FFF
6017 #define TOE_UPDATE_PARAMS_RESERVED_SHIFT			1
6018 	__le16 rcv_indication_size;
6019 	__le16 reserved1[2];
6020 };
6021 
6022 /* TOE update ramrod data - DMAed by firmware */
6023 struct toe_update_ramrod_data {
6024 	struct tcp_update_params tcp_upd_params;
6025 	struct toe_update_params toe_upd_params;
6026 };
6027 
6028 struct mstorm_toe_conn_ag_ctx {
6029 	u8 byte0;
6030 	u8 byte1;
6031 	u8 flags0;
6032 #define MSTORM_TOE_CONN_AG_CTX_BIT0_MASK	0x1
6033 #define MSTORM_TOE_CONN_AG_CTX_BIT0_SHIFT	0
6034 #define MSTORM_TOE_CONN_AG_CTX_BIT1_MASK	0x1
6035 #define MSTORM_TOE_CONN_AG_CTX_BIT1_SHIFT	1
6036 #define MSTORM_TOE_CONN_AG_CTX_CF0_MASK		0x3
6037 #define MSTORM_TOE_CONN_AG_CTX_CF0_SHIFT	2
6038 #define MSTORM_TOE_CONN_AG_CTX_CF1_MASK		0x3
6039 #define MSTORM_TOE_CONN_AG_CTX_CF1_SHIFT	4
6040 #define MSTORM_TOE_CONN_AG_CTX_CF2_MASK		0x3
6041 #define MSTORM_TOE_CONN_AG_CTX_CF2_SHIFT	6
6042 	u8 flags1;
6043 #define MSTORM_TOE_CONN_AG_CTX_CF0EN_MASK	0x1
6044 #define MSTORM_TOE_CONN_AG_CTX_CF0EN_SHIFT	0
6045 #define MSTORM_TOE_CONN_AG_CTX_CF1EN_MASK	0x1
6046 #define MSTORM_TOE_CONN_AG_CTX_CF1EN_SHIFT	1
6047 #define MSTORM_TOE_CONN_AG_CTX_CF2EN_MASK	0x1
6048 #define MSTORM_TOE_CONN_AG_CTX_CF2EN_SHIFT	2
6049 #define MSTORM_TOE_CONN_AG_CTX_RULE0EN_MASK	0x1
6050 #define MSTORM_TOE_CONN_AG_CTX_RULE0EN_SHIFT	3
6051 #define MSTORM_TOE_CONN_AG_CTX_RULE1EN_MASK	0x1
6052 #define MSTORM_TOE_CONN_AG_CTX_RULE1EN_SHIFT	4
6053 #define MSTORM_TOE_CONN_AG_CTX_RULE2EN_MASK	0x1
6054 #define MSTORM_TOE_CONN_AG_CTX_RULE2EN_SHIFT	5
6055 #define MSTORM_TOE_CONN_AG_CTX_RULE3EN_MASK	0x1
6056 #define MSTORM_TOE_CONN_AG_CTX_RULE3EN_SHIFT	6
6057 #define MSTORM_TOE_CONN_AG_CTX_RULE4EN_MASK	0x1
6058 #define MSTORM_TOE_CONN_AG_CTX_RULE4EN_SHIFT	7
6059 	__le16 word0;
6060 	__le16 word1;
6061 	__le32 reg0;
6062 	__le32 reg1;
6063 };
6064 
6065 /* TOE doorbell data */
6066 struct toe_db_data {
6067 	u8 params;
6068 #define TOE_DB_DATA_DEST_MASK			0x3
6069 #define TOE_DB_DATA_DEST_SHIFT			0
6070 #define TOE_DB_DATA_AGG_CMD_MASK		0x3
6071 #define TOE_DB_DATA_AGG_CMD_SHIFT		2
6072 #define TOE_DB_DATA_BYPASS_EN_MASK		0x1
6073 #define TOE_DB_DATA_BYPASS_EN_SHIFT		4
6074 #define TOE_DB_DATA_RESERVED_MASK		0x1
6075 #define TOE_DB_DATA_RESERVED_SHIFT		5
6076 #define TOE_DB_DATA_AGG_VAL_SEL_MASK		0x3
6077 #define TOE_DB_DATA_AGG_VAL_SEL_SHIFT		6
6078 	u8 agg_flags;
6079 	__le16 bd_prod;
6080 };
6081 
6082 /* rdma function init ramrod data */
6083 struct rdma_close_func_ramrod_data {
6084 	u8 cnq_start_offset;
6085 	u8 num_cnqs;
6086 	u8 vf_id;
6087 	u8 vf_valid;
6088 	u8 reserved[4];
6089 };
6090 
6091 /* rdma function init CNQ parameters */
6092 struct rdma_cnq_params {
6093 	__le16 sb_num;
6094 	u8 sb_index;
6095 	u8 num_pbl_pages;
6096 	__le32 reserved;
6097 	struct regpair pbl_base_addr;
6098 	__le16 queue_zone_num;
6099 	u8 reserved1[6];
6100 };
6101 
6102 /* rdma create cq ramrod data */
6103 struct rdma_create_cq_ramrod_data {
6104 	struct regpair cq_handle;
6105 	struct regpair pbl_addr;
6106 	__le32 max_cqes;
6107 	__le16 pbl_num_pages;
6108 	__le16 dpi;
6109 	u8 is_two_level_pbl;
6110 	u8 cnq_id;
6111 	u8 pbl_log_page_size;
6112 	u8 toggle_bit;
6113 	__le16 int_timeout;
6114 	u8 vf_id;
6115 	u8 flags;
6116 #define RDMA_CREATE_CQ_RAMROD_DATA_VF_ID_VALID_MASK  0x1
6117 #define RDMA_CREATE_CQ_RAMROD_DATA_VF_ID_VALID_SHIFT 0
6118 #define RDMA_CREATE_CQ_RAMROD_DATA_RESERVED1_MASK    0x7F
6119 #define RDMA_CREATE_CQ_RAMROD_DATA_RESERVED1_SHIFT   1
6120 };
6121 
6122 /* rdma deregister tid ramrod data */
6123 struct rdma_deregister_tid_ramrod_data {
6124 	__le32 itid;
6125 	__le32 reserved;
6126 };
6127 
6128 /* rdma destroy cq output params */
6129 struct rdma_destroy_cq_output_params {
6130 	__le16 cnq_num;
6131 	__le16 reserved0;
6132 	__le32 reserved1;
6133 };
6134 
6135 /* rdma destroy cq ramrod data */
6136 struct rdma_destroy_cq_ramrod_data {
6137 	struct regpair output_params_addr;
6138 };
6139 
6140 /* RDMA slow path EQ cmd IDs */
6141 enum rdma_event_opcode {
6142 	RDMA_EVENT_UNUSED,
6143 	RDMA_EVENT_FUNC_INIT,
6144 	RDMA_EVENT_FUNC_CLOSE,
6145 	RDMA_EVENT_REGISTER_MR,
6146 	RDMA_EVENT_DEREGISTER_MR,
6147 	RDMA_EVENT_CREATE_CQ,
6148 	RDMA_EVENT_RESIZE_CQ,
6149 	RDMA_EVENT_DESTROY_CQ,
6150 	RDMA_EVENT_CREATE_SRQ,
6151 	RDMA_EVENT_MODIFY_SRQ,
6152 	RDMA_EVENT_DESTROY_SRQ,
6153 	RDMA_EVENT_START_NAMESPACE_TRACKING,
6154 	RDMA_EVENT_STOP_NAMESPACE_TRACKING,
6155 	MAX_RDMA_EVENT_OPCODE
6156 };
6157 
6158 /* RDMA FW return code for slow path ramrods */
6159 enum rdma_fw_return_code {
6160 	RDMA_RETURN_OK = 0,
6161 	RDMA_RETURN_REGISTER_MR_BAD_STATE_ERR,
6162 	RDMA_RETURN_DEREGISTER_MR_BAD_STATE_ERR,
6163 	RDMA_RETURN_RESIZE_CQ_ERR,
6164 	RDMA_RETURN_NIG_DRAIN_REQ,
6165 	RDMA_RETURN_GENERAL_ERR,
6166 	MAX_RDMA_FW_RETURN_CODE
6167 };
6168 
6169 /* rdma function init header */
6170 struct rdma_init_func_hdr {
6171 	u8 cnq_start_offset;
6172 	u8 num_cnqs;
6173 	u8 cq_ring_mode;
6174 	u8 vf_id;
6175 	u8 vf_valid;
6176 	u8 relaxed_ordering;
6177 	__le16 first_reg_srq_id;
6178 	__le32 reg_srq_base_addr;
6179 	u8 flags;
6180 #define RDMA_INIT_FUNC_HDR_SEARCHER_MODE_MASK		0x1
6181 #define RDMA_INIT_FUNC_HDR_SEARCHER_MODE_SHIFT		0
6182 #define RDMA_INIT_FUNC_HDR_PVRDMA_MODE_MASK		0x1
6183 #define RDMA_INIT_FUNC_HDR_PVRDMA_MODE_SHIFT		1
6184 #define RDMA_INIT_FUNC_HDR_DPT_MODE_MASK		0x1
6185 #define RDMA_INIT_FUNC_HDR_DPT_MODE_SHIFT		2
6186 #define RDMA_INIT_FUNC_HDR_RESERVED0_MASK		0x1F
6187 #define RDMA_INIT_FUNC_HDR_RESERVED0_SHIFT		3
6188 	u8 dpt_byte_threshold_log;
6189 	u8 dpt_common_queue_id;
6190 	u8 max_num_ns_log;
6191 };
6192 
6193 /* rdma function init ramrod data */
6194 struct rdma_init_func_ramrod_data {
6195 	struct rdma_init_func_hdr params_header;
6196 	struct rdma_cnq_params dptq_params;
6197 	struct rdma_cnq_params cnq_params[NUM_OF_GLOBAL_QUEUES];
6198 };
6199 
6200 /* rdma namespace tracking ramrod data */
6201 struct rdma_namespace_tracking_ramrod_data {
6202 	u8 name_space;
6203 	u8 reserved[7];
6204 };
6205 
6206 /* RDMA ramrod command IDs */
6207 enum rdma_ramrod_cmd_id {
6208 	RDMA_RAMROD_UNUSED,
6209 	RDMA_RAMROD_FUNC_INIT,
6210 	RDMA_RAMROD_FUNC_CLOSE,
6211 	RDMA_RAMROD_REGISTER_MR,
6212 	RDMA_RAMROD_DEREGISTER_MR,
6213 	RDMA_RAMROD_CREATE_CQ,
6214 	RDMA_RAMROD_RESIZE_CQ,
6215 	RDMA_RAMROD_DESTROY_CQ,
6216 	RDMA_RAMROD_CREATE_SRQ,
6217 	RDMA_RAMROD_MODIFY_SRQ,
6218 	RDMA_RAMROD_DESTROY_SRQ,
6219 	RDMA_RAMROD_START_NS_TRACKING,
6220 	RDMA_RAMROD_STOP_NS_TRACKING,
6221 	MAX_RDMA_RAMROD_CMD_ID
6222 };
6223 
6224 /* rdma register tid ramrod data */
6225 struct rdma_register_tid_ramrod_data {
6226 	__le16 flags;
6227 #define RDMA_REGISTER_TID_RAMROD_DATA_PAGE_SIZE_LOG_MASK	0x1F
6228 #define RDMA_REGISTER_TID_RAMROD_DATA_PAGE_SIZE_LOG_SHIFT	0
6229 #define RDMA_REGISTER_TID_RAMROD_DATA_TWO_LEVEL_PBL_MASK	0x1
6230 #define RDMA_REGISTER_TID_RAMROD_DATA_TWO_LEVEL_PBL_SHIFT	5
6231 #define RDMA_REGISTER_TID_RAMROD_DATA_ZERO_BASED_MASK		0x1
6232 #define RDMA_REGISTER_TID_RAMROD_DATA_ZERO_BASED_SHIFT		6
6233 #define RDMA_REGISTER_TID_RAMROD_DATA_PHY_MR_MASK		0x1
6234 #define RDMA_REGISTER_TID_RAMROD_DATA_PHY_MR_SHIFT		7
6235 #define RDMA_REGISTER_TID_RAMROD_DATA_REMOTE_READ_MASK		0x1
6236 #define RDMA_REGISTER_TID_RAMROD_DATA_REMOTE_READ_SHIFT		8
6237 #define RDMA_REGISTER_TID_RAMROD_DATA_REMOTE_WRITE_MASK		0x1
6238 #define RDMA_REGISTER_TID_RAMROD_DATA_REMOTE_WRITE_SHIFT	9
6239 #define RDMA_REGISTER_TID_RAMROD_DATA_REMOTE_ATOMIC_MASK	0x1
6240 #define RDMA_REGISTER_TID_RAMROD_DATA_REMOTE_ATOMIC_SHIFT	10
6241 #define RDMA_REGISTER_TID_RAMROD_DATA_LOCAL_WRITE_MASK		0x1
6242 #define RDMA_REGISTER_TID_RAMROD_DATA_LOCAL_WRITE_SHIFT		11
6243 #define RDMA_REGISTER_TID_RAMROD_DATA_LOCAL_READ_MASK		0x1
6244 #define RDMA_REGISTER_TID_RAMROD_DATA_LOCAL_READ_SHIFT		12
6245 #define RDMA_REGISTER_TID_RAMROD_DATA_ENABLE_MW_BIND_MASK	0x1
6246 #define RDMA_REGISTER_TID_RAMROD_DATA_ENABLE_MW_BIND_SHIFT	13
6247 #define RDMA_REGISTER_TID_RAMROD_DATA_RESERVED_MASK		0x3
6248 #define RDMA_REGISTER_TID_RAMROD_DATA_RESERVED_SHIFT		14
6249 	u8 flags1;
6250 #define RDMA_REGISTER_TID_RAMROD_DATA_PBL_PAGE_SIZE_LOG_MASK	0x1F
6251 #define RDMA_REGISTER_TID_RAMROD_DATA_PBL_PAGE_SIZE_LOG_SHIFT	0
6252 #define RDMA_REGISTER_TID_RAMROD_DATA_TID_TYPE_MASK		0x7
6253 #define RDMA_REGISTER_TID_RAMROD_DATA_TID_TYPE_SHIFT		5
6254 	u8 flags2;
6255 #define RDMA_REGISTER_TID_RAMROD_DATA_DMA_MR_MASK		0x1
6256 #define RDMA_REGISTER_TID_RAMROD_DATA_DMA_MR_SHIFT		0
6257 #define RDMA_REGISTER_TID_RAMROD_DATA_DIF_ON_HOST_FLG_MASK	0x1
6258 #define RDMA_REGISTER_TID_RAMROD_DATA_DIF_ON_HOST_FLG_SHIFT	1
6259 #define RDMA_REGISTER_TID_RAMROD_DATA_RESERVED1_MASK		0x3F
6260 #define RDMA_REGISTER_TID_RAMROD_DATA_RESERVED1_SHIFT		2
6261 	u8 key;
6262 	u8 length_hi;
6263 	u8 vf_id;
6264 	u8 vf_valid;
6265 	__le16 pd;
6266 	__le16 reserved2;
6267 	__le32 length_lo;
6268 	__le32 itid;
6269 	__le32 reserved3;
6270 	struct regpair va;
6271 	struct regpair pbl_base;
6272 	struct regpair dif_error_addr;
6273 	__le32 reserved4[4];
6274 };
6275 
6276 /* rdma resize cq output params */
6277 struct rdma_resize_cq_output_params {
6278 	__le32 old_cq_cons;
6279 	__le32 old_cq_prod;
6280 };
6281 
6282 /* rdma resize cq ramrod data */
6283 struct rdma_resize_cq_ramrod_data {
6284 	u8 flags;
6285 #define RDMA_RESIZE_CQ_RAMROD_DATA_TOGGLE_BIT_MASK		0x1
6286 #define RDMA_RESIZE_CQ_RAMROD_DATA_TOGGLE_BIT_SHIFT		0
6287 #define RDMA_RESIZE_CQ_RAMROD_DATA_IS_TWO_LEVEL_PBL_MASK	0x1
6288 #define RDMA_RESIZE_CQ_RAMROD_DATA_IS_TWO_LEVEL_PBL_SHIFT	1
6289 #define RDMA_RESIZE_CQ_RAMROD_DATA_VF_ID_VALID_MASK		0x1
6290 #define RDMA_RESIZE_CQ_RAMROD_DATA_VF_ID_VALID_SHIFT		2
6291 #define RDMA_RESIZE_CQ_RAMROD_DATA_RESERVED_MASK		0x1F
6292 #define RDMA_RESIZE_CQ_RAMROD_DATA_RESERVED_SHIFT		3
6293 	u8 pbl_log_page_size;
6294 	__le16 pbl_num_pages;
6295 	__le32 max_cqes;
6296 	struct regpair pbl_addr;
6297 	struct regpair output_params_addr;
6298 	u8 vf_id;
6299 	u8 reserved1[7];
6300 };
6301 
6302 /* The rdma SRQ context */
6303 struct rdma_srq_context {
6304 	struct regpair temp[8];
6305 };
6306 
6307 /* rdma create qp requester ramrod data */
6308 struct rdma_srq_create_ramrod_data {
6309 	u8 flags;
6310 #define RDMA_SRQ_CREATE_RAMROD_DATA_XRC_FLAG_MASK         0x1
6311 #define RDMA_SRQ_CREATE_RAMROD_DATA_XRC_FLAG_SHIFT        0
6312 #define RDMA_SRQ_CREATE_RAMROD_DATA_RESERVED_KEY_EN_MASK  0x1
6313 #define RDMA_SRQ_CREATE_RAMROD_DATA_RESERVED_KEY_EN_SHIFT 1
6314 #define RDMA_SRQ_CREATE_RAMROD_DATA_RESERVED1_MASK        0x3F
6315 #define RDMA_SRQ_CREATE_RAMROD_DATA_RESERVED1_SHIFT       2
6316 	u8 reserved2;
6317 	__le16 xrc_domain;
6318 	__le32 xrc_srq_cq_cid;
6319 	struct regpair pbl_base_addr;
6320 	__le16 pages_in_srq_pbl;
6321 	__le16 pd_id;
6322 	struct rdma_srq_id srq_id;
6323 	__le16 page_size;
6324 	__le16 reserved3;
6325 	__le32 reserved4;
6326 	struct regpair producers_addr;
6327 };
6328 
6329 /* rdma create qp requester ramrod data */
6330 struct rdma_srq_destroy_ramrod_data {
6331 	struct rdma_srq_id srq_id;
6332 	__le32 reserved;
6333 };
6334 
6335 /* rdma create qp requester ramrod data */
6336 struct rdma_srq_modify_ramrod_data {
6337 	struct rdma_srq_id srq_id;
6338 	__le32 wqe_limit;
6339 };
6340 
6341 /* RDMA Tid type enumeration (for register_tid ramrod) */
6342 enum rdma_tid_type {
6343 	RDMA_TID_REGISTERED_MR,
6344 	RDMA_TID_FMR,
6345 	RDMA_TID_MW,
6346 	MAX_RDMA_TID_TYPE
6347 };
6348 
6349 /* The rdma XRC SRQ context */
6350 struct rdma_xrc_srq_context {
6351 	struct regpair temp[9];
6352 };
6353 
6354 struct tstorm_rdma_task_ag_ctx {
6355 	u8 byte0;
6356 	u8 byte1;
6357 	__le16 word0;
6358 	u8 flags0;
6359 #define TSTORM_RDMA_TASK_AG_CTX_NIBBLE0_MASK		0xF
6360 #define TSTORM_RDMA_TASK_AG_CTX_NIBBLE0_SHIFT	0
6361 #define TSTORM_RDMA_TASK_AG_CTX_BIT0_MASK		0x1
6362 #define TSTORM_RDMA_TASK_AG_CTX_BIT0_SHIFT		4
6363 #define TSTORM_RDMA_TASK_AG_CTX_BIT1_MASK		0x1
6364 #define TSTORM_RDMA_TASK_AG_CTX_BIT1_SHIFT		5
6365 #define TSTORM_RDMA_TASK_AG_CTX_BIT2_MASK		0x1
6366 #define TSTORM_RDMA_TASK_AG_CTX_BIT2_SHIFT		6
6367 #define TSTORM_RDMA_TASK_AG_CTX_BIT3_MASK		0x1
6368 #define TSTORM_RDMA_TASK_AG_CTX_BIT3_SHIFT		7
6369 	u8 flags1;
6370 #define TSTORM_RDMA_TASK_AG_CTX_BIT4_MASK	0x1
6371 #define TSTORM_RDMA_TASK_AG_CTX_BIT4_SHIFT	0
6372 #define TSTORM_RDMA_TASK_AG_CTX_BIT5_MASK	0x1
6373 #define TSTORM_RDMA_TASK_AG_CTX_BIT5_SHIFT	1
6374 #define TSTORM_RDMA_TASK_AG_CTX_CF0_MASK	0x3
6375 #define TSTORM_RDMA_TASK_AG_CTX_CF0_SHIFT	2
6376 #define TSTORM_RDMA_TASK_AG_CTX_CF1_MASK	0x3
6377 #define TSTORM_RDMA_TASK_AG_CTX_CF1_SHIFT	4
6378 #define TSTORM_RDMA_TASK_AG_CTX_CF2_MASK	0x3
6379 #define TSTORM_RDMA_TASK_AG_CTX_CF2_SHIFT	6
6380 	u8 flags2;
6381 #define TSTORM_RDMA_TASK_AG_CTX_CF3_MASK	0x3
6382 #define TSTORM_RDMA_TASK_AG_CTX_CF3_SHIFT	0
6383 #define TSTORM_RDMA_TASK_AG_CTX_CF4_MASK	0x3
6384 #define TSTORM_RDMA_TASK_AG_CTX_CF4_SHIFT	2
6385 #define TSTORM_RDMA_TASK_AG_CTX_CF5_MASK	0x3
6386 #define TSTORM_RDMA_TASK_AG_CTX_CF5_SHIFT	4
6387 #define TSTORM_RDMA_TASK_AG_CTX_CF6_MASK	0x3
6388 #define TSTORM_RDMA_TASK_AG_CTX_CF6_SHIFT	6
6389 	u8 flags3;
6390 #define TSTORM_RDMA_TASK_AG_CTX_CF7_MASK	0x3
6391 #define TSTORM_RDMA_TASK_AG_CTX_CF7_SHIFT	0
6392 #define TSTORM_RDMA_TASK_AG_CTX_CF0EN_MASK	0x1
6393 #define TSTORM_RDMA_TASK_AG_CTX_CF0EN_SHIFT	2
6394 #define TSTORM_RDMA_TASK_AG_CTX_CF1EN_MASK	0x1
6395 #define TSTORM_RDMA_TASK_AG_CTX_CF1EN_SHIFT	3
6396 #define TSTORM_RDMA_TASK_AG_CTX_CF2EN_MASK	0x1
6397 #define TSTORM_RDMA_TASK_AG_CTX_CF2EN_SHIFT	4
6398 #define TSTORM_RDMA_TASK_AG_CTX_CF3EN_MASK	0x1
6399 #define TSTORM_RDMA_TASK_AG_CTX_CF3EN_SHIFT	5
6400 #define TSTORM_RDMA_TASK_AG_CTX_CF4EN_MASK	0x1
6401 #define TSTORM_RDMA_TASK_AG_CTX_CF4EN_SHIFT	6
6402 #define TSTORM_RDMA_TASK_AG_CTX_CF5EN_MASK	0x1
6403 #define TSTORM_RDMA_TASK_AG_CTX_CF5EN_SHIFT	7
6404 	u8 flags4;
6405 #define TSTORM_RDMA_TASK_AG_CTX_CF6EN_MASK		0x1
6406 #define TSTORM_RDMA_TASK_AG_CTX_CF6EN_SHIFT		0
6407 #define TSTORM_RDMA_TASK_AG_CTX_CF7EN_MASK		0x1
6408 #define TSTORM_RDMA_TASK_AG_CTX_CF7EN_SHIFT		1
6409 #define TSTORM_RDMA_TASK_AG_CTX_RULE0EN_MASK		0x1
6410 #define TSTORM_RDMA_TASK_AG_CTX_RULE0EN_SHIFT	2
6411 #define TSTORM_RDMA_TASK_AG_CTX_RULE1EN_MASK		0x1
6412 #define TSTORM_RDMA_TASK_AG_CTX_RULE1EN_SHIFT	3
6413 #define TSTORM_RDMA_TASK_AG_CTX_RULE2EN_MASK		0x1
6414 #define TSTORM_RDMA_TASK_AG_CTX_RULE2EN_SHIFT	4
6415 #define TSTORM_RDMA_TASK_AG_CTX_RULE3EN_MASK		0x1
6416 #define TSTORM_RDMA_TASK_AG_CTX_RULE3EN_SHIFT	5
6417 #define TSTORM_RDMA_TASK_AG_CTX_RULE4EN_MASK		0x1
6418 #define TSTORM_RDMA_TASK_AG_CTX_RULE4EN_SHIFT	6
6419 #define TSTORM_RDMA_TASK_AG_CTX_RULE5EN_MASK		0x1
6420 #define TSTORM_RDMA_TASK_AG_CTX_RULE5EN_SHIFT	7
6421 	u8 byte2;
6422 	__le16 word1;
6423 	__le32 reg0;
6424 	u8 byte3;
6425 	u8 byte4;
6426 	__le16 word2;
6427 	__le16 word3;
6428 	__le16 word4;
6429 	__le32 reg1;
6430 	__le32 reg2;
6431 };
6432 
6433 struct ustorm_rdma_conn_ag_ctx {
6434 	u8 reserved;
6435 	u8 byte1;
6436 	u8 flags0;
6437 #define USTORM_RDMA_CONN_AG_CTX_EXIST_IN_QM0_MASK	0x1
6438 #define USTORM_RDMA_CONN_AG_CTX_EXIST_IN_QM0_SHIFT	0
6439 #define USTORM_RDMA_CONN_AG_CTX_DIF_ERROR_REPORTED_MASK  0x1
6440 #define USTORM_RDMA_CONN_AG_CTX_DIF_ERROR_REPORTED_SHIFT 1
6441 #define USTORM_RDMA_CONN_AG_CTX_FLUSH_Q0_CF_MASK	0x3
6442 #define USTORM_RDMA_CONN_AG_CTX_FLUSH_Q0_CF_SHIFT	2
6443 #define USTORM_RDMA_CONN_AG_CTX_CF1_MASK		0x3
6444 #define USTORM_RDMA_CONN_AG_CTX_CF1_SHIFT		4
6445 #define USTORM_RDMA_CONN_AG_CTX_CF2_MASK		0x3
6446 #define USTORM_RDMA_CONN_AG_CTX_CF2_SHIFT		6
6447 	u8 flags1;
6448 #define USTORM_RDMA_CONN_AG_CTX_CF3_MASK		0x3
6449 #define USTORM_RDMA_CONN_AG_CTX_CF3_SHIFT		0
6450 #define USTORM_RDMA_CONN_AG_CTX_CQ_ARM_SE_CF_MASK	0x3
6451 #define USTORM_RDMA_CONN_AG_CTX_CQ_ARM_SE_CF_SHIFT	2
6452 #define USTORM_RDMA_CONN_AG_CTX_CQ_ARM_CF_MASK	0x3
6453 #define USTORM_RDMA_CONN_AG_CTX_CQ_ARM_CF_SHIFT	4
6454 #define USTORM_RDMA_CONN_AG_CTX_CF6_MASK		0x3
6455 #define USTORM_RDMA_CONN_AG_CTX_CF6_SHIFT		6
6456 	u8 flags2;
6457 #define USTORM_RDMA_CONN_AG_CTX_FLUSH_Q0_CF_EN_MASK		0x1
6458 #define USTORM_RDMA_CONN_AG_CTX_FLUSH_Q0_CF_EN_SHIFT		0
6459 #define USTORM_RDMA_CONN_AG_CTX_CF1EN_MASK			0x1
6460 #define USTORM_RDMA_CONN_AG_CTX_CF1EN_SHIFT			1
6461 #define USTORM_RDMA_CONN_AG_CTX_CF2EN_MASK			0x1
6462 #define USTORM_RDMA_CONN_AG_CTX_CF2EN_SHIFT			2
6463 #define USTORM_RDMA_CONN_AG_CTX_CF3EN_MASK			0x1
6464 #define USTORM_RDMA_CONN_AG_CTX_CF3EN_SHIFT			3
6465 #define USTORM_RDMA_CONN_AG_CTX_CQ_ARM_SE_CF_EN_MASK		0x1
6466 #define USTORM_RDMA_CONN_AG_CTX_CQ_ARM_SE_CF_EN_SHIFT	4
6467 #define USTORM_RDMA_CONN_AG_CTX_CQ_ARM_CF_EN_MASK		0x1
6468 #define USTORM_RDMA_CONN_AG_CTX_CQ_ARM_CF_EN_SHIFT		5
6469 #define USTORM_RDMA_CONN_AG_CTX_CF6EN_MASK			0x1
6470 #define USTORM_RDMA_CONN_AG_CTX_CF6EN_SHIFT			6
6471 #define USTORM_RDMA_CONN_AG_CTX_CQ_SE_EN_MASK		0x1
6472 #define USTORM_RDMA_CONN_AG_CTX_CQ_SE_EN_SHIFT		7
6473 	u8 flags3;
6474 #define USTORM_RDMA_CONN_AG_CTX_CQ_EN_MASK		0x1
6475 #define USTORM_RDMA_CONN_AG_CTX_CQ_EN_SHIFT		0
6476 #define USTORM_RDMA_CONN_AG_CTX_RULE2EN_MASK		0x1
6477 #define USTORM_RDMA_CONN_AG_CTX_RULE2EN_SHIFT	1
6478 #define USTORM_RDMA_CONN_AG_CTX_RULE3EN_MASK		0x1
6479 #define USTORM_RDMA_CONN_AG_CTX_RULE3EN_SHIFT	2
6480 #define USTORM_RDMA_CONN_AG_CTX_RULE4EN_MASK		0x1
6481 #define USTORM_RDMA_CONN_AG_CTX_RULE4EN_SHIFT	3
6482 #define USTORM_RDMA_CONN_AG_CTX_RULE5EN_MASK		0x1
6483 #define USTORM_RDMA_CONN_AG_CTX_RULE5EN_SHIFT	4
6484 #define USTORM_RDMA_CONN_AG_CTX_RULE6EN_MASK		0x1
6485 #define USTORM_RDMA_CONN_AG_CTX_RULE6EN_SHIFT	5
6486 #define USTORM_RDMA_CONN_AG_CTX_RULE7EN_MASK		0x1
6487 #define USTORM_RDMA_CONN_AG_CTX_RULE7EN_SHIFT	6
6488 #define USTORM_RDMA_CONN_AG_CTX_RULE8EN_MASK		0x1
6489 #define USTORM_RDMA_CONN_AG_CTX_RULE8EN_SHIFT	7
6490 	u8 byte2;
6491 	u8 nvmf_only;
6492 	__le16 conn_dpi;
6493 	__le16 word1;
6494 	__le32 cq_cons;
6495 	__le32 cq_se_prod;
6496 	__le32 cq_prod;
6497 	__le32 reg3;
6498 	__le16 int_timeout;
6499 	__le16 word3;
6500 };
6501 
6502 struct xstorm_roce_conn_ag_ctx {
6503 	u8 reserved0;
6504 	u8 state;
6505 	u8 flags0;
6506 #define XSTORM_ROCE_CONN_AG_CTX_EXIST_IN_QM0_MASK      0x1
6507 #define XSTORM_ROCE_CONN_AG_CTX_EXIST_IN_QM0_SHIFT     0
6508 #define XSTORM_ROCE_CONN_AG_CTX_BIT1_MASK              0x1
6509 #define XSTORM_ROCE_CONN_AG_CTX_BIT1_SHIFT             1
6510 #define XSTORM_ROCE_CONN_AG_CTX_BIT2_MASK              0x1
6511 #define XSTORM_ROCE_CONN_AG_CTX_BIT2_SHIFT             2
6512 #define XSTORM_ROCE_CONN_AG_CTX_EXIST_IN_QM3_MASK      0x1
6513 #define XSTORM_ROCE_CONN_AG_CTX_EXIST_IN_QM3_SHIFT     3
6514 #define XSTORM_ROCE_CONN_AG_CTX_BIT4_MASK              0x1
6515 #define XSTORM_ROCE_CONN_AG_CTX_BIT4_SHIFT             4
6516 #define XSTORM_ROCE_CONN_AG_CTX_BIT5_MASK              0x1
6517 #define XSTORM_ROCE_CONN_AG_CTX_BIT5_SHIFT             5
6518 #define XSTORM_ROCE_CONN_AG_CTX_BIT6_MASK              0x1
6519 #define XSTORM_ROCE_CONN_AG_CTX_BIT6_SHIFT             6
6520 #define XSTORM_ROCE_CONN_AG_CTX_BIT7_MASK              0x1
6521 #define XSTORM_ROCE_CONN_AG_CTX_BIT7_SHIFT             7
6522 	u8 flags1;
6523 #define XSTORM_ROCE_CONN_AG_CTX_BIT8_MASK              0x1
6524 #define XSTORM_ROCE_CONN_AG_CTX_BIT8_SHIFT             0
6525 #define XSTORM_ROCE_CONN_AG_CTX_BIT9_MASK              0x1
6526 #define XSTORM_ROCE_CONN_AG_CTX_BIT9_SHIFT             1
6527 #define XSTORM_ROCE_CONN_AG_CTX_BIT10_MASK             0x1
6528 #define XSTORM_ROCE_CONN_AG_CTX_BIT10_SHIFT            2
6529 #define XSTORM_ROCE_CONN_AG_CTX_BIT11_MASK             0x1
6530 #define XSTORM_ROCE_CONN_AG_CTX_BIT11_SHIFT            3
6531 #define XSTORM_ROCE_CONN_AG_CTX_MSDM_FLUSH_MASK        0x1
6532 #define XSTORM_ROCE_CONN_AG_CTX_MSDM_FLUSH_SHIFT       4
6533 #define XSTORM_ROCE_CONN_AG_CTX_MSEM_FLUSH_MASK        0x1
6534 #define XSTORM_ROCE_CONN_AG_CTX_MSEM_FLUSH_SHIFT       5
6535 #define XSTORM_ROCE_CONN_AG_CTX_BIT14_MASK	       0x1
6536 #define XSTORM_ROCE_CONN_AG_CTX_BIT14_SHIFT	       6
6537 #define XSTORM_ROCE_CONN_AG_CTX_YSTORM_FLUSH_MASK      0x1
6538 #define XSTORM_ROCE_CONN_AG_CTX_YSTORM_FLUSH_SHIFT     7
6539 	u8 flags2;
6540 #define XSTORM_ROCE_CONN_AG_CTX_CF0_MASK               0x3
6541 #define XSTORM_ROCE_CONN_AG_CTX_CF0_SHIFT              0
6542 #define XSTORM_ROCE_CONN_AG_CTX_CF1_MASK               0x3
6543 #define XSTORM_ROCE_CONN_AG_CTX_CF1_SHIFT              2
6544 #define XSTORM_ROCE_CONN_AG_CTX_CF2_MASK               0x3
6545 #define XSTORM_ROCE_CONN_AG_CTX_CF2_SHIFT              4
6546 #define XSTORM_ROCE_CONN_AG_CTX_CF3_MASK               0x3
6547 #define XSTORM_ROCE_CONN_AG_CTX_CF3_SHIFT              6
6548 	u8 flags3;
6549 #define XSTORM_ROCE_CONN_AG_CTX_CF4_MASK               0x3
6550 #define XSTORM_ROCE_CONN_AG_CTX_CF4_SHIFT              0
6551 #define XSTORM_ROCE_CONN_AG_CTX_CF5_MASK               0x3
6552 #define XSTORM_ROCE_CONN_AG_CTX_CF5_SHIFT              2
6553 #define XSTORM_ROCE_CONN_AG_CTX_CF6_MASK               0x3
6554 #define XSTORM_ROCE_CONN_AG_CTX_CF6_SHIFT              4
6555 #define XSTORM_ROCE_CONN_AG_CTX_FLUSH_Q0_CF_MASK       0x3
6556 #define XSTORM_ROCE_CONN_AG_CTX_FLUSH_Q0_CF_SHIFT      6
6557 	u8 flags4;
6558 #define XSTORM_ROCE_CONN_AG_CTX_CF8_MASK               0x3
6559 #define XSTORM_ROCE_CONN_AG_CTX_CF8_SHIFT              0
6560 #define XSTORM_ROCE_CONN_AG_CTX_CF9_MASK               0x3
6561 #define XSTORM_ROCE_CONN_AG_CTX_CF9_SHIFT              2
6562 #define XSTORM_ROCE_CONN_AG_CTX_CF10_MASK              0x3
6563 #define XSTORM_ROCE_CONN_AG_CTX_CF10_SHIFT             4
6564 #define XSTORM_ROCE_CONN_AG_CTX_CF11_MASK              0x3
6565 #define XSTORM_ROCE_CONN_AG_CTX_CF11_SHIFT             6
6566 	u8 flags5;
6567 #define XSTORM_ROCE_CONN_AG_CTX_CF12_MASK              0x3
6568 #define XSTORM_ROCE_CONN_AG_CTX_CF12_SHIFT             0
6569 #define XSTORM_ROCE_CONN_AG_CTX_CF13_MASK              0x3
6570 #define XSTORM_ROCE_CONN_AG_CTX_CF13_SHIFT             2
6571 #define XSTORM_ROCE_CONN_AG_CTX_CF14_MASK              0x3
6572 #define XSTORM_ROCE_CONN_AG_CTX_CF14_SHIFT             4
6573 #define XSTORM_ROCE_CONN_AG_CTX_CF15_MASK              0x3
6574 #define XSTORM_ROCE_CONN_AG_CTX_CF15_SHIFT             6
6575 	u8 flags6;
6576 #define XSTORM_ROCE_CONN_AG_CTX_CF16_MASK              0x3
6577 #define XSTORM_ROCE_CONN_AG_CTX_CF16_SHIFT             0
6578 #define XSTORM_ROCE_CONN_AG_CTX_CF17_MASK              0x3
6579 #define XSTORM_ROCE_CONN_AG_CTX_CF17_SHIFT             2
6580 #define XSTORM_ROCE_CONN_AG_CTX_CF18_MASK              0x3
6581 #define XSTORM_ROCE_CONN_AG_CTX_CF18_SHIFT             4
6582 #define XSTORM_ROCE_CONN_AG_CTX_CF19_MASK              0x3
6583 #define XSTORM_ROCE_CONN_AG_CTX_CF19_SHIFT             6
6584 	u8 flags7;
6585 #define XSTORM_ROCE_CONN_AG_CTX_CF20_MASK              0x3
6586 #define XSTORM_ROCE_CONN_AG_CTX_CF20_SHIFT             0
6587 #define XSTORM_ROCE_CONN_AG_CTX_CF21_MASK              0x3
6588 #define XSTORM_ROCE_CONN_AG_CTX_CF21_SHIFT             2
6589 #define XSTORM_ROCE_CONN_AG_CTX_SLOW_PATH_MASK         0x3
6590 #define XSTORM_ROCE_CONN_AG_CTX_SLOW_PATH_SHIFT        4
6591 #define XSTORM_ROCE_CONN_AG_CTX_CF0EN_MASK             0x1
6592 #define XSTORM_ROCE_CONN_AG_CTX_CF0EN_SHIFT            6
6593 #define XSTORM_ROCE_CONN_AG_CTX_CF1EN_MASK             0x1
6594 #define XSTORM_ROCE_CONN_AG_CTX_CF1EN_SHIFT            7
6595 	u8 flags8;
6596 #define XSTORM_ROCE_CONN_AG_CTX_CF2EN_MASK             0x1
6597 #define XSTORM_ROCE_CONN_AG_CTX_CF2EN_SHIFT            0
6598 #define XSTORM_ROCE_CONN_AG_CTX_CF3EN_MASK             0x1
6599 #define XSTORM_ROCE_CONN_AG_CTX_CF3EN_SHIFT            1
6600 #define XSTORM_ROCE_CONN_AG_CTX_CF4EN_MASK             0x1
6601 #define XSTORM_ROCE_CONN_AG_CTX_CF4EN_SHIFT            2
6602 #define XSTORM_ROCE_CONN_AG_CTX_CF5EN_MASK             0x1
6603 #define XSTORM_ROCE_CONN_AG_CTX_CF5EN_SHIFT            3
6604 #define XSTORM_ROCE_CONN_AG_CTX_CF6EN_MASK             0x1
6605 #define XSTORM_ROCE_CONN_AG_CTX_CF6EN_SHIFT            4
6606 #define XSTORM_ROCE_CONN_AG_CTX_FLUSH_Q0_CF_EN_MASK    0x1
6607 #define XSTORM_ROCE_CONN_AG_CTX_FLUSH_Q0_CF_EN_SHIFT   5
6608 #define XSTORM_ROCE_CONN_AG_CTX_CF8EN_MASK             0x1
6609 #define XSTORM_ROCE_CONN_AG_CTX_CF8EN_SHIFT            6
6610 #define XSTORM_ROCE_CONN_AG_CTX_CF9EN_MASK             0x1
6611 #define XSTORM_ROCE_CONN_AG_CTX_CF9EN_SHIFT            7
6612 	u8 flags9;
6613 #define XSTORM_ROCE_CONN_AG_CTX_CF10EN_MASK            0x1
6614 #define XSTORM_ROCE_CONN_AG_CTX_CF10EN_SHIFT           0
6615 #define XSTORM_ROCE_CONN_AG_CTX_CF11EN_MASK            0x1
6616 #define XSTORM_ROCE_CONN_AG_CTX_CF11EN_SHIFT           1
6617 #define XSTORM_ROCE_CONN_AG_CTX_CF12EN_MASK            0x1
6618 #define XSTORM_ROCE_CONN_AG_CTX_CF12EN_SHIFT           2
6619 #define XSTORM_ROCE_CONN_AG_CTX_CF13EN_MASK            0x1
6620 #define XSTORM_ROCE_CONN_AG_CTX_CF13EN_SHIFT           3
6621 #define XSTORM_ROCE_CONN_AG_CTX_CF14EN_MASK            0x1
6622 #define XSTORM_ROCE_CONN_AG_CTX_CF14EN_SHIFT           4
6623 #define XSTORM_ROCE_CONN_AG_CTX_CF15EN_MASK            0x1
6624 #define XSTORM_ROCE_CONN_AG_CTX_CF15EN_SHIFT           5
6625 #define XSTORM_ROCE_CONN_AG_CTX_CF16EN_MASK            0x1
6626 #define XSTORM_ROCE_CONN_AG_CTX_CF16EN_SHIFT           6
6627 #define XSTORM_ROCE_CONN_AG_CTX_CF17EN_MASK            0x1
6628 #define XSTORM_ROCE_CONN_AG_CTX_CF17EN_SHIFT           7
6629 	u8 flags10;
6630 #define XSTORM_ROCE_CONN_AG_CTX_CF18EN_MASK            0x1
6631 #define XSTORM_ROCE_CONN_AG_CTX_CF18EN_SHIFT           0
6632 #define XSTORM_ROCE_CONN_AG_CTX_CF19EN_MASK            0x1
6633 #define XSTORM_ROCE_CONN_AG_CTX_CF19EN_SHIFT           1
6634 #define XSTORM_ROCE_CONN_AG_CTX_CF20EN_MASK            0x1
6635 #define XSTORM_ROCE_CONN_AG_CTX_CF20EN_SHIFT           2
6636 #define XSTORM_ROCE_CONN_AG_CTX_CF21EN_MASK            0x1
6637 #define XSTORM_ROCE_CONN_AG_CTX_CF21EN_SHIFT           3
6638 #define XSTORM_ROCE_CONN_AG_CTX_SLOW_PATH_EN_MASK      0x1
6639 #define XSTORM_ROCE_CONN_AG_CTX_SLOW_PATH_EN_SHIFT     4
6640 #define XSTORM_ROCE_CONN_AG_CTX_CF23EN_MASK            0x1
6641 #define XSTORM_ROCE_CONN_AG_CTX_CF23EN_SHIFT           5
6642 #define XSTORM_ROCE_CONN_AG_CTX_RULE0EN_MASK           0x1
6643 #define XSTORM_ROCE_CONN_AG_CTX_RULE0EN_SHIFT          6
6644 #define XSTORM_ROCE_CONN_AG_CTX_RULE1EN_MASK           0x1
6645 #define XSTORM_ROCE_CONN_AG_CTX_RULE1EN_SHIFT          7
6646 	u8 flags11;
6647 #define XSTORM_ROCE_CONN_AG_CTX_RULE2EN_MASK           0x1
6648 #define XSTORM_ROCE_CONN_AG_CTX_RULE2EN_SHIFT          0
6649 #define XSTORM_ROCE_CONN_AG_CTX_RULE3EN_MASK           0x1
6650 #define XSTORM_ROCE_CONN_AG_CTX_RULE3EN_SHIFT          1
6651 #define XSTORM_ROCE_CONN_AG_CTX_RULE4EN_MASK           0x1
6652 #define XSTORM_ROCE_CONN_AG_CTX_RULE4EN_SHIFT          2
6653 #define XSTORM_ROCE_CONN_AG_CTX_RULE5EN_MASK           0x1
6654 #define XSTORM_ROCE_CONN_AG_CTX_RULE5EN_SHIFT          3
6655 #define XSTORM_ROCE_CONN_AG_CTX_RULE6EN_MASK           0x1
6656 #define XSTORM_ROCE_CONN_AG_CTX_RULE6EN_SHIFT          4
6657 #define XSTORM_ROCE_CONN_AG_CTX_RULE7EN_MASK           0x1
6658 #define XSTORM_ROCE_CONN_AG_CTX_RULE7EN_SHIFT          5
6659 #define XSTORM_ROCE_CONN_AG_CTX_A0_RESERVED1_MASK      0x1
6660 #define XSTORM_ROCE_CONN_AG_CTX_A0_RESERVED1_SHIFT     6
6661 #define XSTORM_ROCE_CONN_AG_CTX_RULE9EN_MASK           0x1
6662 #define XSTORM_ROCE_CONN_AG_CTX_RULE9EN_SHIFT          7
6663 	u8 flags12;
6664 #define XSTORM_ROCE_CONN_AG_CTX_RULE10EN_MASK          0x1
6665 #define XSTORM_ROCE_CONN_AG_CTX_RULE10EN_SHIFT         0
6666 #define XSTORM_ROCE_CONN_AG_CTX_RULE11EN_MASK          0x1
6667 #define XSTORM_ROCE_CONN_AG_CTX_RULE11EN_SHIFT         1
6668 #define XSTORM_ROCE_CONN_AG_CTX_A0_RESERVED2_MASK      0x1
6669 #define XSTORM_ROCE_CONN_AG_CTX_A0_RESERVED2_SHIFT     2
6670 #define XSTORM_ROCE_CONN_AG_CTX_A0_RESERVED3_MASK      0x1
6671 #define XSTORM_ROCE_CONN_AG_CTX_A0_RESERVED3_SHIFT     3
6672 #define XSTORM_ROCE_CONN_AG_CTX_RULE14EN_MASK          0x1
6673 #define XSTORM_ROCE_CONN_AG_CTX_RULE14EN_SHIFT         4
6674 #define XSTORM_ROCE_CONN_AG_CTX_RULE15EN_MASK          0x1
6675 #define XSTORM_ROCE_CONN_AG_CTX_RULE15EN_SHIFT         5
6676 #define XSTORM_ROCE_CONN_AG_CTX_RULE16EN_MASK          0x1
6677 #define XSTORM_ROCE_CONN_AG_CTX_RULE16EN_SHIFT         6
6678 #define XSTORM_ROCE_CONN_AG_CTX_RULE17EN_MASK          0x1
6679 #define XSTORM_ROCE_CONN_AG_CTX_RULE17EN_SHIFT         7
6680 	u8 flags13;
6681 #define XSTORM_ROCE_CONN_AG_CTX_RULE18EN_MASK          0x1
6682 #define XSTORM_ROCE_CONN_AG_CTX_RULE18EN_SHIFT         0
6683 #define XSTORM_ROCE_CONN_AG_CTX_RULE19EN_MASK          0x1
6684 #define XSTORM_ROCE_CONN_AG_CTX_RULE19EN_SHIFT         1
6685 #define XSTORM_ROCE_CONN_AG_CTX_A0_RESERVED4_MASK      0x1
6686 #define XSTORM_ROCE_CONN_AG_CTX_A0_RESERVED4_SHIFT     2
6687 #define XSTORM_ROCE_CONN_AG_CTX_A0_RESERVED5_MASK      0x1
6688 #define XSTORM_ROCE_CONN_AG_CTX_A0_RESERVED5_SHIFT     3
6689 #define XSTORM_ROCE_CONN_AG_CTX_A0_RESERVED6_MASK      0x1
6690 #define XSTORM_ROCE_CONN_AG_CTX_A0_RESERVED6_SHIFT     4
6691 #define XSTORM_ROCE_CONN_AG_CTX_A0_RESERVED7_MASK      0x1
6692 #define XSTORM_ROCE_CONN_AG_CTX_A0_RESERVED7_SHIFT     5
6693 #define XSTORM_ROCE_CONN_AG_CTX_A0_RESERVED8_MASK      0x1
6694 #define XSTORM_ROCE_CONN_AG_CTX_A0_RESERVED8_SHIFT     6
6695 #define XSTORM_ROCE_CONN_AG_CTX_A0_RESERVED9_MASK      0x1
6696 #define XSTORM_ROCE_CONN_AG_CTX_A0_RESERVED9_SHIFT     7
6697 	u8 flags14;
6698 #define XSTORM_ROCE_CONN_AG_CTX_MIGRATION_MASK         0x1
6699 #define XSTORM_ROCE_CONN_AG_CTX_MIGRATION_SHIFT        0
6700 #define XSTORM_ROCE_CONN_AG_CTX_BIT17_MASK             0x1
6701 #define XSTORM_ROCE_CONN_AG_CTX_BIT17_SHIFT            1
6702 #define XSTORM_ROCE_CONN_AG_CTX_DPM_PORT_NUM_MASK      0x3
6703 #define XSTORM_ROCE_CONN_AG_CTX_DPM_PORT_NUM_SHIFT     2
6704 #define XSTORM_ROCE_CONN_AG_CTX_RESERVED_MASK          0x1
6705 #define XSTORM_ROCE_CONN_AG_CTX_RESERVED_SHIFT         4
6706 #define XSTORM_ROCE_CONN_AG_CTX_ROCE_EDPM_ENABLE_MASK  0x1
6707 #define XSTORM_ROCE_CONN_AG_CTX_ROCE_EDPM_ENABLE_SHIFT 5
6708 #define XSTORM_ROCE_CONN_AG_CTX_CF23_MASK              0x3
6709 #define XSTORM_ROCE_CONN_AG_CTX_CF23_SHIFT             6
6710 	u8 byte2;
6711 	__le16 physical_q0;
6712 	__le16 word1;
6713 	__le16 word2;
6714 	__le16 word3;
6715 	__le16 word4;
6716 	__le16 word5;
6717 	__le16 conn_dpi;
6718 	u8 byte3;
6719 	u8 byte4;
6720 	u8 byte5;
6721 	u8 byte6;
6722 	__le32 reg0;
6723 	__le32 reg1;
6724 	__le32 reg2;
6725 	__le32 snd_nxt_psn;
6726 	__le32 reg4;
6727 	__le32 reg5;
6728 	__le32 reg6;
6729 };
6730 
6731 struct tstorm_roce_conn_ag_ctx {
6732 	u8 reserved0;
6733 	u8 byte1;
6734 	u8 flags0;
6735 #define TSTORM_ROCE_CONN_AG_CTX_EXIST_IN_QM0_MASK          0x1
6736 #define TSTORM_ROCE_CONN_AG_CTX_EXIST_IN_QM0_SHIFT         0
6737 #define TSTORM_ROCE_CONN_AG_CTX_BIT1_MASK                  0x1
6738 #define TSTORM_ROCE_CONN_AG_CTX_BIT1_SHIFT                 1
6739 #define TSTORM_ROCE_CONN_AG_CTX_BIT2_MASK                  0x1
6740 #define TSTORM_ROCE_CONN_AG_CTX_BIT2_SHIFT                 2
6741 #define TSTORM_ROCE_CONN_AG_CTX_BIT3_MASK                  0x1
6742 #define TSTORM_ROCE_CONN_AG_CTX_BIT3_SHIFT                 3
6743 #define TSTORM_ROCE_CONN_AG_CTX_BIT4_MASK                  0x1
6744 #define TSTORM_ROCE_CONN_AG_CTX_BIT4_SHIFT                 4
6745 #define TSTORM_ROCE_CONN_AG_CTX_BIT5_MASK                  0x1
6746 #define TSTORM_ROCE_CONN_AG_CTX_BIT5_SHIFT                 5
6747 #define TSTORM_ROCE_CONN_AG_CTX_CF0_MASK                   0x3
6748 #define TSTORM_ROCE_CONN_AG_CTX_CF0_SHIFT                  6
6749 	u8 flags1;
6750 #define TSTORM_ROCE_CONN_AG_CTX_MSTORM_FLUSH_CF_MASK       0x3
6751 #define TSTORM_ROCE_CONN_AG_CTX_MSTORM_FLUSH_CF_SHIFT      0
6752 #define TSTORM_ROCE_CONN_AG_CTX_CF2_MASK                   0x3
6753 #define TSTORM_ROCE_CONN_AG_CTX_CF2_SHIFT                  2
6754 #define TSTORM_ROCE_CONN_AG_CTX_TIMER_STOP_ALL_CF_MASK     0x3
6755 #define TSTORM_ROCE_CONN_AG_CTX_TIMER_STOP_ALL_CF_SHIFT    4
6756 #define TSTORM_ROCE_CONN_AG_CTX_FLUSH_Q0_CF_MASK           0x3
6757 #define TSTORM_ROCE_CONN_AG_CTX_FLUSH_Q0_CF_SHIFT          6
6758 	u8 flags2;
6759 #define TSTORM_ROCE_CONN_AG_CTX_CF5_MASK                   0x3
6760 #define TSTORM_ROCE_CONN_AG_CTX_CF5_SHIFT                  0
6761 #define TSTORM_ROCE_CONN_AG_CTX_CF6_MASK                   0x3
6762 #define TSTORM_ROCE_CONN_AG_CTX_CF6_SHIFT                  2
6763 #define TSTORM_ROCE_CONN_AG_CTX_CF7_MASK                   0x3
6764 #define TSTORM_ROCE_CONN_AG_CTX_CF7_SHIFT                  4
6765 #define TSTORM_ROCE_CONN_AG_CTX_CF8_MASK                   0x3
6766 #define TSTORM_ROCE_CONN_AG_CTX_CF8_SHIFT                  6
6767 	u8 flags3;
6768 #define TSTORM_ROCE_CONN_AG_CTX_CF9_MASK                   0x3
6769 #define TSTORM_ROCE_CONN_AG_CTX_CF9_SHIFT                  0
6770 #define TSTORM_ROCE_CONN_AG_CTX_CF10_MASK                  0x3
6771 #define TSTORM_ROCE_CONN_AG_CTX_CF10_SHIFT                 2
6772 #define TSTORM_ROCE_CONN_AG_CTX_CF0EN_MASK                 0x1
6773 #define TSTORM_ROCE_CONN_AG_CTX_CF0EN_SHIFT                4
6774 #define TSTORM_ROCE_CONN_AG_CTX_MSTORM_FLUSH_CF_EN_MASK    0x1
6775 #define TSTORM_ROCE_CONN_AG_CTX_MSTORM_FLUSH_CF_EN_SHIFT   5
6776 #define TSTORM_ROCE_CONN_AG_CTX_CF2EN_MASK                 0x1
6777 #define TSTORM_ROCE_CONN_AG_CTX_CF2EN_SHIFT                6
6778 #define TSTORM_ROCE_CONN_AG_CTX_TIMER_STOP_ALL_CF_EN_MASK  0x1
6779 #define TSTORM_ROCE_CONN_AG_CTX_TIMER_STOP_ALL_CF_EN_SHIFT 7
6780 	u8 flags4;
6781 #define TSTORM_ROCE_CONN_AG_CTX_FLUSH_Q0_CF_EN_MASK        0x1
6782 #define TSTORM_ROCE_CONN_AG_CTX_FLUSH_Q0_CF_EN_SHIFT       0
6783 #define TSTORM_ROCE_CONN_AG_CTX_CF5EN_MASK                 0x1
6784 #define TSTORM_ROCE_CONN_AG_CTX_CF5EN_SHIFT                1
6785 #define TSTORM_ROCE_CONN_AG_CTX_CF6EN_MASK                 0x1
6786 #define TSTORM_ROCE_CONN_AG_CTX_CF6EN_SHIFT                2
6787 #define TSTORM_ROCE_CONN_AG_CTX_CF7EN_MASK                 0x1
6788 #define TSTORM_ROCE_CONN_AG_CTX_CF7EN_SHIFT                3
6789 #define TSTORM_ROCE_CONN_AG_CTX_CF8EN_MASK                 0x1
6790 #define TSTORM_ROCE_CONN_AG_CTX_CF8EN_SHIFT                4
6791 #define TSTORM_ROCE_CONN_AG_CTX_CF9EN_MASK                 0x1
6792 #define TSTORM_ROCE_CONN_AG_CTX_CF9EN_SHIFT                5
6793 #define TSTORM_ROCE_CONN_AG_CTX_CF10EN_MASK                0x1
6794 #define TSTORM_ROCE_CONN_AG_CTX_CF10EN_SHIFT               6
6795 #define TSTORM_ROCE_CONN_AG_CTX_RULE0EN_MASK               0x1
6796 #define TSTORM_ROCE_CONN_AG_CTX_RULE0EN_SHIFT              7
6797 	u8 flags5;
6798 #define TSTORM_ROCE_CONN_AG_CTX_RULE1EN_MASK               0x1
6799 #define TSTORM_ROCE_CONN_AG_CTX_RULE1EN_SHIFT              0
6800 #define TSTORM_ROCE_CONN_AG_CTX_RULE2EN_MASK               0x1
6801 #define TSTORM_ROCE_CONN_AG_CTX_RULE2EN_SHIFT              1
6802 #define TSTORM_ROCE_CONN_AG_CTX_RULE3EN_MASK               0x1
6803 #define TSTORM_ROCE_CONN_AG_CTX_RULE3EN_SHIFT              2
6804 #define TSTORM_ROCE_CONN_AG_CTX_RULE4EN_MASK               0x1
6805 #define TSTORM_ROCE_CONN_AG_CTX_RULE4EN_SHIFT              3
6806 #define TSTORM_ROCE_CONN_AG_CTX_RULE5EN_MASK               0x1
6807 #define TSTORM_ROCE_CONN_AG_CTX_RULE5EN_SHIFT              4
6808 #define TSTORM_ROCE_CONN_AG_CTX_RULE6EN_MASK               0x1
6809 #define TSTORM_ROCE_CONN_AG_CTX_RULE6EN_SHIFT              5
6810 #define TSTORM_ROCE_CONN_AG_CTX_RULE7EN_MASK               0x1
6811 #define TSTORM_ROCE_CONN_AG_CTX_RULE7EN_SHIFT              6
6812 #define TSTORM_ROCE_CONN_AG_CTX_RULE8EN_MASK               0x1
6813 #define TSTORM_ROCE_CONN_AG_CTX_RULE8EN_SHIFT              7
6814 	__le32 reg0;
6815 	__le32 reg1;
6816 	__le32 reg2;
6817 	__le32 reg3;
6818 	__le32 reg4;
6819 	__le32 reg5;
6820 	__le32 reg6;
6821 	__le32 reg7;
6822 	__le32 reg8;
6823 	u8 byte2;
6824 	u8 byte3;
6825 	__le16 word0;
6826 	u8 byte4;
6827 	u8 byte5;
6828 	__le16 word1;
6829 	__le16 word2;
6830 	__le16 word3;
6831 	__le32 reg9;
6832 	__le32 reg10;
6833 };
6834 
6835 /* The roce storm context of Ystorm */
6836 struct ystorm_roce_conn_st_ctx {
6837 	struct regpair temp[2];
6838 };
6839 
6840 /* The roce storm context of Mstorm */
6841 struct pstorm_roce_conn_st_ctx {
6842 	struct regpair temp[16];
6843 };
6844 
6845 /* The roce storm context of Xstorm */
6846 struct xstorm_roce_conn_st_ctx {
6847 	struct regpair temp[24];
6848 };
6849 
6850 /* The roce storm context of Tstorm */
6851 struct tstorm_roce_conn_st_ctx {
6852 	struct regpair temp[30];
6853 };
6854 
6855 /* The roce storm context of Mstorm */
6856 struct mstorm_roce_conn_st_ctx {
6857 	struct regpair temp[6];
6858 };
6859 
6860 /* The roce storm context of Ustorm */
6861 struct ustorm_roce_conn_st_ctx {
6862 	struct regpair temp[14];
6863 };
6864 
6865 /* roce connection context */
6866 struct roce_conn_context {
6867 	struct ystorm_roce_conn_st_ctx ystorm_st_context;
6868 	struct regpair ystorm_st_padding[2];
6869 	struct pstorm_roce_conn_st_ctx pstorm_st_context;
6870 	struct xstorm_roce_conn_st_ctx xstorm_st_context;
6871 	struct xstorm_roce_conn_ag_ctx xstorm_ag_context;
6872 	struct tstorm_roce_conn_ag_ctx tstorm_ag_context;
6873 	struct timers_context timer_context;
6874 	struct ustorm_rdma_conn_ag_ctx ustorm_ag_context;
6875 	struct tstorm_roce_conn_st_ctx tstorm_st_context;
6876 	struct regpair tstorm_st_padding[2];
6877 	struct mstorm_roce_conn_st_ctx mstorm_st_context;
6878 	struct regpair mstorm_st_padding[2];
6879 	struct ustorm_roce_conn_st_ctx ustorm_st_context;
6880 	struct regpair ustorm_st_padding[2];
6881 };
6882 
6883 /* roce cqes statistics */
6884 struct roce_cqe_stats {
6885 	__le32 req_cqe_error;
6886 	__le32 req_remote_access_errors;
6887 	__le32 req_remote_invalid_request;
6888 	__le32 resp_cqe_error;
6889 	__le32 resp_local_length_error;
6890 	__le32 reserved;
6891 };
6892 
6893 /* roce create qp requester ramrod data */
6894 struct roce_create_qp_req_ramrod_data {
6895 	__le16 flags;
6896 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_ROCE_FLAVOR_MASK			0x3
6897 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_ROCE_FLAVOR_SHIFT		0
6898 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_FMR_AND_RESERVED_EN_MASK		0x1
6899 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_FMR_AND_RESERVED_EN_SHIFT	2
6900 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_SIGNALED_COMP_MASK		0x1
6901 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_SIGNALED_COMP_SHIFT		3
6902 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_PRI_MASK				0x7
6903 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_PRI_SHIFT			4
6904 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_XRC_FLAG_MASK			0x1
6905 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_XRC_FLAG_SHIFT			7
6906 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_ERR_RETRY_CNT_MASK		0xF
6907 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_ERR_RETRY_CNT_SHIFT		8
6908 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_RNR_NAK_CNT_MASK			0xF
6909 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_RNR_NAK_CNT_SHIFT		12
6910 	u8 max_ord;
6911 	u8 traffic_class;
6912 	u8 hop_limit;
6913 	u8 orq_num_pages;
6914 	__le16 p_key;
6915 	__le32 flow_label;
6916 	__le32 dst_qp_id;
6917 	__le32 ack_timeout_val;
6918 	__le32 initial_psn;
6919 	__le16 mtu;
6920 	__le16 pd;
6921 	__le16 sq_num_pages;
6922 	__le16 low_latency_phy_queue;
6923 	struct regpair sq_pbl_addr;
6924 	struct regpair orq_pbl_addr;
6925 	__le16 local_mac_addr[3];
6926 	__le16 remote_mac_addr[3];
6927 	__le16 vlan_id;
6928 	__le16 udp_src_port;
6929 	__le32 src_gid[4];
6930 	__le32 dst_gid[4];
6931 	__le32 cq_cid;
6932 	struct regpair qp_handle_for_cqe;
6933 	struct regpair qp_handle_for_async;
6934 	u8 stats_counter_id;
6935 	u8 vf_id;
6936 	u8 vport_id;
6937 	u8 flags2;
6938 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_EDPM_MODE_MASK			0x1
6939 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_EDPM_MODE_SHIFT			0
6940 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_VF_ID_VALID_MASK			0x1
6941 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_VF_ID_VALID_SHIFT		1
6942 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_FORCE_LB_MASK			0x1
6943 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_FORCE_LB_SHIFT			2
6944 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_RESERVED_MASK			0x1F
6945 #define ROCE_CREATE_QP_REQ_RAMROD_DATA_RESERVED_SHIFT			3
6946 	u8 name_space;
6947 	u8 reserved3[3];
6948 	__le16 regular_latency_phy_queue;
6949 	__le16 dpi;
6950 };
6951 
6952 /* roce create qp responder ramrod data */
6953 struct roce_create_qp_resp_ramrod_data {
6954 	__le32 flags;
6955 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_ROCE_FLAVOR_MASK		0x3
6956 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_ROCE_FLAVOR_SHIFT		0
6957 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_RDMA_RD_EN_MASK			0x1
6958 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_RDMA_RD_EN_SHIFT		2
6959 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_RDMA_WR_EN_MASK			0x1
6960 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_RDMA_WR_EN_SHIFT		3
6961 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_ATOMIC_EN_MASK			0x1
6962 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_ATOMIC_EN_SHIFT			4
6963 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_SRQ_FLG_MASK			0x1
6964 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_SRQ_FLG_SHIFT			5
6965 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_E2E_FLOW_CONTROL_EN_MASK	0x1
6966 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_E2E_FLOW_CONTROL_EN_SHIFT	6
6967 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_RESERVED_KEY_EN_MASK		0x1
6968 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_RESERVED_KEY_EN_SHIFT		7
6969 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_PRI_MASK			0x7
6970 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_PRI_SHIFT			8
6971 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_MIN_RNR_NAK_TIMER_MASK		0x1F
6972 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_MIN_RNR_NAK_TIMER_SHIFT		11
6973 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_XRC_FLAG_MASK             0x1
6974 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_XRC_FLAG_SHIFT            16
6975 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_VF_ID_VALID_MASK	0x1
6976 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_VF_ID_VALID_SHIFT	17
6977 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_FORCE_LB_MASK			0x1
6978 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_FORCE_LB_SHIFT			18
6979 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_RESERVED_MASK			0x1FFF
6980 #define ROCE_CREATE_QP_RESP_RAMROD_DATA_RESERVED_SHIFT			19
6981 	__le16 xrc_domain;
6982 	u8 max_ird;
6983 	u8 traffic_class;
6984 	u8 hop_limit;
6985 	u8 irq_num_pages;
6986 	__le16 p_key;
6987 	__le32 flow_label;
6988 	__le32 dst_qp_id;
6989 	u8 stats_counter_id;
6990 	u8 reserved1;
6991 	__le16 mtu;
6992 	__le32 initial_psn;
6993 	__le16 pd;
6994 	__le16 rq_num_pages;
6995 	struct rdma_srq_id srq_id;
6996 	struct regpair rq_pbl_addr;
6997 	struct regpair irq_pbl_addr;
6998 	__le16 local_mac_addr[3];
6999 	__le16 remote_mac_addr[3];
7000 	__le16 vlan_id;
7001 	__le16 udp_src_port;
7002 	__le32 src_gid[4];
7003 	__le32 dst_gid[4];
7004 	struct regpair qp_handle_for_cqe;
7005 	struct regpair qp_handle_for_async;
7006 	__le16 low_latency_phy_queue;
7007 	u8 vf_id;
7008 	u8 vport_id;
7009 	__le32 cq_cid;
7010 	__le16 regular_latency_phy_queue;
7011 	__le16 dpi;
7012 	__le32 src_qp_id;
7013 	u8 name_space;
7014 	u8 reserved3[3];
7015 };
7016 
7017 /* RoCE Create Suspended qp requester runtime ramrod data */
7018 struct roce_create_suspended_qp_req_runtime_ramrod_data {
7019 	__le32 flags;
7020 #define ROCE_CREATE_SUSPENDED_QP_REQ_RUNTIME_RAMROD_DATA_ERR_FLG_MASK 0x1
7021 #define ROCE_CREATE_SUSPENDED_QP_REQ_RUNTIME_RAMROD_DATA_ERR_FLG_SHIFT 0
7022 #define ROCE_CREATE_SUSPENDED_QP_REQ_RUNTIME_RAMROD_DATA_RESERVED0_MASK \
7023 								 0x7FFFFFFF
7024 #define ROCE_CREATE_SUSPENDED_QP_REQ_RUNTIME_RAMROD_DATA_RESERVED0_SHIFT 1
7025 	__le32 send_msg_psn;
7026 	__le32 inflight_sends;
7027 	__le32 ssn;
7028 };
7029 
7030 /* RoCE Create Suspended QP requester ramrod data */
7031 struct roce_create_suspended_qp_req_ramrod_data {
7032 	struct roce_create_qp_req_ramrod_data qp_params;
7033 	struct roce_create_suspended_qp_req_runtime_ramrod_data
7034 	 qp_runtime_params;
7035 };
7036 
7037 /* RoCE Create Suspended QP responder runtime params */
7038 struct roce_create_suspended_qp_resp_runtime_params {
7039 	__le32 flags;
7040 #define ROCE_CREATE_SUSPENDED_QP_RESP_RUNTIME_PARAMS_ERR_FLG_MASK 0x1
7041 #define ROCE_CREATE_SUSPENDED_QP_RESP_RUNTIME_PARAMS_ERR_FLG_SHIFT 0
7042 #define ROCE_CREATE_SUSPENDED_QP_RESP_RUNTIME_PARAMS_RDMA_ACTIVE_MASK 0x1
7043 #define ROCE_CREATE_SUSPENDED_QP_RESP_RUNTIME_PARAMS_RDMA_ACTIVE_SHIFT 1
7044 #define ROCE_CREATE_SUSPENDED_QP_RESP_RUNTIME_PARAMS_RESERVED0_MASK 0x3FFFFFFF
7045 #define ROCE_CREATE_SUSPENDED_QP_RESP_RUNTIME_PARAMS_RESERVED0_SHIFT 2
7046 	__le32 receive_msg_psn;
7047 	__le32 inflight_receives;
7048 	__le32 rmsn;
7049 	__le32 rdma_key;
7050 	struct regpair rdma_va;
7051 	__le32 rdma_length;
7052 	__le32 num_rdb_entries;
7053 	__le32 resreved;
7054 };
7055 
7056 /* RoCE RDB array entry */
7057 struct roce_resp_qp_rdb_entry {
7058 	struct regpair atomic_data;
7059 	struct regpair va;
7060 	__le32 psn;
7061 	__le32 rkey;
7062 	__le32 byte_count;
7063 	u8 op_type;
7064 	u8 reserved[3];
7065 };
7066 
7067 /* RoCE Create Suspended QP responder runtime ramrod data */
7068 struct roce_create_suspended_qp_resp_runtime_ramrod_data {
7069 	struct roce_create_suspended_qp_resp_runtime_params params;
7070 	struct roce_resp_qp_rdb_entry
7071 	 rdb_array_entries[RDMA_MAX_IRQ_ELEMS_IN_PAGE];
7072 };
7073 
7074 /* RoCE Create Suspended QP responder ramrod data */
7075 struct roce_create_suspended_qp_resp_ramrod_data {
7076 	struct roce_create_qp_resp_ramrod_data
7077 	 qp_params;
7078 	struct roce_create_suspended_qp_resp_runtime_ramrod_data
7079 	 qp_runtime_params;
7080 };
7081 
7082 /* RoCE create ud qp ramrod data */
7083 struct roce_create_ud_qp_ramrod_data {
7084 	__le16 local_mac_addr[3];
7085 	__le16 vlan_id;
7086 	__le32 src_qp_id;
7087 	u8 name_space;
7088 	u8 reserved[3];
7089 };
7090 
7091 /* roce DCQCN received statistics */
7092 struct roce_dcqcn_received_stats {
7093 	struct regpair ecn_pkt_rcv;
7094 	struct regpair cnp_pkt_rcv;
7095 	struct regpair cnp_pkt_reject;
7096 };
7097 
7098 /* roce DCQCN sent statistics */
7099 struct roce_dcqcn_sent_stats {
7100 	struct regpair cnp_pkt_sent;
7101 };
7102 
7103 /* RoCE destroy qp requester output params */
7104 struct roce_destroy_qp_req_output_params {
7105 	__le32 cq_prod;
7106 	__le32 reserved;
7107 };
7108 
7109 /* RoCE destroy qp requester ramrod data */
7110 struct roce_destroy_qp_req_ramrod_data {
7111 	struct regpair output_params_addr;
7112 };
7113 
7114 /* RoCE destroy qp responder output params */
7115 struct roce_destroy_qp_resp_output_params {
7116 	__le32 cq_prod;
7117 	__le32 reserved;
7118 };
7119 
7120 /* RoCE destroy qp responder ramrod data */
7121 struct roce_destroy_qp_resp_ramrod_data {
7122 	struct regpair output_params_addr;
7123 	__le32 src_qp_id;
7124 	__le32 reserved;
7125 };
7126 
7127 /* RoCE destroy ud qp ramrod data */
7128 struct roce_destroy_ud_qp_ramrod_data {
7129 	__le32 src_qp_id;
7130 	__le32 reserved;
7131 };
7132 
7133 /* roce error statistics */
7134 struct roce_error_stats {
7135 	__le32 resp_remote_access_errors;
7136 	__le32 reserved;
7137 };
7138 
7139 /* roce special events statistics */
7140 struct roce_events_stats {
7141 	__le32 silent_drops;
7142 	__le32 rnr_naks_sent;
7143 	__le32 retransmit_count;
7144 	__le32 icrc_error_count;
7145 	__le32 implied_nak_seq_err;
7146 	__le32 duplicate_request;
7147 	__le32 local_ack_timeout_err;
7148 	__le32 out_of_sequence;
7149 	__le32 packet_seq_err;
7150 	__le32 rnr_nak_retry_err;
7151 };
7152 
7153 /* roce slow path EQ cmd IDs */
7154 enum roce_event_opcode {
7155 	ROCE_EVENT_CREATE_QP = 13,
7156 	ROCE_EVENT_MODIFY_QP,
7157 	ROCE_EVENT_QUERY_QP,
7158 	ROCE_EVENT_DESTROY_QP,
7159 	ROCE_EVENT_CREATE_UD_QP,
7160 	ROCE_EVENT_DESTROY_UD_QP,
7161 	ROCE_EVENT_FUNC_UPDATE,
7162 	ROCE_EVENT_SUSPEND_QP,
7163 	ROCE_EVENT_QUERY_SUSPENDED_QP,
7164 	ROCE_EVENT_CREATE_SUSPENDED_QP,
7165 	ROCE_EVENT_RESUME_QP,
7166 	ROCE_EVENT_SUSPEND_UD_QP,
7167 	ROCE_EVENT_RESUME_UD_QP,
7168 	ROCE_EVENT_CREATE_SUSPENDED_UD_QP,
7169 	ROCE_EVENT_FLUSH_DPT_QP,
7170 	MAX_ROCE_EVENT_OPCODE
7171 };
7172 
7173 /* roce func init ramrod data */
7174 struct roce_init_func_params {
7175 	u8 ll2_queue_id;
7176 	u8 cnp_vlan_priority;
7177 	u8 cnp_dscp;
7178 	u8 flags;
7179 #define ROCE_INIT_FUNC_PARAMS_DCQCN_NP_EN_MASK		0x1
7180 #define ROCE_INIT_FUNC_PARAMS_DCQCN_NP_EN_SHIFT		0
7181 #define ROCE_INIT_FUNC_PARAMS_DCQCN_RP_EN_MASK		0x1
7182 #define ROCE_INIT_FUNC_PARAMS_DCQCN_RP_EN_SHIFT		1
7183 #define ROCE_INIT_FUNC_PARAMS_RESERVED0_MASK		0x3F
7184 #define ROCE_INIT_FUNC_PARAMS_RESERVED0_SHIFT		2
7185 	__le32 cnp_send_timeout;
7186 	__le16 rl_offset;
7187 	u8 rl_count_log;
7188 	u8 reserved1[5];
7189 };
7190 
7191 /* roce func init ramrod data */
7192 struct roce_init_func_ramrod_data {
7193 	struct rdma_init_func_ramrod_data rdma;
7194 	struct roce_init_func_params roce;
7195 };
7196 
7197 /* roce_ll2_cqe_data */
7198 struct roce_ll2_cqe_data {
7199 	u8 name_space;
7200 	u8 flags;
7201 #define ROCE_LL2_CQE_DATA_QP_SUSPENDED_MASK	0x1
7202 #define ROCE_LL2_CQE_DATA_QP_SUSPENDED_SHIFT	0
7203 #define ROCE_LL2_CQE_DATA_RESERVED0_MASK	0x7F
7204 #define ROCE_LL2_CQE_DATA_RESERVED0_SHIFT	1
7205 	u8 reserved1[2];
7206 	__le32 cid;
7207 };
7208 
7209 /* roce modify qp requester ramrod data */
7210 struct roce_modify_qp_req_ramrod_data {
7211 	__le16 flags;
7212 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_MOVE_TO_ERR_FLG_MASK		0x1
7213 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_MOVE_TO_ERR_FLG_SHIFT		0
7214 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_MOVE_TO_SQD_FLG_MASK		0x1
7215 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_MOVE_TO_SQD_FLG_SHIFT		1
7216 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_EN_SQD_ASYNC_NOTIFY_MASK		0x1
7217 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_EN_SQD_ASYNC_NOTIFY_SHIFT	2
7218 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_P_KEY_FLG_MASK			0x1
7219 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_P_KEY_FLG_SHIFT			3
7220 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_ADDRESS_VECTOR_FLG_MASK		0x1
7221 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_ADDRESS_VECTOR_FLG_SHIFT		4
7222 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_MAX_ORD_FLG_MASK			0x1
7223 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_MAX_ORD_FLG_SHIFT		5
7224 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_RNR_NAK_CNT_FLG_MASK		0x1
7225 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_RNR_NAK_CNT_FLG_SHIFT		6
7226 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_ERR_RETRY_CNT_FLG_MASK		0x1
7227 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_ERR_RETRY_CNT_FLG_SHIFT		7
7228 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_ACK_TIMEOUT_FLG_MASK		0x1
7229 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_ACK_TIMEOUT_FLG_SHIFT		8
7230 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_PRI_FLG_MASK			0x1
7231 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_PRI_FLG_SHIFT			9
7232 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_PRI_MASK				0x7
7233 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_PRI_SHIFT			10
7234 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_PHYSICAL_QUEUE_FLG_MASK		0x1
7235 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_PHYSICAL_QUEUE_FLG_SHIFT		13
7236 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_FORCE_LB_MASK			0x1
7237 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_FORCE_LB_SHIFT			14
7238 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_RESERVED1_MASK			0x1
7239 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_RESERVED1_SHIFT			15
7240 	u8 fields;
7241 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_ERR_RETRY_CNT_MASK	0xF
7242 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_ERR_RETRY_CNT_SHIFT	0
7243 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_RNR_NAK_CNT_MASK		0xF
7244 #define ROCE_MODIFY_QP_REQ_RAMROD_DATA_RNR_NAK_CNT_SHIFT	4
7245 	u8 max_ord;
7246 	u8 traffic_class;
7247 	u8 hop_limit;
7248 	__le16 p_key;
7249 	__le32 flow_label;
7250 	__le32 ack_timeout_val;
7251 	__le16 mtu;
7252 	__le16 reserved2;
7253 	__le32 reserved3[2];
7254 	__le16 low_latency_phy_queue;
7255 	__le16 regular_latency_phy_queue;
7256 	__le32 src_gid[4];
7257 	__le32 dst_gid[4];
7258 };
7259 
7260 /* roce modify qp responder ramrod data */
7261 struct roce_modify_qp_resp_ramrod_data {
7262 	__le16 flags;
7263 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_MOVE_TO_ERR_FLG_MASK		0x1
7264 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_MOVE_TO_ERR_FLG_SHIFT		0
7265 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_RDMA_RD_EN_MASK			0x1
7266 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_RDMA_RD_EN_SHIFT		1
7267 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_RDMA_WR_EN_MASK			0x1
7268 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_RDMA_WR_EN_SHIFT		2
7269 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_ATOMIC_EN_MASK			0x1
7270 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_ATOMIC_EN_SHIFT			3
7271 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_P_KEY_FLG_MASK			0x1
7272 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_P_KEY_FLG_SHIFT			4
7273 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_ADDRESS_VECTOR_FLG_MASK		0x1
7274 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_ADDRESS_VECTOR_FLG_SHIFT	5
7275 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_MAX_IRD_FLG_MASK		0x1
7276 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_MAX_IRD_FLG_SHIFT		6
7277 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_PRI_FLG_MASK			0x1
7278 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_PRI_FLG_SHIFT			7
7279 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_MIN_RNR_NAK_TIMER_FLG_MASK	0x1
7280 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_MIN_RNR_NAK_TIMER_FLG_SHIFT	8
7281 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_RDMA_OPS_EN_FLG_MASK		0x1
7282 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_RDMA_OPS_EN_FLG_SHIFT		9
7283 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_PHYSICAL_QUEUE_FLG_MASK		0x1
7284 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_PHYSICAL_QUEUE_FLG_SHIFT	10
7285 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_FORCE_LB_MASK			0x1
7286 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_FORCE_LB_SHIFT			11
7287 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_RESERVED1_MASK			0xF
7288 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_RESERVED1_SHIFT			12
7289 	u8 fields;
7290 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_PRI_MASK		0x7
7291 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_PRI_SHIFT		0
7292 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_MIN_RNR_NAK_TIMER_MASK	0x1F
7293 #define ROCE_MODIFY_QP_RESP_RAMROD_DATA_MIN_RNR_NAK_TIMER_SHIFT	3
7294 	u8 max_ird;
7295 	u8 traffic_class;
7296 	u8 hop_limit;
7297 	__le16 p_key;
7298 	__le32 flow_label;
7299 	__le16 mtu;
7300 	__le16 low_latency_phy_queue;
7301 	__le16 regular_latency_phy_queue;
7302 	u8 reserved2[6];
7303 	__le32 src_gid[4];
7304 	__le32 dst_gid[4];
7305 };
7306 
7307 /* RoCE query qp requester output params */
7308 struct roce_query_qp_req_output_params {
7309 	__le32 psn;
7310 	__le32 flags;
7311 #define ROCE_QUERY_QP_REQ_OUTPUT_PARAMS_ERR_FLG_MASK		0x1
7312 #define ROCE_QUERY_QP_REQ_OUTPUT_PARAMS_ERR_FLG_SHIFT		0
7313 #define ROCE_QUERY_QP_REQ_OUTPUT_PARAMS_SQ_DRAINING_FLG_MASK	0x1
7314 #define ROCE_QUERY_QP_REQ_OUTPUT_PARAMS_SQ_DRAINING_FLG_SHIFT	1
7315 #define ROCE_QUERY_QP_REQ_OUTPUT_PARAMS_RESERVED0_MASK		0x3FFFFFFF
7316 #define ROCE_QUERY_QP_REQ_OUTPUT_PARAMS_RESERVED0_SHIFT		2
7317 };
7318 
7319 /* RoCE query qp requester ramrod data */
7320 struct roce_query_qp_req_ramrod_data {
7321 	struct regpair output_params_addr;
7322 };
7323 
7324 /* RoCE query qp responder output params */
7325 struct roce_query_qp_resp_output_params {
7326 	__le32 psn;
7327 	__le32 flags;
7328 #define ROCE_QUERY_QP_RESP_OUTPUT_PARAMS_ERROR_FLG_MASK  0x1
7329 #define ROCE_QUERY_QP_RESP_OUTPUT_PARAMS_ERROR_FLG_SHIFT 0
7330 #define ROCE_QUERY_QP_RESP_OUTPUT_PARAMS_RESERVED0_MASK  0x7FFFFFFF
7331 #define ROCE_QUERY_QP_RESP_OUTPUT_PARAMS_RESERVED0_SHIFT 1
7332 };
7333 
7334 /* RoCE query qp responder ramrod data */
7335 struct roce_query_qp_resp_ramrod_data {
7336 	struct regpair output_params_addr;
7337 };
7338 
7339 /* RoCE Query Suspended QP requester output params */
7340 struct roce_query_suspended_qp_req_output_params {
7341 	__le32 psn;
7342 	__le32 flags;
7343 #define ROCE_QUERY_SUSPENDED_QP_REQ_OUTPUT_PARAMS_ERR_FLG_MASK		0x1
7344 #define ROCE_QUERY_SUSPENDED_QP_REQ_OUTPUT_PARAMS_ERR_FLG_SHIFT		0
7345 #define ROCE_QUERY_SUSPENDED_QP_REQ_OUTPUT_PARAMS_RESERVED0_MASK 0x7FFFFFFF
7346 #define ROCE_QUERY_SUSPENDED_QP_REQ_OUTPUT_PARAMS_RESERVED0_SHIFT	1
7347 	__le32 send_msg_psn;
7348 	__le32 inflight_sends;
7349 	__le32 ssn;
7350 	__le32 reserved;
7351 };
7352 
7353 /* RoCE Query Suspended QP requester ramrod data */
7354 struct roce_query_suspended_qp_req_ramrod_data {
7355 	struct regpair output_params_addr;
7356 };
7357 
7358 /* RoCE Query Suspended QP responder runtime params */
7359 struct roce_query_suspended_qp_resp_runtime_params {
7360 	__le32 psn;
7361 	__le32 flags;
7362 #define ROCE_QUERY_SUSPENDED_QP_RESP_RUNTIME_PARAMS_ERR_FLG_MASK 0x1
7363 #define ROCE_QUERY_SUSPENDED_QP_RESP_RUNTIME_PARAMS_ERR_FLG_SHIFT 0
7364 #define ROCE_QUERY_SUSPENDED_QP_RESP_RUNTIME_PARAMS_RDMA_ACTIVE_MASK 0x1
7365 #define ROCE_QUERY_SUSPENDED_QP_RESP_RUNTIME_PARAMS_RDMA_ACTIVE_SHIFT 1
7366 #define ROCE_QUERY_SUSPENDED_QP_RESP_RUNTIME_PARAMS_RESERVED0_MASK 0x3FFFFFFF
7367 #define ROCE_QUERY_SUSPENDED_QP_RESP_RUNTIME_PARAMS_RESERVED0_SHIFT 2
7368 	__le32 receive_msg_psn;
7369 	__le32 inflight_receives;
7370 	__le32 rmsn;
7371 	__le32 rdma_key;
7372 	struct regpair rdma_va;
7373 	__le32 rdma_length;
7374 	__le32 num_rdb_entries;
7375 };
7376 
7377 /* RoCE Query Suspended QP responder output params */
7378 struct roce_query_suspended_qp_resp_output_params {
7379 	struct roce_query_suspended_qp_resp_runtime_params runtime_params;
7380 	struct roce_resp_qp_rdb_entry
7381 	 rdb_array_entries[RDMA_MAX_IRQ_ELEMS_IN_PAGE];
7382 };
7383 
7384 /* RoCE Query Suspended QP responder ramrod data */
7385 struct roce_query_suspended_qp_resp_ramrod_data {
7386 	struct regpair output_params_addr;
7387 };
7388 
7389 /* ROCE ramrod command IDs */
7390 enum roce_ramrod_cmd_id {
7391 	ROCE_RAMROD_CREATE_QP = 13,
7392 	ROCE_RAMROD_MODIFY_QP,
7393 	ROCE_RAMROD_QUERY_QP,
7394 	ROCE_RAMROD_DESTROY_QP,
7395 	ROCE_RAMROD_CREATE_UD_QP,
7396 	ROCE_RAMROD_DESTROY_UD_QP,
7397 	ROCE_RAMROD_FUNC_UPDATE,
7398 	ROCE_RAMROD_SUSPEND_QP,
7399 	ROCE_RAMROD_QUERY_SUSPENDED_QP,
7400 	ROCE_RAMROD_CREATE_SUSPENDED_QP,
7401 	ROCE_RAMROD_RESUME_QP,
7402 	ROCE_RAMROD_SUSPEND_UD_QP,
7403 	ROCE_RAMROD_RESUME_UD_QP,
7404 	ROCE_RAMROD_CREATE_SUSPENDED_UD_QP,
7405 	ROCE_RAMROD_FLUSH_DPT_QP,
7406 	MAX_ROCE_RAMROD_CMD_ID
7407 };
7408 
7409 /* ROCE RDB array entry type */
7410 enum roce_resp_qp_rdb_entry_type {
7411 	ROCE_QP_RDB_ENTRY_RDMA_RESPONSE = 0,
7412 	ROCE_QP_RDB_ENTRY_ATOMIC_RESPONSE = 1,
7413 	ROCE_QP_RDB_ENTRY_INVALID = 2,
7414 	MAX_ROCE_RESP_QP_RDB_ENTRY_TYPE
7415 };
7416 
7417 /* RoCE func init ramrod data */
7418 struct roce_update_func_params {
7419 	u8 cnp_vlan_priority;
7420 	u8 cnp_dscp;
7421 	__le16 flags;
7422 #define ROCE_UPDATE_FUNC_PARAMS_DCQCN_NP_EN_MASK	0x1
7423 #define ROCE_UPDATE_FUNC_PARAMS_DCQCN_NP_EN_SHIFT	0
7424 #define ROCE_UPDATE_FUNC_PARAMS_DCQCN_RP_EN_MASK	0x1
7425 #define ROCE_UPDATE_FUNC_PARAMS_DCQCN_RP_EN_SHIFT	1
7426 #define ROCE_UPDATE_FUNC_PARAMS_RESERVED0_MASK		0x3FFF
7427 #define ROCE_UPDATE_FUNC_PARAMS_RESERVED0_SHIFT		2
7428 	__le32 cnp_send_timeout;
7429 };
7430 
7431 struct xstorm_roce_conn_ag_ctx_dq_ext_ld_part {
7432 	u8 reserved0;
7433 	u8 state;
7434 	u8 flags0;
7435 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_EXIST_IN_QM0_MASK	0x1
7436 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_EXIST_IN_QM0_SHIFT	0
7437 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT1_MASK		0x1
7438 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT1_SHIFT		1
7439 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT2_MASK		0x1
7440 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT2_SHIFT		2
7441 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_EXIST_IN_QM3_MASK	0x1
7442 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_EXIST_IN_QM3_SHIFT	3
7443 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT4_MASK		0x1
7444 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT4_SHIFT		4
7445 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT5_MASK		0x1
7446 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT5_SHIFT		5
7447 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT6_MASK		0x1
7448 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT6_SHIFT		6
7449 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT7_MASK		0x1
7450 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT7_SHIFT		7
7451 	u8 flags1;
7452 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT8_MASK		0x1
7453 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT8_SHIFT		0
7454 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT9_MASK		0x1
7455 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT9_SHIFT		1
7456 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT10_MASK		0x1
7457 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT10_SHIFT		2
7458 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT11_MASK		0x1
7459 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT11_SHIFT		3
7460 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_MSDM_FLUSH_MASK	0x1
7461 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_MSDM_FLUSH_SHIFT	4
7462 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_MSEM_FLUSH_MASK	0x1
7463 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_MSEM_FLUSH_SHIFT	5
7464 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT14_MASK		0x1
7465 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT14_SHIFT		6
7466 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_YSTORM_FLUSH_MASK	0x1
7467 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_YSTORM_FLUSH_SHIFT	7
7468 	u8 flags2;
7469 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF0_MASK	0x3
7470 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF0_SHIFT	0
7471 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF1_MASK	0x3
7472 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF1_SHIFT	2
7473 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF2_MASK	0x3
7474 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF2_SHIFT	4
7475 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF3_MASK	0x3
7476 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF3_SHIFT	6
7477 	u8 flags3;
7478 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF4_MASK		0x3
7479 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF4_SHIFT		0
7480 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF5_MASK		0x3
7481 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF5_SHIFT		2
7482 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF6_MASK		0x3
7483 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF6_SHIFT		4
7484 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_FLUSH_Q0_CF_MASK	0x3
7485 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_FLUSH_Q0_CF_SHIFT	6
7486 	u8 flags4;
7487 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF8_MASK	0x3
7488 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF8_SHIFT	0
7489 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF9_MASK	0x3
7490 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF9_SHIFT	2
7491 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF10_MASK	0x3
7492 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF10_SHIFT	4
7493 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF11_MASK	0x3
7494 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF11_SHIFT	6
7495 	u8 flags5;
7496 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF12_MASK	0x3
7497 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF12_SHIFT	0
7498 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF13_MASK	0x3
7499 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF13_SHIFT	2
7500 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF14_MASK	0x3
7501 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF14_SHIFT	4
7502 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF15_MASK	0x3
7503 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF15_SHIFT	6
7504 	u8 flags6;
7505 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF16_MASK	0x3
7506 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF16_SHIFT	0
7507 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF17_MASK	0x3
7508 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF17_SHIFT	2
7509 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF18_MASK	0x3
7510 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF18_SHIFT	4
7511 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF19_MASK	0x3
7512 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF19_SHIFT	6
7513 	u8 flags7;
7514 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF20_MASK		0x3
7515 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF20_SHIFT		0
7516 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF21_MASK		0x3
7517 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF21_SHIFT		2
7518 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_SLOW_PATH_MASK		0x3
7519 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_SLOW_PATH_SHIFT	4
7520 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF0EN_MASK		0x1
7521 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF0EN_SHIFT		6
7522 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF1EN_MASK		0x1
7523 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF1EN_SHIFT		7
7524 	u8 flags8;
7525 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF2EN_MASK		0x1
7526 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF2EN_SHIFT		0
7527 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF3EN_MASK		0x1
7528 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF3EN_SHIFT		1
7529 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF4EN_MASK		0x1
7530 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF4EN_SHIFT		2
7531 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF5EN_MASK		0x1
7532 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF5EN_SHIFT		3
7533 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF6EN_MASK		0x1
7534 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF6EN_SHIFT		4
7535 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_FLUSH_Q0_CF_EN_MASK	0x1
7536 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_FLUSH_Q0_CF_EN_SHIFT	5
7537 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF8EN_MASK		0x1
7538 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF8EN_SHIFT		6
7539 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF9EN_MASK		0x1
7540 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF9EN_SHIFT		7
7541 	u8 flags9;
7542 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF10EN_MASK	0x1
7543 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF10EN_SHIFT	0
7544 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF11EN_MASK	0x1
7545 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF11EN_SHIFT	1
7546 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF12EN_MASK	0x1
7547 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF12EN_SHIFT	2
7548 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF13EN_MASK	0x1
7549 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF13EN_SHIFT	3
7550 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF14EN_MASK	0x1
7551 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF14EN_SHIFT	4
7552 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF15EN_MASK	0x1
7553 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF15EN_SHIFT	5
7554 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF16EN_MASK	0x1
7555 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF16EN_SHIFT	6
7556 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF17EN_MASK	0x1
7557 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF17EN_SHIFT	7
7558 	u8 flags10;
7559 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF18EN_MASK		0x1
7560 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF18EN_SHIFT		0
7561 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF19EN_MASK		0x1
7562 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF19EN_SHIFT		1
7563 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF20EN_MASK		0x1
7564 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF20EN_SHIFT		2
7565 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF21EN_MASK		0x1
7566 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF21EN_SHIFT		3
7567 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_SLOW_PATH_EN_MASK	0x1
7568 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_SLOW_PATH_EN_SHIFT	4
7569 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF23EN_MASK		0x1
7570 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF23EN_SHIFT		5
7571 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE0EN_MASK		0x1
7572 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE0EN_SHIFT		6
7573 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE1EN_MASK		0x1
7574 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE1EN_SHIFT		7
7575 	u8 flags11;
7576 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE2EN_MASK		0x1
7577 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE2EN_SHIFT		0
7578 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE3EN_MASK		0x1
7579 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE3EN_SHIFT		1
7580 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE4EN_MASK		0x1
7581 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE4EN_SHIFT		2
7582 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE5EN_MASK		0x1
7583 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE5EN_SHIFT		3
7584 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE6EN_MASK		0x1
7585 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE6EN_SHIFT		4
7586 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE7EN_MASK		0x1
7587 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE7EN_SHIFT		5
7588 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED1_MASK	0x1
7589 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED1_SHIFT	6
7590 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE9EN_MASK		0x1
7591 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE9EN_SHIFT		7
7592 	u8 flags12;
7593 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE10EN_MASK		0x1
7594 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE10EN_SHIFT		0
7595 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE11EN_MASK		0x1
7596 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE11EN_SHIFT		1
7597 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED2_MASK	0x1
7598 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED2_SHIFT	2
7599 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED3_MASK	0x1
7600 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED3_SHIFT	3
7601 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE14EN_MASK		0x1
7602 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE14EN_SHIFT		4
7603 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE15EN_MASK		0x1
7604 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE15EN_SHIFT		5
7605 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE16EN_MASK		0x1
7606 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE16EN_SHIFT		6
7607 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE17EN_MASK		0x1
7608 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE17EN_SHIFT		7
7609 	u8 flags13;
7610 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE18EN_MASK		0x1
7611 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE18EN_SHIFT		0
7612 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE19EN_MASK		0x1
7613 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RULE19EN_SHIFT		1
7614 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED4_MASK	0x1
7615 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED4_SHIFT	2
7616 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED5_MASK	0x1
7617 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED5_SHIFT	3
7618 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED6_MASK	0x1
7619 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED6_SHIFT	4
7620 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED7_MASK	0x1
7621 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED7_SHIFT	5
7622 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED8_MASK	0x1
7623 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED8_SHIFT	6
7624 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED9_MASK	0x1
7625 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_A0_RESERVED9_SHIFT	7
7626 	u8 flags14;
7627 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_MIGRATION_MASK		0x1
7628 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_MIGRATION_SHIFT	0
7629 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT17_MASK		0x1
7630 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_BIT17_SHIFT		1
7631 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_DPM_PORT_NUM_MASK	0x3
7632 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_DPM_PORT_NUM_SHIFT	2
7633 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RESERVED_MASK		0x1
7634 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_RESERVED_SHIFT		4
7635 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_ROCE_EDPM_ENABLE_MASK	0x1
7636 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_ROCE_EDPM_ENABLE_SHIFT	5
7637 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF23_MASK		0x3
7638 #define E4XSTORMROCECONNAGCTXDQEXTLDPART_CF23_SHIFT		6
7639 	u8 byte2;
7640 	__le16 physical_q0;
7641 	__le16 word1;
7642 	__le16 word2;
7643 	__le16 word3;
7644 	__le16 word4;
7645 	__le16 word5;
7646 	__le16 conn_dpi;
7647 	u8 byte3;
7648 	u8 byte4;
7649 	u8 byte5;
7650 	u8 byte6;
7651 	__le32 reg0;
7652 	__le32 reg1;
7653 	__le32 reg2;
7654 	__le32 snd_nxt_psn;
7655 	__le32 reg4;
7656 };
7657 
7658 struct mstorm_roce_conn_ag_ctx {
7659 	u8 byte0;
7660 	u8 byte1;
7661 	u8 flags0;
7662 #define MSTORM_ROCE_CONN_AG_CTX_BIT0_MASK     0x1
7663 #define MSTORM_ROCE_CONN_AG_CTX_BIT0_SHIFT    0
7664 #define MSTORM_ROCE_CONN_AG_CTX_BIT1_MASK     0x1
7665 #define MSTORM_ROCE_CONN_AG_CTX_BIT1_SHIFT    1
7666 #define MSTORM_ROCE_CONN_AG_CTX_CF0_MASK      0x3
7667 #define MSTORM_ROCE_CONN_AG_CTX_CF0_SHIFT     2
7668 #define MSTORM_ROCE_CONN_AG_CTX_CF1_MASK      0x3
7669 #define MSTORM_ROCE_CONN_AG_CTX_CF1_SHIFT     4
7670 #define MSTORM_ROCE_CONN_AG_CTX_CF2_MASK      0x3
7671 #define MSTORM_ROCE_CONN_AG_CTX_CF2_SHIFT     6
7672 	u8 flags1;
7673 #define MSTORM_ROCE_CONN_AG_CTX_CF0EN_MASK    0x1
7674 #define MSTORM_ROCE_CONN_AG_CTX_CF0EN_SHIFT   0
7675 #define MSTORM_ROCE_CONN_AG_CTX_CF1EN_MASK    0x1
7676 #define MSTORM_ROCE_CONN_AG_CTX_CF1EN_SHIFT   1
7677 #define MSTORM_ROCE_CONN_AG_CTX_CF2EN_MASK    0x1
7678 #define MSTORM_ROCE_CONN_AG_CTX_CF2EN_SHIFT   2
7679 #define MSTORM_ROCE_CONN_AG_CTX_RULE0EN_MASK  0x1
7680 #define MSTORM_ROCE_CONN_AG_CTX_RULE0EN_SHIFT 3
7681 #define MSTORM_ROCE_CONN_AG_CTX_RULE1EN_MASK  0x1
7682 #define MSTORM_ROCE_CONN_AG_CTX_RULE1EN_SHIFT 4
7683 #define MSTORM_ROCE_CONN_AG_CTX_RULE2EN_MASK  0x1
7684 #define MSTORM_ROCE_CONN_AG_CTX_RULE2EN_SHIFT 5
7685 #define MSTORM_ROCE_CONN_AG_CTX_RULE3EN_MASK  0x1
7686 #define MSTORM_ROCE_CONN_AG_CTX_RULE3EN_SHIFT 6
7687 #define MSTORM_ROCE_CONN_AG_CTX_RULE4EN_MASK  0x1
7688 #define MSTORM_ROCE_CONN_AG_CTX_RULE4EN_SHIFT 7
7689 	__le16 word0;
7690 	__le16 word1;
7691 	__le32 reg0;
7692 	__le32 reg1;
7693 };
7694 
7695 struct mstorm_roce_req_conn_ag_ctx {
7696 	u8 byte0;
7697 	u8 byte1;
7698 	u8 flags0;
7699 #define MSTORM_ROCE_REQ_CONN_AG_CTX_BIT0_MASK	0x1
7700 #define MSTORM_ROCE_REQ_CONN_AG_CTX_BIT0_SHIFT	0
7701 #define MSTORM_ROCE_REQ_CONN_AG_CTX_BIT1_MASK	0x1
7702 #define MSTORM_ROCE_REQ_CONN_AG_CTX_BIT1_SHIFT	1
7703 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF0_MASK		0x3
7704 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF0_SHIFT	2
7705 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF1_MASK		0x3
7706 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF1_SHIFT	4
7707 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF2_MASK		0x3
7708 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF2_SHIFT	6
7709 	u8 flags1;
7710 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF0EN_MASK	0x1
7711 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF0EN_SHIFT	0
7712 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF1EN_MASK	0x1
7713 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF1EN_SHIFT	1
7714 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF2EN_MASK	0x1
7715 #define MSTORM_ROCE_REQ_CONN_AG_CTX_CF2EN_SHIFT	2
7716 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_MASK	0x1
7717 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_SHIFT	3
7718 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_MASK	0x1
7719 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_SHIFT	4
7720 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE2EN_MASK	0x1
7721 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE2EN_SHIFT	5
7722 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_MASK	0x1
7723 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_SHIFT	6
7724 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_MASK	0x1
7725 #define MSTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_SHIFT	7
7726 	__le16 word0;
7727 	__le16 word1;
7728 	__le32 reg0;
7729 	__le32 reg1;
7730 };
7731 
7732 struct mstorm_roce_resp_conn_ag_ctx {
7733 	u8 byte0;
7734 	u8 byte1;
7735 	u8 flags0;
7736 #define MSTORM_ROCE_RESP_CONN_AG_CTX_BIT0_MASK	0x1
7737 #define MSTORM_ROCE_RESP_CONN_AG_CTX_BIT0_SHIFT	0
7738 #define MSTORM_ROCE_RESP_CONN_AG_CTX_BIT1_MASK	0x1
7739 #define MSTORM_ROCE_RESP_CONN_AG_CTX_BIT1_SHIFT	1
7740 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF0_MASK	0x3
7741 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF0_SHIFT	2
7742 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF1_MASK	0x3
7743 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF1_SHIFT	4
7744 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF2_MASK	0x3
7745 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF2_SHIFT	6
7746 	u8 flags1;
7747 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_MASK	0x1
7748 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_SHIFT	0
7749 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF1EN_MASK	0x1
7750 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF1EN_SHIFT	1
7751 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF2EN_MASK	0x1
7752 #define MSTORM_ROCE_RESP_CONN_AG_CTX_CF2EN_SHIFT	2
7753 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_MASK	0x1
7754 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_SHIFT	3
7755 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_MASK	0x1
7756 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_SHIFT	4
7757 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_MASK	0x1
7758 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_SHIFT	5
7759 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_MASK	0x1
7760 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_SHIFT	6
7761 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_MASK	0x1
7762 #define MSTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_SHIFT	7
7763 	__le16 word0;
7764 	__le16 word1;
7765 	__le32 reg0;
7766 	__le32 reg1;
7767 };
7768 
7769 struct tstorm_roce_req_conn_ag_ctx {
7770 	u8 reserved0;
7771 	u8 state;
7772 	u8 flags0;
7773 #define TSTORM_ROCE_REQ_CONN_AG_CTX_EXIST_IN_QM0_MASK		0x1
7774 #define TSTORM_ROCE_REQ_CONN_AG_CTX_EXIST_IN_QM0_SHIFT		0
7775 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RX_ERROR_OCCURRED_MASK		0x1
7776 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RX_ERROR_OCCURRED_SHIFT		1
7777 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TX_CQE_ERROR_OCCURRED_MASK	0x1
7778 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TX_CQE_ERROR_OCCURRED_SHIFT	2
7779 #define TSTORM_ROCE_REQ_CONN_AG_CTX_BIT3_MASK			0x1
7780 #define TSTORM_ROCE_REQ_CONN_AG_CTX_BIT3_SHIFT			3
7781 #define TSTORM_ROCE_REQ_CONN_AG_CTX_MSTORM_FLUSH_MASK		0x1
7782 #define TSTORM_ROCE_REQ_CONN_AG_CTX_MSTORM_FLUSH_SHIFT		4
7783 #define TSTORM_ROCE_REQ_CONN_AG_CTX_CACHED_ORQ_MASK			0x1
7784 #define TSTORM_ROCE_REQ_CONN_AG_CTX_CACHED_ORQ_SHIFT			5
7785 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TIMER_CF_MASK			0x3
7786 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TIMER_CF_SHIFT			6
7787 	u8 flags1;
7788 #define TSTORM_ROCE_REQ_CONN_AG_CTX_MSTORM_FLUSH_CF_MASK             0x3
7789 #define TSTORM_ROCE_REQ_CONN_AG_CTX_MSTORM_FLUSH_CF_SHIFT            0
7790 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_SQ_CF_MASK			0x3
7791 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_SQ_CF_SHIFT		2
7792 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TIMER_STOP_ALL_CF_MASK		0x3
7793 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TIMER_STOP_ALL_CF_SHIFT		4
7794 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_Q0_CF_MASK			0x3
7795 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_Q0_CF_SHIFT		6
7796 	u8 flags2;
7797 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FORCE_COMP_CF_MASK               0x3
7798 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FORCE_COMP_CF_SHIFT              0
7799 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SET_TIMER_CF_MASK	0x3
7800 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SET_TIMER_CF_SHIFT	2
7801 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TX_ASYNC_ERROR_CF_MASK	0x3
7802 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TX_ASYNC_ERROR_CF_SHIFT	4
7803 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RXMIT_DONE_CF_MASK	0x3
7804 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RXMIT_DONE_CF_SHIFT	6
7805 	u8 flags3;
7806 #define TSTORM_ROCE_REQ_CONN_AG_CTX_ERROR_SCAN_COMPLETED_CF_MASK	0x3
7807 #define TSTORM_ROCE_REQ_CONN_AG_CTX_ERROR_SCAN_COMPLETED_CF_SHIFT	0
7808 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SQ_DRAIN_COMPLETED_CF_MASK	0x3
7809 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SQ_DRAIN_COMPLETED_CF_SHIFT	2
7810 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TIMER_CF_EN_MASK			0x1
7811 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TIMER_CF_EN_SHIFT		4
7812 #define TSTORM_ROCE_REQ_CONN_AG_CTX_MSTORM_FLUSH_CF_EN_MASK          0x1
7813 #define TSTORM_ROCE_REQ_CONN_AG_CTX_MSTORM_FLUSH_CF_EN_SHIFT         5
7814 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_SQ_CF_EN_MASK		0x1
7815 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_SQ_CF_EN_SHIFT		6
7816 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TIMER_STOP_ALL_CF_EN_MASK	0x1
7817 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TIMER_STOP_ALL_CF_EN_SHIFT	7
7818 	u8 flags4;
7819 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_Q0_CF_EN_MASK		0x1
7820 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_Q0_CF_EN_SHIFT		0
7821 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FORCE_COMP_CF_EN_MASK            0x1
7822 #define TSTORM_ROCE_REQ_CONN_AG_CTX_FORCE_COMP_CF_EN_SHIFT           1
7823 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SET_TIMER_CF_EN_MASK		0x1
7824 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SET_TIMER_CF_EN_SHIFT		2
7825 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TX_ASYNC_ERROR_CF_EN_MASK	0x1
7826 #define TSTORM_ROCE_REQ_CONN_AG_CTX_TX_ASYNC_ERROR_CF_EN_SHIFT	3
7827 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RXMIT_DONE_CF_EN_MASK		0x1
7828 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RXMIT_DONE_CF_EN_SHIFT		4
7829 #define TSTORM_ROCE_REQ_CONN_AG_CTX_ERROR_SCAN_COMPLETED_CF_EN_MASK	0x1
7830 #define TSTORM_ROCE_REQ_CONN_AG_CTX_ERROR_SCAN_COMPLETED_CF_EN_SHIFT	5
7831 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SQ_DRAIN_COMPLETED_CF_EN_MASK	0x1
7832 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SQ_DRAIN_COMPLETED_CF_EN_SHIFT	6
7833 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_MASK			0x1
7834 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_SHIFT			7
7835 	u8 flags5;
7836 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_MASK		0x1
7837 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_SHIFT		0
7838 #define TSTORM_ROCE_REQ_CONN_AG_CTX_DIF_CNT_EN_MASK		0x1
7839 #define TSTORM_ROCE_REQ_CONN_AG_CTX_DIF_CNT_EN_SHIFT		1
7840 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_MASK		0x1
7841 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_SHIFT		2
7842 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_MASK		0x1
7843 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_SHIFT		3
7844 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE5EN_MASK		0x1
7845 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE5EN_SHIFT		4
7846 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SND_SQ_CONS_EN_MASK	0x1
7847 #define TSTORM_ROCE_REQ_CONN_AG_CTX_SND_SQ_CONS_EN_SHIFT	5
7848 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE7EN_MASK		0x1
7849 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE7EN_SHIFT		6
7850 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE8EN_MASK		0x1
7851 #define TSTORM_ROCE_REQ_CONN_AG_CTX_RULE8EN_SHIFT		7
7852 	__le32 dif_rxmit_cnt;
7853 	__le32 snd_nxt_psn;
7854 	__le32 snd_max_psn;
7855 	__le32 orq_prod;
7856 	__le32 reg4;
7857 	__le32 dif_acked_cnt;
7858 	__le32 dif_cnt;
7859 	__le32 reg7;
7860 	__le32 reg8;
7861 	u8 tx_cqe_error_type;
7862 	u8 orq_cache_idx;
7863 	__le16 snd_sq_cons_th;
7864 	u8 byte4;
7865 	u8 byte5;
7866 	__le16 snd_sq_cons;
7867 	__le16 conn_dpi;
7868 	__le16 force_comp_cons;
7869 	__le32 dif_rxmit_acked_cnt;
7870 	__le32 reg10;
7871 };
7872 
7873 struct tstorm_roce_resp_conn_ag_ctx {
7874 	u8 byte0;
7875 	u8 state;
7876 	u8 flags0;
7877 #define TSTORM_ROCE_RESP_CONN_AG_CTX_EXIST_IN_QM0_MASK		0x1
7878 #define TSTORM_ROCE_RESP_CONN_AG_CTX_EXIST_IN_QM0_SHIFT		0
7879 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RX_ERROR_NOTIFY_REQUESTER_MASK	0x1
7880 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RX_ERROR_NOTIFY_REQUESTER_SHIFT	1
7881 #define TSTORM_ROCE_RESP_CONN_AG_CTX_BIT2_MASK			0x1
7882 #define TSTORM_ROCE_RESP_CONN_AG_CTX_BIT2_SHIFT			2
7883 #define TSTORM_ROCE_RESP_CONN_AG_CTX_BIT3_MASK			0x1
7884 #define TSTORM_ROCE_RESP_CONN_AG_CTX_BIT3_SHIFT			3
7885 #define TSTORM_ROCE_RESP_CONN_AG_CTX_MSTORM_FLUSH_MASK		0x1
7886 #define TSTORM_ROCE_RESP_CONN_AG_CTX_MSTORM_FLUSH_SHIFT		4
7887 #define TSTORM_ROCE_RESP_CONN_AG_CTX_BIT5_MASK			0x1
7888 #define TSTORM_ROCE_RESP_CONN_AG_CTX_BIT5_SHIFT			5
7889 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF0_MASK			0x3
7890 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF0_SHIFT			6
7891 	u8 flags1;
7892 #define TSTORM_ROCE_RESP_CONN_AG_CTX_MSTORM_FLUSH_CF_MASK            0x3
7893 #define TSTORM_ROCE_RESP_CONN_AG_CTX_MSTORM_FLUSH_CF_SHIFT           0
7894 #define TSTORM_ROCE_RESP_CONN_AG_CTX_TX_ERROR_CF_MASK	0x3
7895 #define TSTORM_ROCE_RESP_CONN_AG_CTX_TX_ERROR_CF_SHIFT	2
7896 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF3_MASK		0x3
7897 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF3_SHIFT		4
7898 #define TSTORM_ROCE_RESP_CONN_AG_CTX_FLUSH_Q0_CF_MASK	0x3
7899 #define TSTORM_ROCE_RESP_CONN_AG_CTX_FLUSH_Q0_CF_SHIFT	6
7900 	u8 flags2;
7901 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RX_ERROR_CF_MASK                0x3
7902 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RX_ERROR_CF_SHIFT               0
7903 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF6_MASK		0x3
7904 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF6_SHIFT		2
7905 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF7_MASK		0x3
7906 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF7_SHIFT		4
7907 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF8_MASK		0x3
7908 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF8_SHIFT		6
7909 	u8 flags3;
7910 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF9_MASK		0x3
7911 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF9_SHIFT		0
7912 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF10_MASK		0x3
7913 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF10_SHIFT		2
7914 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_MASK		0x1
7915 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_SHIFT		4
7916 #define TSTORM_ROCE_RESP_CONN_AG_CTX_MSTORM_FLUSH_CF_EN_MASK         0x1
7917 #define TSTORM_ROCE_RESP_CONN_AG_CTX_MSTORM_FLUSH_CF_EN_SHIFT        5
7918 #define TSTORM_ROCE_RESP_CONN_AG_CTX_TX_ERROR_CF_EN_MASK	0x1
7919 #define TSTORM_ROCE_RESP_CONN_AG_CTX_TX_ERROR_CF_EN_SHIFT	6
7920 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF3EN_MASK		0x1
7921 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF3EN_SHIFT		7
7922 	u8 flags4;
7923 #define TSTORM_ROCE_RESP_CONN_AG_CTX_FLUSH_Q0_CF_EN_MASK		0x1
7924 #define TSTORM_ROCE_RESP_CONN_AG_CTX_FLUSH_Q0_CF_EN_SHIFT		0
7925 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RX_ERROR_CF_EN_MASK             0x1
7926 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RX_ERROR_CF_EN_SHIFT            1
7927 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF6EN_MASK			0x1
7928 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF6EN_SHIFT			2
7929 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF7EN_MASK			0x1
7930 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF7EN_SHIFT			3
7931 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF8EN_MASK			0x1
7932 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF8EN_SHIFT			4
7933 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF9EN_MASK			0x1
7934 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF9EN_SHIFT			5
7935 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF10EN_MASK			0x1
7936 #define TSTORM_ROCE_RESP_CONN_AG_CTX_CF10EN_SHIFT			6
7937 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_MASK			0x1
7938 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_SHIFT			7
7939 	u8 flags5;
7940 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_MASK		0x1
7941 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_SHIFT		0
7942 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_MASK		0x1
7943 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_SHIFT		1
7944 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_MASK		0x1
7945 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_SHIFT		2
7946 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_MASK		0x1
7947 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_SHIFT		3
7948 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE5EN_MASK		0x1
7949 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE5EN_SHIFT		4
7950 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RQ_RULE_EN_MASK		0x1
7951 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RQ_RULE_EN_SHIFT	5
7952 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE7EN_MASK		0x1
7953 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE7EN_SHIFT		6
7954 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE8EN_MASK		0x1
7955 #define TSTORM_ROCE_RESP_CONN_AG_CTX_RULE8EN_SHIFT		7
7956 	__le32 psn_and_rxmit_id_echo;
7957 	__le32 reg1;
7958 	__le32 reg2;
7959 	__le32 reg3;
7960 	__le32 reg4;
7961 	__le32 reg5;
7962 	__le32 reg6;
7963 	__le32 reg7;
7964 	__le32 reg8;
7965 	u8 tx_async_error_type;
7966 	u8 byte3;
7967 	__le16 rq_cons;
7968 	u8 byte4;
7969 	u8 byte5;
7970 	__le16 rq_prod;
7971 	__le16 conn_dpi;
7972 	__le16 irq_cons;
7973 	__le32 reg9;
7974 	__le32 reg10;
7975 };
7976 
7977 struct ustorm_roce_req_conn_ag_ctx {
7978 	u8 byte0;
7979 	u8 byte1;
7980 	u8 flags0;
7981 #define USTORM_ROCE_REQ_CONN_AG_CTX_BIT0_MASK	0x1
7982 #define USTORM_ROCE_REQ_CONN_AG_CTX_BIT0_SHIFT	0
7983 #define USTORM_ROCE_REQ_CONN_AG_CTX_BIT1_MASK	0x1
7984 #define USTORM_ROCE_REQ_CONN_AG_CTX_BIT1_SHIFT	1
7985 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF0_MASK		0x3
7986 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF0_SHIFT	2
7987 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF1_MASK		0x3
7988 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF1_SHIFT	4
7989 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF2_MASK		0x3
7990 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF2_SHIFT	6
7991 	u8 flags1;
7992 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF3_MASK		0x3
7993 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF3_SHIFT	0
7994 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF4_MASK		0x3
7995 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF4_SHIFT	2
7996 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF5_MASK		0x3
7997 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF5_SHIFT	4
7998 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF6_MASK		0x3
7999 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF6_SHIFT	6
8000 	u8 flags2;
8001 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF0EN_MASK	0x1
8002 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF0EN_SHIFT	0
8003 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF1EN_MASK	0x1
8004 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF1EN_SHIFT	1
8005 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF2EN_MASK	0x1
8006 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF2EN_SHIFT	2
8007 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF3EN_MASK	0x1
8008 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF3EN_SHIFT	3
8009 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF4EN_MASK	0x1
8010 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF4EN_SHIFT	4
8011 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF5EN_MASK	0x1
8012 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF5EN_SHIFT	5
8013 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF6EN_MASK	0x1
8014 #define USTORM_ROCE_REQ_CONN_AG_CTX_CF6EN_SHIFT	6
8015 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_MASK	0x1
8016 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_SHIFT	7
8017 	u8 flags3;
8018 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_MASK	0x1
8019 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_SHIFT	0
8020 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE2EN_MASK	0x1
8021 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE2EN_SHIFT	1
8022 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_MASK	0x1
8023 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_SHIFT	2
8024 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_MASK	0x1
8025 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_SHIFT	3
8026 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE5EN_MASK	0x1
8027 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE5EN_SHIFT	4
8028 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE6EN_MASK	0x1
8029 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE6EN_SHIFT	5
8030 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE7EN_MASK	0x1
8031 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE7EN_SHIFT	6
8032 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE8EN_MASK	0x1
8033 #define USTORM_ROCE_REQ_CONN_AG_CTX_RULE8EN_SHIFT	7
8034 	u8 byte2;
8035 	u8 byte3;
8036 	__le16 word0;
8037 	__le16 word1;
8038 	__le32 reg0;
8039 	__le32 reg1;
8040 	__le32 reg2;
8041 	__le32 reg3;
8042 	__le16 word2;
8043 	__le16 word3;
8044 };
8045 
8046 struct ustorm_roce_resp_conn_ag_ctx {
8047 	u8 byte0;
8048 	u8 byte1;
8049 	u8 flags0;
8050 #define USTORM_ROCE_RESP_CONN_AG_CTX_BIT0_MASK	0x1
8051 #define USTORM_ROCE_RESP_CONN_AG_CTX_BIT0_SHIFT	0
8052 #define USTORM_ROCE_RESP_CONN_AG_CTX_BIT1_MASK	0x1
8053 #define USTORM_ROCE_RESP_CONN_AG_CTX_BIT1_SHIFT	1
8054 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF0_MASK	0x3
8055 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF0_SHIFT	2
8056 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF1_MASK	0x3
8057 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF1_SHIFT	4
8058 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF2_MASK	0x3
8059 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF2_SHIFT	6
8060 	u8 flags1;
8061 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF3_MASK	0x3
8062 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF3_SHIFT	0
8063 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF4_MASK	0x3
8064 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF4_SHIFT	2
8065 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF5_MASK	0x3
8066 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF5_SHIFT	4
8067 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF6_MASK	0x3
8068 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF6_SHIFT	6
8069 	u8 flags2;
8070 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_MASK	0x1
8071 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_SHIFT	0
8072 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF1EN_MASK	0x1
8073 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF1EN_SHIFT	1
8074 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF2EN_MASK	0x1
8075 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF2EN_SHIFT	2
8076 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF3EN_MASK	0x1
8077 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF3EN_SHIFT	3
8078 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF4EN_MASK	0x1
8079 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF4EN_SHIFT	4
8080 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF5EN_MASK	0x1
8081 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF5EN_SHIFT	5
8082 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF6EN_MASK	0x1
8083 #define USTORM_ROCE_RESP_CONN_AG_CTX_CF6EN_SHIFT	6
8084 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_MASK	0x1
8085 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_SHIFT	7
8086 	u8 flags3;
8087 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_MASK	0x1
8088 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_SHIFT	0
8089 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_MASK	0x1
8090 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_SHIFT	1
8091 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_MASK	0x1
8092 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_SHIFT	2
8093 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_MASK	0x1
8094 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_SHIFT	3
8095 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE5EN_MASK	0x1
8096 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE5EN_SHIFT	4
8097 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE6EN_MASK	0x1
8098 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE6EN_SHIFT	5
8099 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE7EN_MASK	0x1
8100 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE7EN_SHIFT	6
8101 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE8EN_MASK	0x1
8102 #define USTORM_ROCE_RESP_CONN_AG_CTX_RULE8EN_SHIFT	7
8103 	u8 byte2;
8104 	u8 byte3;
8105 	__le16 word0;
8106 	__le16 word1;
8107 	__le32 reg0;
8108 	__le32 reg1;
8109 	__le32 reg2;
8110 	__le32 reg3;
8111 	__le16 word2;
8112 	__le16 word3;
8113 };
8114 
8115 struct xstorm_roce_req_conn_ag_ctx {
8116 	u8 reserved0;
8117 	u8 state;
8118 	u8 flags0;
8119 #define XSTORM_ROCE_REQ_CONN_AG_CTX_EXIST_IN_QM0_MASK	0x1
8120 #define XSTORM_ROCE_REQ_CONN_AG_CTX_EXIST_IN_QM0_SHIFT	0
8121 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED1_MASK		0x1
8122 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED1_SHIFT		1
8123 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED2_MASK		0x1
8124 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED2_SHIFT		2
8125 #define XSTORM_ROCE_REQ_CONN_AG_CTX_EXIST_IN_QM3_MASK	0x1
8126 #define XSTORM_ROCE_REQ_CONN_AG_CTX_EXIST_IN_QM3_SHIFT	3
8127 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED3_MASK		0x1
8128 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED3_SHIFT		4
8129 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED4_MASK		0x1
8130 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED4_SHIFT		5
8131 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED5_MASK		0x1
8132 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED5_SHIFT		6
8133 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED6_MASK		0x1
8134 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED6_SHIFT		7
8135 	u8 flags1;
8136 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED7_MASK		0x1
8137 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED7_SHIFT		0
8138 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED8_MASK		0x1
8139 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED8_SHIFT		1
8140 #define XSTORM_ROCE_REQ_CONN_AG_CTX_BIT10_MASK		0x1
8141 #define XSTORM_ROCE_REQ_CONN_AG_CTX_BIT10_SHIFT		2
8142 #define XSTORM_ROCE_REQ_CONN_AG_CTX_BIT11_MASK		0x1
8143 #define XSTORM_ROCE_REQ_CONN_AG_CTX_BIT11_SHIFT		3
8144 #define XSTORM_ROCE_REQ_CONN_AG_CTX_MSDM_FLUSH_MASK		0x1
8145 #define XSTORM_ROCE_REQ_CONN_AG_CTX_MSDM_FLUSH_SHIFT		4
8146 #define XSTORM_ROCE_REQ_CONN_AG_CTX_MSEM_FLUSH_MASK		0x1
8147 #define XSTORM_ROCE_REQ_CONN_AG_CTX_MSEM_FLUSH_SHIFT		5
8148 #define XSTORM_ROCE_REQ_CONN_AG_CTX_ERROR_STATE_MASK		0x1
8149 #define XSTORM_ROCE_REQ_CONN_AG_CTX_ERROR_STATE_SHIFT	6
8150 #define XSTORM_ROCE_REQ_CONN_AG_CTX_YSTORM_FLUSH_MASK	0x1
8151 #define XSTORM_ROCE_REQ_CONN_AG_CTX_YSTORM_FLUSH_SHIFT	7
8152 	u8 flags2;
8153 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF0_MASK		0x3
8154 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF0_SHIFT	0
8155 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF1_MASK		0x3
8156 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF1_SHIFT	2
8157 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF2_MASK		0x3
8158 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF2_SHIFT	4
8159 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF3_MASK		0x3
8160 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF3_SHIFT	6
8161 	u8 flags3;
8162 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SQ_FLUSH_CF_MASK		0x3
8163 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SQ_FLUSH_CF_SHIFT	0
8164 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RX_ERROR_CF_MASK		0x3
8165 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RX_ERROR_CF_SHIFT	2
8166 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SND_RXMIT_CF_MASK	0x3
8167 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SND_RXMIT_CF_SHIFT	4
8168 #define XSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_Q0_CF_MASK		0x3
8169 #define XSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_Q0_CF_SHIFT	6
8170 	u8 flags4;
8171 #define XSTORM_ROCE_REQ_CONN_AG_CTX_DIF_ERROR_CF_MASK        0x3
8172 #define XSTORM_ROCE_REQ_CONN_AG_CTX_DIF_ERROR_CF_SHIFT       0
8173 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SCAN_SQ_FOR_COMP_CF_MASK     0x3
8174 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SCAN_SQ_FOR_COMP_CF_SHIFT    2
8175 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF10_MASK	0x3
8176 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF10_SHIFT	4
8177 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF11_MASK	0x3
8178 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF11_SHIFT	6
8179 	u8 flags5;
8180 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF12_MASK		0x3
8181 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF12_SHIFT		0
8182 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF13_MASK		0x3
8183 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF13_SHIFT		2
8184 #define XSTORM_ROCE_REQ_CONN_AG_CTX_FMR_ENDED_CF_MASK	0x3
8185 #define XSTORM_ROCE_REQ_CONN_AG_CTX_FMR_ENDED_CF_SHIFT	4
8186 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF15_MASK		0x3
8187 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF15_SHIFT		6
8188 	u8 flags6;
8189 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF16_MASK	0x3
8190 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF16_SHIFT	0
8191 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF17_MASK	0x3
8192 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF17_SHIFT	2
8193 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF18_MASK	0x3
8194 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF18_SHIFT	4
8195 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF19_MASK	0x3
8196 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF19_SHIFT	6
8197 	u8 flags7;
8198 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF20_MASK	0x3
8199 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF20_SHIFT	0
8200 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF21_MASK	0x3
8201 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF21_SHIFT	2
8202 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SLOW_PATH_MASK	0x3
8203 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SLOW_PATH_SHIFT	4
8204 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF0EN_MASK	0x1
8205 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF0EN_SHIFT	6
8206 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF1EN_MASK	0x1
8207 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF1EN_SHIFT	7
8208 	u8 flags8;
8209 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF2EN_MASK		0x1
8210 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF2EN_SHIFT		0
8211 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF3EN_MASK		0x1
8212 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF3EN_SHIFT		1
8213 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SQ_FLUSH_CF_EN_MASK	0x1
8214 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SQ_FLUSH_CF_EN_SHIFT	2
8215 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RX_ERROR_CF_EN_MASK	0x1
8216 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RX_ERROR_CF_EN_SHIFT	3
8217 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SND_RXMIT_CF_EN_MASK	0x1
8218 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SND_RXMIT_CF_EN_SHIFT	4
8219 #define XSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_Q0_CF_EN_MASK	0x1
8220 #define XSTORM_ROCE_REQ_CONN_AG_CTX_FLUSH_Q0_CF_EN_SHIFT	5
8221 #define XSTORM_ROCE_REQ_CONN_AG_CTX_DIF_ERROR_CF_EN_MASK     0x1
8222 #define XSTORM_ROCE_REQ_CONN_AG_CTX_DIF_ERROR_CF_EN_SHIFT    6
8223 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SCAN_SQ_FOR_COMP_CF_EN_MASK  0x1
8224 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SCAN_SQ_FOR_COMP_CF_EN_SHIFT 7
8225 	u8 flags9;
8226 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF10EN_MASK		0x1
8227 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF10EN_SHIFT		0
8228 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF11EN_MASK		0x1
8229 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF11EN_SHIFT		1
8230 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF12EN_MASK		0x1
8231 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF12EN_SHIFT		2
8232 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF13EN_MASK		0x1
8233 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF13EN_SHIFT		3
8234 #define XSTORM_ROCE_REQ_CONN_AG_CTX_FME_ENDED_CF_EN_MASK	0x1
8235 #define XSTORM_ROCE_REQ_CONN_AG_CTX_FME_ENDED_CF_EN_SHIFT	4
8236 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF15EN_MASK		0x1
8237 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF15EN_SHIFT		5
8238 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF16EN_MASK		0x1
8239 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF16EN_SHIFT		6
8240 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF17EN_MASK		0x1
8241 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF17EN_SHIFT		7
8242 	u8 flags10;
8243 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF18EN_MASK		0x1
8244 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF18EN_SHIFT		0
8245 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF19EN_MASK		0x1
8246 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF19EN_SHIFT		1
8247 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF20EN_MASK		0x1
8248 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF20EN_SHIFT		2
8249 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF21EN_MASK		0x1
8250 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF21EN_SHIFT		3
8251 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SLOW_PATH_EN_MASK	0x1
8252 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SLOW_PATH_EN_SHIFT	4
8253 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF23EN_MASK		0x1
8254 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF23EN_SHIFT		5
8255 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_MASK		0x1
8256 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_SHIFT		6
8257 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_MASK		0x1
8258 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_SHIFT		7
8259 	u8 flags11;
8260 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE2EN_MASK		0x1
8261 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE2EN_SHIFT		0
8262 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_MASK		0x1
8263 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_SHIFT		1
8264 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_MASK		0x1
8265 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_SHIFT		2
8266 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE5EN_MASK		0x1
8267 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE5EN_SHIFT		3
8268 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE6EN_MASK		0x1
8269 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE6EN_SHIFT		4
8270 #define XSTORM_ROCE_REQ_CONN_AG_CTX_E2E_CREDIT_RULE_EN_MASK	0x1
8271 #define XSTORM_ROCE_REQ_CONN_AG_CTX_E2E_CREDIT_RULE_EN_SHIFT	5
8272 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED1_MASK	0x1
8273 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED1_SHIFT	6
8274 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE9EN_MASK		0x1
8275 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE9EN_SHIFT		7
8276 	u8 flags12;
8277 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SQ_PROD_EN_MASK		0x1
8278 #define XSTORM_ROCE_REQ_CONN_AG_CTX_SQ_PROD_EN_SHIFT		0
8279 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE11EN_MASK		0x1
8280 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE11EN_SHIFT		1
8281 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED2_MASK	0x1
8282 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED2_SHIFT	2
8283 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED3_MASK	0x1
8284 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED3_SHIFT	3
8285 #define XSTORM_ROCE_REQ_CONN_AG_CTX_INV_FENCE_RULE_EN_MASK	0x1
8286 #define XSTORM_ROCE_REQ_CONN_AG_CTX_INV_FENCE_RULE_EN_SHIFT	4
8287 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE15EN_MASK		0x1
8288 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE15EN_SHIFT		5
8289 #define XSTORM_ROCE_REQ_CONN_AG_CTX_ORQ_FENCE_RULE_EN_MASK	0x1
8290 #define XSTORM_ROCE_REQ_CONN_AG_CTX_ORQ_FENCE_RULE_EN_SHIFT	6
8291 #define XSTORM_ROCE_REQ_CONN_AG_CTX_MAX_ORD_RULE_EN_MASK	0x1
8292 #define XSTORM_ROCE_REQ_CONN_AG_CTX_MAX_ORD_RULE_EN_SHIFT	7
8293 	u8 flags13;
8294 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE18EN_MASK		0x1
8295 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE18EN_SHIFT		0
8296 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE19EN_MASK		0x1
8297 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RULE19EN_SHIFT		1
8298 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED4_MASK	0x1
8299 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED4_SHIFT	2
8300 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED5_MASK	0x1
8301 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED5_SHIFT	3
8302 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED6_MASK	0x1
8303 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED6_SHIFT	4
8304 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED7_MASK	0x1
8305 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED7_SHIFT	5
8306 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED8_MASK	0x1
8307 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED8_SHIFT	6
8308 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED9_MASK	0x1
8309 #define XSTORM_ROCE_REQ_CONN_AG_CTX_A0_RESERVED9_SHIFT	7
8310 	u8 flags14;
8311 #define XSTORM_ROCE_REQ_CONN_AG_CTX_MIGRATION_FLAG_MASK	0x1
8312 #define XSTORM_ROCE_REQ_CONN_AG_CTX_MIGRATION_FLAG_SHIFT	0
8313 #define XSTORM_ROCE_REQ_CONN_AG_CTX_BIT17_MASK		0x1
8314 #define XSTORM_ROCE_REQ_CONN_AG_CTX_BIT17_SHIFT		1
8315 #define XSTORM_ROCE_REQ_CONN_AG_CTX_DPM_PORT_NUM_MASK	0x3
8316 #define XSTORM_ROCE_REQ_CONN_AG_CTX_DPM_PORT_NUM_SHIFT	2
8317 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED_MASK		0x1
8318 #define XSTORM_ROCE_REQ_CONN_AG_CTX_RESERVED_SHIFT		4
8319 #define XSTORM_ROCE_REQ_CONN_AG_CTX_ROCE_EDPM_ENABLE_MASK	0x1
8320 #define XSTORM_ROCE_REQ_CONN_AG_CTX_ROCE_EDPM_ENABLE_SHIFT	5
8321 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF23_MASK		0x3
8322 #define XSTORM_ROCE_REQ_CONN_AG_CTX_CF23_SHIFT		6
8323 	u8 byte2;
8324 	__le16 physical_q0;
8325 	__le16 word1;
8326 	__le16 sq_cmp_cons;
8327 	__le16 sq_cons;
8328 	__le16 sq_prod;
8329 	__le16 dif_error_first_sq_cons;
8330 	__le16 conn_dpi;
8331 	u8 dif_error_sge_index;
8332 	u8 byte4;
8333 	u8 byte5;
8334 	u8 byte6;
8335 	__le32 lsn;
8336 	__le32 ssn;
8337 	__le32 snd_una_psn;
8338 	__le32 snd_nxt_psn;
8339 	__le32 dif_error_offset;
8340 	__le32 orq_cons_th;
8341 	__le32 orq_cons;
8342 };
8343 
8344 struct xstorm_roce_resp_conn_ag_ctx {
8345 	u8 reserved0;
8346 	u8 state;
8347 	u8 flags0;
8348 #define XSTORM_ROCE_RESP_CONN_AG_CTX_EXIST_IN_QM0_MASK	0x1
8349 #define XSTORM_ROCE_RESP_CONN_AG_CTX_EXIST_IN_QM0_SHIFT	0
8350 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED1_MASK		0x1
8351 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED1_SHIFT		1
8352 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED2_MASK		0x1
8353 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED2_SHIFT		2
8354 #define XSTORM_ROCE_RESP_CONN_AG_CTX_EXIST_IN_QM3_MASK	0x1
8355 #define XSTORM_ROCE_RESP_CONN_AG_CTX_EXIST_IN_QM3_SHIFT	3
8356 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED3_MASK		0x1
8357 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED3_SHIFT		4
8358 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED4_MASK		0x1
8359 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED4_SHIFT		5
8360 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED5_MASK		0x1
8361 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED5_SHIFT		6
8362 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED6_MASK		0x1
8363 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED6_SHIFT		7
8364 	u8 flags1;
8365 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED7_MASK		0x1
8366 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED7_SHIFT		0
8367 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED8_MASK		0x1
8368 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RESERVED8_SHIFT		1
8369 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT10_MASK		0x1
8370 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT10_SHIFT		2
8371 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT11_MASK		0x1
8372 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT11_SHIFT		3
8373 #define XSTORM_ROCE_RESP_CONN_AG_CTX_MSDM_FLUSH_MASK		0x1
8374 #define XSTORM_ROCE_RESP_CONN_AG_CTX_MSDM_FLUSH_SHIFT	4
8375 #define XSTORM_ROCE_RESP_CONN_AG_CTX_MSEM_FLUSH_MASK		0x1
8376 #define XSTORM_ROCE_RESP_CONN_AG_CTX_MSEM_FLUSH_SHIFT	5
8377 #define XSTORM_ROCE_RESP_CONN_AG_CTX_ERROR_STATE_MASK	0x1
8378 #define XSTORM_ROCE_RESP_CONN_AG_CTX_ERROR_STATE_SHIFT	6
8379 #define XSTORM_ROCE_RESP_CONN_AG_CTX_YSTORM_FLUSH_MASK	0x1
8380 #define XSTORM_ROCE_RESP_CONN_AG_CTX_YSTORM_FLUSH_SHIFT	7
8381 	u8 flags2;
8382 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF0_MASK	0x3
8383 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF0_SHIFT	0
8384 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF1_MASK	0x3
8385 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF1_SHIFT	2
8386 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF2_MASK	0x3
8387 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF2_SHIFT	4
8388 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF3_MASK	0x3
8389 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF3_SHIFT	6
8390 	u8 flags3;
8391 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RXMIT_CF_MASK		0x3
8392 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RXMIT_CF_SHIFT		0
8393 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RX_ERROR_CF_MASK	0x3
8394 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RX_ERROR_CF_SHIFT	2
8395 #define XSTORM_ROCE_RESP_CONN_AG_CTX_FORCE_ACK_CF_MASK	0x3
8396 #define XSTORM_ROCE_RESP_CONN_AG_CTX_FORCE_ACK_CF_SHIFT	4
8397 #define XSTORM_ROCE_RESP_CONN_AG_CTX_FLUSH_Q0_CF_MASK	0x3
8398 #define XSTORM_ROCE_RESP_CONN_AG_CTX_FLUSH_Q0_CF_SHIFT	6
8399 	u8 flags4;
8400 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF8_MASK	0x3
8401 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF8_SHIFT	0
8402 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF9_MASK	0x3
8403 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF9_SHIFT	2
8404 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF10_MASK	0x3
8405 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF10_SHIFT	4
8406 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF11_MASK	0x3
8407 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF11_SHIFT	6
8408 	u8 flags5;
8409 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF12_MASK	0x3
8410 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF12_SHIFT	0
8411 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF13_MASK	0x3
8412 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF13_SHIFT	2
8413 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF14_MASK	0x3
8414 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF14_SHIFT	4
8415 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF15_MASK	0x3
8416 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF15_SHIFT	6
8417 	u8 flags6;
8418 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF16_MASK	0x3
8419 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF16_SHIFT	0
8420 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF17_MASK	0x3
8421 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF17_SHIFT	2
8422 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF18_MASK	0x3
8423 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF18_SHIFT	4
8424 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF19_MASK	0x3
8425 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF19_SHIFT	6
8426 	u8 flags7;
8427 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF20_MASK	0x3
8428 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF20_SHIFT	0
8429 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF21_MASK	0x3
8430 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF21_SHIFT	2
8431 #define XSTORM_ROCE_RESP_CONN_AG_CTX_SLOW_PATH_MASK	0x3
8432 #define XSTORM_ROCE_RESP_CONN_AG_CTX_SLOW_PATH_SHIFT	4
8433 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_MASK	0x1
8434 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_SHIFT	6
8435 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF1EN_MASK	0x1
8436 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF1EN_SHIFT	7
8437 	u8 flags8;
8438 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF2EN_MASK		0x1
8439 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF2EN_SHIFT		0
8440 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF3EN_MASK		0x1
8441 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF3EN_SHIFT		1
8442 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RXMIT_CF_EN_MASK	0x1
8443 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RXMIT_CF_EN_SHIFT	2
8444 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RX_ERROR_CF_EN_MASK	0x1
8445 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RX_ERROR_CF_EN_SHIFT	3
8446 #define XSTORM_ROCE_RESP_CONN_AG_CTX_FORCE_ACK_CF_EN_MASK	0x1
8447 #define XSTORM_ROCE_RESP_CONN_AG_CTX_FORCE_ACK_CF_EN_SHIFT	4
8448 #define XSTORM_ROCE_RESP_CONN_AG_CTX_FLUSH_Q0_CF_EN_MASK	0x1
8449 #define XSTORM_ROCE_RESP_CONN_AG_CTX_FLUSH_Q0_CF_EN_SHIFT	5
8450 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF8EN_MASK		0x1
8451 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF8EN_SHIFT		6
8452 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF9EN_MASK		0x1
8453 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF9EN_SHIFT		7
8454 	u8 flags9;
8455 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF10EN_MASK	0x1
8456 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF10EN_SHIFT	0
8457 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF11EN_MASK	0x1
8458 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF11EN_SHIFT	1
8459 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF12EN_MASK	0x1
8460 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF12EN_SHIFT	2
8461 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF13EN_MASK	0x1
8462 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF13EN_SHIFT	3
8463 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF14EN_MASK	0x1
8464 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF14EN_SHIFT	4
8465 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF15EN_MASK	0x1
8466 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF15EN_SHIFT	5
8467 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF16EN_MASK	0x1
8468 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF16EN_SHIFT	6
8469 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF17EN_MASK	0x1
8470 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF17EN_SHIFT	7
8471 	u8 flags10;
8472 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF18EN_MASK		0x1
8473 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF18EN_SHIFT		0
8474 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF19EN_MASK		0x1
8475 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF19EN_SHIFT		1
8476 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF20EN_MASK		0x1
8477 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF20EN_SHIFT		2
8478 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF21EN_MASK		0x1
8479 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF21EN_SHIFT		3
8480 #define XSTORM_ROCE_RESP_CONN_AG_CTX_SLOW_PATH_EN_MASK	0x1
8481 #define XSTORM_ROCE_RESP_CONN_AG_CTX_SLOW_PATH_EN_SHIFT	4
8482 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF23EN_MASK		0x1
8483 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF23EN_SHIFT		5
8484 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_MASK		0x1
8485 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_SHIFT		6
8486 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_MASK		0x1
8487 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_SHIFT		7
8488 	u8 flags11;
8489 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_MASK		0x1
8490 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_SHIFT		0
8491 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_MASK		0x1
8492 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_SHIFT		1
8493 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_MASK		0x1
8494 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_SHIFT		2
8495 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE5EN_MASK		0x1
8496 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE5EN_SHIFT		3
8497 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE6EN_MASK		0x1
8498 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE6EN_SHIFT		4
8499 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE7EN_MASK		0x1
8500 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE7EN_SHIFT		5
8501 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED1_MASK	0x1
8502 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED1_SHIFT	6
8503 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE9EN_MASK		0x1
8504 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE9EN_SHIFT		7
8505 	u8 flags12;
8506 #define XSTORM_ROCE_RESP_CONN_AG_CTX_IRQ_PROD_RULE_EN_MASK	0x1
8507 #define XSTORM_ROCE_RESP_CONN_AG_CTX_IRQ_PROD_RULE_EN_SHIFT	0
8508 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE11EN_MASK		0x1
8509 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE11EN_SHIFT		1
8510 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED2_MASK	0x1
8511 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED2_SHIFT	2
8512 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED3_MASK	0x1
8513 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED3_SHIFT	3
8514 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE14EN_MASK		0x1
8515 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE14EN_SHIFT		4
8516 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE15EN_MASK		0x1
8517 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE15EN_SHIFT		5
8518 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE16EN_MASK		0x1
8519 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE16EN_SHIFT		6
8520 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE17EN_MASK		0x1
8521 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE17EN_SHIFT		7
8522 	u8 flags13;
8523 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE18EN_MASK		0x1
8524 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE18EN_SHIFT		0
8525 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE19EN_MASK		0x1
8526 #define XSTORM_ROCE_RESP_CONN_AG_CTX_RULE19EN_SHIFT		1
8527 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED4_MASK	0x1
8528 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED4_SHIFT	2
8529 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED5_MASK	0x1
8530 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED5_SHIFT	3
8531 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED6_MASK	0x1
8532 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED6_SHIFT	4
8533 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED7_MASK	0x1
8534 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED7_SHIFT	5
8535 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED8_MASK	0x1
8536 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED8_SHIFT	6
8537 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED9_MASK	0x1
8538 #define XSTORM_ROCE_RESP_CONN_AG_CTX_A0_RESERVED9_SHIFT	7
8539 	u8 flags14;
8540 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT16_MASK	0x1
8541 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT16_SHIFT	0
8542 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT17_MASK	0x1
8543 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT17_SHIFT	1
8544 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT18_MASK	0x1
8545 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT18_SHIFT	2
8546 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT19_MASK	0x1
8547 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT19_SHIFT	3
8548 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT20_MASK	0x1
8549 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT20_SHIFT	4
8550 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT21_MASK	0x1
8551 #define XSTORM_ROCE_RESP_CONN_AG_CTX_BIT21_SHIFT	5
8552 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF23_MASK	0x3
8553 #define XSTORM_ROCE_RESP_CONN_AG_CTX_CF23_SHIFT	6
8554 	u8 byte2;
8555 	__le16 physical_q0;
8556 	__le16 irq_prod_shadow;
8557 	__le16 word2;
8558 	__le16 irq_cons;
8559 	__le16 irq_prod;
8560 	__le16 e5_reserved1;
8561 	__le16 conn_dpi;
8562 	u8 rxmit_opcode;
8563 	u8 byte4;
8564 	u8 byte5;
8565 	u8 byte6;
8566 	__le32 rxmit_psn_and_id;
8567 	__le32 rxmit_bytes_length;
8568 	__le32 psn;
8569 	__le32 reg3;
8570 	__le32 reg4;
8571 	__le32 reg5;
8572 	__le32 msn_and_syndrome;
8573 };
8574 
8575 struct ystorm_roce_conn_ag_ctx {
8576 	u8 byte0;
8577 	u8 byte1;
8578 	u8 flags0;
8579 #define YSTORM_ROCE_CONN_AG_CTX_BIT0_MASK     0x1
8580 #define YSTORM_ROCE_CONN_AG_CTX_BIT0_SHIFT    0
8581 #define YSTORM_ROCE_CONN_AG_CTX_BIT1_MASK     0x1
8582 #define YSTORM_ROCE_CONN_AG_CTX_BIT1_SHIFT    1
8583 #define YSTORM_ROCE_CONN_AG_CTX_CF0_MASK      0x3
8584 #define YSTORM_ROCE_CONN_AG_CTX_CF0_SHIFT     2
8585 #define YSTORM_ROCE_CONN_AG_CTX_CF1_MASK      0x3
8586 #define YSTORM_ROCE_CONN_AG_CTX_CF1_SHIFT     4
8587 #define YSTORM_ROCE_CONN_AG_CTX_CF2_MASK      0x3
8588 #define YSTORM_ROCE_CONN_AG_CTX_CF2_SHIFT     6
8589 	u8 flags1;
8590 #define YSTORM_ROCE_CONN_AG_CTX_CF0EN_MASK    0x1
8591 #define YSTORM_ROCE_CONN_AG_CTX_CF0EN_SHIFT   0
8592 #define YSTORM_ROCE_CONN_AG_CTX_CF1EN_MASK    0x1
8593 #define YSTORM_ROCE_CONN_AG_CTX_CF1EN_SHIFT   1
8594 #define YSTORM_ROCE_CONN_AG_CTX_CF2EN_MASK    0x1
8595 #define YSTORM_ROCE_CONN_AG_CTX_CF2EN_SHIFT   2
8596 #define YSTORM_ROCE_CONN_AG_CTX_RULE0EN_MASK  0x1
8597 #define YSTORM_ROCE_CONN_AG_CTX_RULE0EN_SHIFT 3
8598 #define YSTORM_ROCE_CONN_AG_CTX_RULE1EN_MASK  0x1
8599 #define YSTORM_ROCE_CONN_AG_CTX_RULE1EN_SHIFT 4
8600 #define YSTORM_ROCE_CONN_AG_CTX_RULE2EN_MASK  0x1
8601 #define YSTORM_ROCE_CONN_AG_CTX_RULE2EN_SHIFT 5
8602 #define YSTORM_ROCE_CONN_AG_CTX_RULE3EN_MASK  0x1
8603 #define YSTORM_ROCE_CONN_AG_CTX_RULE3EN_SHIFT 6
8604 #define YSTORM_ROCE_CONN_AG_CTX_RULE4EN_MASK  0x1
8605 #define YSTORM_ROCE_CONN_AG_CTX_RULE4EN_SHIFT 7
8606 	u8 byte2;
8607 	u8 byte3;
8608 	__le16 word0;
8609 	__le32 reg0;
8610 	__le32 reg1;
8611 	__le16 word1;
8612 	__le16 word2;
8613 	__le16 word3;
8614 	__le16 word4;
8615 	__le32 reg2;
8616 	__le32 reg3;
8617 };
8618 
8619 struct ystorm_roce_req_conn_ag_ctx {
8620 	u8 byte0;
8621 	u8 byte1;
8622 	u8 flags0;
8623 #define YSTORM_ROCE_REQ_CONN_AG_CTX_BIT0_MASK	0x1
8624 #define YSTORM_ROCE_REQ_CONN_AG_CTX_BIT0_SHIFT	0
8625 #define YSTORM_ROCE_REQ_CONN_AG_CTX_BIT1_MASK	0x1
8626 #define YSTORM_ROCE_REQ_CONN_AG_CTX_BIT1_SHIFT	1
8627 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF0_MASK		0x3
8628 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF0_SHIFT	2
8629 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF1_MASK		0x3
8630 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF1_SHIFT	4
8631 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF2_MASK		0x3
8632 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF2_SHIFT	6
8633 	u8 flags1;
8634 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF0EN_MASK	0x1
8635 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF0EN_SHIFT	0
8636 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF1EN_MASK	0x1
8637 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF1EN_SHIFT	1
8638 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF2EN_MASK	0x1
8639 #define YSTORM_ROCE_REQ_CONN_AG_CTX_CF2EN_SHIFT	2
8640 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_MASK	0x1
8641 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE0EN_SHIFT	3
8642 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_MASK	0x1
8643 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE1EN_SHIFT	4
8644 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE2EN_MASK	0x1
8645 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE2EN_SHIFT	5
8646 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_MASK	0x1
8647 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE3EN_SHIFT	6
8648 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_MASK	0x1
8649 #define YSTORM_ROCE_REQ_CONN_AG_CTX_RULE4EN_SHIFT	7
8650 	u8 byte2;
8651 	u8 byte3;
8652 	__le16 word0;
8653 	__le32 reg0;
8654 	__le32 reg1;
8655 	__le16 word1;
8656 	__le16 word2;
8657 	__le16 word3;
8658 	__le16 word4;
8659 	__le32 reg2;
8660 	__le32 reg3;
8661 };
8662 
8663 struct ystorm_roce_resp_conn_ag_ctx {
8664 	u8 byte0;
8665 	u8 byte1;
8666 	u8 flags0;
8667 #define YSTORM_ROCE_RESP_CONN_AG_CTX_BIT0_MASK	0x1
8668 #define YSTORM_ROCE_RESP_CONN_AG_CTX_BIT0_SHIFT	0
8669 #define YSTORM_ROCE_RESP_CONN_AG_CTX_BIT1_MASK	0x1
8670 #define YSTORM_ROCE_RESP_CONN_AG_CTX_BIT1_SHIFT	1
8671 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF0_MASK	0x3
8672 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF0_SHIFT	2
8673 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF1_MASK	0x3
8674 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF1_SHIFT	4
8675 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF2_MASK	0x3
8676 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF2_SHIFT	6
8677 	u8 flags1;
8678 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_MASK	0x1
8679 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF0EN_SHIFT	0
8680 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF1EN_MASK	0x1
8681 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF1EN_SHIFT	1
8682 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF2EN_MASK	0x1
8683 #define YSTORM_ROCE_RESP_CONN_AG_CTX_CF2EN_SHIFT	2
8684 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_MASK	0x1
8685 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE0EN_SHIFT	3
8686 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_MASK	0x1
8687 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE1EN_SHIFT	4
8688 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_MASK	0x1
8689 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE2EN_SHIFT	5
8690 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_MASK	0x1
8691 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE3EN_SHIFT	6
8692 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_MASK	0x1
8693 #define YSTORM_ROCE_RESP_CONN_AG_CTX_RULE4EN_SHIFT	7
8694 	u8 byte2;
8695 	u8 byte3;
8696 	__le16 word0;
8697 	__le32 reg0;
8698 	__le32 reg1;
8699 	__le16 word1;
8700 	__le16 word2;
8701 	__le16 word3;
8702 	__le16 word4;
8703 	__le32 reg2;
8704 	__le32 reg3;
8705 };
8706 
8707 /* Roce doorbell data */
8708 enum roce_flavor {
8709 	PLAIN_ROCE,
8710 	RROCE_IPV4,
8711 	RROCE_IPV6,
8712 	MAX_ROCE_FLAVOR
8713 };
8714 
8715 /* The iwarp storm context of Ystorm */
8716 struct ystorm_iwarp_conn_st_ctx {
8717 	__le32 reserved[4];
8718 };
8719 
8720 /* The iwarp storm context of Pstorm */
8721 struct pstorm_iwarp_conn_st_ctx {
8722 	__le32 reserved[36];
8723 };
8724 
8725 /* The iwarp storm context of Xstorm */
8726 struct xstorm_iwarp_conn_st_ctx {
8727 	__le32 reserved[48];
8728 };
8729 
8730 struct xstorm_iwarp_conn_ag_ctx {
8731 	u8 reserved0;
8732 	u8 state;
8733 	u8 flags0;
8734 #define XSTORM_IWARP_CONN_AG_CTX_EXIST_IN_QM0_MASK	0x1
8735 #define XSTORM_IWARP_CONN_AG_CTX_EXIST_IN_QM0_SHIFT	0
8736 #define XSTORM_IWARP_CONN_AG_CTX_EXIST_IN_QM1_MASK	0x1
8737 #define XSTORM_IWARP_CONN_AG_CTX_EXIST_IN_QM1_SHIFT	1
8738 #define XSTORM_IWARP_CONN_AG_CTX_EXIST_IN_QM2_MASK	0x1
8739 #define XSTORM_IWARP_CONN_AG_CTX_EXIST_IN_QM2_SHIFT	2
8740 #define XSTORM_IWARP_CONN_AG_CTX_EXIST_IN_QM3_MASK	0x1
8741 #define XSTORM_IWARP_CONN_AG_CTX_EXIST_IN_QM3_SHIFT	3
8742 #define XSTORM_IWARP_CONN_AG_CTX_BIT4_MASK		0x1
8743 #define XSTORM_IWARP_CONN_AG_CTX_BIT4_SHIFT		4
8744 #define XSTORM_IWARP_CONN_AG_CTX_RESERVED2_MASK	0x1
8745 #define XSTORM_IWARP_CONN_AG_CTX_RESERVED2_SHIFT	5
8746 #define XSTORM_IWARP_CONN_AG_CTX_BIT6_MASK		0x1
8747 #define XSTORM_IWARP_CONN_AG_CTX_BIT6_SHIFT		6
8748 #define XSTORM_IWARP_CONN_AG_CTX_BIT7_MASK		0x1
8749 #define XSTORM_IWARP_CONN_AG_CTX_BIT7_SHIFT		7
8750 	u8 flags1;
8751 #define XSTORM_IWARP_CONN_AG_CTX_BIT8_MASK				0x1
8752 #define XSTORM_IWARP_CONN_AG_CTX_BIT8_SHIFT				0
8753 #define XSTORM_IWARP_CONN_AG_CTX_BIT9_MASK				0x1
8754 #define XSTORM_IWARP_CONN_AG_CTX_BIT9_SHIFT				1
8755 #define XSTORM_IWARP_CONN_AG_CTX_BIT10_MASK				0x1
8756 #define XSTORM_IWARP_CONN_AG_CTX_BIT10_SHIFT				2
8757 #define XSTORM_IWARP_CONN_AG_CTX_BIT11_MASK				0x1
8758 #define XSTORM_IWARP_CONN_AG_CTX_BIT11_SHIFT				3
8759 #define XSTORM_IWARP_CONN_AG_CTX_BIT12_MASK				0x1
8760 #define XSTORM_IWARP_CONN_AG_CTX_BIT12_SHIFT				4
8761 #define XSTORM_IWARP_CONN_AG_CTX_BIT13_MASK				0x1
8762 #define XSTORM_IWARP_CONN_AG_CTX_BIT13_SHIFT				5
8763 #define XSTORM_IWARP_CONN_AG_CTX_BIT14_MASK				0x1
8764 #define XSTORM_IWARP_CONN_AG_CTX_BIT14_SHIFT				6
8765 #define XSTORM_IWARP_CONN_AG_CTX_YSTORM_FLUSH_OR_REWIND_SND_MAX_MASK	0x1
8766 #define XSTORM_IWARP_CONN_AG_CTX_YSTORM_FLUSH_OR_REWIND_SND_MAX_SHIFT 7
8767 	u8 flags2;
8768 #define XSTORM_IWARP_CONN_AG_CTX_CF0_MASK			0x3
8769 #define XSTORM_IWARP_CONN_AG_CTX_CF0_SHIFT			0
8770 #define XSTORM_IWARP_CONN_AG_CTX_CF1_MASK			0x3
8771 #define XSTORM_IWARP_CONN_AG_CTX_CF1_SHIFT			2
8772 #define XSTORM_IWARP_CONN_AG_CTX_CF2_MASK			0x3
8773 #define XSTORM_IWARP_CONN_AG_CTX_CF2_SHIFT			4
8774 #define XSTORM_IWARP_CONN_AG_CTX_TIMER_STOP_ALL_MASK		0x3
8775 #define XSTORM_IWARP_CONN_AG_CTX_TIMER_STOP_ALL_SHIFT	6
8776 	u8 flags3;
8777 #define XSTORM_IWARP_CONN_AG_CTX_CF4_MASK	0x3
8778 #define XSTORM_IWARP_CONN_AG_CTX_CF4_SHIFT	0
8779 #define XSTORM_IWARP_CONN_AG_CTX_CF5_MASK	0x3
8780 #define XSTORM_IWARP_CONN_AG_CTX_CF5_SHIFT	2
8781 #define XSTORM_IWARP_CONN_AG_CTX_CF6_MASK	0x3
8782 #define XSTORM_IWARP_CONN_AG_CTX_CF6_SHIFT	4
8783 #define XSTORM_IWARP_CONN_AG_CTX_CF7_MASK	0x3
8784 #define XSTORM_IWARP_CONN_AG_CTX_CF7_SHIFT	6
8785 	u8 flags4;
8786 #define XSTORM_IWARP_CONN_AG_CTX_CF8_MASK	0x3
8787 #define XSTORM_IWARP_CONN_AG_CTX_CF8_SHIFT	0
8788 #define XSTORM_IWARP_CONN_AG_CTX_CF9_MASK	0x3
8789 #define XSTORM_IWARP_CONN_AG_CTX_CF9_SHIFT	2
8790 #define XSTORM_IWARP_CONN_AG_CTX_CF10_MASK	0x3
8791 #define XSTORM_IWARP_CONN_AG_CTX_CF10_SHIFT	4
8792 #define XSTORM_IWARP_CONN_AG_CTX_CF11_MASK	0x3
8793 #define XSTORM_IWARP_CONN_AG_CTX_CF11_SHIFT	6
8794 	u8 flags5;
8795 #define XSTORM_IWARP_CONN_AG_CTX_CF12_MASK		0x3
8796 #define XSTORM_IWARP_CONN_AG_CTX_CF12_SHIFT		0
8797 #define XSTORM_IWARP_CONN_AG_CTX_CF13_MASK		0x3
8798 #define XSTORM_IWARP_CONN_AG_CTX_CF13_SHIFT		2
8799 #define XSTORM_IWARP_CONN_AG_CTX_SQ_FLUSH_CF_MASK	0x3
8800 #define XSTORM_IWARP_CONN_AG_CTX_SQ_FLUSH_CF_SHIFT	4
8801 #define XSTORM_IWARP_CONN_AG_CTX_CF15_MASK		0x3
8802 #define XSTORM_IWARP_CONN_AG_CTX_CF15_SHIFT		6
8803 	u8 flags6;
8804 #define XSTORM_IWARP_CONN_AG_CTX_MPA_OR_ERROR_WAKEUP_TRIGGER_CF_MASK	0x3
8805 #define XSTORM_IWARP_CONN_AG_CTX_MPA_OR_ERROR_WAKEUP_TRIGGER_CF_SHIFT 0
8806 #define XSTORM_IWARP_CONN_AG_CTX_CF17_MASK				0x3
8807 #define XSTORM_IWARP_CONN_AG_CTX_CF17_SHIFT				2
8808 #define XSTORM_IWARP_CONN_AG_CTX_CF18_MASK				0x3
8809 #define XSTORM_IWARP_CONN_AG_CTX_CF18_SHIFT				4
8810 #define XSTORM_IWARP_CONN_AG_CTX_DQ_FLUSH_MASK			0x3
8811 #define XSTORM_IWARP_CONN_AG_CTX_DQ_FLUSH_SHIFT			6
8812 	u8 flags7;
8813 #define XSTORM_IWARP_CONN_AG_CTX_FLUSH_Q0_MASK	0x3
8814 #define XSTORM_IWARP_CONN_AG_CTX_FLUSH_Q0_SHIFT	0
8815 #define XSTORM_IWARP_CONN_AG_CTX_FLUSH_Q1_MASK	0x3
8816 #define XSTORM_IWARP_CONN_AG_CTX_FLUSH_Q1_SHIFT	2
8817 #define XSTORM_IWARP_CONN_AG_CTX_SLOW_PATH_MASK	0x3
8818 #define XSTORM_IWARP_CONN_AG_CTX_SLOW_PATH_SHIFT	4
8819 #define XSTORM_IWARP_CONN_AG_CTX_CF0EN_MASK		0x1
8820 #define XSTORM_IWARP_CONN_AG_CTX_CF0EN_SHIFT		6
8821 #define XSTORM_IWARP_CONN_AG_CTX_CF1EN_MASK		0x1
8822 #define XSTORM_IWARP_CONN_AG_CTX_CF1EN_SHIFT		7
8823 	u8 flags8;
8824 #define XSTORM_IWARP_CONN_AG_CTX_CF2EN_MASK			0x1
8825 #define XSTORM_IWARP_CONN_AG_CTX_CF2EN_SHIFT			0
8826 #define XSTORM_IWARP_CONN_AG_CTX_TIMER_STOP_ALL_EN_MASK	0x1
8827 #define XSTORM_IWARP_CONN_AG_CTX_TIMER_STOP_ALL_EN_SHIFT	1
8828 #define XSTORM_IWARP_CONN_AG_CTX_CF4EN_MASK			0x1
8829 #define XSTORM_IWARP_CONN_AG_CTX_CF4EN_SHIFT			2
8830 #define XSTORM_IWARP_CONN_AG_CTX_CF5EN_MASK			0x1
8831 #define XSTORM_IWARP_CONN_AG_CTX_CF5EN_SHIFT			3
8832 #define XSTORM_IWARP_CONN_AG_CTX_CF6EN_MASK			0x1
8833 #define XSTORM_IWARP_CONN_AG_CTX_CF6EN_SHIFT			4
8834 #define XSTORM_IWARP_CONN_AG_CTX_CF7EN_MASK			0x1
8835 #define XSTORM_IWARP_CONN_AG_CTX_CF7EN_SHIFT			5
8836 #define XSTORM_IWARP_CONN_AG_CTX_CF8EN_MASK			0x1
8837 #define XSTORM_IWARP_CONN_AG_CTX_CF8EN_SHIFT			6
8838 #define XSTORM_IWARP_CONN_AG_CTX_CF9EN_MASK			0x1
8839 #define XSTORM_IWARP_CONN_AG_CTX_CF9EN_SHIFT			7
8840 	u8 flags9;
8841 #define XSTORM_IWARP_CONN_AG_CTX_CF10EN_MASK				0x1
8842 #define XSTORM_IWARP_CONN_AG_CTX_CF10EN_SHIFT			0
8843 #define XSTORM_IWARP_CONN_AG_CTX_CF11EN_MASK				0x1
8844 #define XSTORM_IWARP_CONN_AG_CTX_CF11EN_SHIFT			1
8845 #define XSTORM_IWARP_CONN_AG_CTX_CF12EN_MASK				0x1
8846 #define XSTORM_IWARP_CONN_AG_CTX_CF12EN_SHIFT			2
8847 #define XSTORM_IWARP_CONN_AG_CTX_CF13EN_MASK				0x1
8848 #define XSTORM_IWARP_CONN_AG_CTX_CF13EN_SHIFT			3
8849 #define XSTORM_IWARP_CONN_AG_CTX_SQ_FLUSH_CF_EN_MASK			0x1
8850 #define XSTORM_IWARP_CONN_AG_CTX_SQ_FLUSH_CF_EN_SHIFT		4
8851 #define XSTORM_IWARP_CONN_AG_CTX_CF15EN_MASK				0x1
8852 #define XSTORM_IWARP_CONN_AG_CTX_CF15EN_SHIFT			5
8853 #define XSTORM_IWARP_CONN_AG_CTX_MPA_OR_ERROR_WAKEUP_TRIGGER_CF_EN_MASK 0x1
8854 #define XSTORM_IWARP_CONN_AG_CTX_MPA_OR_ERROR_WAKEUP_TRIGGER_CF_EN_SHIFT 6
8855 #define XSTORM_IWARP_CONN_AG_CTX_CF17EN_MASK				0x1
8856 #define XSTORM_IWARP_CONN_AG_CTX_CF17EN_SHIFT			7
8857 	u8 flags10;
8858 #define XSTORM_IWARP_CONN_AG_CTX_CF18EN_MASK			0x1
8859 #define XSTORM_IWARP_CONN_AG_CTX_CF18EN_SHIFT		0
8860 #define XSTORM_IWARP_CONN_AG_CTX_DQ_FLUSH_EN_MASK		0x1
8861 #define XSTORM_IWARP_CONN_AG_CTX_DQ_FLUSH_EN_SHIFT		1
8862 #define XSTORM_IWARP_CONN_AG_CTX_FLUSH_Q0_EN_MASK		0x1
8863 #define XSTORM_IWARP_CONN_AG_CTX_FLUSH_Q0_EN_SHIFT		2
8864 #define XSTORM_IWARP_CONN_AG_CTX_FLUSH_Q1_EN_MASK		0x1
8865 #define XSTORM_IWARP_CONN_AG_CTX_FLUSH_Q1_EN_SHIFT		3
8866 #define XSTORM_IWARP_CONN_AG_CTX_SLOW_PATH_EN_MASK		0x1
8867 #define XSTORM_IWARP_CONN_AG_CTX_SLOW_PATH_EN_SHIFT		4
8868 #define XSTORM_IWARP_CONN_AG_CTX_SEND_TERMINATE_CF_EN_MASK               0x1
8869 #define XSTORM_IWARP_CONN_AG_CTX_SEND_TERMINATE_CF_EN_SHIFT              5
8870 #define XSTORM_IWARP_CONN_AG_CTX_RULE0EN_MASK		0x1
8871 #define XSTORM_IWARP_CONN_AG_CTX_RULE0EN_SHIFT		6
8872 #define XSTORM_IWARP_CONN_AG_CTX_MORE_TO_SEND_RULE_EN_MASK	0x1
8873 #define XSTORM_IWARP_CONN_AG_CTX_MORE_TO_SEND_RULE_EN_SHIFT	7
8874 	u8 flags11;
8875 #define XSTORM_IWARP_CONN_AG_CTX_TX_BLOCKED_EN_MASK	0x1
8876 #define XSTORM_IWARP_CONN_AG_CTX_TX_BLOCKED_EN_SHIFT	0
8877 #define XSTORM_IWARP_CONN_AG_CTX_RULE3EN_MASK	0x1
8878 #define XSTORM_IWARP_CONN_AG_CTX_RULE3EN_SHIFT	1
8879 #define XSTORM_IWARP_CONN_AG_CTX_RESERVED3_MASK	0x1
8880 #define XSTORM_IWARP_CONN_AG_CTX_RESERVED3_SHIFT	2
8881 #define XSTORM_IWARP_CONN_AG_CTX_RULE5EN_MASK	0x1
8882 #define XSTORM_IWARP_CONN_AG_CTX_RULE5EN_SHIFT	3
8883 #define XSTORM_IWARP_CONN_AG_CTX_RULE6EN_MASK	0x1
8884 #define XSTORM_IWARP_CONN_AG_CTX_RULE6EN_SHIFT	4
8885 #define XSTORM_IWARP_CONN_AG_CTX_RULE7EN_MASK	0x1
8886 #define XSTORM_IWARP_CONN_AG_CTX_RULE7EN_SHIFT	5
8887 #define XSTORM_IWARP_CONN_AG_CTX_A0_RESERVED1_MASK	0x1
8888 #define XSTORM_IWARP_CONN_AG_CTX_A0_RESERVED1_SHIFT	6
8889 #define XSTORM_IWARP_CONN_AG_CTX_RULE9EN_MASK	0x1
8890 #define XSTORM_IWARP_CONN_AG_CTX_RULE9EN_SHIFT	7
8891 	u8 flags12;
8892 #define XSTORM_IWARP_CONN_AG_CTX_SQ_NOT_EMPTY_RULE_EN_MASK	0x1
8893 #define XSTORM_IWARP_CONN_AG_CTX_SQ_NOT_EMPTY_RULE_EN_SHIFT	0
8894 #define XSTORM_IWARP_CONN_AG_CTX_RULE11EN_MASK		0x1
8895 #define XSTORM_IWARP_CONN_AG_CTX_RULE11EN_SHIFT		1
8896 #define XSTORM_IWARP_CONN_AG_CTX_A0_RESERVED2_MASK		0x1
8897 #define XSTORM_IWARP_CONN_AG_CTX_A0_RESERVED2_SHIFT		2
8898 #define XSTORM_IWARP_CONN_AG_CTX_A0_RESERVED3_MASK		0x1
8899 #define XSTORM_IWARP_CONN_AG_CTX_A0_RESERVED3_SHIFT		3
8900 #define XSTORM_IWARP_CONN_AG_CTX_SQ_FENCE_RULE_EN_MASK	0x1
8901 #define XSTORM_IWARP_CONN_AG_CTX_SQ_FENCE_RULE_EN_SHIFT	4
8902 #define XSTORM_IWARP_CONN_AG_CTX_RULE15EN_MASK		0x1
8903 #define XSTORM_IWARP_CONN_AG_CTX_RULE15EN_SHIFT		5
8904 #define XSTORM_IWARP_CONN_AG_CTX_RULE16EN_MASK		0x1
8905 #define XSTORM_IWARP_CONN_AG_CTX_RULE16EN_SHIFT		6
8906 #define XSTORM_IWARP_CONN_AG_CTX_RULE17EN_MASK		0x1
8907 #define XSTORM_IWARP_CONN_AG_CTX_RULE17EN_SHIFT		7
8908 	u8 flags13;
8909 #define XSTORM_IWARP_CONN_AG_CTX_IRQ_NOT_EMPTY_RULE_EN_MASK	0x1
8910 #define XSTORM_IWARP_CONN_AG_CTX_IRQ_NOT_EMPTY_RULE_EN_SHIFT	0
8911 #define XSTORM_IWARP_CONN_AG_CTX_HQ_NOT_FULL_RULE_EN_MASK	0x1
8912 #define XSTORM_IWARP_CONN_AG_CTX_HQ_NOT_FULL_RULE_EN_SHIFT	1
8913 #define XSTORM_IWARP_CONN_AG_CTX_ORQ_RD_FENCE_RULE_EN_MASK	0x1
8914 #define XSTORM_IWARP_CONN_AG_CTX_ORQ_RD_FENCE_RULE_EN_SHIFT	2
8915 #define XSTORM_IWARP_CONN_AG_CTX_RULE21EN_MASK		0x1
8916 #define XSTORM_IWARP_CONN_AG_CTX_RULE21EN_SHIFT		3
8917 #define XSTORM_IWARP_CONN_AG_CTX_A0_RESERVED6_MASK		0x1
8918 #define XSTORM_IWARP_CONN_AG_CTX_A0_RESERVED6_SHIFT		4
8919 #define XSTORM_IWARP_CONN_AG_CTX_ORQ_NOT_FULL_RULE_EN_MASK	0x1
8920 #define XSTORM_IWARP_CONN_AG_CTX_ORQ_NOT_FULL_RULE_EN_SHIFT	5
8921 #define XSTORM_IWARP_CONN_AG_CTX_A0_RESERVED8_MASK		0x1
8922 #define XSTORM_IWARP_CONN_AG_CTX_A0_RESERVED8_SHIFT		6
8923 #define XSTORM_IWARP_CONN_AG_CTX_A0_RESERVED9_MASK		0x1
8924 #define XSTORM_IWARP_CONN_AG_CTX_A0_RESERVED9_SHIFT		7
8925 	u8 flags14;
8926 #define XSTORM_IWARP_CONN_AG_CTX_BIT16_MASK		0x1
8927 #define XSTORM_IWARP_CONN_AG_CTX_BIT16_SHIFT		0
8928 #define XSTORM_IWARP_CONN_AG_CTX_BIT17_MASK		0x1
8929 #define XSTORM_IWARP_CONN_AG_CTX_BIT17_SHIFT		1
8930 #define XSTORM_IWARP_CONN_AG_CTX_BIT18_MASK		0x1
8931 #define XSTORM_IWARP_CONN_AG_CTX_BIT18_SHIFT		2
8932 #define XSTORM_IWARP_CONN_AG_CTX_E5_RESERVED1_MASK	0x1
8933 #define XSTORM_IWARP_CONN_AG_CTX_E5_RESERVED1_SHIFT	3
8934 #define XSTORM_IWARP_CONN_AG_CTX_E5_RESERVED2_MASK	0x1
8935 #define XSTORM_IWARP_CONN_AG_CTX_E5_RESERVED2_SHIFT	4
8936 #define XSTORM_IWARP_CONN_AG_CTX_E5_RESERVED3_MASK	0x1
8937 #define XSTORM_IWARP_CONN_AG_CTX_E5_RESERVED3_SHIFT	5
8938 #define XSTORM_IWARP_CONN_AG_CTX_SEND_TERMINATE_CF_MASK	0x3
8939 #define XSTORM_IWARP_CONN_AG_CTX_SEND_TERMINATE_CF_SHIFT	6
8940 	u8 byte2;
8941 	__le16 physical_q0;
8942 	__le16 physical_q1;
8943 	__le16 sq_comp_cons;
8944 	__le16 sq_tx_cons;
8945 	__le16 sq_prod;
8946 	__le16 word5;
8947 	__le16 conn_dpi;
8948 	u8 byte3;
8949 	u8 byte4;
8950 	u8 byte5;
8951 	u8 byte6;
8952 	__le32 reg0;
8953 	__le32 reg1;
8954 	__le32 reg2;
8955 	__le32 more_to_send_seq;
8956 	__le32 reg4;
8957 	__le32 rewinded_snd_max_or_term_opcode;
8958 	__le32 rd_msn;
8959 	__le16 irq_prod_via_msdm;
8960 	__le16 irq_cons;
8961 	__le16 hq_cons_th_or_mpa_data;
8962 	__le16 hq_cons;
8963 	__le32 atom_msn;
8964 	__le32 orq_cons;
8965 	__le32 orq_cons_th;
8966 	u8 byte7;
8967 	u8 wqe_data_pad_bytes;
8968 	u8 max_ord;
8969 	u8 former_hq_prod;
8970 	u8 irq_prod_via_msem;
8971 	u8 byte12;
8972 	u8 max_pkt_pdu_size_lo;
8973 	u8 max_pkt_pdu_size_hi;
8974 	u8 byte15;
8975 	u8 e5_reserved;
8976 	__le16 e5_reserved4;
8977 	__le32 reg10;
8978 	__le32 reg11;
8979 	__le32 shared_queue_page_addr_lo;
8980 	__le32 shared_queue_page_addr_hi;
8981 	__le32 reg14;
8982 	__le32 reg15;
8983 	__le32 reg16;
8984 	__le32 reg17;
8985 };
8986 
8987 struct tstorm_iwarp_conn_ag_ctx {
8988 	u8 reserved0;
8989 	u8 state;
8990 	u8 flags0;
8991 #define TSTORM_IWARP_CONN_AG_CTX_EXIST_IN_QM0_MASK	0x1
8992 #define TSTORM_IWARP_CONN_AG_CTX_EXIST_IN_QM0_SHIFT	0
8993 #define TSTORM_IWARP_CONN_AG_CTX_BIT1_MASK		0x1
8994 #define TSTORM_IWARP_CONN_AG_CTX_BIT1_SHIFT		1
8995 #define TSTORM_IWARP_CONN_AG_CTX_BIT2_MASK		0x1
8996 #define TSTORM_IWARP_CONN_AG_CTX_BIT2_SHIFT		2
8997 #define TSTORM_IWARP_CONN_AG_CTX_MSTORM_FLUSH_OR_TERMINATE_SENT_MASK  0x1
8998 #define TSTORM_IWARP_CONN_AG_CTX_MSTORM_FLUSH_OR_TERMINATE_SENT_SHIFT 3
8999 #define TSTORM_IWARP_CONN_AG_CTX_BIT4_MASK		0x1
9000 #define TSTORM_IWARP_CONN_AG_CTX_BIT4_SHIFT		4
9001 #define TSTORM_IWARP_CONN_AG_CTX_CACHED_ORQ_MASK	0x1
9002 #define TSTORM_IWARP_CONN_AG_CTX_CACHED_ORQ_SHIFT	5
9003 #define TSTORM_IWARP_CONN_AG_CTX_CF0_MASK		0x3
9004 #define TSTORM_IWARP_CONN_AG_CTX_CF0_SHIFT		6
9005 	u8 flags1;
9006 #define TSTORM_IWARP_CONN_AG_CTX_RQ_POST_CF_MASK		0x3
9007 #define TSTORM_IWARP_CONN_AG_CTX_RQ_POST_CF_SHIFT		0
9008 #define TSTORM_IWARP_CONN_AG_CTX_MPA_TIMEOUT_CF_MASK		0x3
9009 #define TSTORM_IWARP_CONN_AG_CTX_MPA_TIMEOUT_CF_SHIFT	2
9010 #define TSTORM_IWARP_CONN_AG_CTX_TIMER_STOP_ALL_MASK		0x3
9011 #define TSTORM_IWARP_CONN_AG_CTX_TIMER_STOP_ALL_SHIFT	4
9012 #define TSTORM_IWARP_CONN_AG_CTX_CF4_MASK			0x3
9013 #define TSTORM_IWARP_CONN_AG_CTX_CF4_SHIFT			6
9014 	u8 flags2;
9015 #define TSTORM_IWARP_CONN_AG_CTX_CF5_MASK	0x3
9016 #define TSTORM_IWARP_CONN_AG_CTX_CF5_SHIFT	0
9017 #define TSTORM_IWARP_CONN_AG_CTX_CF6_MASK	0x3
9018 #define TSTORM_IWARP_CONN_AG_CTX_CF6_SHIFT	2
9019 #define TSTORM_IWARP_CONN_AG_CTX_CF7_MASK	0x3
9020 #define TSTORM_IWARP_CONN_AG_CTX_CF7_SHIFT	4
9021 #define TSTORM_IWARP_CONN_AG_CTX_CF8_MASK	0x3
9022 #define TSTORM_IWARP_CONN_AG_CTX_CF8_SHIFT	6
9023 	u8 flags3;
9024 #define TSTORM_IWARP_CONN_AG_CTX_FLUSH_Q0_AND_TCP_HANDSHAKE_COMPLETE_MASK 0x3
9025 #define TSTORM_IWARP_CONN_AG_CTX_FLUSH_Q0_AND_TCP_HANDSHAKE_COMPLETE_SHIFT 0
9026 #define TSTORM_IWARP_CONN_AG_CTX_FLUSH_OR_ERROR_DETECTED_MASK	0x3
9027 #define TSTORM_IWARP_CONN_AG_CTX_FLUSH_OR_ERROR_DETECTED_SHIFT	2
9028 #define TSTORM_IWARP_CONN_AG_CTX_CF0EN_MASK				0x1
9029 #define TSTORM_IWARP_CONN_AG_CTX_CF0EN_SHIFT				4
9030 #define TSTORM_IWARP_CONN_AG_CTX_RQ_POST_CF_EN_MASK			0x1
9031 #define TSTORM_IWARP_CONN_AG_CTX_RQ_POST_CF_EN_SHIFT			5
9032 #define TSTORM_IWARP_CONN_AG_CTX_MPA_TIMEOUT_CF_EN_MASK		0x1
9033 #define TSTORM_IWARP_CONN_AG_CTX_MPA_TIMEOUT_CF_EN_SHIFT		6
9034 #define TSTORM_IWARP_CONN_AG_CTX_TIMER_STOP_ALL_EN_MASK		0x1
9035 #define TSTORM_IWARP_CONN_AG_CTX_TIMER_STOP_ALL_EN_SHIFT		7
9036 	u8 flags4;
9037 #define TSTORM_IWARP_CONN_AG_CTX_CF4EN_MASK				0x1
9038 #define TSTORM_IWARP_CONN_AG_CTX_CF4EN_SHIFT				0
9039 #define TSTORM_IWARP_CONN_AG_CTX_CF5EN_MASK				0x1
9040 #define TSTORM_IWARP_CONN_AG_CTX_CF5EN_SHIFT				1
9041 #define TSTORM_IWARP_CONN_AG_CTX_CF6EN_MASK				0x1
9042 #define TSTORM_IWARP_CONN_AG_CTX_CF6EN_SHIFT				2
9043 #define TSTORM_IWARP_CONN_AG_CTX_CF7EN_MASK				0x1
9044 #define TSTORM_IWARP_CONN_AG_CTX_CF7EN_SHIFT				3
9045 #define TSTORM_IWARP_CONN_AG_CTX_CF8EN_MASK				0x1
9046 #define TSTORM_IWARP_CONN_AG_CTX_CF8EN_SHIFT				4
9047 #define TSTORM_IWARP_CONN_AG_CTX_FLUSH_Q0_AND_TCP_HANDSHAKE_COMPL_EN_MASK 0x1
9048 #define	TSTORM_IWARP_CONN_AG_CTX_FLUSH_Q0_AND_TCP_HANDSHAKE_COMPL_EN_SHIFT 5
9049 #define TSTORM_IWARP_CONN_AG_CTX_FLUSH_OR_ERROR_DETECTED_EN_MASK	0x1
9050 #define TSTORM_IWARP_CONN_AG_CTX_FLUSH_OR_ERROR_DETECTED_EN_SHIFT	6
9051 #define TSTORM_IWARP_CONN_AG_CTX_RULE0EN_MASK			0x1
9052 #define TSTORM_IWARP_CONN_AG_CTX_RULE0EN_SHIFT			7
9053 	u8 flags5;
9054 #define TSTORM_IWARP_CONN_AG_CTX_RULE1EN_MASK		0x1
9055 #define TSTORM_IWARP_CONN_AG_CTX_RULE1EN_SHIFT		0
9056 #define TSTORM_IWARP_CONN_AG_CTX_RULE2EN_MASK		0x1
9057 #define TSTORM_IWARP_CONN_AG_CTX_RULE2EN_SHIFT		1
9058 #define TSTORM_IWARP_CONN_AG_CTX_RULE3EN_MASK		0x1
9059 #define TSTORM_IWARP_CONN_AG_CTX_RULE3EN_SHIFT		2
9060 #define TSTORM_IWARP_CONN_AG_CTX_RULE4EN_MASK		0x1
9061 #define TSTORM_IWARP_CONN_AG_CTX_RULE4EN_SHIFT		3
9062 #define TSTORM_IWARP_CONN_AG_CTX_RULE5EN_MASK		0x1
9063 #define TSTORM_IWARP_CONN_AG_CTX_RULE5EN_SHIFT		4
9064 #define TSTORM_IWARP_CONN_AG_CTX_SND_SQ_CONS_RULE_MASK	0x1
9065 #define TSTORM_IWARP_CONN_AG_CTX_SND_SQ_CONS_RULE_SHIFT	5
9066 #define TSTORM_IWARP_CONN_AG_CTX_RULE7EN_MASK		0x1
9067 #define TSTORM_IWARP_CONN_AG_CTX_RULE7EN_SHIFT		6
9068 #define TSTORM_IWARP_CONN_AG_CTX_RULE8EN_MASK		0x1
9069 #define TSTORM_IWARP_CONN_AG_CTX_RULE8EN_SHIFT		7
9070 	__le32 reg0;
9071 	__le32 reg1;
9072 	__le32 unaligned_nxt_seq;
9073 	__le32 reg3;
9074 	__le32 reg4;
9075 	__le32 reg5;
9076 	__le32 reg6;
9077 	__le32 reg7;
9078 	__le32 reg8;
9079 	u8 orq_cache_idx;
9080 	u8 hq_prod;
9081 	__le16 sq_tx_cons_th;
9082 	u8 orq_prod;
9083 	u8 irq_cons;
9084 	__le16 sq_tx_cons;
9085 	__le16 conn_dpi;
9086 	__le16 rq_prod;
9087 	__le32 snd_seq;
9088 	__le32 last_hq_sequence;
9089 };
9090 
9091 /* The iwarp storm context of Tstorm */
9092 struct tstorm_iwarp_conn_st_ctx {
9093 	__le32 reserved[60];
9094 };
9095 
9096 /* The iwarp storm context of Mstorm */
9097 struct mstorm_iwarp_conn_st_ctx {
9098 	__le32 reserved[32];
9099 };
9100 
9101 /* The iwarp storm context of Ustorm */
9102 struct ustorm_iwarp_conn_st_ctx {
9103 	struct regpair reserved[14];
9104 };
9105 
9106 /* iwarp connection context */
9107 struct iwarp_conn_context {
9108 	struct ystorm_iwarp_conn_st_ctx ystorm_st_context;
9109 	struct regpair ystorm_st_padding[2];
9110 	struct pstorm_iwarp_conn_st_ctx pstorm_st_context;
9111 	struct regpair pstorm_st_padding[2];
9112 	struct xstorm_iwarp_conn_st_ctx xstorm_st_context;
9113 	struct xstorm_iwarp_conn_ag_ctx xstorm_ag_context;
9114 	struct tstorm_iwarp_conn_ag_ctx tstorm_ag_context;
9115 	struct timers_context timer_context;
9116 	struct ustorm_rdma_conn_ag_ctx ustorm_ag_context;
9117 	struct tstorm_iwarp_conn_st_ctx tstorm_st_context;
9118 	struct regpair tstorm_st_padding[2];
9119 	struct mstorm_iwarp_conn_st_ctx mstorm_st_context;
9120 	struct ustorm_iwarp_conn_st_ctx ustorm_st_context;
9121 	struct regpair ustorm_st_padding[2];
9122 };
9123 
9124 /* iWARP create QP params passed by driver to FW in CreateQP Request Ramrod */
9125 struct iwarp_create_qp_ramrod_data {
9126 	u8 flags;
9127 #define IWARP_CREATE_QP_RAMROD_DATA_FMR_AND_RESERVED_EN_MASK	0x1
9128 #define IWARP_CREATE_QP_RAMROD_DATA_FMR_AND_RESERVED_EN_SHIFT	0
9129 #define IWARP_CREATE_QP_RAMROD_DATA_SIGNALED_COMP_MASK		0x1
9130 #define IWARP_CREATE_QP_RAMROD_DATA_SIGNALED_COMP_SHIFT		1
9131 #define IWARP_CREATE_QP_RAMROD_DATA_RDMA_RD_EN_MASK		0x1
9132 #define IWARP_CREATE_QP_RAMROD_DATA_RDMA_RD_EN_SHIFT		2
9133 #define IWARP_CREATE_QP_RAMROD_DATA_RDMA_WR_EN_MASK		0x1
9134 #define IWARP_CREATE_QP_RAMROD_DATA_RDMA_WR_EN_SHIFT		3
9135 #define IWARP_CREATE_QP_RAMROD_DATA_ATOMIC_EN_MASK		0x1
9136 #define IWARP_CREATE_QP_RAMROD_DATA_ATOMIC_EN_SHIFT		4
9137 #define IWARP_CREATE_QP_RAMROD_DATA_SRQ_FLG_MASK		0x1
9138 #define IWARP_CREATE_QP_RAMROD_DATA_SRQ_FLG_SHIFT		5
9139 #define IWARP_CREATE_QP_RAMROD_DATA_LOW_LATENCY_QUEUE_EN_MASK	0x1
9140 #define IWARP_CREATE_QP_RAMROD_DATA_LOW_LATENCY_QUEUE_EN_SHIFT	6
9141 #define IWARP_CREATE_QP_RAMROD_DATA_RESERVED0_MASK		0x1
9142 #define IWARP_CREATE_QP_RAMROD_DATA_RESERVED0_SHIFT		7
9143 	u8 reserved1;
9144 	__le16 pd;
9145 	__le16 sq_num_pages;
9146 	__le16 rq_num_pages;
9147 	__le32 reserved3[2];
9148 	struct regpair qp_handle_for_cqe;
9149 	struct rdma_srq_id srq_id;
9150 	__le32 cq_cid_for_sq;
9151 	__le32 cq_cid_for_rq;
9152 	__le16 dpi;
9153 	__le16 physical_q0;
9154 	__le16 physical_q1;
9155 	u8 reserved2[6];
9156 };
9157 
9158 /* iWARP completion queue types */
9159 enum iwarp_eqe_async_opcode {
9160 	IWARP_EVENT_TYPE_ASYNC_CONNECT_COMPLETE,
9161 	IWARP_EVENT_TYPE_ASYNC_ENHANCED_MPA_REPLY_ARRIVED,
9162 	IWARP_EVENT_TYPE_ASYNC_MPA_HANDSHAKE_COMPLETE,
9163 	IWARP_EVENT_TYPE_ASYNC_CID_CLEANED,
9164 	IWARP_EVENT_TYPE_ASYNC_EXCEPTION_DETECTED,
9165 	IWARP_EVENT_TYPE_ASYNC_QP_IN_ERROR_STATE,
9166 	IWARP_EVENT_TYPE_ASYNC_CQ_OVERFLOW,
9167 	IWARP_EVENT_TYPE_ASYNC_SRQ_LIMIT,
9168 	IWARP_EVENT_TYPE_ASYNC_SRQ_EMPTY,
9169 	MAX_IWARP_EQE_ASYNC_OPCODE
9170 };
9171 
9172 struct iwarp_eqe_data_mpa_async_completion {
9173 	__le16 ulp_data_len;
9174 	u8 rtr_type_sent;
9175 	u8 reserved[5];
9176 };
9177 
9178 struct iwarp_eqe_data_tcp_async_completion {
9179 	__le16 ulp_data_len;
9180 	u8 mpa_handshake_mode;
9181 	u8 reserved[5];
9182 };
9183 
9184 /* iWARP completion queue types */
9185 enum iwarp_eqe_sync_opcode {
9186 	IWARP_EVENT_TYPE_TCP_OFFLOAD = 13,
9187 	IWARP_EVENT_TYPE_MPA_OFFLOAD,
9188 	IWARP_EVENT_TYPE_MPA_OFFLOAD_SEND_RTR,
9189 	IWARP_EVENT_TYPE_CREATE_QP,
9190 	IWARP_EVENT_TYPE_QUERY_QP,
9191 	IWARP_EVENT_TYPE_MODIFY_QP,
9192 	IWARP_EVENT_TYPE_DESTROY_QP,
9193 	IWARP_EVENT_TYPE_ABORT_TCP_OFFLOAD,
9194 	MAX_IWARP_EQE_SYNC_OPCODE
9195 };
9196 
9197 /* iWARP EQE completion status */
9198 enum iwarp_fw_return_code {
9199 	IWARP_CONN_ERROR_TCP_CONNECT_INVALID_PACKET = 6,
9200 	IWARP_CONN_ERROR_TCP_CONNECTION_RST,
9201 	IWARP_CONN_ERROR_TCP_CONNECT_TIMEOUT,
9202 	IWARP_CONN_ERROR_MPA_ERROR_REJECT,
9203 	IWARP_CONN_ERROR_MPA_NOT_SUPPORTED_VER,
9204 	IWARP_CONN_ERROR_MPA_RST,
9205 	IWARP_CONN_ERROR_MPA_FIN,
9206 	IWARP_CONN_ERROR_MPA_RTR_MISMATCH,
9207 	IWARP_CONN_ERROR_MPA_INSUF_IRD,
9208 	IWARP_CONN_ERROR_MPA_INVALID_PACKET,
9209 	IWARP_CONN_ERROR_MPA_LOCAL_ERROR,
9210 	IWARP_CONN_ERROR_MPA_TIMEOUT,
9211 	IWARP_CONN_ERROR_MPA_TERMINATE,
9212 	IWARP_QP_IN_ERROR_GOOD_CLOSE,
9213 	IWARP_QP_IN_ERROR_BAD_CLOSE,
9214 	IWARP_EXCEPTION_DETECTED_LLP_CLOSED,
9215 	IWARP_EXCEPTION_DETECTED_LLP_RESET,
9216 	IWARP_EXCEPTION_DETECTED_IRQ_FULL,
9217 	IWARP_EXCEPTION_DETECTED_RQ_EMPTY,
9218 	IWARP_EXCEPTION_DETECTED_LLP_TIMEOUT,
9219 	IWARP_EXCEPTION_DETECTED_REMOTE_PROTECTION_ERROR,
9220 	IWARP_EXCEPTION_DETECTED_CQ_OVERFLOW,
9221 	IWARP_EXCEPTION_DETECTED_LOCAL_CATASTROPHIC,
9222 	IWARP_EXCEPTION_DETECTED_LOCAL_ACCESS_ERROR,
9223 	IWARP_EXCEPTION_DETECTED_REMOTE_OPERATION_ERROR,
9224 	IWARP_EXCEPTION_DETECTED_TERMINATE_RECEIVED,
9225 	MAX_IWARP_FW_RETURN_CODE
9226 };
9227 
9228 /* unaligned opaque data received from LL2 */
9229 struct iwarp_init_func_params {
9230 	u8 ll2_ooo_q_index;
9231 	u8 reserved1[7];
9232 };
9233 
9234 /* iwarp func init ramrod data */
9235 struct iwarp_init_func_ramrod_data {
9236 	struct rdma_init_func_ramrod_data rdma;
9237 	struct tcp_init_params tcp;
9238 	struct iwarp_init_func_params iwarp;
9239 };
9240 
9241 /* iWARP QP - possible states to transition to */
9242 enum iwarp_modify_qp_new_state_type {
9243 	IWARP_MODIFY_QP_STATE_CLOSING = 1,
9244 	IWARP_MODIFY_QP_STATE_ERROR = 2,
9245 	MAX_IWARP_MODIFY_QP_NEW_STATE_TYPE
9246 };
9247 
9248 /* iwarp modify qp responder ramrod data */
9249 struct iwarp_modify_qp_ramrod_data {
9250 	__le16 transition_to_state;
9251 	__le16 flags;
9252 #define IWARP_MODIFY_QP_RAMROD_DATA_RDMA_RD_EN_MASK		0x1
9253 #define IWARP_MODIFY_QP_RAMROD_DATA_RDMA_RD_EN_SHIFT		0
9254 #define IWARP_MODIFY_QP_RAMROD_DATA_RDMA_WR_EN_MASK		0x1
9255 #define IWARP_MODIFY_QP_RAMROD_DATA_RDMA_WR_EN_SHIFT		1
9256 #define IWARP_MODIFY_QP_RAMROD_DATA_ATOMIC_EN_MASK		0x1
9257 #define IWARP_MODIFY_QP_RAMROD_DATA_ATOMIC_EN_SHIFT		2
9258 #define IWARP_MODIFY_QP_RAMROD_DATA_STATE_TRANS_EN_MASK		0x1
9259 #define IWARP_MODIFY_QP_RAMROD_DATA_STATE_TRANS_EN_SHIFT	3
9260 #define IWARP_MODIFY_QP_RAMROD_DATA_RDMA_OPS_EN_FLG_MASK	0x1
9261 #define IWARP_MODIFY_QP_RAMROD_DATA_RDMA_OPS_EN_FLG_SHIFT	4
9262 #define IWARP_MODIFY_QP_RAMROD_DATA_PHYSICAL_QUEUE_FLG_MASK	0x1
9263 #define IWARP_MODIFY_QP_RAMROD_DATA_PHYSICAL_QUEUE_FLG_SHIFT	5
9264 #define IWARP_MODIFY_QP_RAMROD_DATA_RESERVED_MASK		0x3FF
9265 #define IWARP_MODIFY_QP_RAMROD_DATA_RESERVED_SHIFT		6
9266 	__le16 physical_q0;
9267 	__le16 physical_q1;
9268 	__le32 reserved1[10];
9269 };
9270 
9271 /* MPA params for Enhanced mode */
9272 struct mpa_rq_params {
9273 	__le32 ird;
9274 	__le32 ord;
9275 };
9276 
9277 /* MPA host Address-Len for private data */
9278 struct mpa_ulp_buffer {
9279 	struct regpair addr;
9280 	__le16 len;
9281 	__le16 reserved[3];
9282 };
9283 
9284 /* iWARP MPA offload params common to Basic and Enhanced modes */
9285 struct mpa_outgoing_params {
9286 	u8 crc_needed;
9287 	u8 reject;
9288 	u8 reserved[6];
9289 	struct mpa_rq_params out_rq;
9290 	struct mpa_ulp_buffer outgoing_ulp_buffer;
9291 };
9292 
9293 /* iWARP MPA offload params passed by driver to FW in MPA Offload Request
9294  * Ramrod.
9295  */
9296 struct iwarp_mpa_offload_ramrod_data {
9297 	struct mpa_outgoing_params common;
9298 	__le32 tcp_cid;
9299 	u8 mode;
9300 	u8 tcp_connect_side;
9301 	u8 rtr_pref;
9302 #define IWARP_MPA_OFFLOAD_RAMROD_DATA_RTR_SUPPORTED_MASK	0x7
9303 #define IWARP_MPA_OFFLOAD_RAMROD_DATA_RTR_SUPPORTED_SHIFT	0
9304 #define IWARP_MPA_OFFLOAD_RAMROD_DATA_RESERVED1_MASK		0x1F
9305 #define IWARP_MPA_OFFLOAD_RAMROD_DATA_RESERVED1_SHIFT		3
9306 	u8 reserved2;
9307 	struct mpa_ulp_buffer incoming_ulp_buffer;
9308 	struct regpair async_eqe_output_buf;
9309 	struct regpair handle_for_async;
9310 	struct regpair shared_queue_addr;
9311 	__le32 additional_setup_time;
9312 	__le16 rcv_wnd;
9313 	u8 stats_counter_id;
9314 	u8 reserved3[9];
9315 };
9316 
9317 /* iWARP TCP connection offload params passed by driver to FW */
9318 struct iwarp_offload_params {
9319 	struct mpa_ulp_buffer incoming_ulp_buffer;
9320 	struct regpair async_eqe_output_buf;
9321 	struct regpair handle_for_async;
9322 	__le32 additional_setup_time;
9323 	__le16 physical_q0;
9324 	__le16 physical_q1;
9325 	u8 stats_counter_id;
9326 	u8 mpa_mode;
9327 	u8 src_vport_id;
9328 	u8 reserved[5];
9329 };
9330 
9331 /* iWARP query QP output params */
9332 struct iwarp_query_qp_output_params {
9333 	__le32 flags;
9334 #define IWARP_QUERY_QP_OUTPUT_PARAMS_ERROR_FLG_MASK	0x1
9335 #define IWARP_QUERY_QP_OUTPUT_PARAMS_ERROR_FLG_SHIFT	0
9336 #define IWARP_QUERY_QP_OUTPUT_PARAMS_RESERVED0_MASK	0x7FFFFFFF
9337 #define IWARP_QUERY_QP_OUTPUT_PARAMS_RESERVED0_SHIFT	1
9338 	u8 reserved1[4];
9339 };
9340 
9341 /* iWARP query QP ramrod data */
9342 struct iwarp_query_qp_ramrod_data {
9343 	struct regpair output_params_addr;
9344 };
9345 
9346 /* iWARP Ramrod Command IDs */
9347 enum iwarp_ramrod_cmd_id {
9348 	IWARP_RAMROD_CMD_ID_TCP_OFFLOAD = 13,
9349 	IWARP_RAMROD_CMD_ID_MPA_OFFLOAD,
9350 	IWARP_RAMROD_CMD_ID_MPA_OFFLOAD_SEND_RTR,
9351 	IWARP_RAMROD_CMD_ID_CREATE_QP,
9352 	IWARP_RAMROD_CMD_ID_QUERY_QP,
9353 	IWARP_RAMROD_CMD_ID_MODIFY_QP,
9354 	IWARP_RAMROD_CMD_ID_DESTROY_QP,
9355 	IWARP_RAMROD_CMD_ID_ABORT_TCP_OFFLOAD,
9356 	MAX_IWARP_RAMROD_CMD_ID
9357 };
9358 
9359 /* Per PF iWARP retransmit path statistics */
9360 struct iwarp_rxmit_stats_drv {
9361 	struct regpair tx_go_to_slow_start_event_cnt;
9362 	struct regpair tx_fast_retransmit_event_cnt;
9363 };
9364 
9365 /* iWARP and TCP connection offload params passed by driver to FW in iWARP
9366  * offload ramrod.
9367  */
9368 struct iwarp_tcp_offload_ramrod_data {
9369 	struct tcp_offload_params_opt2 tcp;
9370 	struct iwarp_offload_params iwarp;
9371 };
9372 
9373 /* iWARP MPA negotiation types */
9374 enum mpa_negotiation_mode {
9375 	MPA_NEGOTIATION_TYPE_BASIC = 1,
9376 	MPA_NEGOTIATION_TYPE_ENHANCED = 2,
9377 	MAX_MPA_NEGOTIATION_MODE
9378 };
9379 
9380 /* iWARP MPA Enhanced mode RTR types */
9381 enum mpa_rtr_type {
9382 	MPA_RTR_TYPE_NONE = 0,
9383 	MPA_RTR_TYPE_ZERO_SEND = 1,
9384 	MPA_RTR_TYPE_ZERO_WRITE = 2,
9385 	MPA_RTR_TYPE_ZERO_SEND_AND_WRITE = 3,
9386 	MPA_RTR_TYPE_ZERO_READ = 4,
9387 	MPA_RTR_TYPE_ZERO_SEND_AND_READ = 5,
9388 	MPA_RTR_TYPE_ZERO_WRITE_AND_READ = 6,
9389 	MPA_RTR_TYPE_ZERO_SEND_AND_WRITE_AND_READ = 7,
9390 	MAX_MPA_RTR_TYPE
9391 };
9392 
9393 /* unaligned opaque data received from LL2 */
9394 struct unaligned_opaque_data {
9395 	__le16 first_mpa_offset;
9396 	u8 tcp_payload_offset;
9397 	u8 flags;
9398 #define UNALIGNED_OPAQUE_DATA_PKT_REACHED_WIN_RIGHT_EDGE_MASK	0x1
9399 #define UNALIGNED_OPAQUE_DATA_PKT_REACHED_WIN_RIGHT_EDGE_SHIFT	0
9400 #define UNALIGNED_OPAQUE_DATA_CONNECTION_CLOSED_MASK		0x1
9401 #define UNALIGNED_OPAQUE_DATA_CONNECTION_CLOSED_SHIFT		1
9402 #define UNALIGNED_OPAQUE_DATA_RESERVED_MASK			0x3F
9403 #define UNALIGNED_OPAQUE_DATA_RESERVED_SHIFT			2
9404 	__le32 cid;
9405 };
9406 
9407 struct mstorm_iwarp_conn_ag_ctx {
9408 	u8 reserved;
9409 	u8 state;
9410 	u8 flags0;
9411 #define MSTORM_IWARP_CONN_AG_CTX_EXIST_IN_QM0_MASK		0x1
9412 #define MSTORM_IWARP_CONN_AG_CTX_EXIST_IN_QM0_SHIFT		0
9413 #define MSTORM_IWARP_CONN_AG_CTX_BIT1_MASK			0x1
9414 #define MSTORM_IWARP_CONN_AG_CTX_BIT1_SHIFT			1
9415 #define MSTORM_IWARP_CONN_AG_CTX_INV_STAG_DONE_CF_MASK	0x3
9416 #define MSTORM_IWARP_CONN_AG_CTX_INV_STAG_DONE_CF_SHIFT	2
9417 #define MSTORM_IWARP_CONN_AG_CTX_CF1_MASK			0x3
9418 #define MSTORM_IWARP_CONN_AG_CTX_CF1_SHIFT			4
9419 #define MSTORM_IWARP_CONN_AG_CTX_CF2_MASK			0x3
9420 #define MSTORM_IWARP_CONN_AG_CTX_CF2_SHIFT			6
9421 	u8 flags1;
9422 #define MSTORM_IWARP_CONN_AG_CTX_INV_STAG_DONE_CF_EN_MASK	0x1
9423 #define MSTORM_IWARP_CONN_AG_CTX_INV_STAG_DONE_CF_EN_SHIFT	0
9424 #define MSTORM_IWARP_CONN_AG_CTX_CF1EN_MASK			0x1
9425 #define MSTORM_IWARP_CONN_AG_CTX_CF1EN_SHIFT			1
9426 #define MSTORM_IWARP_CONN_AG_CTX_CF2EN_MASK			0x1
9427 #define MSTORM_IWARP_CONN_AG_CTX_CF2EN_SHIFT			2
9428 #define MSTORM_IWARP_CONN_AG_CTX_RULE0EN_MASK		0x1
9429 #define MSTORM_IWARP_CONN_AG_CTX_RULE0EN_SHIFT		3
9430 #define MSTORM_IWARP_CONN_AG_CTX_RULE1EN_MASK		0x1
9431 #define MSTORM_IWARP_CONN_AG_CTX_RULE1EN_SHIFT		4
9432 #define MSTORM_IWARP_CONN_AG_CTX_RULE2EN_MASK		0x1
9433 #define MSTORM_IWARP_CONN_AG_CTX_RULE2EN_SHIFT		5
9434 #define MSTORM_IWARP_CONN_AG_CTX_RCQ_CONS_EN_MASK		0x1
9435 #define MSTORM_IWARP_CONN_AG_CTX_RCQ_CONS_EN_SHIFT		6
9436 #define MSTORM_IWARP_CONN_AG_CTX_RULE4EN_MASK		0x1
9437 #define MSTORM_IWARP_CONN_AG_CTX_RULE4EN_SHIFT		7
9438 	__le16 rcq_cons;
9439 	__le16 rcq_cons_th;
9440 	__le32 reg0;
9441 	__le32 reg1;
9442 };
9443 
9444 struct ustorm_iwarp_conn_ag_ctx {
9445 	u8 reserved;
9446 	u8 byte1;
9447 	u8 flags0;
9448 #define USTORM_IWARP_CONN_AG_CTX_EXIST_IN_QM0_MASK	0x1
9449 #define USTORM_IWARP_CONN_AG_CTX_EXIST_IN_QM0_SHIFT	0
9450 #define USTORM_IWARP_CONN_AG_CTX_BIT1_MASK		0x1
9451 #define USTORM_IWARP_CONN_AG_CTX_BIT1_SHIFT		1
9452 #define USTORM_IWARP_CONN_AG_CTX_CF0_MASK		0x3
9453 #define USTORM_IWARP_CONN_AG_CTX_CF0_SHIFT		2
9454 #define USTORM_IWARP_CONN_AG_CTX_CF1_MASK		0x3
9455 #define USTORM_IWARP_CONN_AG_CTX_CF1_SHIFT		4
9456 #define USTORM_IWARP_CONN_AG_CTX_CF2_MASK		0x3
9457 #define USTORM_IWARP_CONN_AG_CTX_CF2_SHIFT		6
9458 	u8 flags1;
9459 #define USTORM_IWARP_CONN_AG_CTX_CF3_MASK		0x3
9460 #define USTORM_IWARP_CONN_AG_CTX_CF3_SHIFT		0
9461 #define USTORM_IWARP_CONN_AG_CTX_CQ_ARM_SE_CF_MASK	0x3
9462 #define USTORM_IWARP_CONN_AG_CTX_CQ_ARM_SE_CF_SHIFT	2
9463 #define USTORM_IWARP_CONN_AG_CTX_CQ_ARM_CF_MASK	0x3
9464 #define USTORM_IWARP_CONN_AG_CTX_CQ_ARM_CF_SHIFT	4
9465 #define USTORM_IWARP_CONN_AG_CTX_CF6_MASK		0x3
9466 #define USTORM_IWARP_CONN_AG_CTX_CF6_SHIFT		6
9467 	u8 flags2;
9468 #define USTORM_IWARP_CONN_AG_CTX_CF0EN_MASK			0x1
9469 #define USTORM_IWARP_CONN_AG_CTX_CF0EN_SHIFT			0
9470 #define USTORM_IWARP_CONN_AG_CTX_CF1EN_MASK			0x1
9471 #define USTORM_IWARP_CONN_AG_CTX_CF1EN_SHIFT			1
9472 #define USTORM_IWARP_CONN_AG_CTX_CF2EN_MASK			0x1
9473 #define USTORM_IWARP_CONN_AG_CTX_CF2EN_SHIFT			2
9474 #define USTORM_IWARP_CONN_AG_CTX_CF3EN_MASK			0x1
9475 #define USTORM_IWARP_CONN_AG_CTX_CF3EN_SHIFT			3
9476 #define USTORM_IWARP_CONN_AG_CTX_CQ_ARM_SE_CF_EN_MASK	0x1
9477 #define USTORM_IWARP_CONN_AG_CTX_CQ_ARM_SE_CF_EN_SHIFT	4
9478 #define USTORM_IWARP_CONN_AG_CTX_CQ_ARM_CF_EN_MASK		0x1
9479 #define USTORM_IWARP_CONN_AG_CTX_CQ_ARM_CF_EN_SHIFT		5
9480 #define USTORM_IWARP_CONN_AG_CTX_CF6EN_MASK			0x1
9481 #define USTORM_IWARP_CONN_AG_CTX_CF6EN_SHIFT			6
9482 #define USTORM_IWARP_CONN_AG_CTX_CQ_SE_EN_MASK		0x1
9483 #define USTORM_IWARP_CONN_AG_CTX_CQ_SE_EN_SHIFT		7
9484 	u8 flags3;
9485 #define USTORM_IWARP_CONN_AG_CTX_CQ_EN_MASK		0x1
9486 #define USTORM_IWARP_CONN_AG_CTX_CQ_EN_SHIFT		0
9487 #define USTORM_IWARP_CONN_AG_CTX_RULE2EN_MASK	0x1
9488 #define USTORM_IWARP_CONN_AG_CTX_RULE2EN_SHIFT	1
9489 #define USTORM_IWARP_CONN_AG_CTX_RULE3EN_MASK	0x1
9490 #define USTORM_IWARP_CONN_AG_CTX_RULE3EN_SHIFT	2
9491 #define USTORM_IWARP_CONN_AG_CTX_RULE4EN_MASK	0x1
9492 #define USTORM_IWARP_CONN_AG_CTX_RULE4EN_SHIFT	3
9493 #define USTORM_IWARP_CONN_AG_CTX_RULE5EN_MASK	0x1
9494 #define USTORM_IWARP_CONN_AG_CTX_RULE5EN_SHIFT	4
9495 #define USTORM_IWARP_CONN_AG_CTX_RULE6EN_MASK	0x1
9496 #define USTORM_IWARP_CONN_AG_CTX_RULE6EN_SHIFT	5
9497 #define USTORM_IWARP_CONN_AG_CTX_RULE7EN_MASK	0x1
9498 #define USTORM_IWARP_CONN_AG_CTX_RULE7EN_SHIFT	6
9499 #define USTORM_IWARP_CONN_AG_CTX_RULE8EN_MASK	0x1
9500 #define USTORM_IWARP_CONN_AG_CTX_RULE8EN_SHIFT	7
9501 	u8 byte2;
9502 	u8 byte3;
9503 	__le16 word0;
9504 	__le16 word1;
9505 	__le32 cq_cons;
9506 	__le32 cq_se_prod;
9507 	__le32 cq_prod;
9508 	__le32 reg3;
9509 	__le16 word2;
9510 	__le16 word3;
9511 };
9512 
9513 struct ystorm_iwarp_conn_ag_ctx {
9514 	u8 byte0;
9515 	u8 byte1;
9516 	u8 flags0;
9517 #define YSTORM_IWARP_CONN_AG_CTX_BIT0_MASK	0x1
9518 #define YSTORM_IWARP_CONN_AG_CTX_BIT0_SHIFT	0
9519 #define YSTORM_IWARP_CONN_AG_CTX_BIT1_MASK	0x1
9520 #define YSTORM_IWARP_CONN_AG_CTX_BIT1_SHIFT	1
9521 #define YSTORM_IWARP_CONN_AG_CTX_CF0_MASK	0x3
9522 #define YSTORM_IWARP_CONN_AG_CTX_CF0_SHIFT	2
9523 #define YSTORM_IWARP_CONN_AG_CTX_CF1_MASK	0x3
9524 #define YSTORM_IWARP_CONN_AG_CTX_CF1_SHIFT	4
9525 #define YSTORM_IWARP_CONN_AG_CTX_CF2_MASK	0x3
9526 #define YSTORM_IWARP_CONN_AG_CTX_CF2_SHIFT	6
9527 	u8 flags1;
9528 #define YSTORM_IWARP_CONN_AG_CTX_CF0EN_MASK		0x1
9529 #define YSTORM_IWARP_CONN_AG_CTX_CF0EN_SHIFT		0
9530 #define YSTORM_IWARP_CONN_AG_CTX_CF1EN_MASK		0x1
9531 #define YSTORM_IWARP_CONN_AG_CTX_CF1EN_SHIFT		1
9532 #define YSTORM_IWARP_CONN_AG_CTX_CF2EN_MASK		0x1
9533 #define YSTORM_IWARP_CONN_AG_CTX_CF2EN_SHIFT		2
9534 #define YSTORM_IWARP_CONN_AG_CTX_RULE0EN_MASK	0x1
9535 #define YSTORM_IWARP_CONN_AG_CTX_RULE0EN_SHIFT	3
9536 #define YSTORM_IWARP_CONN_AG_CTX_RULE1EN_MASK	0x1
9537 #define YSTORM_IWARP_CONN_AG_CTX_RULE1EN_SHIFT	4
9538 #define YSTORM_IWARP_CONN_AG_CTX_RULE2EN_MASK	0x1
9539 #define YSTORM_IWARP_CONN_AG_CTX_RULE2EN_SHIFT	5
9540 #define YSTORM_IWARP_CONN_AG_CTX_RULE3EN_MASK	0x1
9541 #define YSTORM_IWARP_CONN_AG_CTX_RULE3EN_SHIFT	6
9542 #define YSTORM_IWARP_CONN_AG_CTX_RULE4EN_MASK	0x1
9543 #define YSTORM_IWARP_CONN_AG_CTX_RULE4EN_SHIFT	7
9544 	u8 byte2;
9545 	u8 byte3;
9546 	__le16 word0;
9547 	__le32 reg0;
9548 	__le32 reg1;
9549 	__le16 word1;
9550 	__le16 word2;
9551 	__le16 word3;
9552 	__le16 word4;
9553 	__le32 reg2;
9554 	__le32 reg3;
9555 };
9556 
9557 /* The fcoe storm context of Ystorm */
9558 struct ystorm_fcoe_conn_st_ctx {
9559 	u8 func_mode;
9560 	u8 cos;
9561 	u8 conf_version;
9562 	u8 eth_hdr_size;
9563 	__le16 stat_ram_addr;
9564 	__le16 mtu;
9565 	__le16 max_fc_payload_len;
9566 	__le16 tx_max_fc_pay_len;
9567 	u8 fcp_cmd_size;
9568 	u8 fcp_rsp_size;
9569 	__le16 mss;
9570 	struct regpair reserved;
9571 	__le16 min_frame_size;
9572 	u8 protection_info_flags;
9573 #define YSTORM_FCOE_CONN_ST_CTX_SUPPORT_PROTECTION_MASK		0x1
9574 #define YSTORM_FCOE_CONN_ST_CTX_SUPPORT_PROTECTION_SHIFT	0
9575 #define YSTORM_FCOE_CONN_ST_CTX_VALID_MASK			0x1
9576 #define YSTORM_FCOE_CONN_ST_CTX_VALID_SHIFT			1
9577 #define YSTORM_FCOE_CONN_ST_CTX_RESERVED1_MASK			0x3F
9578 #define YSTORM_FCOE_CONN_ST_CTX_RESERVED1_SHIFT			2
9579 	u8 dst_protection_per_mss;
9580 	u8 src_protection_per_mss;
9581 	u8 ptu_log_page_size;
9582 	u8 flags;
9583 #define YSTORM_FCOE_CONN_ST_CTX_INNER_VLAN_FLAG_MASK	0x1
9584 #define YSTORM_FCOE_CONN_ST_CTX_INNER_VLAN_FLAG_SHIFT	0
9585 #define YSTORM_FCOE_CONN_ST_CTX_OUTER_VLAN_FLAG_MASK	0x1
9586 #define YSTORM_FCOE_CONN_ST_CTX_OUTER_VLAN_FLAG_SHIFT	1
9587 #define YSTORM_FCOE_CONN_ST_CTX_RSRV_MASK		0x3F
9588 #define YSTORM_FCOE_CONN_ST_CTX_RSRV_SHIFT		2
9589 	u8 fcp_xfer_size;
9590 };
9591 
9592 /* FCoE 16-bits vlan structure */
9593 struct fcoe_vlan_fields {
9594 	__le16 fields;
9595 #define FCOE_VLAN_FIELDS_VID_MASK	0xFFF
9596 #define FCOE_VLAN_FIELDS_VID_SHIFT	0
9597 #define FCOE_VLAN_FIELDS_CLI_MASK	0x1
9598 #define FCOE_VLAN_FIELDS_CLI_SHIFT	12
9599 #define FCOE_VLAN_FIELDS_PRI_MASK	0x7
9600 #define FCOE_VLAN_FIELDS_PRI_SHIFT	13
9601 };
9602 
9603 /* FCoE 16-bits vlan union */
9604 union fcoe_vlan_field_union {
9605 	struct fcoe_vlan_fields fields;
9606 	__le16 val;
9607 };
9608 
9609 /* FCoE 16-bits vlan, vif union */
9610 union fcoe_vlan_vif_field_union {
9611 	union fcoe_vlan_field_union vlan;
9612 	__le16 vif;
9613 };
9614 
9615 /* Ethernet context section */
9616 struct pstorm_fcoe_eth_context_section {
9617 	u8 remote_addr_3;
9618 	u8 remote_addr_2;
9619 	u8 remote_addr_1;
9620 	u8 remote_addr_0;
9621 	u8 local_addr_1;
9622 	u8 local_addr_0;
9623 	u8 remote_addr_5;
9624 	u8 remote_addr_4;
9625 	u8 local_addr_5;
9626 	u8 local_addr_4;
9627 	u8 local_addr_3;
9628 	u8 local_addr_2;
9629 	union fcoe_vlan_vif_field_union vif_outer_vlan;
9630 	__le16 vif_outer_eth_type;
9631 	union fcoe_vlan_vif_field_union inner_vlan;
9632 	__le16 inner_eth_type;
9633 };
9634 
9635 /* The fcoe storm context of Pstorm */
9636 struct pstorm_fcoe_conn_st_ctx {
9637 	u8 func_mode;
9638 	u8 cos;
9639 	u8 conf_version;
9640 	u8 rsrv;
9641 	__le16 stat_ram_addr;
9642 	__le16 mss;
9643 	struct regpair abts_cleanup_addr;
9644 	struct pstorm_fcoe_eth_context_section eth;
9645 	u8 sid_2;
9646 	u8 sid_1;
9647 	u8 sid_0;
9648 	u8 flags;
9649 #define PSTORM_FCOE_CONN_ST_CTX_VNTAG_VLAN_MASK			0x1
9650 #define PSTORM_FCOE_CONN_ST_CTX_VNTAG_VLAN_SHIFT		0
9651 #define PSTORM_FCOE_CONN_ST_CTX_SUPPORT_REC_RR_TOV_MASK		0x1
9652 #define PSTORM_FCOE_CONN_ST_CTX_SUPPORT_REC_RR_TOV_SHIFT	1
9653 #define PSTORM_FCOE_CONN_ST_CTX_INNER_VLAN_FLAG_MASK		0x1
9654 #define PSTORM_FCOE_CONN_ST_CTX_INNER_VLAN_FLAG_SHIFT		2
9655 #define PSTORM_FCOE_CONN_ST_CTX_OUTER_VLAN_FLAG_MASK		0x1
9656 #define PSTORM_FCOE_CONN_ST_CTX_OUTER_VLAN_FLAG_SHIFT		3
9657 #define PSTORM_FCOE_CONN_ST_CTX_SINGLE_VLAN_FLAG_MASK		0x1
9658 #define PSTORM_FCOE_CONN_ST_CTX_SINGLE_VLAN_FLAG_SHIFT		4
9659 #define PSTORM_FCOE_CONN_ST_CTX_RESERVED_MASK			0x7
9660 #define PSTORM_FCOE_CONN_ST_CTX_RESERVED_SHIFT			5
9661 	u8 did_2;
9662 	u8 did_1;
9663 	u8 did_0;
9664 	u8 src_mac_index;
9665 	__le16 rec_rr_tov_val;
9666 	u8 q_relative_offset;
9667 	u8 reserved1;
9668 };
9669 
9670 /* The fcoe storm context of Xstorm */
9671 struct xstorm_fcoe_conn_st_ctx {
9672 	u8 func_mode;
9673 	u8 src_mac_index;
9674 	u8 conf_version;
9675 	u8 cached_wqes_avail;
9676 	__le16 stat_ram_addr;
9677 	u8 flags;
9678 #define XSTORM_FCOE_CONN_ST_CTX_SQ_DEFERRED_MASK		0x1
9679 #define XSTORM_FCOE_CONN_ST_CTX_SQ_DEFERRED_SHIFT		0
9680 #define XSTORM_FCOE_CONN_ST_CTX_INNER_VLAN_FLAG_MASK		0x1
9681 #define XSTORM_FCOE_CONN_ST_CTX_INNER_VLAN_FLAG_SHIFT		1
9682 #define XSTORM_FCOE_CONN_ST_CTX_INNER_VLAN_FLAG_ORIG_MASK	0x1
9683 #define XSTORM_FCOE_CONN_ST_CTX_INNER_VLAN_FLAG_ORIG_SHIFT	2
9684 #define XSTORM_FCOE_CONN_ST_CTX_LAST_QUEUE_HANDLED_MASK		0x3
9685 #define XSTORM_FCOE_CONN_ST_CTX_LAST_QUEUE_HANDLED_SHIFT	3
9686 #define XSTORM_FCOE_CONN_ST_CTX_RSRV_MASK			0x7
9687 #define XSTORM_FCOE_CONN_ST_CTX_RSRV_SHIFT			5
9688 	u8 cached_wqes_offset;
9689 	u8 reserved2;
9690 	u8 eth_hdr_size;
9691 	u8 seq_id;
9692 	u8 max_conc_seqs;
9693 	__le16 num_pages_in_pbl;
9694 	__le16 reserved;
9695 	struct regpair sq_pbl_addr;
9696 	struct regpair sq_curr_page_addr;
9697 	struct regpair sq_next_page_addr;
9698 	struct regpair xferq_pbl_addr;
9699 	struct regpair xferq_curr_page_addr;
9700 	struct regpair xferq_next_page_addr;
9701 	struct regpair respq_pbl_addr;
9702 	struct regpair respq_curr_page_addr;
9703 	struct regpair respq_next_page_addr;
9704 	__le16 mtu;
9705 	__le16 tx_max_fc_pay_len;
9706 	__le16 max_fc_payload_len;
9707 	__le16 min_frame_size;
9708 	__le16 sq_pbl_next_index;
9709 	__le16 respq_pbl_next_index;
9710 	u8 fcp_cmd_byte_credit;
9711 	u8 fcp_rsp_byte_credit;
9712 	__le16 protection_info;
9713 #define XSTORM_FCOE_CONN_ST_CTX_PROTECTION_PERF_MASK		0x1
9714 #define XSTORM_FCOE_CONN_ST_CTX_PROTECTION_PERF_SHIFT		0
9715 #define XSTORM_FCOE_CONN_ST_CTX_SUPPORT_PROTECTION_MASK		0x1
9716 #define XSTORM_FCOE_CONN_ST_CTX_SUPPORT_PROTECTION_SHIFT	1
9717 #define XSTORM_FCOE_CONN_ST_CTX_VALID_MASK			0x1
9718 #define XSTORM_FCOE_CONN_ST_CTX_VALID_SHIFT			2
9719 #define XSTORM_FCOE_CONN_ST_CTX_FRAME_PROT_ALIGNED_MASK		0x1
9720 #define XSTORM_FCOE_CONN_ST_CTX_FRAME_PROT_ALIGNED_SHIFT	3
9721 #define XSTORM_FCOE_CONN_ST_CTX_RESERVED3_MASK			0xF
9722 #define XSTORM_FCOE_CONN_ST_CTX_RESERVED3_SHIFT			4
9723 #define XSTORM_FCOE_CONN_ST_CTX_DST_PROTECTION_PER_MSS_MASK	0xFF
9724 #define XSTORM_FCOE_CONN_ST_CTX_DST_PROTECTION_PER_MSS_SHIFT	8
9725 	__le16 xferq_pbl_next_index;
9726 	__le16 page_size;
9727 	u8 mid_seq;
9728 	u8 fcp_xfer_byte_credit;
9729 	u8 reserved1[2];
9730 	struct fcoe_wqe cached_wqes[16];
9731 };
9732 
9733 struct xstorm_fcoe_conn_ag_ctx {
9734 	u8 reserved0;
9735 	u8 state;
9736 	u8 flags0;
9737 #define XSTORM_FCOE_CONN_AG_CTX_EXIST_IN_QM0_MASK	0x1
9738 #define XSTORM_FCOE_CONN_AG_CTX_EXIST_IN_QM0_SHIFT	0
9739 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED1_MASK	0x1
9740 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED1_SHIFT	1
9741 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED2_MASK	0x1
9742 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED2_SHIFT	2
9743 #define XSTORM_FCOE_CONN_AG_CTX_EXIST_IN_QM3_MASK	0x1
9744 #define XSTORM_FCOE_CONN_AG_CTX_EXIST_IN_QM3_SHIFT	3
9745 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED3_MASK	0x1
9746 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED3_SHIFT	4
9747 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED4_MASK	0x1
9748 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED4_SHIFT	5
9749 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED5_MASK	0x1
9750 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED5_SHIFT	6
9751 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED6_MASK	0x1
9752 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED6_SHIFT	7
9753 	u8 flags1;
9754 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED7_MASK	0x1
9755 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED7_SHIFT	0
9756 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED8_MASK	0x1
9757 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED8_SHIFT	1
9758 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED9_MASK	0x1
9759 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED9_SHIFT	2
9760 #define XSTORM_FCOE_CONN_AG_CTX_BIT11_MASK		0x1
9761 #define XSTORM_FCOE_CONN_AG_CTX_BIT11_SHIFT		3
9762 #define XSTORM_FCOE_CONN_AG_CTX_BIT12_MASK		0x1
9763 #define XSTORM_FCOE_CONN_AG_CTX_BIT12_SHIFT		4
9764 #define XSTORM_FCOE_CONN_AG_CTX_BIT13_MASK		0x1
9765 #define XSTORM_FCOE_CONN_AG_CTX_BIT13_SHIFT		5
9766 #define XSTORM_FCOE_CONN_AG_CTX_BIT14_MASK		0x1
9767 #define XSTORM_FCOE_CONN_AG_CTX_BIT14_SHIFT		6
9768 #define XSTORM_FCOE_CONN_AG_CTX_BIT15_MASK		0x1
9769 #define XSTORM_FCOE_CONN_AG_CTX_BIT15_SHIFT		7
9770 	u8 flags2;
9771 #define XSTORM_FCOE_CONN_AG_CTX_CF0_MASK	0x3
9772 #define XSTORM_FCOE_CONN_AG_CTX_CF0_SHIFT	0
9773 #define XSTORM_FCOE_CONN_AG_CTX_CF1_MASK	0x3
9774 #define XSTORM_FCOE_CONN_AG_CTX_CF1_SHIFT	2
9775 #define XSTORM_FCOE_CONN_AG_CTX_CF2_MASK	0x3
9776 #define XSTORM_FCOE_CONN_AG_CTX_CF2_SHIFT	4
9777 #define XSTORM_FCOE_CONN_AG_CTX_CF3_MASK	0x3
9778 #define XSTORM_FCOE_CONN_AG_CTX_CF3_SHIFT	6
9779 	u8 flags3;
9780 #define XSTORM_FCOE_CONN_AG_CTX_CF4_MASK	0x3
9781 #define XSTORM_FCOE_CONN_AG_CTX_CF4_SHIFT	0
9782 #define XSTORM_FCOE_CONN_AG_CTX_CF5_MASK	0x3
9783 #define XSTORM_FCOE_CONN_AG_CTX_CF5_SHIFT	2
9784 #define XSTORM_FCOE_CONN_AG_CTX_CF6_MASK	0x3
9785 #define XSTORM_FCOE_CONN_AG_CTX_CF6_SHIFT	4
9786 #define XSTORM_FCOE_CONN_AG_CTX_CF7_MASK	0x3
9787 #define XSTORM_FCOE_CONN_AG_CTX_CF7_SHIFT	6
9788 	u8 flags4;
9789 #define XSTORM_FCOE_CONN_AG_CTX_CF8_MASK	0x3
9790 #define XSTORM_FCOE_CONN_AG_CTX_CF8_SHIFT	0
9791 #define XSTORM_FCOE_CONN_AG_CTX_CF9_MASK	0x3
9792 #define XSTORM_FCOE_CONN_AG_CTX_CF9_SHIFT	2
9793 #define XSTORM_FCOE_CONN_AG_CTX_CF10_MASK	0x3
9794 #define XSTORM_FCOE_CONN_AG_CTX_CF10_SHIFT	4
9795 #define XSTORM_FCOE_CONN_AG_CTX_CF11_MASK	0x3
9796 #define XSTORM_FCOE_CONN_AG_CTX_CF11_SHIFT	6
9797 	u8 flags5;
9798 #define XSTORM_FCOE_CONN_AG_CTX_CF12_MASK	0x3
9799 #define XSTORM_FCOE_CONN_AG_CTX_CF12_SHIFT	0
9800 #define XSTORM_FCOE_CONN_AG_CTX_CF13_MASK	0x3
9801 #define XSTORM_FCOE_CONN_AG_CTX_CF13_SHIFT	2
9802 #define XSTORM_FCOE_CONN_AG_CTX_CF14_MASK	0x3
9803 #define XSTORM_FCOE_CONN_AG_CTX_CF14_SHIFT	4
9804 #define XSTORM_FCOE_CONN_AG_CTX_CF15_MASK	0x3
9805 #define XSTORM_FCOE_CONN_AG_CTX_CF15_SHIFT	6
9806 	u8 flags6;
9807 #define XSTORM_FCOE_CONN_AG_CTX_CF16_MASK	0x3
9808 #define XSTORM_FCOE_CONN_AG_CTX_CF16_SHIFT	0
9809 #define XSTORM_FCOE_CONN_AG_CTX_CF17_MASK	0x3
9810 #define XSTORM_FCOE_CONN_AG_CTX_CF17_SHIFT	2
9811 #define XSTORM_FCOE_CONN_AG_CTX_CF18_MASK	0x3
9812 #define XSTORM_FCOE_CONN_AG_CTX_CF18_SHIFT	4
9813 #define XSTORM_FCOE_CONN_AG_CTX_DQ_CF_MASK	0x3
9814 #define XSTORM_FCOE_CONN_AG_CTX_DQ_CF_SHIFT	6
9815 	u8 flags7;
9816 #define XSTORM_FCOE_CONN_AG_CTX_FLUSH_Q0_MASK	0x3
9817 #define XSTORM_FCOE_CONN_AG_CTX_FLUSH_Q0_SHIFT	0
9818 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED10_MASK	0x3
9819 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED10_SHIFT	2
9820 #define XSTORM_FCOE_CONN_AG_CTX_SLOW_PATH_MASK	0x3
9821 #define XSTORM_FCOE_CONN_AG_CTX_SLOW_PATH_SHIFT	4
9822 #define XSTORM_FCOE_CONN_AG_CTX_CF0EN_MASK		0x1
9823 #define XSTORM_FCOE_CONN_AG_CTX_CF0EN_SHIFT		6
9824 #define XSTORM_FCOE_CONN_AG_CTX_CF1EN_MASK		0x1
9825 #define XSTORM_FCOE_CONN_AG_CTX_CF1EN_SHIFT		7
9826 	u8 flags8;
9827 #define XSTORM_FCOE_CONN_AG_CTX_CF2EN_MASK	0x1
9828 #define XSTORM_FCOE_CONN_AG_CTX_CF2EN_SHIFT	0
9829 #define XSTORM_FCOE_CONN_AG_CTX_CF3EN_MASK	0x1
9830 #define XSTORM_FCOE_CONN_AG_CTX_CF3EN_SHIFT	1
9831 #define XSTORM_FCOE_CONN_AG_CTX_CF4EN_MASK	0x1
9832 #define XSTORM_FCOE_CONN_AG_CTX_CF4EN_SHIFT	2
9833 #define XSTORM_FCOE_CONN_AG_CTX_CF5EN_MASK	0x1
9834 #define XSTORM_FCOE_CONN_AG_CTX_CF5EN_SHIFT	3
9835 #define XSTORM_FCOE_CONN_AG_CTX_CF6EN_MASK	0x1
9836 #define XSTORM_FCOE_CONN_AG_CTX_CF6EN_SHIFT	4
9837 #define XSTORM_FCOE_CONN_AG_CTX_CF7EN_MASK	0x1
9838 #define XSTORM_FCOE_CONN_AG_CTX_CF7EN_SHIFT	5
9839 #define XSTORM_FCOE_CONN_AG_CTX_CF8EN_MASK	0x1
9840 #define XSTORM_FCOE_CONN_AG_CTX_CF8EN_SHIFT	6
9841 #define XSTORM_FCOE_CONN_AG_CTX_CF9EN_MASK	0x1
9842 #define XSTORM_FCOE_CONN_AG_CTX_CF9EN_SHIFT	7
9843 	u8 flags9;
9844 #define XSTORM_FCOE_CONN_AG_CTX_CF10EN_MASK	0x1
9845 #define XSTORM_FCOE_CONN_AG_CTX_CF10EN_SHIFT	0
9846 #define XSTORM_FCOE_CONN_AG_CTX_CF11EN_MASK	0x1
9847 #define XSTORM_FCOE_CONN_AG_CTX_CF11EN_SHIFT	1
9848 #define XSTORM_FCOE_CONN_AG_CTX_CF12EN_MASK	0x1
9849 #define XSTORM_FCOE_CONN_AG_CTX_CF12EN_SHIFT	2
9850 #define XSTORM_FCOE_CONN_AG_CTX_CF13EN_MASK	0x1
9851 #define XSTORM_FCOE_CONN_AG_CTX_CF13EN_SHIFT	3
9852 #define XSTORM_FCOE_CONN_AG_CTX_CF14EN_MASK	0x1
9853 #define XSTORM_FCOE_CONN_AG_CTX_CF14EN_SHIFT	4
9854 #define XSTORM_FCOE_CONN_AG_CTX_CF15EN_MASK	0x1
9855 #define XSTORM_FCOE_CONN_AG_CTX_CF15EN_SHIFT	5
9856 #define XSTORM_FCOE_CONN_AG_CTX_CF16EN_MASK	0x1
9857 #define XSTORM_FCOE_CONN_AG_CTX_CF16EN_SHIFT	6
9858 #define XSTORM_FCOE_CONN_AG_CTX_CF17EN_MASK	0x1
9859 #define XSTORM_FCOE_CONN_AG_CTX_CF17EN_SHIFT	7
9860 	u8 flags10;
9861 #define XSTORM_FCOE_CONN_AG_CTX_CF18EN_MASK		0x1
9862 #define XSTORM_FCOE_CONN_AG_CTX_CF18EN_SHIFT		0
9863 #define XSTORM_FCOE_CONN_AG_CTX_DQ_CF_EN_MASK	0x1
9864 #define XSTORM_FCOE_CONN_AG_CTX_DQ_CF_EN_SHIFT	1
9865 #define XSTORM_FCOE_CONN_AG_CTX_FLUSH_Q0_EN_MASK	0x1
9866 #define XSTORM_FCOE_CONN_AG_CTX_FLUSH_Q0_EN_SHIFT	2
9867 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED11_MASK	0x1
9868 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED11_SHIFT	3
9869 #define XSTORM_FCOE_CONN_AG_CTX_SLOW_PATH_EN_MASK	0x1
9870 #define XSTORM_FCOE_CONN_AG_CTX_SLOW_PATH_EN_SHIFT	4
9871 #define XSTORM_FCOE_CONN_AG_CTX_CF23EN_MASK		0x1
9872 #define XSTORM_FCOE_CONN_AG_CTX_CF23EN_SHIFT		5
9873 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED12_MASK	0x1
9874 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED12_SHIFT	6
9875 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED13_MASK	0x1
9876 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED13_SHIFT	7
9877 	u8 flags11;
9878 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED14_MASK		0x1
9879 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED14_SHIFT		0
9880 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED15_MASK		0x1
9881 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED15_SHIFT		1
9882 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED16_MASK		0x1
9883 #define XSTORM_FCOE_CONN_AG_CTX_RESERVED16_SHIFT		2
9884 #define XSTORM_FCOE_CONN_AG_CTX_RULE5EN_MASK			0x1
9885 #define XSTORM_FCOE_CONN_AG_CTX_RULE5EN_SHIFT		3
9886 #define XSTORM_FCOE_CONN_AG_CTX_RULE6EN_MASK			0x1
9887 #define XSTORM_FCOE_CONN_AG_CTX_RULE6EN_SHIFT		4
9888 #define XSTORM_FCOE_CONN_AG_CTX_RULE7EN_MASK			0x1
9889 #define XSTORM_FCOE_CONN_AG_CTX_RULE7EN_SHIFT		5
9890 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED1_MASK		0x1
9891 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED1_SHIFT		6
9892 #define XSTORM_FCOE_CONN_AG_CTX_XFERQ_DECISION_EN_MASK	0x1
9893 #define XSTORM_FCOE_CONN_AG_CTX_XFERQ_DECISION_EN_SHIFT	7
9894 	u8 flags12;
9895 #define XSTORM_FCOE_CONN_AG_CTX_SQ_DECISION_EN_MASK	0x1
9896 #define XSTORM_FCOE_CONN_AG_CTX_SQ_DECISION_EN_SHIFT	0
9897 #define XSTORM_FCOE_CONN_AG_CTX_RULE11EN_MASK	0x1
9898 #define XSTORM_FCOE_CONN_AG_CTX_RULE11EN_SHIFT	1
9899 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED2_MASK	0x1
9900 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED2_SHIFT	2
9901 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED3_MASK	0x1
9902 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED3_SHIFT	3
9903 #define XSTORM_FCOE_CONN_AG_CTX_RULE14EN_MASK	0x1
9904 #define XSTORM_FCOE_CONN_AG_CTX_RULE14EN_SHIFT	4
9905 #define XSTORM_FCOE_CONN_AG_CTX_RULE15EN_MASK	0x1
9906 #define XSTORM_FCOE_CONN_AG_CTX_RULE15EN_SHIFT	5
9907 #define XSTORM_FCOE_CONN_AG_CTX_RULE16EN_MASK	0x1
9908 #define XSTORM_FCOE_CONN_AG_CTX_RULE16EN_SHIFT	6
9909 #define XSTORM_FCOE_CONN_AG_CTX_RULE17EN_MASK	0x1
9910 #define XSTORM_FCOE_CONN_AG_CTX_RULE17EN_SHIFT	7
9911 	u8 flags13;
9912 #define XSTORM_FCOE_CONN_AG_CTX_RESPQ_DECISION_EN_MASK	0x1
9913 #define XSTORM_FCOE_CONN_AG_CTX_RESPQ_DECISION_EN_SHIFT	0
9914 #define XSTORM_FCOE_CONN_AG_CTX_RULE19EN_MASK		0x1
9915 #define XSTORM_FCOE_CONN_AG_CTX_RULE19EN_SHIFT		1
9916 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED4_MASK		0x1
9917 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED4_SHIFT		2
9918 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED5_MASK		0x1
9919 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED5_SHIFT		3
9920 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED6_MASK		0x1
9921 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED6_SHIFT		4
9922 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED7_MASK		0x1
9923 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED7_SHIFT		5
9924 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED8_MASK		0x1
9925 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED8_SHIFT		6
9926 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED9_MASK		0x1
9927 #define XSTORM_FCOE_CONN_AG_CTX_A0_RESERVED9_SHIFT		7
9928 	u8 flags14;
9929 #define XSTORM_FCOE_CONN_AG_CTX_BIT16_MASK	0x1
9930 #define XSTORM_FCOE_CONN_AG_CTX_BIT16_SHIFT	0
9931 #define XSTORM_FCOE_CONN_AG_CTX_BIT17_MASK	0x1
9932 #define XSTORM_FCOE_CONN_AG_CTX_BIT17_SHIFT	1
9933 #define XSTORM_FCOE_CONN_AG_CTX_BIT18_MASK	0x1
9934 #define XSTORM_FCOE_CONN_AG_CTX_BIT18_SHIFT	2
9935 #define XSTORM_FCOE_CONN_AG_CTX_BIT19_MASK	0x1
9936 #define XSTORM_FCOE_CONN_AG_CTX_BIT19_SHIFT	3
9937 #define XSTORM_FCOE_CONN_AG_CTX_BIT20_MASK	0x1
9938 #define XSTORM_FCOE_CONN_AG_CTX_BIT20_SHIFT	4
9939 #define XSTORM_FCOE_CONN_AG_CTX_BIT21_MASK	0x1
9940 #define XSTORM_FCOE_CONN_AG_CTX_BIT21_SHIFT	5
9941 #define XSTORM_FCOE_CONN_AG_CTX_CF23_MASK	0x3
9942 #define XSTORM_FCOE_CONN_AG_CTX_CF23_SHIFT	6
9943 	u8 byte2;
9944 	__le16 physical_q0;
9945 	__le16 word1;
9946 	__le16 word2;
9947 	__le16 sq_cons;
9948 	__le16 sq_prod;
9949 	__le16 xferq_prod;
9950 	__le16 xferq_cons;
9951 	u8 byte3;
9952 	u8 byte4;
9953 	u8 byte5;
9954 	u8 byte6;
9955 	__le32 remain_io;
9956 	__le32 reg1;
9957 	__le32 reg2;
9958 	__le32 reg3;
9959 	__le32 reg4;
9960 	__le32 reg5;
9961 	__le32 reg6;
9962 	__le16 respq_prod;
9963 	__le16 respq_cons;
9964 	__le16 word9;
9965 	__le16 word10;
9966 	__le32 reg7;
9967 	__le32 reg8;
9968 };
9969 
9970 /* The fcoe storm context of Ustorm */
9971 struct ustorm_fcoe_conn_st_ctx {
9972 	struct regpair respq_pbl_addr;
9973 	__le16 num_pages_in_pbl;
9974 	u8 ptu_log_page_size;
9975 	u8 log_page_size;
9976 	__le16 respq_prod;
9977 	u8 reserved[2];
9978 };
9979 
9980 struct tstorm_fcoe_conn_ag_ctx {
9981 	u8 reserved0;
9982 	u8 state;
9983 	u8 flags0;
9984 #define TSTORM_FCOE_CONN_AG_CTX_EXIST_IN_QM0_MASK	0x1
9985 #define TSTORM_FCOE_CONN_AG_CTX_EXIST_IN_QM0_SHIFT	0
9986 #define TSTORM_FCOE_CONN_AG_CTX_BIT1_MASK		0x1
9987 #define TSTORM_FCOE_CONN_AG_CTX_BIT1_SHIFT		1
9988 #define TSTORM_FCOE_CONN_AG_CTX_BIT2_MASK		0x1
9989 #define TSTORM_FCOE_CONN_AG_CTX_BIT2_SHIFT		2
9990 #define TSTORM_FCOE_CONN_AG_CTX_BIT3_MASK		0x1
9991 #define TSTORM_FCOE_CONN_AG_CTX_BIT3_SHIFT		3
9992 #define TSTORM_FCOE_CONN_AG_CTX_BIT4_MASK		0x1
9993 #define TSTORM_FCOE_CONN_AG_CTX_BIT4_SHIFT		4
9994 #define TSTORM_FCOE_CONN_AG_CTX_BIT5_MASK		0x1
9995 #define TSTORM_FCOE_CONN_AG_CTX_BIT5_SHIFT		5
9996 #define TSTORM_FCOE_CONN_AG_CTX_DUMMY_TIMER_CF_MASK	0x3
9997 #define TSTORM_FCOE_CONN_AG_CTX_DUMMY_TIMER_CF_SHIFT	6
9998 	u8 flags1;
9999 #define TSTORM_FCOE_CONN_AG_CTX_FLUSH_Q0_CF_MASK		0x3
10000 #define TSTORM_FCOE_CONN_AG_CTX_FLUSH_Q0_CF_SHIFT		0
10001 #define TSTORM_FCOE_CONN_AG_CTX_CF2_MASK			0x3
10002 #define TSTORM_FCOE_CONN_AG_CTX_CF2_SHIFT			2
10003 #define TSTORM_FCOE_CONN_AG_CTX_TIMER_STOP_ALL_CF_MASK	0x3
10004 #define TSTORM_FCOE_CONN_AG_CTX_TIMER_STOP_ALL_CF_SHIFT	4
10005 #define TSTORM_FCOE_CONN_AG_CTX_CF4_MASK			0x3
10006 #define TSTORM_FCOE_CONN_AG_CTX_CF4_SHIFT			6
10007 	u8 flags2;
10008 #define TSTORM_FCOE_CONN_AG_CTX_CF5_MASK	0x3
10009 #define TSTORM_FCOE_CONN_AG_CTX_CF5_SHIFT	0
10010 #define TSTORM_FCOE_CONN_AG_CTX_CF6_MASK	0x3
10011 #define TSTORM_FCOE_CONN_AG_CTX_CF6_SHIFT	2
10012 #define TSTORM_FCOE_CONN_AG_CTX_CF7_MASK	0x3
10013 #define TSTORM_FCOE_CONN_AG_CTX_CF7_SHIFT	4
10014 #define TSTORM_FCOE_CONN_AG_CTX_CF8_MASK	0x3
10015 #define TSTORM_FCOE_CONN_AG_CTX_CF8_SHIFT	6
10016 	u8 flags3;
10017 #define TSTORM_FCOE_CONN_AG_CTX_CF9_MASK			0x3
10018 #define TSTORM_FCOE_CONN_AG_CTX_CF9_SHIFT			0
10019 #define TSTORM_FCOE_CONN_AG_CTX_CF10_MASK			0x3
10020 #define TSTORM_FCOE_CONN_AG_CTX_CF10_SHIFT			2
10021 #define TSTORM_FCOE_CONN_AG_CTX_DUMMY_TIMER_CF_EN_MASK	0x1
10022 #define TSTORM_FCOE_CONN_AG_CTX_DUMMY_TIMER_CF_EN_SHIFT	4
10023 #define TSTORM_FCOE_CONN_AG_CTX_FLUSH_Q0_CF_EN_MASK		0x1
10024 #define TSTORM_FCOE_CONN_AG_CTX_FLUSH_Q0_CF_EN_SHIFT		5
10025 #define TSTORM_FCOE_CONN_AG_CTX_CF2EN_MASK			0x1
10026 #define TSTORM_FCOE_CONN_AG_CTX_CF2EN_SHIFT			6
10027 #define TSTORM_FCOE_CONN_AG_CTX_TIMER_STOP_ALL_CF_EN_MASK	0x1
10028 #define TSTORM_FCOE_CONN_AG_CTX_TIMER_STOP_ALL_CF_EN_SHIFT	7
10029 	u8 flags4;
10030 #define TSTORM_FCOE_CONN_AG_CTX_CF4EN_MASK		0x1
10031 #define TSTORM_FCOE_CONN_AG_CTX_CF4EN_SHIFT		0
10032 #define TSTORM_FCOE_CONN_AG_CTX_CF5EN_MASK		0x1
10033 #define TSTORM_FCOE_CONN_AG_CTX_CF5EN_SHIFT		1
10034 #define TSTORM_FCOE_CONN_AG_CTX_CF6EN_MASK		0x1
10035 #define TSTORM_FCOE_CONN_AG_CTX_CF6EN_SHIFT		2
10036 #define TSTORM_FCOE_CONN_AG_CTX_CF7EN_MASK		0x1
10037 #define TSTORM_FCOE_CONN_AG_CTX_CF7EN_SHIFT		3
10038 #define TSTORM_FCOE_CONN_AG_CTX_CF8EN_MASK		0x1
10039 #define TSTORM_FCOE_CONN_AG_CTX_CF8EN_SHIFT		4
10040 #define TSTORM_FCOE_CONN_AG_CTX_CF9EN_MASK		0x1
10041 #define TSTORM_FCOE_CONN_AG_CTX_CF9EN_SHIFT		5
10042 #define TSTORM_FCOE_CONN_AG_CTX_CF10EN_MASK		0x1
10043 #define TSTORM_FCOE_CONN_AG_CTX_CF10EN_SHIFT		6
10044 #define TSTORM_FCOE_CONN_AG_CTX_RULE0EN_MASK		0x1
10045 #define TSTORM_FCOE_CONN_AG_CTX_RULE0EN_SHIFT	7
10046 	u8 flags5;
10047 #define TSTORM_FCOE_CONN_AG_CTX_RULE1EN_MASK		0x1
10048 #define TSTORM_FCOE_CONN_AG_CTX_RULE1EN_SHIFT	0
10049 #define TSTORM_FCOE_CONN_AG_CTX_RULE2EN_MASK		0x1
10050 #define TSTORM_FCOE_CONN_AG_CTX_RULE2EN_SHIFT	1
10051 #define TSTORM_FCOE_CONN_AG_CTX_RULE3EN_MASK		0x1
10052 #define TSTORM_FCOE_CONN_AG_CTX_RULE3EN_SHIFT	2
10053 #define TSTORM_FCOE_CONN_AG_CTX_RULE4EN_MASK		0x1
10054 #define TSTORM_FCOE_CONN_AG_CTX_RULE4EN_SHIFT	3
10055 #define TSTORM_FCOE_CONN_AG_CTX_RULE5EN_MASK		0x1
10056 #define TSTORM_FCOE_CONN_AG_CTX_RULE5EN_SHIFT	4
10057 #define TSTORM_FCOE_CONN_AG_CTX_RULE6EN_MASK		0x1
10058 #define TSTORM_FCOE_CONN_AG_CTX_RULE6EN_SHIFT	5
10059 #define TSTORM_FCOE_CONN_AG_CTX_RULE7EN_MASK		0x1
10060 #define TSTORM_FCOE_CONN_AG_CTX_RULE7EN_SHIFT	6
10061 #define TSTORM_FCOE_CONN_AG_CTX_RULE8EN_MASK		0x1
10062 #define TSTORM_FCOE_CONN_AG_CTX_RULE8EN_SHIFT	7
10063 	__le32 reg0;
10064 	__le32 reg1;
10065 };
10066 
10067 struct ustorm_fcoe_conn_ag_ctx {
10068 	u8 byte0;
10069 	u8 byte1;
10070 	u8 flags0;
10071 #define USTORM_FCOE_CONN_AG_CTX_BIT0_MASK	0x1
10072 #define USTORM_FCOE_CONN_AG_CTX_BIT0_SHIFT	0
10073 #define USTORM_FCOE_CONN_AG_CTX_BIT1_MASK	0x1
10074 #define USTORM_FCOE_CONN_AG_CTX_BIT1_SHIFT	1
10075 #define USTORM_FCOE_CONN_AG_CTX_CF0_MASK	0x3
10076 #define USTORM_FCOE_CONN_AG_CTX_CF0_SHIFT	2
10077 #define USTORM_FCOE_CONN_AG_CTX_CF1_MASK	0x3
10078 #define USTORM_FCOE_CONN_AG_CTX_CF1_SHIFT	4
10079 #define USTORM_FCOE_CONN_AG_CTX_CF2_MASK	0x3
10080 #define USTORM_FCOE_CONN_AG_CTX_CF2_SHIFT	6
10081 	u8 flags1;
10082 #define USTORM_FCOE_CONN_AG_CTX_CF3_MASK	0x3
10083 #define USTORM_FCOE_CONN_AG_CTX_CF3_SHIFT	0
10084 #define USTORM_FCOE_CONN_AG_CTX_CF4_MASK	0x3
10085 #define USTORM_FCOE_CONN_AG_CTX_CF4_SHIFT	2
10086 #define USTORM_FCOE_CONN_AG_CTX_CF5_MASK	0x3
10087 #define USTORM_FCOE_CONN_AG_CTX_CF5_SHIFT	4
10088 #define USTORM_FCOE_CONN_AG_CTX_CF6_MASK	0x3
10089 #define USTORM_FCOE_CONN_AG_CTX_CF6_SHIFT	6
10090 	u8 flags2;
10091 #define USTORM_FCOE_CONN_AG_CTX_CF0EN_MASK		0x1
10092 #define USTORM_FCOE_CONN_AG_CTX_CF0EN_SHIFT		0
10093 #define USTORM_FCOE_CONN_AG_CTX_CF1EN_MASK		0x1
10094 #define USTORM_FCOE_CONN_AG_CTX_CF1EN_SHIFT		1
10095 #define USTORM_FCOE_CONN_AG_CTX_CF2EN_MASK		0x1
10096 #define USTORM_FCOE_CONN_AG_CTX_CF2EN_SHIFT		2
10097 #define USTORM_FCOE_CONN_AG_CTX_CF3EN_MASK		0x1
10098 #define USTORM_FCOE_CONN_AG_CTX_CF3EN_SHIFT		3
10099 #define USTORM_FCOE_CONN_AG_CTX_CF4EN_MASK		0x1
10100 #define USTORM_FCOE_CONN_AG_CTX_CF4EN_SHIFT		4
10101 #define USTORM_FCOE_CONN_AG_CTX_CF5EN_MASK		0x1
10102 #define USTORM_FCOE_CONN_AG_CTX_CF5EN_SHIFT		5
10103 #define USTORM_FCOE_CONN_AG_CTX_CF6EN_MASK		0x1
10104 #define USTORM_FCOE_CONN_AG_CTX_CF6EN_SHIFT		6
10105 #define USTORM_FCOE_CONN_AG_CTX_RULE0EN_MASK		0x1
10106 #define USTORM_FCOE_CONN_AG_CTX_RULE0EN_SHIFT	7
10107 	u8 flags3;
10108 #define USTORM_FCOE_CONN_AG_CTX_RULE1EN_MASK		0x1
10109 #define USTORM_FCOE_CONN_AG_CTX_RULE1EN_SHIFT	0
10110 #define USTORM_FCOE_CONN_AG_CTX_RULE2EN_MASK		0x1
10111 #define USTORM_FCOE_CONN_AG_CTX_RULE2EN_SHIFT	1
10112 #define USTORM_FCOE_CONN_AG_CTX_RULE3EN_MASK		0x1
10113 #define USTORM_FCOE_CONN_AG_CTX_RULE3EN_SHIFT	2
10114 #define USTORM_FCOE_CONN_AG_CTX_RULE4EN_MASK		0x1
10115 #define USTORM_FCOE_CONN_AG_CTX_RULE4EN_SHIFT	3
10116 #define USTORM_FCOE_CONN_AG_CTX_RULE5EN_MASK		0x1
10117 #define USTORM_FCOE_CONN_AG_CTX_RULE5EN_SHIFT	4
10118 #define USTORM_FCOE_CONN_AG_CTX_RULE6EN_MASK		0x1
10119 #define USTORM_FCOE_CONN_AG_CTX_RULE6EN_SHIFT	5
10120 #define USTORM_FCOE_CONN_AG_CTX_RULE7EN_MASK		0x1
10121 #define USTORM_FCOE_CONN_AG_CTX_RULE7EN_SHIFT	6
10122 #define USTORM_FCOE_CONN_AG_CTX_RULE8EN_MASK		0x1
10123 #define USTORM_FCOE_CONN_AG_CTX_RULE8EN_SHIFT	7
10124 	u8 byte2;
10125 	u8 byte3;
10126 	__le16 word0;
10127 	__le16 word1;
10128 	__le32 reg0;
10129 	__le32 reg1;
10130 	__le32 reg2;
10131 	__le32 reg3;
10132 	__le16 word2;
10133 	__le16 word3;
10134 };
10135 
10136 /* The fcoe storm context of Tstorm */
10137 struct tstorm_fcoe_conn_st_ctx {
10138 	__le16 stat_ram_addr;
10139 	__le16 rx_max_fc_payload_len;
10140 	__le16 e_d_tov_val;
10141 	u8 flags;
10142 #define TSTORM_FCOE_CONN_ST_CTX_INC_SEQ_CNT_MASK	0x1
10143 #define TSTORM_FCOE_CONN_ST_CTX_INC_SEQ_CNT_SHIFT	0
10144 #define TSTORM_FCOE_CONN_ST_CTX_SUPPORT_CONF_MASK	0x1
10145 #define TSTORM_FCOE_CONN_ST_CTX_SUPPORT_CONF_SHIFT	1
10146 #define TSTORM_FCOE_CONN_ST_CTX_DEF_Q_IDX_MASK		0x3F
10147 #define TSTORM_FCOE_CONN_ST_CTX_DEF_Q_IDX_SHIFT		2
10148 	u8 timers_cleanup_invocation_cnt;
10149 	__le32 reserved1[2];
10150 	__le32 dst_mac_address_bytes_0_to_3;
10151 	__le16 dst_mac_address_bytes_4_to_5;
10152 	__le16 ramrod_echo;
10153 	u8 flags1;
10154 #define TSTORM_FCOE_CONN_ST_CTX_MODE_MASK	0x3
10155 #define TSTORM_FCOE_CONN_ST_CTX_MODE_SHIFT	0
10156 #define TSTORM_FCOE_CONN_ST_CTX_RESERVED_MASK	0x3F
10157 #define TSTORM_FCOE_CONN_ST_CTX_RESERVED_SHIFT	2
10158 	u8 cq_relative_offset;
10159 	u8 cmdq_relative_offset;
10160 	u8 bdq_resource_id;
10161 	u8 reserved0[4];
10162 };
10163 
10164 struct mstorm_fcoe_conn_ag_ctx {
10165 	u8 byte0;
10166 	u8 byte1;
10167 	u8 flags0;
10168 #define MSTORM_FCOE_CONN_AG_CTX_BIT0_MASK	0x1
10169 #define MSTORM_FCOE_CONN_AG_CTX_BIT0_SHIFT	0
10170 #define MSTORM_FCOE_CONN_AG_CTX_BIT1_MASK	0x1
10171 #define MSTORM_FCOE_CONN_AG_CTX_BIT1_SHIFT	1
10172 #define MSTORM_FCOE_CONN_AG_CTX_CF0_MASK	0x3
10173 #define MSTORM_FCOE_CONN_AG_CTX_CF0_SHIFT	2
10174 #define MSTORM_FCOE_CONN_AG_CTX_CF1_MASK	0x3
10175 #define MSTORM_FCOE_CONN_AG_CTX_CF1_SHIFT	4
10176 #define MSTORM_FCOE_CONN_AG_CTX_CF2_MASK	0x3
10177 #define MSTORM_FCOE_CONN_AG_CTX_CF2_SHIFT	6
10178 	u8 flags1;
10179 #define MSTORM_FCOE_CONN_AG_CTX_CF0EN_MASK		0x1
10180 #define MSTORM_FCOE_CONN_AG_CTX_CF0EN_SHIFT		0
10181 #define MSTORM_FCOE_CONN_AG_CTX_CF1EN_MASK		0x1
10182 #define MSTORM_FCOE_CONN_AG_CTX_CF1EN_SHIFT		1
10183 #define MSTORM_FCOE_CONN_AG_CTX_CF2EN_MASK		0x1
10184 #define MSTORM_FCOE_CONN_AG_CTX_CF2EN_SHIFT		2
10185 #define MSTORM_FCOE_CONN_AG_CTX_RULE0EN_MASK		0x1
10186 #define MSTORM_FCOE_CONN_AG_CTX_RULE0EN_SHIFT	3
10187 #define MSTORM_FCOE_CONN_AG_CTX_RULE1EN_MASK		0x1
10188 #define MSTORM_FCOE_CONN_AG_CTX_RULE1EN_SHIFT	4
10189 #define MSTORM_FCOE_CONN_AG_CTX_RULE2EN_MASK		0x1
10190 #define MSTORM_FCOE_CONN_AG_CTX_RULE2EN_SHIFT	5
10191 #define MSTORM_FCOE_CONN_AG_CTX_RULE3EN_MASK		0x1
10192 #define MSTORM_FCOE_CONN_AG_CTX_RULE3EN_SHIFT	6
10193 #define MSTORM_FCOE_CONN_AG_CTX_RULE4EN_MASK		0x1
10194 #define MSTORM_FCOE_CONN_AG_CTX_RULE4EN_SHIFT	7
10195 	__le16 word0;
10196 	__le16 word1;
10197 	__le32 reg0;
10198 	__le32 reg1;
10199 };
10200 
10201 /* Fast path part of the fcoe storm context of Mstorm */
10202 struct fcoe_mstorm_fcoe_conn_st_ctx_fp {
10203 	__le16 xfer_prod;
10204 	u8 num_cqs;
10205 	u8 reserved1;
10206 	u8 protection_info;
10207 #define FCOE_MSTORM_FCOE_CONN_ST_CTX_FP_SUPPORT_PROTECTION_MASK  0x1
10208 #define FCOE_MSTORM_FCOE_CONN_ST_CTX_FP_SUPPORT_PROTECTION_SHIFT 0
10209 #define FCOE_MSTORM_FCOE_CONN_ST_CTX_FP_VALID_MASK               0x1
10210 #define FCOE_MSTORM_FCOE_CONN_ST_CTX_FP_VALID_SHIFT              1
10211 #define FCOE_MSTORM_FCOE_CONN_ST_CTX_FP_RESERVED0_MASK           0x3F
10212 #define FCOE_MSTORM_FCOE_CONN_ST_CTX_FP_RESERVED0_SHIFT          2
10213 	u8 q_relative_offset;
10214 	u8 reserved2[2];
10215 };
10216 
10217 /* Non fast path part of the fcoe storm context of Mstorm */
10218 struct fcoe_mstorm_fcoe_conn_st_ctx_non_fp {
10219 	__le16 conn_id;
10220 	__le16 stat_ram_addr;
10221 	__le16 num_pages_in_pbl;
10222 	u8 ptu_log_page_size;
10223 	u8 log_page_size;
10224 	__le16 unsolicited_cq_count;
10225 	__le16 cmdq_count;
10226 	u8 bdq_resource_id;
10227 	u8 reserved0[3];
10228 	struct regpair xferq_pbl_addr;
10229 	struct regpair reserved1;
10230 	struct regpair reserved2[3];
10231 };
10232 
10233 /* The fcoe storm context of Mstorm */
10234 struct mstorm_fcoe_conn_st_ctx {
10235 	struct fcoe_mstorm_fcoe_conn_st_ctx_fp fp;
10236 	struct fcoe_mstorm_fcoe_conn_st_ctx_non_fp non_fp;
10237 };
10238 
10239 /* fcoe connection context */
10240 struct fcoe_conn_context {
10241 	struct ystorm_fcoe_conn_st_ctx ystorm_st_context;
10242 	struct pstorm_fcoe_conn_st_ctx pstorm_st_context;
10243 	struct regpair pstorm_st_padding[2];
10244 	struct xstorm_fcoe_conn_st_ctx xstorm_st_context;
10245 	struct xstorm_fcoe_conn_ag_ctx xstorm_ag_context;
10246 	struct regpair xstorm_ag_padding[6];
10247 	struct ustorm_fcoe_conn_st_ctx ustorm_st_context;
10248 	struct regpair ustorm_st_padding[2];
10249 	struct tstorm_fcoe_conn_ag_ctx tstorm_ag_context;
10250 	struct regpair tstorm_ag_padding[2];
10251 	struct timers_context timer_context;
10252 	struct ustorm_fcoe_conn_ag_ctx ustorm_ag_context;
10253 	struct tstorm_fcoe_conn_st_ctx tstorm_st_context;
10254 	struct mstorm_fcoe_conn_ag_ctx mstorm_ag_context;
10255 	struct mstorm_fcoe_conn_st_ctx mstorm_st_context;
10256 };
10257 
10258 /* FCoE connection offload params passed by driver to FW in FCoE offload
10259  * ramrod.
10260  */
10261 struct fcoe_conn_offload_ramrod_params {
10262 	struct fcoe_conn_offload_ramrod_data offload_ramrod_data;
10263 };
10264 
10265 /* FCoE connection terminate params passed by driver to FW in FCoE terminate
10266  * conn ramrod.
10267  */
10268 struct fcoe_conn_terminate_ramrod_params {
10269 	struct fcoe_conn_terminate_ramrod_data terminate_ramrod_data;
10270 };
10271 
10272 /* FCoE event type */
10273 enum fcoe_event_type {
10274 	FCOE_EVENT_INIT_FUNC,
10275 	FCOE_EVENT_DESTROY_FUNC,
10276 	FCOE_EVENT_STAT_FUNC,
10277 	FCOE_EVENT_OFFLOAD_CONN,
10278 	FCOE_EVENT_TERMINATE_CONN,
10279 	FCOE_EVENT_ERROR,
10280 	MAX_FCOE_EVENT_TYPE
10281 };
10282 
10283 /* FCoE init params passed by driver to FW in FCoE init ramrod */
10284 struct fcoe_init_ramrod_params {
10285 	struct fcoe_init_func_ramrod_data init_ramrod_data;
10286 };
10287 
10288 /* FCoE ramrod Command IDs */
10289 enum fcoe_ramrod_cmd_id {
10290 	FCOE_RAMROD_CMD_ID_INIT_FUNC,
10291 	FCOE_RAMROD_CMD_ID_DESTROY_FUNC,
10292 	FCOE_RAMROD_CMD_ID_STAT_FUNC,
10293 	FCOE_RAMROD_CMD_ID_OFFLOAD_CONN,
10294 	FCOE_RAMROD_CMD_ID_TERMINATE_CONN,
10295 	MAX_FCOE_RAMROD_CMD_ID
10296 };
10297 
10298 /* FCoE statistics params buffer passed by driver to FW in FCoE statistics
10299  * ramrod.
10300  */
10301 struct fcoe_stat_ramrod_params {
10302 	struct fcoe_stat_ramrod_data stat_ramrod_data;
10303 };
10304 
10305 struct ystorm_fcoe_conn_ag_ctx {
10306 	u8 byte0;
10307 	u8 byte1;
10308 	u8 flags0;
10309 #define YSTORM_FCOE_CONN_AG_CTX_BIT0_MASK	0x1
10310 #define YSTORM_FCOE_CONN_AG_CTX_BIT0_SHIFT	0
10311 #define YSTORM_FCOE_CONN_AG_CTX_BIT1_MASK	0x1
10312 #define YSTORM_FCOE_CONN_AG_CTX_BIT1_SHIFT	1
10313 #define YSTORM_FCOE_CONN_AG_CTX_CF0_MASK	0x3
10314 #define YSTORM_FCOE_CONN_AG_CTX_CF0_SHIFT	2
10315 #define YSTORM_FCOE_CONN_AG_CTX_CF1_MASK	0x3
10316 #define YSTORM_FCOE_CONN_AG_CTX_CF1_SHIFT	4
10317 #define YSTORM_FCOE_CONN_AG_CTX_CF2_MASK	0x3
10318 #define YSTORM_FCOE_CONN_AG_CTX_CF2_SHIFT	6
10319 	u8 flags1;
10320 #define YSTORM_FCOE_CONN_AG_CTX_CF0EN_MASK		0x1
10321 #define YSTORM_FCOE_CONN_AG_CTX_CF0EN_SHIFT		0
10322 #define YSTORM_FCOE_CONN_AG_CTX_CF1EN_MASK		0x1
10323 #define YSTORM_FCOE_CONN_AG_CTX_CF1EN_SHIFT		1
10324 #define YSTORM_FCOE_CONN_AG_CTX_CF2EN_MASK		0x1
10325 #define YSTORM_FCOE_CONN_AG_CTX_CF2EN_SHIFT		2
10326 #define YSTORM_FCOE_CONN_AG_CTX_RULE0EN_MASK		0x1
10327 #define YSTORM_FCOE_CONN_AG_CTX_RULE0EN_SHIFT	3
10328 #define YSTORM_FCOE_CONN_AG_CTX_RULE1EN_MASK		0x1
10329 #define YSTORM_FCOE_CONN_AG_CTX_RULE1EN_SHIFT	4
10330 #define YSTORM_FCOE_CONN_AG_CTX_RULE2EN_MASK		0x1
10331 #define YSTORM_FCOE_CONN_AG_CTX_RULE2EN_SHIFT	5
10332 #define YSTORM_FCOE_CONN_AG_CTX_RULE3EN_MASK		0x1
10333 #define YSTORM_FCOE_CONN_AG_CTX_RULE3EN_SHIFT	6
10334 #define YSTORM_FCOE_CONN_AG_CTX_RULE4EN_MASK		0x1
10335 #define YSTORM_FCOE_CONN_AG_CTX_RULE4EN_SHIFT	7
10336 	u8 byte2;
10337 	u8 byte3;
10338 	__le16 word0;
10339 	__le32 reg0;
10340 	__le32 reg1;
10341 	__le16 word1;
10342 	__le16 word2;
10343 	__le16 word3;
10344 	__le16 word4;
10345 	__le32 reg2;
10346 	__le32 reg3;
10347 };
10348 
10349 /* The iscsi storm connection context of Ystorm */
10350 struct ystorm_iscsi_conn_st_ctx {
10351 	__le32 reserved[8];
10352 };
10353 
10354 /* Combined iSCSI and TCP storm connection of Pstorm */
10355 struct pstorm_iscsi_tcp_conn_st_ctx {
10356 	__le32 tcp[32];
10357 	__le32 iscsi[4];
10358 };
10359 
10360 /* The combined tcp and iscsi storm context of Xstorm */
10361 struct xstorm_iscsi_tcp_conn_st_ctx {
10362 	__le32 reserved_tcp[4];
10363 	__le32 reserved_iscsi[44];
10364 };
10365 
10366 struct xstorm_iscsi_conn_ag_ctx {
10367 	u8 cdu_validation;
10368 	u8 state;
10369 	u8 flags0;
10370 #define XSTORM_ISCSI_CONN_AG_CTX_EXIST_IN_QM0_MASK	0x1
10371 #define XSTORM_ISCSI_CONN_AG_CTX_EXIST_IN_QM0_SHIFT	0
10372 #define XSTORM_ISCSI_CONN_AG_CTX_EXIST_IN_QM1_MASK	0x1
10373 #define XSTORM_ISCSI_CONN_AG_CTX_EXIST_IN_QM1_SHIFT	1
10374 #define XSTORM_ISCSI_CONN_AG_CTX_RESERVED1_MASK	0x1
10375 #define XSTORM_ISCSI_CONN_AG_CTX_RESERVED1_SHIFT	2
10376 #define XSTORM_ISCSI_CONN_AG_CTX_EXIST_IN_QM3_MASK	0x1
10377 #define XSTORM_ISCSI_CONN_AG_CTX_EXIST_IN_QM3_SHIFT	3
10378 #define XSTORM_ISCSI_CONN_AG_CTX_BIT4_MASK		0x1
10379 #define XSTORM_ISCSI_CONN_AG_CTX_BIT4_SHIFT		4
10380 #define XSTORM_ISCSI_CONN_AG_CTX_RESERVED2_MASK	0x1
10381 #define XSTORM_ISCSI_CONN_AG_CTX_RESERVED2_SHIFT	5
10382 #define XSTORM_ISCSI_CONN_AG_CTX_BIT6_MASK		0x1
10383 #define XSTORM_ISCSI_CONN_AG_CTX_BIT6_SHIFT		6
10384 #define XSTORM_ISCSI_CONN_AG_CTX_BIT7_MASK		0x1
10385 #define XSTORM_ISCSI_CONN_AG_CTX_BIT7_SHIFT		7
10386 	u8 flags1;
10387 #define XSTORM_ISCSI_CONN_AG_CTX_BIT8_MASK		0x1
10388 #define XSTORM_ISCSI_CONN_AG_CTX_BIT8_SHIFT		0
10389 #define XSTORM_ISCSI_CONN_AG_CTX_BIT9_MASK		0x1
10390 #define XSTORM_ISCSI_CONN_AG_CTX_BIT9_SHIFT		1
10391 #define XSTORM_ISCSI_CONN_AG_CTX_BIT10_MASK		0x1
10392 #define XSTORM_ISCSI_CONN_AG_CTX_BIT10_SHIFT		2
10393 #define XSTORM_ISCSI_CONN_AG_CTX_BIT11_MASK		0x1
10394 #define XSTORM_ISCSI_CONN_AG_CTX_BIT11_SHIFT		3
10395 #define XSTORM_ISCSI_CONN_AG_CTX_BIT12_MASK		0x1
10396 #define XSTORM_ISCSI_CONN_AG_CTX_BIT12_SHIFT		4
10397 #define XSTORM_ISCSI_CONN_AG_CTX_BIT13_MASK		0x1
10398 #define XSTORM_ISCSI_CONN_AG_CTX_BIT13_SHIFT		5
10399 #define XSTORM_ISCSI_CONN_AG_CTX_BIT14_MASK		0x1
10400 #define XSTORM_ISCSI_CONN_AG_CTX_BIT14_SHIFT		6
10401 #define XSTORM_ISCSI_CONN_AG_CTX_TX_TRUNCATE_MASK	0x1
10402 #define XSTORM_ISCSI_CONN_AG_CTX_TX_TRUNCATE_SHIFT	7
10403 	u8 flags2;
10404 #define XSTORM_ISCSI_CONN_AG_CTX_CF0_MASK			0x3
10405 #define XSTORM_ISCSI_CONN_AG_CTX_CF0_SHIFT			0
10406 #define XSTORM_ISCSI_CONN_AG_CTX_CF1_MASK			0x3
10407 #define XSTORM_ISCSI_CONN_AG_CTX_CF1_SHIFT			2
10408 #define XSTORM_ISCSI_CONN_AG_CTX_CF2_MASK			0x3
10409 #define XSTORM_ISCSI_CONN_AG_CTX_CF2_SHIFT			4
10410 #define XSTORM_ISCSI_CONN_AG_CTX_TIMER_STOP_ALL_MASK		0x3
10411 #define XSTORM_ISCSI_CONN_AG_CTX_TIMER_STOP_ALL_SHIFT	6
10412 	u8 flags3;
10413 #define XSTORM_ISCSI_CONN_AG_CTX_CF4_MASK	0x3
10414 #define XSTORM_ISCSI_CONN_AG_CTX_CF4_SHIFT	0
10415 #define XSTORM_ISCSI_CONN_AG_CTX_CF5_MASK	0x3
10416 #define XSTORM_ISCSI_CONN_AG_CTX_CF5_SHIFT	2
10417 #define XSTORM_ISCSI_CONN_AG_CTX_CF6_MASK	0x3
10418 #define XSTORM_ISCSI_CONN_AG_CTX_CF6_SHIFT	4
10419 #define XSTORM_ISCSI_CONN_AG_CTX_CF7_MASK	0x3
10420 #define XSTORM_ISCSI_CONN_AG_CTX_CF7_SHIFT	6
10421 	u8 flags4;
10422 #define XSTORM_ISCSI_CONN_AG_CTX_CF8_MASK	0x3
10423 #define XSTORM_ISCSI_CONN_AG_CTX_CF8_SHIFT	0
10424 #define XSTORM_ISCSI_CONN_AG_CTX_CF9_MASK	0x3
10425 #define XSTORM_ISCSI_CONN_AG_CTX_CF9_SHIFT	2
10426 #define XSTORM_ISCSI_CONN_AG_CTX_CF10_MASK	0x3
10427 #define XSTORM_ISCSI_CONN_AG_CTX_CF10_SHIFT	4
10428 #define XSTORM_ISCSI_CONN_AG_CTX_CF11_MASK	0x3
10429 #define XSTORM_ISCSI_CONN_AG_CTX_CF11_SHIFT	6
10430 	u8 flags5;
10431 #define XSTORM_ISCSI_CONN_AG_CTX_CF12_MASK				0x3
10432 #define XSTORM_ISCSI_CONN_AG_CTX_CF12_SHIFT				0
10433 #define XSTORM_ISCSI_CONN_AG_CTX_CF13_MASK				0x3
10434 #define XSTORM_ISCSI_CONN_AG_CTX_CF13_SHIFT				2
10435 #define XSTORM_ISCSI_CONN_AG_CTX_CF14_MASK				0x3
10436 #define XSTORM_ISCSI_CONN_AG_CTX_CF14_SHIFT				4
10437 #define XSTORM_ISCSI_CONN_AG_CTX_UPDATE_STATE_TO_BASE_CF_MASK	0x3
10438 #define XSTORM_ISCSI_CONN_AG_CTX_UPDATE_STATE_TO_BASE_CF_SHIFT	6
10439 	u8 flags6;
10440 #define XSTORM_ISCSI_CONN_AG_CTX_CF16_MASK		0x3
10441 #define XSTORM_ISCSI_CONN_AG_CTX_CF16_SHIFT		0
10442 #define XSTORM_ISCSI_CONN_AG_CTX_CF17_MASK		0x3
10443 #define XSTORM_ISCSI_CONN_AG_CTX_CF17_SHIFT		2
10444 #define XSTORM_ISCSI_CONN_AG_CTX_CF18_MASK		0x3
10445 #define XSTORM_ISCSI_CONN_AG_CTX_CF18_SHIFT		4
10446 #define XSTORM_ISCSI_CONN_AG_CTX_DQ_FLUSH_MASK	0x3
10447 #define XSTORM_ISCSI_CONN_AG_CTX_DQ_FLUSH_SHIFT	6
10448 	u8 flags7;
10449 #define XSTORM_ISCSI_CONN_AG_CTX_MST_XCM_Q0_FLUSH_CF_MASK	0x3
10450 #define XSTORM_ISCSI_CONN_AG_CTX_MST_XCM_Q0_FLUSH_CF_SHIFT	0
10451 #define XSTORM_ISCSI_CONN_AG_CTX_UST_XCM_Q1_FLUSH_CF_MASK	0x3
10452 #define XSTORM_ISCSI_CONN_AG_CTX_UST_XCM_Q1_FLUSH_CF_SHIFT	2
10453 #define XSTORM_ISCSI_CONN_AG_CTX_SLOW_PATH_MASK		0x3
10454 #define XSTORM_ISCSI_CONN_AG_CTX_SLOW_PATH_SHIFT		4
10455 #define XSTORM_ISCSI_CONN_AG_CTX_CF0EN_MASK			0x1
10456 #define XSTORM_ISCSI_CONN_AG_CTX_CF0EN_SHIFT			6
10457 #define XSTORM_ISCSI_CONN_AG_CTX_CF1EN_MASK			0x1
10458 #define XSTORM_ISCSI_CONN_AG_CTX_CF1EN_SHIFT			7
10459 	u8 flags8;
10460 #define XSTORM_ISCSI_CONN_AG_CTX_CF2EN_MASK			0x1
10461 #define XSTORM_ISCSI_CONN_AG_CTX_CF2EN_SHIFT			0
10462 #define XSTORM_ISCSI_CONN_AG_CTX_TIMER_STOP_ALL_EN_MASK	0x1
10463 #define XSTORM_ISCSI_CONN_AG_CTX_TIMER_STOP_ALL_EN_SHIFT	1
10464 #define XSTORM_ISCSI_CONN_AG_CTX_CF4EN_MASK			0x1
10465 #define XSTORM_ISCSI_CONN_AG_CTX_CF4EN_SHIFT			2
10466 #define XSTORM_ISCSI_CONN_AG_CTX_CF5EN_MASK			0x1
10467 #define XSTORM_ISCSI_CONN_AG_CTX_CF5EN_SHIFT			3
10468 #define XSTORM_ISCSI_CONN_AG_CTX_CF6EN_MASK			0x1
10469 #define XSTORM_ISCSI_CONN_AG_CTX_CF6EN_SHIFT			4
10470 #define XSTORM_ISCSI_CONN_AG_CTX_CF7EN_MASK			0x1
10471 #define XSTORM_ISCSI_CONN_AG_CTX_CF7EN_SHIFT			5
10472 #define XSTORM_ISCSI_CONN_AG_CTX_CF8EN_MASK			0x1
10473 #define XSTORM_ISCSI_CONN_AG_CTX_CF8EN_SHIFT			6
10474 #define XSTORM_ISCSI_CONN_AG_CTX_CF9EN_MASK			0x1
10475 #define XSTORM_ISCSI_CONN_AG_CTX_CF9EN_SHIFT			7
10476 	u8 flags9;
10477 #define XSTORM_ISCSI_CONN_AG_CTX_CF10EN_MASK				0x1
10478 #define XSTORM_ISCSI_CONN_AG_CTX_CF10EN_SHIFT			0
10479 #define XSTORM_ISCSI_CONN_AG_CTX_CF11EN_MASK				0x1
10480 #define XSTORM_ISCSI_CONN_AG_CTX_CF11EN_SHIFT			1
10481 #define XSTORM_ISCSI_CONN_AG_CTX_CF12EN_MASK				0x1
10482 #define XSTORM_ISCSI_CONN_AG_CTX_CF12EN_SHIFT			2
10483 #define XSTORM_ISCSI_CONN_AG_CTX_CF13EN_MASK				0x1
10484 #define XSTORM_ISCSI_CONN_AG_CTX_CF13EN_SHIFT			3
10485 #define XSTORM_ISCSI_CONN_AG_CTX_CF14EN_MASK				0x1
10486 #define XSTORM_ISCSI_CONN_AG_CTX_CF14EN_SHIFT			4
10487 #define XSTORM_ISCSI_CONN_AG_CTX_UPDATE_STATE_TO_BASE_CF_EN_MASK	0x1
10488 #define XSTORM_ISCSI_CONN_AG_CTX_UPDATE_STATE_TO_BASE_CF_EN_SHIFT	5
10489 #define XSTORM_ISCSI_CONN_AG_CTX_CF16EN_MASK				0x1
10490 #define XSTORM_ISCSI_CONN_AG_CTX_CF16EN_SHIFT			6
10491 #define XSTORM_ISCSI_CONN_AG_CTX_CF17EN_MASK				0x1
10492 #define XSTORM_ISCSI_CONN_AG_CTX_CF17EN_SHIFT			7
10493 	u8 flags10;
10494 #define XSTORM_ISCSI_CONN_AG_CTX_CF18EN_MASK				0x1
10495 #define XSTORM_ISCSI_CONN_AG_CTX_CF18EN_SHIFT			0
10496 #define XSTORM_ISCSI_CONN_AG_CTX_DQ_FLUSH_EN_MASK			0x1
10497 #define XSTORM_ISCSI_CONN_AG_CTX_DQ_FLUSH_EN_SHIFT			1
10498 #define XSTORM_ISCSI_CONN_AG_CTX_MST_XCM_Q0_FLUSH_CF_EN_MASK		0x1
10499 #define XSTORM_ISCSI_CONN_AG_CTX_MST_XCM_Q0_FLUSH_CF_EN_SHIFT	2
10500 #define XSTORM_ISCSI_CONN_AG_CTX_UST_XCM_Q1_FLUSH_CF_EN_MASK		0x1
10501 #define XSTORM_ISCSI_CONN_AG_CTX_UST_XCM_Q1_FLUSH_CF_EN_SHIFT	3
10502 #define XSTORM_ISCSI_CONN_AG_CTX_SLOW_PATH_EN_MASK			0x1
10503 #define XSTORM_ISCSI_CONN_AG_CTX_SLOW_PATH_EN_SHIFT			4
10504 #define XSTORM_ISCSI_CONN_AG_CTX_PROC_ONLY_CLEANUP_EN_MASK		0x1
10505 #define XSTORM_ISCSI_CONN_AG_CTX_PROC_ONLY_CLEANUP_EN_SHIFT		5
10506 #define XSTORM_ISCSI_CONN_AG_CTX_RULE0EN_MASK			0x1
10507 #define XSTORM_ISCSI_CONN_AG_CTX_RULE0EN_SHIFT			6
10508 #define XSTORM_ISCSI_CONN_AG_CTX_MORE_TO_SEND_DEC_RULE_EN_MASK	0x1
10509 #define XSTORM_ISCSI_CONN_AG_CTX_MORE_TO_SEND_DEC_RULE_EN_SHIFT	7
10510 	u8 flags11;
10511 #define XSTORM_ISCSI_CONN_AG_CTX_TX_BLOCKED_EN_MASK	0x1
10512 #define XSTORM_ISCSI_CONN_AG_CTX_TX_BLOCKED_EN_SHIFT	0
10513 #define XSTORM_ISCSI_CONN_AG_CTX_RULE3EN_MASK	0x1
10514 #define XSTORM_ISCSI_CONN_AG_CTX_RULE3EN_SHIFT	1
10515 #define XSTORM_ISCSI_CONN_AG_CTX_RESERVED3_MASK	0x1
10516 #define XSTORM_ISCSI_CONN_AG_CTX_RESERVED3_SHIFT	2
10517 #define XSTORM_ISCSI_CONN_AG_CTX_RULE5EN_MASK	0x1
10518 #define XSTORM_ISCSI_CONN_AG_CTX_RULE5EN_SHIFT	3
10519 #define XSTORM_ISCSI_CONN_AG_CTX_RULE6EN_MASK	0x1
10520 #define XSTORM_ISCSI_CONN_AG_CTX_RULE6EN_SHIFT	4
10521 #define XSTORM_ISCSI_CONN_AG_CTX_RULE7EN_MASK	0x1
10522 #define XSTORM_ISCSI_CONN_AG_CTX_RULE7EN_SHIFT	5
10523 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED1_MASK	0x1
10524 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED1_SHIFT	6
10525 #define XSTORM_ISCSI_CONN_AG_CTX_RULE9EN_MASK	0x1
10526 #define XSTORM_ISCSI_CONN_AG_CTX_RULE9EN_SHIFT	7
10527 	u8 flags12;
10528 #define XSTORM_ISCSI_CONN_AG_CTX_SQ_DEC_RULE_EN_MASK		0x1
10529 #define XSTORM_ISCSI_CONN_AG_CTX_SQ_DEC_RULE_EN_SHIFT	0
10530 #define XSTORM_ISCSI_CONN_AG_CTX_RULE11EN_MASK		0x1
10531 #define XSTORM_ISCSI_CONN_AG_CTX_RULE11EN_SHIFT		1
10532 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED2_MASK		0x1
10533 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED2_SHIFT		2
10534 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED3_MASK		0x1
10535 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED3_SHIFT		3
10536 #define XSTORM_ISCSI_CONN_AG_CTX_RULE14EN_MASK		0x1
10537 #define XSTORM_ISCSI_CONN_AG_CTX_RULE14EN_SHIFT		4
10538 #define XSTORM_ISCSI_CONN_AG_CTX_RULE15EN_MASK		0x1
10539 #define XSTORM_ISCSI_CONN_AG_CTX_RULE15EN_SHIFT		5
10540 #define XSTORM_ISCSI_CONN_AG_CTX_RULE16EN_MASK		0x1
10541 #define XSTORM_ISCSI_CONN_AG_CTX_RULE16EN_SHIFT		6
10542 #define XSTORM_ISCSI_CONN_AG_CTX_RULE17EN_MASK		0x1
10543 #define XSTORM_ISCSI_CONN_AG_CTX_RULE17EN_SHIFT		7
10544 	u8 flags13;
10545 #define XSTORM_ISCSI_CONN_AG_CTX_R2TQ_DEC_RULE_EN_MASK	0x1
10546 #define XSTORM_ISCSI_CONN_AG_CTX_R2TQ_DEC_RULE_EN_SHIFT	0
10547 #define XSTORM_ISCSI_CONN_AG_CTX_HQ_DEC_RULE_EN_MASK		0x1
10548 #define XSTORM_ISCSI_CONN_AG_CTX_HQ_DEC_RULE_EN_SHIFT	1
10549 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED4_MASK		0x1
10550 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED4_SHIFT		2
10551 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED5_MASK		0x1
10552 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED5_SHIFT		3
10553 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED6_MASK		0x1
10554 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED6_SHIFT		4
10555 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED7_MASK		0x1
10556 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED7_SHIFT		5
10557 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED8_MASK		0x1
10558 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED8_SHIFT		6
10559 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED9_MASK		0x1
10560 #define XSTORM_ISCSI_CONN_AG_CTX_A0_RESERVED9_SHIFT		7
10561 	u8 flags14;
10562 #define XSTORM_ISCSI_CONN_AG_CTX_BIT16_MASK			0x1
10563 #define XSTORM_ISCSI_CONN_AG_CTX_BIT16_SHIFT			0
10564 #define XSTORM_ISCSI_CONN_AG_CTX_BIT17_MASK			0x1
10565 #define XSTORM_ISCSI_CONN_AG_CTX_BIT17_SHIFT			1
10566 #define XSTORM_ISCSI_CONN_AG_CTX_BIT18_MASK			0x1
10567 #define XSTORM_ISCSI_CONN_AG_CTX_BIT18_SHIFT			2
10568 #define XSTORM_ISCSI_CONN_AG_CTX_BIT19_MASK			0x1
10569 #define XSTORM_ISCSI_CONN_AG_CTX_BIT19_SHIFT			3
10570 #define XSTORM_ISCSI_CONN_AG_CTX_BIT20_MASK			0x1
10571 #define XSTORM_ISCSI_CONN_AG_CTX_BIT20_SHIFT			4
10572 #define XSTORM_ISCSI_CONN_AG_CTX_DUMMY_READ_DONE_MASK	0x1
10573 #define XSTORM_ISCSI_CONN_AG_CTX_DUMMY_READ_DONE_SHIFT	5
10574 #define XSTORM_ISCSI_CONN_AG_CTX_PROC_ONLY_CLEANUP_MASK	0x3
10575 #define XSTORM_ISCSI_CONN_AG_CTX_PROC_ONLY_CLEANUP_SHIFT	6
10576 	u8 byte2;
10577 	__le16 physical_q0;
10578 	__le16 physical_q1;
10579 	__le16 dummy_dorq_var;
10580 	__le16 sq_cons;
10581 	__le16 sq_prod;
10582 	__le16 word5;
10583 	__le16 slow_io_total_data_tx_update;
10584 	u8 byte3;
10585 	u8 byte4;
10586 	u8 byte5;
10587 	u8 byte6;
10588 	__le32 reg0;
10589 	__le32 reg1;
10590 	__le32 reg2;
10591 	__le32 more_to_send_seq;
10592 	__le32 reg4;
10593 	__le32 reg5;
10594 	__le32 hq_scan_next_relevant_ack;
10595 	__le16 r2tq_prod;
10596 	__le16 r2tq_cons;
10597 	__le16 hq_prod;
10598 	__le16 hq_cons;
10599 	__le32 remain_seq;
10600 	__le32 bytes_to_next_pdu;
10601 	__le32 hq_tcp_seq;
10602 	u8 byte7;
10603 	u8 byte8;
10604 	u8 byte9;
10605 	u8 byte10;
10606 	u8 byte11;
10607 	u8 byte12;
10608 	u8 byte13;
10609 	u8 byte14;
10610 	u8 byte15;
10611 	u8 e5_reserved;
10612 	__le16 word11;
10613 	__le32 reg10;
10614 	__le32 reg11;
10615 	__le32 exp_stat_sn;
10616 	__le32 ongoing_fast_rxmit_seq;
10617 	__le32 reg14;
10618 	__le32 reg15;
10619 	__le32 reg16;
10620 	__le32 reg17;
10621 };
10622 
10623 struct tstorm_iscsi_conn_ag_ctx {
10624 	u8 reserved0;
10625 	u8 state;
10626 	u8 flags0;
10627 #define TSTORM_ISCSI_CONN_AG_CTX_EXIST_IN_QM0_MASK	0x1
10628 #define TSTORM_ISCSI_CONN_AG_CTX_EXIST_IN_QM0_SHIFT	0
10629 #define TSTORM_ISCSI_CONN_AG_CTX_BIT1_MASK		0x1
10630 #define TSTORM_ISCSI_CONN_AG_CTX_BIT1_SHIFT		1
10631 #define TSTORM_ISCSI_CONN_AG_CTX_BIT2_MASK		0x1
10632 #define TSTORM_ISCSI_CONN_AG_CTX_BIT2_SHIFT		2
10633 #define TSTORM_ISCSI_CONN_AG_CTX_BIT3_MASK		0x1
10634 #define TSTORM_ISCSI_CONN_AG_CTX_BIT3_SHIFT		3
10635 #define TSTORM_ISCSI_CONN_AG_CTX_BIT4_MASK		0x1
10636 #define TSTORM_ISCSI_CONN_AG_CTX_BIT4_SHIFT		4
10637 #define TSTORM_ISCSI_CONN_AG_CTX_BIT5_MASK		0x1
10638 #define TSTORM_ISCSI_CONN_AG_CTX_BIT5_SHIFT		5
10639 #define TSTORM_ISCSI_CONN_AG_CTX_CF0_MASK		0x3
10640 #define TSTORM_ISCSI_CONN_AG_CTX_CF0_SHIFT		6
10641 	u8 flags1;
10642 #define TSTORM_ISCSI_CONN_AG_CTX_P2T_FLUSH_CF_MASK		0x3
10643 #define TSTORM_ISCSI_CONN_AG_CTX_P2T_FLUSH_CF_SHIFT		0
10644 #define TSTORM_ISCSI_CONN_AG_CTX_M2T_FLUSH_CF_MASK		0x3
10645 #define TSTORM_ISCSI_CONN_AG_CTX_M2T_FLUSH_CF_SHIFT		2
10646 #define TSTORM_ISCSI_CONN_AG_CTX_TIMER_STOP_ALL_MASK		0x3
10647 #define TSTORM_ISCSI_CONN_AG_CTX_TIMER_STOP_ALL_SHIFT	4
10648 #define TSTORM_ISCSI_CONN_AG_CTX_CF4_MASK			0x3
10649 #define TSTORM_ISCSI_CONN_AG_CTX_CF4_SHIFT			6
10650 	u8 flags2;
10651 #define TSTORM_ISCSI_CONN_AG_CTX_CF5_MASK	0x3
10652 #define TSTORM_ISCSI_CONN_AG_CTX_CF5_SHIFT	0
10653 #define TSTORM_ISCSI_CONN_AG_CTX_CF6_MASK	0x3
10654 #define TSTORM_ISCSI_CONN_AG_CTX_CF6_SHIFT	2
10655 #define TSTORM_ISCSI_CONN_AG_CTX_CF7_MASK	0x3
10656 #define TSTORM_ISCSI_CONN_AG_CTX_CF7_SHIFT	4
10657 #define TSTORM_ISCSI_CONN_AG_CTX_CF8_MASK	0x3
10658 #define TSTORM_ISCSI_CONN_AG_CTX_CF8_SHIFT	6
10659 	u8 flags3;
10660 #define TSTORM_ISCSI_CONN_AG_CTX_FLUSH_Q0_MASK		0x3
10661 #define TSTORM_ISCSI_CONN_AG_CTX_FLUSH_Q0_SHIFT		0
10662 #define TSTORM_ISCSI_CONN_AG_CTX_FLUSH_OOO_ISLES_CF_MASK	0x3
10663 #define TSTORM_ISCSI_CONN_AG_CTX_FLUSH_OOO_ISLES_CF_SHIFT	2
10664 #define TSTORM_ISCSI_CONN_AG_CTX_CF0EN_MASK			0x1
10665 #define TSTORM_ISCSI_CONN_AG_CTX_CF0EN_SHIFT			4
10666 #define TSTORM_ISCSI_CONN_AG_CTX_P2T_FLUSH_CF_EN_MASK	0x1
10667 #define TSTORM_ISCSI_CONN_AG_CTX_P2T_FLUSH_CF_EN_SHIFT	5
10668 #define TSTORM_ISCSI_CONN_AG_CTX_M2T_FLUSH_CF_EN_MASK	0x1
10669 #define TSTORM_ISCSI_CONN_AG_CTX_M2T_FLUSH_CF_EN_SHIFT	6
10670 #define TSTORM_ISCSI_CONN_AG_CTX_TIMER_STOP_ALL_EN_MASK	0x1
10671 #define TSTORM_ISCSI_CONN_AG_CTX_TIMER_STOP_ALL_EN_SHIFT	7
10672 	u8 flags4;
10673 #define TSTORM_ISCSI_CONN_AG_CTX_CF4EN_MASK		0x1
10674 #define TSTORM_ISCSI_CONN_AG_CTX_CF4EN_SHIFT		0
10675 #define TSTORM_ISCSI_CONN_AG_CTX_CF5EN_MASK		0x1
10676 #define TSTORM_ISCSI_CONN_AG_CTX_CF5EN_SHIFT		1
10677 #define TSTORM_ISCSI_CONN_AG_CTX_CF6EN_MASK		0x1
10678 #define TSTORM_ISCSI_CONN_AG_CTX_CF6EN_SHIFT		2
10679 #define TSTORM_ISCSI_CONN_AG_CTX_CF7EN_MASK		0x1
10680 #define TSTORM_ISCSI_CONN_AG_CTX_CF7EN_SHIFT		3
10681 #define TSTORM_ISCSI_CONN_AG_CTX_CF8EN_MASK		0x1
10682 #define TSTORM_ISCSI_CONN_AG_CTX_CF8EN_SHIFT		4
10683 #define TSTORM_ISCSI_CONN_AG_CTX_FLUSH_Q0_EN_MASK	0x1
10684 #define TSTORM_ISCSI_CONN_AG_CTX_FLUSH_Q0_EN_SHIFT	5
10685 #define TSTORM_ISCSI_CONN_AG_CTX_FLUSH_OOO_ISLES_CF_EN_MASK	0x1
10686 #define TSTORM_ISCSI_CONN_AG_CTX_FLUSH_OOO_ISLES_CF_EN_SHIFT	6
10687 #define TSTORM_ISCSI_CONN_AG_CTX_RULE0EN_MASK	0x1
10688 #define TSTORM_ISCSI_CONN_AG_CTX_RULE0EN_SHIFT	7
10689 	u8 flags5;
10690 #define TSTORM_ISCSI_CONN_AG_CTX_RULE1EN_MASK	0x1
10691 #define TSTORM_ISCSI_CONN_AG_CTX_RULE1EN_SHIFT	0
10692 #define TSTORM_ISCSI_CONN_AG_CTX_RULE2EN_MASK	0x1
10693 #define TSTORM_ISCSI_CONN_AG_CTX_RULE2EN_SHIFT	1
10694 #define TSTORM_ISCSI_CONN_AG_CTX_RULE3EN_MASK	0x1
10695 #define TSTORM_ISCSI_CONN_AG_CTX_RULE3EN_SHIFT	2
10696 #define TSTORM_ISCSI_CONN_AG_CTX_RULE4EN_MASK	0x1
10697 #define TSTORM_ISCSI_CONN_AG_CTX_RULE4EN_SHIFT	3
10698 #define TSTORM_ISCSI_CONN_AG_CTX_RULE5EN_MASK	0x1
10699 #define TSTORM_ISCSI_CONN_AG_CTX_RULE5EN_SHIFT	4
10700 #define TSTORM_ISCSI_CONN_AG_CTX_RULE6EN_MASK	0x1
10701 #define TSTORM_ISCSI_CONN_AG_CTX_RULE6EN_SHIFT	5
10702 #define TSTORM_ISCSI_CONN_AG_CTX_RULE7EN_MASK	0x1
10703 #define TSTORM_ISCSI_CONN_AG_CTX_RULE7EN_SHIFT	6
10704 #define TSTORM_ISCSI_CONN_AG_CTX_RULE8EN_MASK	0x1
10705 #define TSTORM_ISCSI_CONN_AG_CTX_RULE8EN_SHIFT	7
10706 	__le32 reg0;
10707 	__le32 reg1;
10708 	__le32 rx_tcp_checksum_err_cnt;
10709 	__le32 reg3;
10710 	__le32 reg4;
10711 	__le32 reg5;
10712 	__le32 reg6;
10713 	__le32 reg7;
10714 	__le32 reg8;
10715 	u8 cid_offload_cnt;
10716 	u8 byte3;
10717 	__le16 word0;
10718 };
10719 
10720 struct ustorm_iscsi_conn_ag_ctx {
10721 	u8 byte0;
10722 	u8 byte1;
10723 	u8 flags0;
10724 #define USTORM_ISCSI_CONN_AG_CTX_BIT0_MASK	0x1
10725 #define USTORM_ISCSI_CONN_AG_CTX_BIT0_SHIFT	0
10726 #define USTORM_ISCSI_CONN_AG_CTX_BIT1_MASK	0x1
10727 #define USTORM_ISCSI_CONN_AG_CTX_BIT1_SHIFT	1
10728 #define USTORM_ISCSI_CONN_AG_CTX_CF0_MASK	0x3
10729 #define USTORM_ISCSI_CONN_AG_CTX_CF0_SHIFT	2
10730 #define USTORM_ISCSI_CONN_AG_CTX_CF1_MASK	0x3
10731 #define USTORM_ISCSI_CONN_AG_CTX_CF1_SHIFT	4
10732 #define USTORM_ISCSI_CONN_AG_CTX_CF2_MASK	0x3
10733 #define USTORM_ISCSI_CONN_AG_CTX_CF2_SHIFT	6
10734 	u8 flags1;
10735 #define USTORM_ISCSI_CONN_AG_CTX_CF3_MASK	0x3
10736 #define USTORM_ISCSI_CONN_AG_CTX_CF3_SHIFT	0
10737 #define USTORM_ISCSI_CONN_AG_CTX_CF4_MASK	0x3
10738 #define USTORM_ISCSI_CONN_AG_CTX_CF4_SHIFT	2
10739 #define USTORM_ISCSI_CONN_AG_CTX_CF5_MASK	0x3
10740 #define USTORM_ISCSI_CONN_AG_CTX_CF5_SHIFT	4
10741 #define USTORM_ISCSI_CONN_AG_CTX_CF6_MASK	0x3
10742 #define USTORM_ISCSI_CONN_AG_CTX_CF6_SHIFT	6
10743 	u8 flags2;
10744 #define USTORM_ISCSI_CONN_AG_CTX_CF0EN_MASK		0x1
10745 #define USTORM_ISCSI_CONN_AG_CTX_CF0EN_SHIFT		0
10746 #define USTORM_ISCSI_CONN_AG_CTX_CF1EN_MASK		0x1
10747 #define USTORM_ISCSI_CONN_AG_CTX_CF1EN_SHIFT		1
10748 #define USTORM_ISCSI_CONN_AG_CTX_CF2EN_MASK		0x1
10749 #define USTORM_ISCSI_CONN_AG_CTX_CF2EN_SHIFT		2
10750 #define USTORM_ISCSI_CONN_AG_CTX_CF3EN_MASK		0x1
10751 #define USTORM_ISCSI_CONN_AG_CTX_CF3EN_SHIFT		3
10752 #define USTORM_ISCSI_CONN_AG_CTX_CF4EN_MASK		0x1
10753 #define USTORM_ISCSI_CONN_AG_CTX_CF4EN_SHIFT		4
10754 #define USTORM_ISCSI_CONN_AG_CTX_CF5EN_MASK		0x1
10755 #define USTORM_ISCSI_CONN_AG_CTX_CF5EN_SHIFT		5
10756 #define USTORM_ISCSI_CONN_AG_CTX_CF6EN_MASK		0x1
10757 #define USTORM_ISCSI_CONN_AG_CTX_CF6EN_SHIFT		6
10758 #define USTORM_ISCSI_CONN_AG_CTX_RULE0EN_MASK	0x1
10759 #define USTORM_ISCSI_CONN_AG_CTX_RULE0EN_SHIFT	7
10760 	u8 flags3;
10761 #define USTORM_ISCSI_CONN_AG_CTX_RULE1EN_MASK	0x1
10762 #define USTORM_ISCSI_CONN_AG_CTX_RULE1EN_SHIFT	0
10763 #define USTORM_ISCSI_CONN_AG_CTX_RULE2EN_MASK	0x1
10764 #define USTORM_ISCSI_CONN_AG_CTX_RULE2EN_SHIFT	1
10765 #define USTORM_ISCSI_CONN_AG_CTX_RULE3EN_MASK	0x1
10766 #define USTORM_ISCSI_CONN_AG_CTX_RULE3EN_SHIFT	2
10767 #define USTORM_ISCSI_CONN_AG_CTX_RULE4EN_MASK	0x1
10768 #define USTORM_ISCSI_CONN_AG_CTX_RULE4EN_SHIFT	3
10769 #define USTORM_ISCSI_CONN_AG_CTX_RULE5EN_MASK	0x1
10770 #define USTORM_ISCSI_CONN_AG_CTX_RULE5EN_SHIFT	4
10771 #define USTORM_ISCSI_CONN_AG_CTX_RULE6EN_MASK	0x1
10772 #define USTORM_ISCSI_CONN_AG_CTX_RULE6EN_SHIFT	5
10773 #define USTORM_ISCSI_CONN_AG_CTX_RULE7EN_MASK	0x1
10774 #define USTORM_ISCSI_CONN_AG_CTX_RULE7EN_SHIFT	6
10775 #define USTORM_ISCSI_CONN_AG_CTX_RULE8EN_MASK	0x1
10776 #define USTORM_ISCSI_CONN_AG_CTX_RULE8EN_SHIFT	7
10777 	u8 byte2;
10778 	u8 byte3;
10779 	__le16 word0;
10780 	__le16 word1;
10781 	__le32 reg0;
10782 	__le32 reg1;
10783 	__le32 reg2;
10784 	__le32 reg3;
10785 	__le16 word2;
10786 	__le16 word3;
10787 };
10788 
10789 /* The iscsi storm connection context of Tstorm */
10790 struct tstorm_iscsi_conn_st_ctx {
10791 	__le32 reserved[44];
10792 };
10793 
10794 struct mstorm_iscsi_conn_ag_ctx {
10795 	u8 reserved;
10796 	u8 state;
10797 	u8 flags0;
10798 #define MSTORM_ISCSI_CONN_AG_CTX_BIT0_MASK	0x1
10799 #define MSTORM_ISCSI_CONN_AG_CTX_BIT0_SHIFT	0
10800 #define MSTORM_ISCSI_CONN_AG_CTX_BIT1_MASK	0x1
10801 #define MSTORM_ISCSI_CONN_AG_CTX_BIT1_SHIFT	1
10802 #define MSTORM_ISCSI_CONN_AG_CTX_CF0_MASK	0x3
10803 #define MSTORM_ISCSI_CONN_AG_CTX_CF0_SHIFT	2
10804 #define MSTORM_ISCSI_CONN_AG_CTX_CF1_MASK	0x3
10805 #define MSTORM_ISCSI_CONN_AG_CTX_CF1_SHIFT	4
10806 #define MSTORM_ISCSI_CONN_AG_CTX_CF2_MASK	0x3
10807 #define MSTORM_ISCSI_CONN_AG_CTX_CF2_SHIFT	6
10808 	u8 flags1;
10809 #define MSTORM_ISCSI_CONN_AG_CTX_CF0EN_MASK		0x1
10810 #define MSTORM_ISCSI_CONN_AG_CTX_CF0EN_SHIFT		0
10811 #define MSTORM_ISCSI_CONN_AG_CTX_CF1EN_MASK		0x1
10812 #define MSTORM_ISCSI_CONN_AG_CTX_CF1EN_SHIFT		1
10813 #define MSTORM_ISCSI_CONN_AG_CTX_CF2EN_MASK		0x1
10814 #define MSTORM_ISCSI_CONN_AG_CTX_CF2EN_SHIFT		2
10815 #define MSTORM_ISCSI_CONN_AG_CTX_RULE0EN_MASK	0x1
10816 #define MSTORM_ISCSI_CONN_AG_CTX_RULE0EN_SHIFT	3
10817 #define MSTORM_ISCSI_CONN_AG_CTX_RULE1EN_MASK	0x1
10818 #define MSTORM_ISCSI_CONN_AG_CTX_RULE1EN_SHIFT	4
10819 #define MSTORM_ISCSI_CONN_AG_CTX_RULE2EN_MASK	0x1
10820 #define MSTORM_ISCSI_CONN_AG_CTX_RULE2EN_SHIFT	5
10821 #define MSTORM_ISCSI_CONN_AG_CTX_RULE3EN_MASK	0x1
10822 #define MSTORM_ISCSI_CONN_AG_CTX_RULE3EN_SHIFT	6
10823 #define MSTORM_ISCSI_CONN_AG_CTX_RULE4EN_MASK	0x1
10824 #define MSTORM_ISCSI_CONN_AG_CTX_RULE4EN_SHIFT	7
10825 	__le16 word0;
10826 	__le16 word1;
10827 	__le32 reg0;
10828 	__le32 reg1;
10829 };
10830 
10831 /* Combined iSCSI and TCP storm connection of Mstorm */
10832 struct mstorm_iscsi_tcp_conn_st_ctx {
10833 	__le32 reserved_tcp[20];
10834 	__le32 reserved_iscsi[12];
10835 };
10836 
10837 /* The iscsi storm context of Ustorm */
10838 struct ustorm_iscsi_conn_st_ctx {
10839 	__le32 reserved[52];
10840 };
10841 
10842 /* iscsi connection context */
10843 struct iscsi_conn_context {
10844 	struct ystorm_iscsi_conn_st_ctx ystorm_st_context;
10845 	struct pstorm_iscsi_tcp_conn_st_ctx pstorm_st_context;
10846 	struct regpair pstorm_st_padding[2];
10847 	struct pb_context xpb2_context;
10848 	struct xstorm_iscsi_tcp_conn_st_ctx xstorm_st_context;
10849 	struct regpair xstorm_st_padding[2];
10850 	struct xstorm_iscsi_conn_ag_ctx xstorm_ag_context;
10851 	struct tstorm_iscsi_conn_ag_ctx tstorm_ag_context;
10852 	struct regpair tstorm_ag_padding[2];
10853 	struct timers_context timer_context;
10854 	struct ustorm_iscsi_conn_ag_ctx ustorm_ag_context;
10855 	struct pb_context upb_context;
10856 	struct tstorm_iscsi_conn_st_ctx tstorm_st_context;
10857 	struct regpair tstorm_st_padding[2];
10858 	struct mstorm_iscsi_conn_ag_ctx mstorm_ag_context;
10859 	struct mstorm_iscsi_tcp_conn_st_ctx mstorm_st_context;
10860 	struct ustorm_iscsi_conn_st_ctx ustorm_st_context;
10861 };
10862 
10863 /* iSCSI init params passed by driver to FW in iSCSI init ramrod */
10864 struct iscsi_init_ramrod_params {
10865 	struct iscsi_spe_func_init iscsi_init_spe;
10866 	struct tcp_init_params tcp_init;
10867 };
10868 
10869 struct ystorm_iscsi_conn_ag_ctx {
10870 	u8 byte0;
10871 	u8 byte1;
10872 	u8 flags0;
10873 #define YSTORM_ISCSI_CONN_AG_CTX_BIT0_MASK	0x1
10874 #define YSTORM_ISCSI_CONN_AG_CTX_BIT0_SHIFT	0
10875 #define YSTORM_ISCSI_CONN_AG_CTX_BIT1_MASK	0x1
10876 #define YSTORM_ISCSI_CONN_AG_CTX_BIT1_SHIFT	1
10877 #define YSTORM_ISCSI_CONN_AG_CTX_CF0_MASK	0x3
10878 #define YSTORM_ISCSI_CONN_AG_CTX_CF0_SHIFT	2
10879 #define YSTORM_ISCSI_CONN_AG_CTX_CF1_MASK	0x3
10880 #define YSTORM_ISCSI_CONN_AG_CTX_CF1_SHIFT	4
10881 #define YSTORM_ISCSI_CONN_AG_CTX_CF2_MASK	0x3
10882 #define YSTORM_ISCSI_CONN_AG_CTX_CF2_SHIFT	6
10883 	u8 flags1;
10884 #define YSTORM_ISCSI_CONN_AG_CTX_CF0EN_MASK		0x1
10885 #define YSTORM_ISCSI_CONN_AG_CTX_CF0EN_SHIFT		0
10886 #define YSTORM_ISCSI_CONN_AG_CTX_CF1EN_MASK		0x1
10887 #define YSTORM_ISCSI_CONN_AG_CTX_CF1EN_SHIFT		1
10888 #define YSTORM_ISCSI_CONN_AG_CTX_CF2EN_MASK		0x1
10889 #define YSTORM_ISCSI_CONN_AG_CTX_CF2EN_SHIFT		2
10890 #define YSTORM_ISCSI_CONN_AG_CTX_RULE0EN_MASK	0x1
10891 #define YSTORM_ISCSI_CONN_AG_CTX_RULE0EN_SHIFT	3
10892 #define YSTORM_ISCSI_CONN_AG_CTX_RULE1EN_MASK	0x1
10893 #define YSTORM_ISCSI_CONN_AG_CTX_RULE1EN_SHIFT	4
10894 #define YSTORM_ISCSI_CONN_AG_CTX_RULE2EN_MASK	0x1
10895 #define YSTORM_ISCSI_CONN_AG_CTX_RULE2EN_SHIFT	5
10896 #define YSTORM_ISCSI_CONN_AG_CTX_RULE3EN_MASK	0x1
10897 #define YSTORM_ISCSI_CONN_AG_CTX_RULE3EN_SHIFT	6
10898 #define YSTORM_ISCSI_CONN_AG_CTX_RULE4EN_MASK	0x1
10899 #define YSTORM_ISCSI_CONN_AG_CTX_RULE4EN_SHIFT	7
10900 	u8 byte2;
10901 	u8 byte3;
10902 	__le16 word0;
10903 	__le32 reg0;
10904 	__le32 reg1;
10905 	__le16 word1;
10906 	__le16 word2;
10907 	__le16 word3;
10908 	__le16 word4;
10909 	__le32 reg2;
10910 	__le32 reg3;
10911 };
10912 
10913 #endif
10914