2 /* cnic.c: QLogic CNIC core network driver.
4 * Copyright (c) 2006-2014 Broadcom Corporation
5 * Copyright (c) 2014 QLogic Corporation
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation.
16 /* KWQ (kernel work queue) request op codes */
17 #define L2_KWQE_OPCODE_VALUE_FLUSH (4)
18 #define L2_KWQE_OPCODE_VALUE_VM_FREE_RX_QUEUE (8)
20 #define L4_KWQE_OPCODE_VALUE_CONNECT1 (50)
21 #define L4_KWQE_OPCODE_VALUE_CONNECT2 (51)
22 #define L4_KWQE_OPCODE_VALUE_CONNECT3 (52)
23 #define L4_KWQE_OPCODE_VALUE_RESET (53)
24 #define L4_KWQE_OPCODE_VALUE_CLOSE (54)
25 #define L4_KWQE_OPCODE_VALUE_UPDATE_SECRET (60)
26 #define L4_KWQE_OPCODE_VALUE_INIT_ULP (61)
28 #define L4_KWQE_OPCODE_VALUE_OFFLOAD_PG (1)
29 #define L4_KWQE_OPCODE_VALUE_UPDATE_PG (9)
30 #define L4_KWQE_OPCODE_VALUE_UPLOAD_PG (14)
32 #define L5CM_RAMROD_CMD_ID_BASE (0x80)
33 #define L5CM_RAMROD_CMD_ID_TCP_CONNECT (L5CM_RAMROD_CMD_ID_BASE + 3)
34 #define L5CM_RAMROD_CMD_ID_CLOSE (L5CM_RAMROD_CMD_ID_BASE + 12)
35 #define L5CM_RAMROD_CMD_ID_ABORT (L5CM_RAMROD_CMD_ID_BASE + 13)
36 #define L5CM_RAMROD_CMD_ID_SEARCHER_DELETE (L5CM_RAMROD_CMD_ID_BASE + 14)
37 #define L5CM_RAMROD_CMD_ID_TERMINATE_OFFLOAD (L5CM_RAMROD_CMD_ID_BASE + 15)
39 #define FCOE_RAMROD_CMD_ID_INIT_FUNC (FCOE_KCQE_OPCODE_INIT_FUNC)
40 #define FCOE_RAMROD_CMD_ID_DESTROY_FUNC (FCOE_KCQE_OPCODE_DESTROY_FUNC)
41 #define FCOE_RAMROD_CMD_ID_STAT_FUNC (FCOE_KCQE_OPCODE_STAT_FUNC)
42 #define FCOE_RAMROD_CMD_ID_OFFLOAD_CONN (FCOE_KCQE_OPCODE_OFFLOAD_CONN)
43 #define FCOE_RAMROD_CMD_ID_ENABLE_CONN (FCOE_KCQE_OPCODE_ENABLE_CONN)
44 #define FCOE_RAMROD_CMD_ID_DISABLE_CONN (FCOE_KCQE_OPCODE_DISABLE_CONN)
45 #define FCOE_RAMROD_CMD_ID_DESTROY_CONN (FCOE_KCQE_OPCODE_DESTROY_CONN)
46 #define FCOE_RAMROD_CMD_ID_TERMINATE_CONN (0x81)
48 /* KCQ (kernel completion queue) response op codes */
49 #define L4_KCQE_OPCODE_VALUE_CLOSE_COMP (53)
50 #define L4_KCQE_OPCODE_VALUE_RESET_COMP (54)
51 #define L4_KCQE_OPCODE_VALUE_FW_TCP_UPDATE (55)
52 #define L4_KCQE_OPCODE_VALUE_CONNECT_COMPLETE (56)
53 #define L4_KCQE_OPCODE_VALUE_RESET_RECEIVED (57)
54 #define L4_KCQE_OPCODE_VALUE_CLOSE_RECEIVED (58)
55 #define L4_KCQE_OPCODE_VALUE_INIT_ULP (61)
57 #define L4_KCQE_OPCODE_VALUE_OFFLOAD_PG (1)
58 #define L4_KCQE_OPCODE_VALUE_UPDATE_PG (9)
59 #define L4_KCQE_OPCODE_VALUE_UPLOAD_PG (14)
61 /* KCQ (kernel completion queue) completion status */
62 #define L4_KCQE_COMPLETION_STATUS_SUCCESS (0)
63 #define L4_KCQE_COMPLETION_STATUS_NIC_ERROR (4)
64 #define L4_KCQE_COMPLETION_STATUS_PARITY_ERROR (0x81)
65 #define L4_KCQE_COMPLETION_STATUS_TIMEOUT (0x93)
67 #define L4_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAIL (0x83)
68 #define L4_KCQE_COMPLETION_STATUS_OFFLOADED_PG (0x89)
70 #define L4_KCQE_OPCODE_VALUE_OOO_EVENT_NOTIFICATION (0xa0)
71 #define L4_KCQE_OPCODE_VALUE_OOO_FLUSH (0xa1)
73 #define L4_LAYER_CODE (4)
74 #define L2_LAYER_CODE (2)
84 #if defined(__BIG_ENDIAN)
87 #elif defined(__LITTLE_ENDIAN)
92 #if defined(__BIG_ENDIAN)
94 #define L4_KCQ_RESERVED3 (0x7<<0)
95 #define L4_KCQ_RESERVED3_SHIFT 0
96 #define L4_KCQ_RAMROD_COMPLETION (0x1<<3) /* Everest only */
97 #define L4_KCQ_RAMROD_COMPLETION_SHIFT 3
98 #define L4_KCQ_LAYER_CODE (0x7<<4)
99 #define L4_KCQ_LAYER_CODE_SHIFT 4
100 #define L4_KCQ_RESERVED4 (0x1<<7)
101 #define L4_KCQ_RESERVED4_SHIFT 7
104 #elif defined(__LITTLE_ENDIAN)
108 #define L4_KCQ_RESERVED3 (0xF<<0)
109 #define L4_KCQ_RESERVED3_SHIFT 0
110 #define L4_KCQ_RAMROD_COMPLETION (0x1<<3) /* Everest only */
111 #define L4_KCQ_RAMROD_COMPLETION_SHIFT 3
112 #define L4_KCQ_LAYER_CODE (0x7<<4)
113 #define L4_KCQ_LAYER_CODE_SHIFT 4
114 #define L4_KCQ_RESERVED4 (0x1<<7)
115 #define L4_KCQ_RESERVED4_SHIFT 7
121 * L4 KCQ CQE PG upload
123 struct l4_kcq_upload_pg
{
125 #if defined(__BIG_ENDIAN)
128 #elif defined(__LITTLE_ENDIAN)
133 #if defined(__BIG_ENDIAN)
135 #define L4_KCQ_UPLOAD_PG_RESERVED3 (0xF<<0)
136 #define L4_KCQ_UPLOAD_PG_RESERVED3_SHIFT 0
137 #define L4_KCQ_UPLOAD_PG_LAYER_CODE (0x7<<4)
138 #define L4_KCQ_UPLOAD_PG_LAYER_CODE_SHIFT 4
139 #define L4_KCQ_UPLOAD_PG_RESERVED4 (0x1<<7)
140 #define L4_KCQ_UPLOAD_PG_RESERVED4_SHIFT 7
143 #elif defined(__LITTLE_ENDIAN)
147 #define L4_KCQ_UPLOAD_PG_RESERVED3 (0xF<<0)
148 #define L4_KCQ_UPLOAD_PG_RESERVED3_SHIFT 0
149 #define L4_KCQ_UPLOAD_PG_LAYER_CODE (0x7<<4)
150 #define L4_KCQ_UPLOAD_PG_LAYER_CODE_SHIFT 4
151 #define L4_KCQ_UPLOAD_PG_RESERVED4 (0x1<<7)
152 #define L4_KCQ_UPLOAD_PG_RESERVED4_SHIFT 7
158 * Gracefully close the connection request
160 struct l4_kwq_close_req
{
161 #if defined(__BIG_ENDIAN)
163 #define L4_KWQ_CLOSE_REQ_RESERVED1 (0xF<<0)
164 #define L4_KWQ_CLOSE_REQ_RESERVED1_SHIFT 0
165 #define L4_KWQ_CLOSE_REQ_LAYER_CODE (0x7<<4)
166 #define L4_KWQ_CLOSE_REQ_LAYER_CODE_SHIFT 4
167 #define L4_KWQ_CLOSE_REQ_LINKED_WITH_NEXT (0x1<<7)
168 #define L4_KWQ_CLOSE_REQ_LINKED_WITH_NEXT_SHIFT 7
171 #elif defined(__LITTLE_ENDIAN)
175 #define L4_KWQ_CLOSE_REQ_RESERVED1 (0xF<<0)
176 #define L4_KWQ_CLOSE_REQ_RESERVED1_SHIFT 0
177 #define L4_KWQ_CLOSE_REQ_LAYER_CODE (0x7<<4)
178 #define L4_KWQ_CLOSE_REQ_LAYER_CODE_SHIFT 4
179 #define L4_KWQ_CLOSE_REQ_LINKED_WITH_NEXT (0x1<<7)
180 #define L4_KWQ_CLOSE_REQ_LINKED_WITH_NEXT_SHIFT 7
188 * The first request to be passed in order to establish connection in option2
190 struct l4_kwq_connect_req1
{
191 #if defined(__BIG_ENDIAN)
193 #define L4_KWQ_CONNECT_REQ1_RESERVED1 (0xF<<0)
194 #define L4_KWQ_CONNECT_REQ1_RESERVED1_SHIFT 0
195 #define L4_KWQ_CONNECT_REQ1_LAYER_CODE (0x7<<4)
196 #define L4_KWQ_CONNECT_REQ1_LAYER_CODE_SHIFT 4
197 #define L4_KWQ_CONNECT_REQ1_LINKED_WITH_NEXT (0x1<<7)
198 #define L4_KWQ_CONNECT_REQ1_LINKED_WITH_NEXT_SHIFT 7
202 #define L4_KWQ_CONNECT_REQ1_IS_PG_HOST_OPAQUE (0x1<<0)
203 #define L4_KWQ_CONNECT_REQ1_IS_PG_HOST_OPAQUE_SHIFT 0
204 #define L4_KWQ_CONNECT_REQ1_IP_V6 (0x1<<1)
205 #define L4_KWQ_CONNECT_REQ1_IP_V6_SHIFT 1
206 #define L4_KWQ_CONNECT_REQ1_PASSIVE_FLAG (0x1<<2)
207 #define L4_KWQ_CONNECT_REQ1_PASSIVE_FLAG_SHIFT 2
208 #define L4_KWQ_CONNECT_REQ1_RSRV (0x1F<<3)
209 #define L4_KWQ_CONNECT_REQ1_RSRV_SHIFT 3
210 #elif defined(__LITTLE_ENDIAN)
212 #define L4_KWQ_CONNECT_REQ1_IS_PG_HOST_OPAQUE (0x1<<0)
213 #define L4_KWQ_CONNECT_REQ1_IS_PG_HOST_OPAQUE_SHIFT 0
214 #define L4_KWQ_CONNECT_REQ1_IP_V6 (0x1<<1)
215 #define L4_KWQ_CONNECT_REQ1_IP_V6_SHIFT 1
216 #define L4_KWQ_CONNECT_REQ1_PASSIVE_FLAG (0x1<<2)
217 #define L4_KWQ_CONNECT_REQ1_PASSIVE_FLAG_SHIFT 2
218 #define L4_KWQ_CONNECT_REQ1_RSRV (0x1F<<3)
219 #define L4_KWQ_CONNECT_REQ1_RSRV_SHIFT 3
223 #define L4_KWQ_CONNECT_REQ1_RESERVED1 (0xF<<0)
224 #define L4_KWQ_CONNECT_REQ1_RESERVED1_SHIFT 0
225 #define L4_KWQ_CONNECT_REQ1_LAYER_CODE (0x7<<4)
226 #define L4_KWQ_CONNECT_REQ1_LAYER_CODE_SHIFT 4
227 #define L4_KWQ_CONNECT_REQ1_LINKED_WITH_NEXT (0x1<<7)
228 #define L4_KWQ_CONNECT_REQ1_LINKED_WITH_NEXT_SHIFT 7
234 #if defined(__BIG_ENDIAN)
237 #elif defined(__LITTLE_ENDIAN)
241 #if defined(__BIG_ENDIAN)
244 #define L4_KWQ_CONNECT_REQ1_NO_DELAY_ACK (0x1<<0)
245 #define L4_KWQ_CONNECT_REQ1_NO_DELAY_ACK_SHIFT 0
246 #define L4_KWQ_CONNECT_REQ1_KEEP_ALIVE (0x1<<1)
247 #define L4_KWQ_CONNECT_REQ1_KEEP_ALIVE_SHIFT 1
248 #define L4_KWQ_CONNECT_REQ1_NAGLE_ENABLE (0x1<<2)
249 #define L4_KWQ_CONNECT_REQ1_NAGLE_ENABLE_SHIFT 2
250 #define L4_KWQ_CONNECT_REQ1_TIME_STAMP (0x1<<3)
251 #define L4_KWQ_CONNECT_REQ1_TIME_STAMP_SHIFT 3
252 #define L4_KWQ_CONNECT_REQ1_SACK (0x1<<4)
253 #define L4_KWQ_CONNECT_REQ1_SACK_SHIFT 4
254 #define L4_KWQ_CONNECT_REQ1_SEG_SCALING (0x1<<5)
255 #define L4_KWQ_CONNECT_REQ1_SEG_SCALING_SHIFT 5
256 #define L4_KWQ_CONNECT_REQ1_RESERVED2 (0x3<<6)
257 #define L4_KWQ_CONNECT_REQ1_RESERVED2_SHIFT 6
258 #elif defined(__LITTLE_ENDIAN)
260 #define L4_KWQ_CONNECT_REQ1_NO_DELAY_ACK (0x1<<0)
261 #define L4_KWQ_CONNECT_REQ1_NO_DELAY_ACK_SHIFT 0
262 #define L4_KWQ_CONNECT_REQ1_KEEP_ALIVE (0x1<<1)
263 #define L4_KWQ_CONNECT_REQ1_KEEP_ALIVE_SHIFT 1
264 #define L4_KWQ_CONNECT_REQ1_NAGLE_ENABLE (0x1<<2)
265 #define L4_KWQ_CONNECT_REQ1_NAGLE_ENABLE_SHIFT 2
266 #define L4_KWQ_CONNECT_REQ1_TIME_STAMP (0x1<<3)
267 #define L4_KWQ_CONNECT_REQ1_TIME_STAMP_SHIFT 3
268 #define L4_KWQ_CONNECT_REQ1_SACK (0x1<<4)
269 #define L4_KWQ_CONNECT_REQ1_SACK_SHIFT 4
270 #define L4_KWQ_CONNECT_REQ1_SEG_SCALING (0x1<<5)
271 #define L4_KWQ_CONNECT_REQ1_SEG_SCALING_SHIFT 5
272 #define L4_KWQ_CONNECT_REQ1_RESERVED2 (0x3<<6)
273 #define L4_KWQ_CONNECT_REQ1_RESERVED2_SHIFT 6
281 * The second ( optional )request to be passed in order to establish
282 * connection in option2 - for IPv6 only
284 struct l4_kwq_connect_req2
{
285 #if defined(__BIG_ENDIAN)
287 #define L4_KWQ_CONNECT_REQ2_RESERVED1 (0xF<<0)
288 #define L4_KWQ_CONNECT_REQ2_RESERVED1_SHIFT 0
289 #define L4_KWQ_CONNECT_REQ2_LAYER_CODE (0x7<<4)
290 #define L4_KWQ_CONNECT_REQ2_LAYER_CODE_SHIFT 4
291 #define L4_KWQ_CONNECT_REQ2_LINKED_WITH_NEXT (0x1<<7)
292 #define L4_KWQ_CONNECT_REQ2_LINKED_WITH_NEXT_SHIFT 7
296 #elif defined(__LITTLE_ENDIAN)
301 #define L4_KWQ_CONNECT_REQ2_RESERVED1 (0xF<<0)
302 #define L4_KWQ_CONNECT_REQ2_RESERVED1_SHIFT 0
303 #define L4_KWQ_CONNECT_REQ2_LAYER_CODE (0x7<<4)
304 #define L4_KWQ_CONNECT_REQ2_LAYER_CODE_SHIFT 4
305 #define L4_KWQ_CONNECT_REQ2_LINKED_WITH_NEXT (0x1<<7)
306 #define L4_KWQ_CONNECT_REQ2_LINKED_WITH_NEXT_SHIFT 7
319 * The third ( and last )request to be passed in order to establish
320 * connection in option2
322 struct l4_kwq_connect_req3
{
323 #if defined(__BIG_ENDIAN)
325 #define L4_KWQ_CONNECT_REQ3_RESERVED1 (0xF<<0)
326 #define L4_KWQ_CONNECT_REQ3_RESERVED1_SHIFT 0
327 #define L4_KWQ_CONNECT_REQ3_LAYER_CODE (0x7<<4)
328 #define L4_KWQ_CONNECT_REQ3_LAYER_CODE_SHIFT 4
329 #define L4_KWQ_CONNECT_REQ3_LINKED_WITH_NEXT (0x1<<7)
330 #define L4_KWQ_CONNECT_REQ3_LINKED_WITH_NEXT_SHIFT 7
333 #elif defined(__LITTLE_ENDIAN)
337 #define L4_KWQ_CONNECT_REQ3_RESERVED1 (0xF<<0)
338 #define L4_KWQ_CONNECT_REQ3_RESERVED1_SHIFT 0
339 #define L4_KWQ_CONNECT_REQ3_LAYER_CODE (0x7<<4)
340 #define L4_KWQ_CONNECT_REQ3_LAYER_CODE_SHIFT 4
341 #define L4_KWQ_CONNECT_REQ3_LINKED_WITH_NEXT (0x1<<7)
342 #define L4_KWQ_CONNECT_REQ3_LINKED_WITH_NEXT_SHIFT 7
346 #if defined(__BIG_ENDIAN)
350 u8 ka_max_probe_count
;
351 #elif defined(__LITTLE_ENDIAN)
352 u8 ka_max_probe_count
;
357 #if defined(__BIG_ENDIAN)
360 #elif defined(__LITTLE_ENDIAN)
371 * a KWQE request to offload a PG connection
373 struct l4_kwq_offload_pg
{
374 #if defined(__BIG_ENDIAN)
376 #define L4_KWQ_OFFLOAD_PG_RESERVED1 (0xF<<0)
377 #define L4_KWQ_OFFLOAD_PG_RESERVED1_SHIFT 0
378 #define L4_KWQ_OFFLOAD_PG_LAYER_CODE (0x7<<4)
379 #define L4_KWQ_OFFLOAD_PG_LAYER_CODE_SHIFT 4
380 #define L4_KWQ_OFFLOAD_PG_LINKED_WITH_NEXT (0x1<<7)
381 #define L4_KWQ_OFFLOAD_PG_LINKED_WITH_NEXT_SHIFT 7
384 #elif defined(__LITTLE_ENDIAN)
388 #define L4_KWQ_OFFLOAD_PG_RESERVED1 (0xF<<0)
389 #define L4_KWQ_OFFLOAD_PG_RESERVED1_SHIFT 0
390 #define L4_KWQ_OFFLOAD_PG_LAYER_CODE (0x7<<4)
391 #define L4_KWQ_OFFLOAD_PG_LAYER_CODE_SHIFT 4
392 #define L4_KWQ_OFFLOAD_PG_LINKED_WITH_NEXT (0x1<<7)
393 #define L4_KWQ_OFFLOAD_PG_LINKED_WITH_NEXT_SHIFT 7
395 #if defined(__BIG_ENDIAN)
398 #define L4_KWQ_OFFLOAD_PG_SNAP_ENCAP (0x1<<0)
399 #define L4_KWQ_OFFLOAD_PG_SNAP_ENCAP_SHIFT 0
400 #define L4_KWQ_OFFLOAD_PG_VLAN_TAGGING (0x1<<1)
401 #define L4_KWQ_OFFLOAD_PG_VLAN_TAGGING_SHIFT 1
402 #define L4_KWQ_OFFLOAD_PG_RESERVED2 (0x3F<<2)
403 #define L4_KWQ_OFFLOAD_PG_RESERVED2_SHIFT 2
406 #elif defined(__LITTLE_ENDIAN)
410 #define L4_KWQ_OFFLOAD_PG_SNAP_ENCAP (0x1<<0)
411 #define L4_KWQ_OFFLOAD_PG_SNAP_ENCAP_SHIFT 0
412 #define L4_KWQ_OFFLOAD_PG_VLAN_TAGGING (0x1<<1)
413 #define L4_KWQ_OFFLOAD_PG_VLAN_TAGGING_SHIFT 1
414 #define L4_KWQ_OFFLOAD_PG_RESERVED2 (0x3F<<2)
415 #define L4_KWQ_OFFLOAD_PG_RESERVED2_SHIFT 2
418 #if defined(__BIG_ENDIAN)
423 #elif defined(__LITTLE_ENDIAN)
429 #if defined(__BIG_ENDIAN)
434 #elif defined(__LITTLE_ENDIAN)
440 #if defined(__BIG_ENDIAN)
444 #elif defined(__LITTLE_ENDIAN)
449 #if defined(__BIG_ENDIAN)
452 #elif defined(__LITTLE_ENDIAN)
456 #if defined(__BIG_ENDIAN)
459 #elif defined(__LITTLE_ENDIAN)
468 * Abortively close the connection request
470 struct l4_kwq_reset_req
{
471 #if defined(__BIG_ENDIAN)
473 #define L4_KWQ_RESET_REQ_RESERVED1 (0xF<<0)
474 #define L4_KWQ_RESET_REQ_RESERVED1_SHIFT 0
475 #define L4_KWQ_RESET_REQ_LAYER_CODE (0x7<<4)
476 #define L4_KWQ_RESET_REQ_LAYER_CODE_SHIFT 4
477 #define L4_KWQ_RESET_REQ_LINKED_WITH_NEXT (0x1<<7)
478 #define L4_KWQ_RESET_REQ_LINKED_WITH_NEXT_SHIFT 7
481 #elif defined(__LITTLE_ENDIAN)
485 #define L4_KWQ_RESET_REQ_RESERVED1 (0xF<<0)
486 #define L4_KWQ_RESET_REQ_RESERVED1_SHIFT 0
487 #define L4_KWQ_RESET_REQ_LAYER_CODE (0x7<<4)
488 #define L4_KWQ_RESET_REQ_LAYER_CODE_SHIFT 4
489 #define L4_KWQ_RESET_REQ_LINKED_WITH_NEXT (0x1<<7)
490 #define L4_KWQ_RESET_REQ_LINKED_WITH_NEXT_SHIFT 7
498 * a KWQE request to update a PG connection
500 struct l4_kwq_update_pg
{
501 #if defined(__BIG_ENDIAN)
503 #define L4_KWQ_UPDATE_PG_RESERVED1 (0xF<<0)
504 #define L4_KWQ_UPDATE_PG_RESERVED1_SHIFT 0
505 #define L4_KWQ_UPDATE_PG_LAYER_CODE (0x7<<4)
506 #define L4_KWQ_UPDATE_PG_LAYER_CODE_SHIFT 4
507 #define L4_KWQ_UPDATE_PG_LINKED_WITH_NEXT (0x1<<7)
508 #define L4_KWQ_UPDATE_PG_LINKED_WITH_NEXT_SHIFT 7
511 #elif defined(__LITTLE_ENDIAN)
515 #define L4_KWQ_UPDATE_PG_RESERVED1 (0xF<<0)
516 #define L4_KWQ_UPDATE_PG_RESERVED1_SHIFT 0
517 #define L4_KWQ_UPDATE_PG_LAYER_CODE (0x7<<4)
518 #define L4_KWQ_UPDATE_PG_LAYER_CODE_SHIFT 4
519 #define L4_KWQ_UPDATE_PG_LINKED_WITH_NEXT (0x1<<7)
520 #define L4_KWQ_UPDATE_PG_LINKED_WITH_NEXT_SHIFT 7
524 #if defined(__BIG_ENDIAN)
526 #define L4_KWQ_UPDATE_PG_VALIDS_IPID_COUNT (0x1<<0)
527 #define L4_KWQ_UPDATE_PG_VALIDS_IPID_COUNT_SHIFT 0
528 #define L4_KWQ_UPDATE_PG_VALIDS_DA (0x1<<1)
529 #define L4_KWQ_UPDATE_PG_VALIDS_DA_SHIFT 1
530 #define L4_KWQ_UPDATE_PG_RESERVERD2 (0x3F<<2)
531 #define L4_KWQ_UPDATE_PG_RESERVERD2_SHIFT 2
534 #elif defined(__LITTLE_ENDIAN)
538 #define L4_KWQ_UPDATE_PG_VALIDS_IPID_COUNT (0x1<<0)
539 #define L4_KWQ_UPDATE_PG_VALIDS_IPID_COUNT_SHIFT 0
540 #define L4_KWQ_UPDATE_PG_VALIDS_DA (0x1<<1)
541 #define L4_KWQ_UPDATE_PG_VALIDS_DA_SHIFT 1
542 #define L4_KWQ_UPDATE_PG_RESERVERD2 (0x3F<<2)
543 #define L4_KWQ_UPDATE_PG_RESERVERD2_SHIFT 2
545 #if defined(__BIG_ENDIAN)
549 #elif defined(__LITTLE_ENDIAN)
554 #if defined(__BIG_ENDIAN)
559 #elif defined(__LITTLE_ENDIAN)
571 * a KWQE request to upload a PG or L4 context
573 struct l4_kwq_upload
{
574 #if defined(__BIG_ENDIAN)
576 #define L4_KWQ_UPLOAD_RESERVED1 (0xF<<0)
577 #define L4_KWQ_UPLOAD_RESERVED1_SHIFT 0
578 #define L4_KWQ_UPLOAD_LAYER_CODE (0x7<<4)
579 #define L4_KWQ_UPLOAD_LAYER_CODE_SHIFT 4
580 #define L4_KWQ_UPLOAD_LINKED_WITH_NEXT (0x1<<7)
581 #define L4_KWQ_UPLOAD_LINKED_WITH_NEXT_SHIFT 7
584 #elif defined(__LITTLE_ENDIAN)
588 #define L4_KWQ_UPLOAD_RESERVED1 (0xF<<0)
589 #define L4_KWQ_UPLOAD_RESERVED1_SHIFT 0
590 #define L4_KWQ_UPLOAD_LAYER_CODE (0x7<<4)
591 #define L4_KWQ_UPLOAD_LAYER_CODE_SHIFT 4
592 #define L4_KWQ_UPLOAD_LINKED_WITH_NEXT (0x1<<7)
593 #define L4_KWQ_UPLOAD_LINKED_WITH_NEXT_SHIFT 7
604 * The iscsi aggregative context of Cstorm
606 struct cstorm_iscsi_ag_context
{
608 #define CSTORM_ISCSI_AG_CONTEXT_STATE (0xFF<<0)
609 #define CSTORM_ISCSI_AG_CONTEXT_STATE_SHIFT 0
610 #define __CSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<8)
611 #define __CSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 8
612 #define __CSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<9)
613 #define __CSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 9
614 #define __CSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<10)
615 #define __CSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 10
616 #define __CSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<11)
617 #define __CSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 11
618 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED_ULP_RX_SE_CF_EN (0x1<<12)
619 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED_ULP_RX_SE_CF_EN_SHIFT 12
620 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED_ULP_RX_INV_CF_EN (0x1<<13)
621 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED_ULP_RX_INV_CF_EN_SHIFT 13
622 #define __CSTORM_ISCSI_AG_CONTEXT_AUX4_CF (0x3<<14)
623 #define __CSTORM_ISCSI_AG_CONTEXT_AUX4_CF_SHIFT 14
624 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED66 (0x3<<16)
625 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED66_SHIFT 16
626 #define __CSTORM_ISCSI_AG_CONTEXT_FIN_RECEIVED_CF_EN (0x1<<18)
627 #define __CSTORM_ISCSI_AG_CONTEXT_FIN_RECEIVED_CF_EN_SHIFT 18
628 #define __CSTORM_ISCSI_AG_CONTEXT_AUX1_CF_EN (0x1<<19)
629 #define __CSTORM_ISCSI_AG_CONTEXT_AUX1_CF_EN_SHIFT 19
630 #define __CSTORM_ISCSI_AG_CONTEXT_AUX2_CF_EN (0x1<<20)
631 #define __CSTORM_ISCSI_AG_CONTEXT_AUX2_CF_EN_SHIFT 20
632 #define __CSTORM_ISCSI_AG_CONTEXT_AUX3_CF_EN (0x1<<21)
633 #define __CSTORM_ISCSI_AG_CONTEXT_AUX3_CF_EN_SHIFT 21
634 #define __CSTORM_ISCSI_AG_CONTEXT_AUX4_CF_EN (0x1<<22)
635 #define __CSTORM_ISCSI_AG_CONTEXT_AUX4_CF_EN_SHIFT 22
636 #define __CSTORM_ISCSI_AG_CONTEXT_REL_SEQ_RULE (0x7<<23)
637 #define __CSTORM_ISCSI_AG_CONTEXT_REL_SEQ_RULE_SHIFT 23
638 #define CSTORM_ISCSI_AG_CONTEXT_HQ_PROD_RULE (0x3<<26)
639 #define CSTORM_ISCSI_AG_CONTEXT_HQ_PROD_RULE_SHIFT 26
640 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED52 (0x3<<28)
641 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED52_SHIFT 28
642 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED53 (0x3<<30)
643 #define __CSTORM_ISCSI_AG_CONTEXT_RESERVED53_SHIFT 30
644 #if defined(__BIG_ENDIAN)
648 #elif defined(__LITTLE_ENDIAN)
655 #if defined(__BIG_ENDIAN)
658 #elif defined(__LITTLE_ENDIAN)
662 #if defined(__BIG_ENDIAN)
667 #elif defined(__LITTLE_ENDIAN)
673 #if defined(__BIG_ENDIAN)
676 #elif defined(__LITTLE_ENDIAN)
681 #if defined(__BIG_ENDIAN)
684 #elif defined(__LITTLE_ENDIAN)
688 #if defined(__BIG_ENDIAN)
691 #elif defined(__LITTLE_ENDIAN)
698 * The fcoe extra aggregative context section of Tstorm
700 struct tstorm_fcoe_extra_ag_context_section
{
702 #if defined(__BIG_ENDIAN)
706 #elif defined(__LITTLE_ENDIAN)
711 #if defined(__BIG_ENDIAN)
715 #elif defined(__LITTLE_ENDIAN)
726 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_FIN_SENT_FLAG (0x1<<0)
727 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_FIN_SENT_FLAG_SHIFT 0
728 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_LAST_PACKET_FIN_FLAG (0x1<<1)
729 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_LAST_PACKET_FIN_FLAG_SHIFT 1
730 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_WND_UPD_CF (0x3<<2)
731 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_WND_UPD_CF_SHIFT 2
732 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_TIMEOUT_CF (0x3<<4)
733 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_TIMEOUT_CF_SHIFT 4
734 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_WND_UPD_CF_EN (0x1<<6)
735 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_WND_UPD_CF_EN_SHIFT 6
736 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_TIMEOUT_CF_EN (0x1<<7)
737 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_TIMEOUT_CF_EN_SHIFT 7
738 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RETRANSMIT_SEQ_EN (0x1<<8)
739 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RETRANSMIT_SEQ_EN_SHIFT 8
740 #define __TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_LCQ_SND_EN (0x1<<9)
741 #define __TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_LCQ_SND_EN_SHIFT 9
742 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX1_FLAG (0x1<<10)
743 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX1_FLAG_SHIFT 10
744 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX2_FLAG (0x1<<11)
745 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX2_FLAG_SHIFT 11
746 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX1_CF_EN (0x1<<12)
747 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX1_CF_EN_SHIFT 12
748 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX2_CF_EN (0x1<<13)
749 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX2_CF_EN_SHIFT 13
750 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX1_CF (0x3<<14)
751 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX1_CF_SHIFT 14
752 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX2_CF (0x3<<16)
753 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX2_CF_SHIFT 16
754 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_TX_BLOCKED (0x1<<18)
755 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_TX_BLOCKED_SHIFT 18
756 #define __TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX10_CF_EN (0x1<<19)
757 #define __TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX10_CF_EN_SHIFT 19
758 #define __TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX11_CF_EN (0x1<<20)
759 #define __TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX11_CF_EN_SHIFT 20
760 #define __TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX12_CF_EN (0x1<<21)
761 #define __TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX12_CF_EN_SHIFT 21
762 #define __TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED1 (0x3<<22)
763 #define __TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED1_SHIFT 22
764 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RETRANSMIT_PEND_SEQ (0xF<<24)
765 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RETRANSMIT_PEND_SEQ_SHIFT 24
766 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RETRANSMIT_DONE_SEQ (0xF<<28)
767 #define TSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RETRANSMIT_DONE_SEQ_SHIFT 28
774 * The fcoe aggregative context of Tstorm
776 struct tstorm_fcoe_ag_context
{
777 #if defined(__BIG_ENDIAN)
780 #define TSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
781 #define TSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
782 #define TSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
783 #define TSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
784 #define TSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<2)
785 #define TSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 2
786 #define TSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<3)
787 #define TSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 3
788 #define __TSTORM_FCOE_AG_CONTEXT_QUEUE0_FLUSH_CF (0x3<<4)
789 #define __TSTORM_FCOE_AG_CONTEXT_QUEUE0_FLUSH_CF_SHIFT 4
790 #define __TSTORM_FCOE_AG_CONTEXT_AUX3_FLAG (0x1<<6)
791 #define __TSTORM_FCOE_AG_CONTEXT_AUX3_FLAG_SHIFT 6
792 #define __TSTORM_FCOE_AG_CONTEXT_AUX4_FLAG (0x1<<7)
793 #define __TSTORM_FCOE_AG_CONTEXT_AUX4_FLAG_SHIFT 7
795 #elif defined(__LITTLE_ENDIAN)
798 #define TSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
799 #define TSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
800 #define TSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
801 #define TSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
802 #define TSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<2)
803 #define TSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 2
804 #define TSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<3)
805 #define TSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 3
806 #define __TSTORM_FCOE_AG_CONTEXT_QUEUE0_FLUSH_CF (0x3<<4)
807 #define __TSTORM_FCOE_AG_CONTEXT_QUEUE0_FLUSH_CF_SHIFT 4
808 #define __TSTORM_FCOE_AG_CONTEXT_AUX3_FLAG (0x1<<6)
809 #define __TSTORM_FCOE_AG_CONTEXT_AUX3_FLAG_SHIFT 6
810 #define __TSTORM_FCOE_AG_CONTEXT_AUX4_FLAG (0x1<<7)
811 #define __TSTORM_FCOE_AG_CONTEXT_AUX4_FLAG_SHIFT 7
814 #if defined(__BIG_ENDIAN)
817 #define __TSTORM_FCOE_AG_CONTEXT_AUX5_FLAG (0x1<<0)
818 #define __TSTORM_FCOE_AG_CONTEXT_AUX5_FLAG_SHIFT 0
819 #define __TSTORM_FCOE_AG_CONTEXT_AUX6_FLAG (0x1<<1)
820 #define __TSTORM_FCOE_AG_CONTEXT_AUX6_FLAG_SHIFT 1
821 #define __TSTORM_FCOE_AG_CONTEXT_AUX4_CF (0x3<<2)
822 #define __TSTORM_FCOE_AG_CONTEXT_AUX4_CF_SHIFT 2
823 #define __TSTORM_FCOE_AG_CONTEXT_AUX5_CF (0x3<<4)
824 #define __TSTORM_FCOE_AG_CONTEXT_AUX5_CF_SHIFT 4
825 #define __TSTORM_FCOE_AG_CONTEXT_AUX6_CF (0x3<<6)
826 #define __TSTORM_FCOE_AG_CONTEXT_AUX6_CF_SHIFT 6
827 #define __TSTORM_FCOE_AG_CONTEXT_AUX7_CF (0x3<<8)
828 #define __TSTORM_FCOE_AG_CONTEXT_AUX7_CF_SHIFT 8
829 #define __TSTORM_FCOE_AG_CONTEXT_AUX7_FLAG (0x1<<10)
830 #define __TSTORM_FCOE_AG_CONTEXT_AUX7_FLAG_SHIFT 10
831 #define __TSTORM_FCOE_AG_CONTEXT_QUEUE0_FLUSH_CF_EN (0x1<<11)
832 #define __TSTORM_FCOE_AG_CONTEXT_QUEUE0_FLUSH_CF_EN_SHIFT 11
833 #define TSTORM_FCOE_AG_CONTEXT_AUX4_CF_EN (0x1<<12)
834 #define TSTORM_FCOE_AG_CONTEXT_AUX4_CF_EN_SHIFT 12
835 #define TSTORM_FCOE_AG_CONTEXT_AUX5_CF_EN (0x1<<13)
836 #define TSTORM_FCOE_AG_CONTEXT_AUX5_CF_EN_SHIFT 13
837 #define TSTORM_FCOE_AG_CONTEXT_AUX6_CF_EN (0x1<<14)
838 #define TSTORM_FCOE_AG_CONTEXT_AUX6_CF_EN_SHIFT 14
839 #define TSTORM_FCOE_AG_CONTEXT_AUX7_CF_EN (0x1<<15)
840 #define TSTORM_FCOE_AG_CONTEXT_AUX7_CF_EN_SHIFT 15
841 #elif defined(__LITTLE_ENDIAN)
843 #define __TSTORM_FCOE_AG_CONTEXT_AUX5_FLAG (0x1<<0)
844 #define __TSTORM_FCOE_AG_CONTEXT_AUX5_FLAG_SHIFT 0
845 #define __TSTORM_FCOE_AG_CONTEXT_AUX6_FLAG (0x1<<1)
846 #define __TSTORM_FCOE_AG_CONTEXT_AUX6_FLAG_SHIFT 1
847 #define __TSTORM_FCOE_AG_CONTEXT_AUX4_CF (0x3<<2)
848 #define __TSTORM_FCOE_AG_CONTEXT_AUX4_CF_SHIFT 2
849 #define __TSTORM_FCOE_AG_CONTEXT_AUX5_CF (0x3<<4)
850 #define __TSTORM_FCOE_AG_CONTEXT_AUX5_CF_SHIFT 4
851 #define __TSTORM_FCOE_AG_CONTEXT_AUX6_CF (0x3<<6)
852 #define __TSTORM_FCOE_AG_CONTEXT_AUX6_CF_SHIFT 6
853 #define __TSTORM_FCOE_AG_CONTEXT_AUX7_CF (0x3<<8)
854 #define __TSTORM_FCOE_AG_CONTEXT_AUX7_CF_SHIFT 8
855 #define __TSTORM_FCOE_AG_CONTEXT_AUX7_FLAG (0x1<<10)
856 #define __TSTORM_FCOE_AG_CONTEXT_AUX7_FLAG_SHIFT 10
857 #define __TSTORM_FCOE_AG_CONTEXT_QUEUE0_FLUSH_CF_EN (0x1<<11)
858 #define __TSTORM_FCOE_AG_CONTEXT_QUEUE0_FLUSH_CF_EN_SHIFT 11
859 #define TSTORM_FCOE_AG_CONTEXT_AUX4_CF_EN (0x1<<12)
860 #define TSTORM_FCOE_AG_CONTEXT_AUX4_CF_EN_SHIFT 12
861 #define TSTORM_FCOE_AG_CONTEXT_AUX5_CF_EN (0x1<<13)
862 #define TSTORM_FCOE_AG_CONTEXT_AUX5_CF_EN_SHIFT 13
863 #define TSTORM_FCOE_AG_CONTEXT_AUX6_CF_EN (0x1<<14)
864 #define TSTORM_FCOE_AG_CONTEXT_AUX6_CF_EN_SHIFT 14
865 #define TSTORM_FCOE_AG_CONTEXT_AUX7_CF_EN (0x1<<15)
866 #define TSTORM_FCOE_AG_CONTEXT_AUX7_CF_EN_SHIFT 15
869 struct tstorm_fcoe_extra_ag_context_section __extra_section
;
875 * The tcp aggregative context section of Tstorm
877 struct tstorm_tcp_tcp_ag_context_section
{
879 #if defined(__BIG_ENDIAN)
883 #elif defined(__LITTLE_ENDIAN)
888 #if defined(__BIG_ENDIAN)
892 #elif defined(__LITTLE_ENDIAN)
900 u32 wnd_right_edge_local
;
903 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_FIN_SENT_FLAG (0x1<<0)
904 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_FIN_SENT_FLAG_SHIFT 0
905 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_LAST_PACKET_FIN_FLAG (0x1<<1)
906 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_LAST_PACKET_FIN_FLAG_SHIFT 1
907 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_WND_UPD_CF (0x3<<2)
908 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_WND_UPD_CF_SHIFT 2
909 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_TIMEOUT_CF (0x3<<4)
910 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_TIMEOUT_CF_SHIFT 4
911 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_WND_UPD_CF_EN (0x1<<6)
912 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_WND_UPD_CF_EN_SHIFT 6
913 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_TIMEOUT_CF_EN (0x1<<7)
914 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_TIMEOUT_CF_EN_SHIFT 7
915 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_RETRANSMIT_SEQ_EN (0x1<<8)
916 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_RETRANSMIT_SEQ_EN_SHIFT 8
917 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_SND_NXT_EN (0x1<<9)
918 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_SND_NXT_EN_SHIFT 9
919 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_FLAG (0x1<<10)
920 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_FLAG_SHIFT 10
921 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX2_FLAG (0x1<<11)
922 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX2_FLAG_SHIFT 11
923 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_CF_EN (0x1<<12)
924 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_CF_EN_SHIFT 12
925 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX2_CF_EN (0x1<<13)
926 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX2_CF_EN_SHIFT 13
927 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_CF (0x3<<14)
928 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_CF_SHIFT 14
929 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX2_CF (0x3<<16)
930 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX2_CF_SHIFT 16
931 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_BLOCKED (0x1<<18)
932 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_BLOCKED_SHIFT 18
933 #define __TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX10_CF_EN (0x1<<19)
934 #define __TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX10_CF_EN_SHIFT 19
935 #define __TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX11_CF_EN (0x1<<20)
936 #define __TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX11_CF_EN_SHIFT 20
937 #define __TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX12_CF_EN (0x1<<21)
938 #define __TSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX12_CF_EN_SHIFT 21
939 #define __TSTORM_TCP_TCP_AG_CONTEXT_SECTION_RESERVED1 (0x3<<22)
940 #define __TSTORM_TCP_TCP_AG_CONTEXT_SECTION_RESERVED1_SHIFT 22
941 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_RETRANSMIT_PEND_SEQ (0xF<<24)
942 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_RETRANSMIT_PEND_SEQ_SHIFT 24
943 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_RETRANSMIT_DONE_SEQ (0xF<<28)
944 #define TSTORM_TCP_TCP_AG_CONTEXT_SECTION_RETRANSMIT_DONE_SEQ_SHIFT 28
951 * The iscsi aggregative context of Tstorm
953 struct tstorm_iscsi_ag_context
{
954 #if defined(__BIG_ENDIAN)
957 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
958 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
959 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
960 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
961 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<2)
962 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 2
963 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<3)
964 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 3
965 #define __TSTORM_ISCSI_AG_CONTEXT_QUEUES_FLUSH_Q0_CF (0x3<<4)
966 #define __TSTORM_ISCSI_AG_CONTEXT_QUEUES_FLUSH_Q0_CF_SHIFT 4
967 #define __TSTORM_ISCSI_AG_CONTEXT_AUX3_FLAG (0x1<<6)
968 #define __TSTORM_ISCSI_AG_CONTEXT_AUX3_FLAG_SHIFT 6
969 #define __TSTORM_ISCSI_AG_CONTEXT_ACK_ON_FIN_SENT_FLAG (0x1<<7)
970 #define __TSTORM_ISCSI_AG_CONTEXT_ACK_ON_FIN_SENT_FLAG_SHIFT 7
972 #elif defined(__LITTLE_ENDIAN)
975 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
976 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
977 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
978 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
979 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<2)
980 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 2
981 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<3)
982 #define TSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 3
983 #define __TSTORM_ISCSI_AG_CONTEXT_QUEUES_FLUSH_Q0_CF (0x3<<4)
984 #define __TSTORM_ISCSI_AG_CONTEXT_QUEUES_FLUSH_Q0_CF_SHIFT 4
985 #define __TSTORM_ISCSI_AG_CONTEXT_AUX3_FLAG (0x1<<6)
986 #define __TSTORM_ISCSI_AG_CONTEXT_AUX3_FLAG_SHIFT 6
987 #define __TSTORM_ISCSI_AG_CONTEXT_ACK_ON_FIN_SENT_FLAG (0x1<<7)
988 #define __TSTORM_ISCSI_AG_CONTEXT_ACK_ON_FIN_SENT_FLAG_SHIFT 7
991 #if defined(__BIG_ENDIAN)
994 #define __TSTORM_ISCSI_AG_CONTEXT_MSL_TIMER_SET_FLAG (0x1<<0)
995 #define __TSTORM_ISCSI_AG_CONTEXT_MSL_TIMER_SET_FLAG_SHIFT 0
996 #define __TSTORM_ISCSI_AG_CONTEXT_FIN_SENT_FIRST_FLAG (0x1<<1)
997 #define __TSTORM_ISCSI_AG_CONTEXT_FIN_SENT_FIRST_FLAG_SHIFT 1
998 #define __TSTORM_ISCSI_AG_CONTEXT_RST_SENT_CF (0x3<<2)
999 #define __TSTORM_ISCSI_AG_CONTEXT_RST_SENT_CF_SHIFT 2
1000 #define __TSTORM_ISCSI_AG_CONTEXT_WAKEUP_CALL_CF (0x3<<4)
1001 #define __TSTORM_ISCSI_AG_CONTEXT_WAKEUP_CALL_CF_SHIFT 4
1002 #define __TSTORM_ISCSI_AG_CONTEXT_AUX6_CF (0x3<<6)
1003 #define __TSTORM_ISCSI_AG_CONTEXT_AUX6_CF_SHIFT 6
1004 #define __TSTORM_ISCSI_AG_CONTEXT_AUX7_CF (0x3<<8)
1005 #define __TSTORM_ISCSI_AG_CONTEXT_AUX7_CF_SHIFT 8
1006 #define __TSTORM_ISCSI_AG_CONTEXT_AUX7_FLAG (0x1<<10)
1007 #define __TSTORM_ISCSI_AG_CONTEXT_AUX7_FLAG_SHIFT 10
1008 #define __TSTORM_ISCSI_AG_CONTEXT_QUEUES_FLUSH_Q0_CF_EN (0x1<<11)
1009 #define __TSTORM_ISCSI_AG_CONTEXT_QUEUES_FLUSH_Q0_CF_EN_SHIFT 11
1010 #define __TSTORM_ISCSI_AG_CONTEXT_RST_SENT_CF_EN (0x1<<12)
1011 #define __TSTORM_ISCSI_AG_CONTEXT_RST_SENT_CF_EN_SHIFT 12
1012 #define __TSTORM_ISCSI_AG_CONTEXT_WAKEUP_CALL_CF_EN (0x1<<13)
1013 #define __TSTORM_ISCSI_AG_CONTEXT_WAKEUP_CALL_CF_EN_SHIFT 13
1014 #define TSTORM_ISCSI_AG_CONTEXT_AUX6_CF_EN (0x1<<14)
1015 #define TSTORM_ISCSI_AG_CONTEXT_AUX6_CF_EN_SHIFT 14
1016 #define TSTORM_ISCSI_AG_CONTEXT_AUX7_CF_EN (0x1<<15)
1017 #define TSTORM_ISCSI_AG_CONTEXT_AUX7_CF_EN_SHIFT 15
1018 #elif defined(__LITTLE_ENDIAN)
1020 #define __TSTORM_ISCSI_AG_CONTEXT_MSL_TIMER_SET_FLAG (0x1<<0)
1021 #define __TSTORM_ISCSI_AG_CONTEXT_MSL_TIMER_SET_FLAG_SHIFT 0
1022 #define __TSTORM_ISCSI_AG_CONTEXT_FIN_SENT_FIRST_FLAG (0x1<<1)
1023 #define __TSTORM_ISCSI_AG_CONTEXT_FIN_SENT_FIRST_FLAG_SHIFT 1
1024 #define __TSTORM_ISCSI_AG_CONTEXT_RST_SENT_CF (0x3<<2)
1025 #define __TSTORM_ISCSI_AG_CONTEXT_RST_SENT_CF_SHIFT 2
1026 #define __TSTORM_ISCSI_AG_CONTEXT_WAKEUP_CALL_CF (0x3<<4)
1027 #define __TSTORM_ISCSI_AG_CONTEXT_WAKEUP_CALL_CF_SHIFT 4
1028 #define __TSTORM_ISCSI_AG_CONTEXT_AUX6_CF (0x3<<6)
1029 #define __TSTORM_ISCSI_AG_CONTEXT_AUX6_CF_SHIFT 6
1030 #define __TSTORM_ISCSI_AG_CONTEXT_AUX7_CF (0x3<<8)
1031 #define __TSTORM_ISCSI_AG_CONTEXT_AUX7_CF_SHIFT 8
1032 #define __TSTORM_ISCSI_AG_CONTEXT_AUX7_FLAG (0x1<<10)
1033 #define __TSTORM_ISCSI_AG_CONTEXT_AUX7_FLAG_SHIFT 10
1034 #define __TSTORM_ISCSI_AG_CONTEXT_QUEUES_FLUSH_Q0_CF_EN (0x1<<11)
1035 #define __TSTORM_ISCSI_AG_CONTEXT_QUEUES_FLUSH_Q0_CF_EN_SHIFT 11
1036 #define __TSTORM_ISCSI_AG_CONTEXT_RST_SENT_CF_EN (0x1<<12)
1037 #define __TSTORM_ISCSI_AG_CONTEXT_RST_SENT_CF_EN_SHIFT 12
1038 #define __TSTORM_ISCSI_AG_CONTEXT_WAKEUP_CALL_CF_EN (0x1<<13)
1039 #define __TSTORM_ISCSI_AG_CONTEXT_WAKEUP_CALL_CF_EN_SHIFT 13
1040 #define TSTORM_ISCSI_AG_CONTEXT_AUX6_CF_EN (0x1<<14)
1041 #define TSTORM_ISCSI_AG_CONTEXT_AUX6_CF_EN_SHIFT 14
1042 #define TSTORM_ISCSI_AG_CONTEXT_AUX7_CF_EN (0x1<<15)
1043 #define TSTORM_ISCSI_AG_CONTEXT_AUX7_CF_EN_SHIFT 15
1046 struct tstorm_tcp_tcp_ag_context_section tcp
;
1052 * The fcoe aggregative context of Ustorm
1054 struct ustorm_fcoe_ag_context
{
1055 #if defined(__BIG_ENDIAN)
1056 u8 __aux_counter_flags
;
1058 #define USTORM_FCOE_AG_CONTEXT_TX_CF (0x3<<0)
1059 #define USTORM_FCOE_AG_CONTEXT_TX_CF_SHIFT 0
1060 #define __USTORM_FCOE_AG_CONTEXT_TIMER_CF (0x3<<2)
1061 #define __USTORM_FCOE_AG_CONTEXT_TIMER_CF_SHIFT 2
1062 #define USTORM_FCOE_AG_CONTEXT_AGG_MISC4_RULE (0x7<<4)
1063 #define USTORM_FCOE_AG_CONTEXT_AGG_MISC4_RULE_SHIFT 4
1064 #define __USTORM_FCOE_AG_CONTEXT_AGG_VAL2_MASK (0x1<<7)
1065 #define __USTORM_FCOE_AG_CONTEXT_AGG_VAL2_MASK_SHIFT 7
1067 #define __USTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
1068 #define __USTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
1069 #define USTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
1070 #define USTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
1071 #define USTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<2)
1072 #define USTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 2
1073 #define USTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<3)
1074 #define USTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 3
1075 #define USTORM_FCOE_AG_CONTEXT_INV_CF (0x3<<4)
1076 #define USTORM_FCOE_AG_CONTEXT_INV_CF_SHIFT 4
1077 #define USTORM_FCOE_AG_CONTEXT_COMPLETION_CF (0x3<<6)
1078 #define USTORM_FCOE_AG_CONTEXT_COMPLETION_CF_SHIFT 6
1080 #elif defined(__LITTLE_ENDIAN)
1083 #define __USTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
1084 #define __USTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
1085 #define USTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
1086 #define USTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
1087 #define USTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<2)
1088 #define USTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 2
1089 #define USTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<3)
1090 #define USTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 3
1091 #define USTORM_FCOE_AG_CONTEXT_INV_CF (0x3<<4)
1092 #define USTORM_FCOE_AG_CONTEXT_INV_CF_SHIFT 4
1093 #define USTORM_FCOE_AG_CONTEXT_COMPLETION_CF (0x3<<6)
1094 #define USTORM_FCOE_AG_CONTEXT_COMPLETION_CF_SHIFT 6
1096 #define USTORM_FCOE_AG_CONTEXT_TX_CF (0x3<<0)
1097 #define USTORM_FCOE_AG_CONTEXT_TX_CF_SHIFT 0
1098 #define __USTORM_FCOE_AG_CONTEXT_TIMER_CF (0x3<<2)
1099 #define __USTORM_FCOE_AG_CONTEXT_TIMER_CF_SHIFT 2
1100 #define USTORM_FCOE_AG_CONTEXT_AGG_MISC4_RULE (0x7<<4)
1101 #define USTORM_FCOE_AG_CONTEXT_AGG_MISC4_RULE_SHIFT 4
1102 #define __USTORM_FCOE_AG_CONTEXT_AGG_VAL2_MASK (0x1<<7)
1103 #define __USTORM_FCOE_AG_CONTEXT_AGG_VAL2_MASK_SHIFT 7
1104 u8 __aux_counter_flags
;
1106 #if defined(__BIG_ENDIAN)
1110 #elif defined(__LITTLE_ENDIAN)
1116 #if defined(__BIG_ENDIAN)
1120 #elif defined(__LITTLE_ENDIAN)
1125 u32 expired_task_id
;
1127 #if defined(__BIG_ENDIAN)
1130 #elif defined(__LITTLE_ENDIAN)
1134 #if defined(__BIG_ENDIAN)
1137 #define USTORM_FCOE_AG_CONTEXT_CQ_DEC_RULE (0x7<<0)
1138 #define USTORM_FCOE_AG_CONTEXT_CQ_DEC_RULE_SHIFT 0
1139 #define __USTORM_FCOE_AG_CONTEXT_AGG_VAL3_RULE (0x7<<3)
1140 #define __USTORM_FCOE_AG_CONTEXT_AGG_VAL3_RULE_SHIFT 3
1141 #define USTORM_FCOE_AG_CONTEXT_CQ_ARM_N_FLAG (0x1<<6)
1142 #define USTORM_FCOE_AG_CONTEXT_CQ_ARM_N_FLAG_SHIFT 6
1143 #define __USTORM_FCOE_AG_CONTEXT_RESERVED1 (0x1<<7)
1144 #define __USTORM_FCOE_AG_CONTEXT_RESERVED1_SHIFT 7
1145 u8 decision_rule_enable_bits
;
1146 #define __USTORM_FCOE_AG_CONTEXT_RESERVED_INV_CF_EN (0x1<<0)
1147 #define __USTORM_FCOE_AG_CONTEXT_RESERVED_INV_CF_EN_SHIFT 0
1148 #define USTORM_FCOE_AG_CONTEXT_COMPLETION_CF_EN (0x1<<1)
1149 #define USTORM_FCOE_AG_CONTEXT_COMPLETION_CF_EN_SHIFT 1
1150 #define USTORM_FCOE_AG_CONTEXT_TX_CF_EN (0x1<<2)
1151 #define USTORM_FCOE_AG_CONTEXT_TX_CF_EN_SHIFT 2
1152 #define __USTORM_FCOE_AG_CONTEXT_TIMER_CF_EN (0x1<<3)
1153 #define __USTORM_FCOE_AG_CONTEXT_TIMER_CF_EN_SHIFT 3
1154 #define __USTORM_FCOE_AG_CONTEXT_AUX1_CF_EN (0x1<<4)
1155 #define __USTORM_FCOE_AG_CONTEXT_AUX1_CF_EN_SHIFT 4
1156 #define __USTORM_FCOE_AG_CONTEXT_QUEUE0_CF_EN (0x1<<5)
1157 #define __USTORM_FCOE_AG_CONTEXT_QUEUE0_CF_EN_SHIFT 5
1158 #define __USTORM_FCOE_AG_CONTEXT_AUX3_CF_EN (0x1<<6)
1159 #define __USTORM_FCOE_AG_CONTEXT_AUX3_CF_EN_SHIFT 6
1160 #define __USTORM_FCOE_AG_CONTEXT_DQ_CF_EN (0x1<<7)
1161 #define __USTORM_FCOE_AG_CONTEXT_DQ_CF_EN_SHIFT 7
1162 #elif defined(__LITTLE_ENDIAN)
1163 u8 decision_rule_enable_bits
;
1164 #define __USTORM_FCOE_AG_CONTEXT_RESERVED_INV_CF_EN (0x1<<0)
1165 #define __USTORM_FCOE_AG_CONTEXT_RESERVED_INV_CF_EN_SHIFT 0
1166 #define USTORM_FCOE_AG_CONTEXT_COMPLETION_CF_EN (0x1<<1)
1167 #define USTORM_FCOE_AG_CONTEXT_COMPLETION_CF_EN_SHIFT 1
1168 #define USTORM_FCOE_AG_CONTEXT_TX_CF_EN (0x1<<2)
1169 #define USTORM_FCOE_AG_CONTEXT_TX_CF_EN_SHIFT 2
1170 #define __USTORM_FCOE_AG_CONTEXT_TIMER_CF_EN (0x1<<3)
1171 #define __USTORM_FCOE_AG_CONTEXT_TIMER_CF_EN_SHIFT 3
1172 #define __USTORM_FCOE_AG_CONTEXT_AUX1_CF_EN (0x1<<4)
1173 #define __USTORM_FCOE_AG_CONTEXT_AUX1_CF_EN_SHIFT 4
1174 #define __USTORM_FCOE_AG_CONTEXT_QUEUE0_CF_EN (0x1<<5)
1175 #define __USTORM_FCOE_AG_CONTEXT_QUEUE0_CF_EN_SHIFT 5
1176 #define __USTORM_FCOE_AG_CONTEXT_AUX3_CF_EN (0x1<<6)
1177 #define __USTORM_FCOE_AG_CONTEXT_AUX3_CF_EN_SHIFT 6
1178 #define __USTORM_FCOE_AG_CONTEXT_DQ_CF_EN (0x1<<7)
1179 #define __USTORM_FCOE_AG_CONTEXT_DQ_CF_EN_SHIFT 7
1181 #define USTORM_FCOE_AG_CONTEXT_CQ_DEC_RULE (0x7<<0)
1182 #define USTORM_FCOE_AG_CONTEXT_CQ_DEC_RULE_SHIFT 0
1183 #define __USTORM_FCOE_AG_CONTEXT_AGG_VAL3_RULE (0x7<<3)
1184 #define __USTORM_FCOE_AG_CONTEXT_AGG_VAL3_RULE_SHIFT 3
1185 #define USTORM_FCOE_AG_CONTEXT_CQ_ARM_N_FLAG (0x1<<6)
1186 #define USTORM_FCOE_AG_CONTEXT_CQ_ARM_N_FLAG_SHIFT 6
1187 #define __USTORM_FCOE_AG_CONTEXT_RESERVED1 (0x1<<7)
1188 #define __USTORM_FCOE_AG_CONTEXT_RESERVED1_SHIFT 7
1195 * The iscsi aggregative context of Ustorm
1197 struct ustorm_iscsi_ag_context
{
1198 #if defined(__BIG_ENDIAN)
1199 u8 __aux_counter_flags
;
1201 #define USTORM_ISCSI_AG_CONTEXT_TX_CF (0x3<<0)
1202 #define USTORM_ISCSI_AG_CONTEXT_TX_CF_SHIFT 0
1203 #define __USTORM_ISCSI_AG_CONTEXT_TIMER_CF (0x3<<2)
1204 #define __USTORM_ISCSI_AG_CONTEXT_TIMER_CF_SHIFT 2
1205 #define USTORM_ISCSI_AG_CONTEXT_AGG_MISC4_RULE (0x7<<4)
1206 #define USTORM_ISCSI_AG_CONTEXT_AGG_MISC4_RULE_SHIFT 4
1207 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_MASK (0x1<<7)
1208 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_MASK_SHIFT 7
1210 #define __USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
1211 #define __USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
1212 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
1213 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
1214 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<2)
1215 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 2
1216 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<3)
1217 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 3
1218 #define USTORM_ISCSI_AG_CONTEXT_INV_CF (0x3<<4)
1219 #define USTORM_ISCSI_AG_CONTEXT_INV_CF_SHIFT 4
1220 #define USTORM_ISCSI_AG_CONTEXT_COMPLETION_CF (0x3<<6)
1221 #define USTORM_ISCSI_AG_CONTEXT_COMPLETION_CF_SHIFT 6
1223 #elif defined(__LITTLE_ENDIAN)
1226 #define __USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
1227 #define __USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
1228 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
1229 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
1230 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<2)
1231 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 2
1232 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<3)
1233 #define USTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 3
1234 #define USTORM_ISCSI_AG_CONTEXT_INV_CF (0x3<<4)
1235 #define USTORM_ISCSI_AG_CONTEXT_INV_CF_SHIFT 4
1236 #define USTORM_ISCSI_AG_CONTEXT_COMPLETION_CF (0x3<<6)
1237 #define USTORM_ISCSI_AG_CONTEXT_COMPLETION_CF_SHIFT 6
1239 #define USTORM_ISCSI_AG_CONTEXT_TX_CF (0x3<<0)
1240 #define USTORM_ISCSI_AG_CONTEXT_TX_CF_SHIFT 0
1241 #define __USTORM_ISCSI_AG_CONTEXT_TIMER_CF (0x3<<2)
1242 #define __USTORM_ISCSI_AG_CONTEXT_TIMER_CF_SHIFT 2
1243 #define USTORM_ISCSI_AG_CONTEXT_AGG_MISC4_RULE (0x7<<4)
1244 #define USTORM_ISCSI_AG_CONTEXT_AGG_MISC4_RULE_SHIFT 4
1245 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_MASK (0x1<<7)
1246 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_MASK_SHIFT 7
1247 u8 __aux_counter_flags
;
1249 #if defined(__BIG_ENDIAN)
1252 u16 __cq_local_comp_itt_val
;
1253 #elif defined(__LITTLE_ENDIAN)
1254 u16 __cq_local_comp_itt_val
;
1259 #if defined(__BIG_ENDIAN)
1263 #elif defined(__LITTLE_ENDIAN)
1270 #if defined(__BIG_ENDIAN)
1273 #elif defined(__LITTLE_ENDIAN)
1277 #if defined(__BIG_ENDIAN)
1280 #define USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_RULE (0x7<<0)
1281 #define USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_RULE_SHIFT 0
1282 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL3_RULE (0x7<<3)
1283 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL3_RULE_SHIFT 3
1284 #define USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_ARM_N_FLAG (0x1<<6)
1285 #define USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_ARM_N_FLAG_SHIFT 6
1286 #define __USTORM_ISCSI_AG_CONTEXT_RESERVED1 (0x1<<7)
1287 #define __USTORM_ISCSI_AG_CONTEXT_RESERVED1_SHIFT 7
1288 u8 decision_rule_enable_bits
;
1289 #define USTORM_ISCSI_AG_CONTEXT_INV_CF_EN (0x1<<0)
1290 #define USTORM_ISCSI_AG_CONTEXT_INV_CF_EN_SHIFT 0
1291 #define USTORM_ISCSI_AG_CONTEXT_COMPLETION_CF_EN (0x1<<1)
1292 #define USTORM_ISCSI_AG_CONTEXT_COMPLETION_CF_EN_SHIFT 1
1293 #define USTORM_ISCSI_AG_CONTEXT_TX_CF_EN (0x1<<2)
1294 #define USTORM_ISCSI_AG_CONTEXT_TX_CF_EN_SHIFT 2
1295 #define __USTORM_ISCSI_AG_CONTEXT_TIMER_CF_EN (0x1<<3)
1296 #define __USTORM_ISCSI_AG_CONTEXT_TIMER_CF_EN_SHIFT 3
1297 #define __USTORM_ISCSI_AG_CONTEXT_CQ_LOCAL_COMP_CF_EN (0x1<<4)
1298 #define __USTORM_ISCSI_AG_CONTEXT_CQ_LOCAL_COMP_CF_EN_SHIFT 4
1299 #define __USTORM_ISCSI_AG_CONTEXT_QUEUES_FLUSH_Q0_CF_EN (0x1<<5)
1300 #define __USTORM_ISCSI_AG_CONTEXT_QUEUES_FLUSH_Q0_CF_EN_SHIFT 5
1301 #define __USTORM_ISCSI_AG_CONTEXT_AUX3_CF_EN (0x1<<6)
1302 #define __USTORM_ISCSI_AG_CONTEXT_AUX3_CF_EN_SHIFT 6
1303 #define __USTORM_ISCSI_AG_CONTEXT_DQ_CF_EN (0x1<<7)
1304 #define __USTORM_ISCSI_AG_CONTEXT_DQ_CF_EN_SHIFT 7
1305 #elif defined(__LITTLE_ENDIAN)
1306 u8 decision_rule_enable_bits
;
1307 #define USTORM_ISCSI_AG_CONTEXT_INV_CF_EN (0x1<<0)
1308 #define USTORM_ISCSI_AG_CONTEXT_INV_CF_EN_SHIFT 0
1309 #define USTORM_ISCSI_AG_CONTEXT_COMPLETION_CF_EN (0x1<<1)
1310 #define USTORM_ISCSI_AG_CONTEXT_COMPLETION_CF_EN_SHIFT 1
1311 #define USTORM_ISCSI_AG_CONTEXT_TX_CF_EN (0x1<<2)
1312 #define USTORM_ISCSI_AG_CONTEXT_TX_CF_EN_SHIFT 2
1313 #define __USTORM_ISCSI_AG_CONTEXT_TIMER_CF_EN (0x1<<3)
1314 #define __USTORM_ISCSI_AG_CONTEXT_TIMER_CF_EN_SHIFT 3
1315 #define __USTORM_ISCSI_AG_CONTEXT_CQ_LOCAL_COMP_CF_EN (0x1<<4)
1316 #define __USTORM_ISCSI_AG_CONTEXT_CQ_LOCAL_COMP_CF_EN_SHIFT 4
1317 #define __USTORM_ISCSI_AG_CONTEXT_QUEUES_FLUSH_Q0_CF_EN (0x1<<5)
1318 #define __USTORM_ISCSI_AG_CONTEXT_QUEUES_FLUSH_Q0_CF_EN_SHIFT 5
1319 #define __USTORM_ISCSI_AG_CONTEXT_AUX3_CF_EN (0x1<<6)
1320 #define __USTORM_ISCSI_AG_CONTEXT_AUX3_CF_EN_SHIFT 6
1321 #define __USTORM_ISCSI_AG_CONTEXT_DQ_CF_EN (0x1<<7)
1322 #define __USTORM_ISCSI_AG_CONTEXT_DQ_CF_EN_SHIFT 7
1324 #define USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_RULE (0x7<<0)
1325 #define USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_RULE_SHIFT 0
1326 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL3_RULE (0x7<<3)
1327 #define __USTORM_ISCSI_AG_CONTEXT_AGG_VAL3_RULE_SHIFT 3
1328 #define USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_ARM_N_FLAG (0x1<<6)
1329 #define USTORM_ISCSI_AG_CONTEXT_AGG_VAL2_ARM_N_FLAG_SHIFT 6
1330 #define __USTORM_ISCSI_AG_CONTEXT_RESERVED1 (0x1<<7)
1331 #define __USTORM_ISCSI_AG_CONTEXT_RESERVED1_SHIFT 7
1338 * The fcoe aggregative context section of Xstorm
1340 struct xstorm_fcoe_extra_ag_context_section
{
1341 #if defined(__BIG_ENDIAN)
1343 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED51 (0x3<<0)
1344 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED51_SHIFT 0
1345 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_ACK_TO_FE_UPDATED (0x3<<2)
1346 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_ACK_TO_FE_UPDATED_SHIFT 2
1347 #define XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_SIDEBAND_SENT_CF (0x3<<4)
1348 #define XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_SIDEBAND_SENT_CF_SHIFT 4
1349 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED_CLEAR_DA_TIMER_EN (0x1<<6)
1350 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED_CLEAR_DA_TIMER_EN_SHIFT 6
1351 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED_DA_EXPIRATION_FLAG (0x1<<7)
1352 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED_DA_EXPIRATION_FLAG_SHIFT 7
1353 u8 __reserved_da_cnt
;
1355 #elif defined(__LITTLE_ENDIAN)
1357 u8 __reserved_da_cnt
;
1359 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED51 (0x3<<0)
1360 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED51_SHIFT 0
1361 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_ACK_TO_FE_UPDATED (0x3<<2)
1362 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_ACK_TO_FE_UPDATED_SHIFT 2
1363 #define XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_SIDEBAND_SENT_CF (0x3<<4)
1364 #define XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_SIDEBAND_SENT_CF_SHIFT 4
1365 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED_CLEAR_DA_TIMER_EN (0x1<<6)
1366 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED_CLEAR_DA_TIMER_EN_SHIFT 6
1367 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED_DA_EXPIRATION_FLAG (0x1<<7)
1368 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED_DA_EXPIRATION_FLAG_SHIFT 7
1371 u32 __xfrqe_bd_addr_lo
;
1372 u32 __xfrqe_bd_addr_hi
;
1374 #if defined(__BIG_ENDIAN)
1378 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED57 (0x1<<0)
1379 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED57_SHIFT 0
1380 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED58 (0x1<<1)
1381 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED58_SHIFT 1
1382 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED59 (0x1<<2)
1383 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED59_SHIFT 2
1384 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX3_FLAG (0x1<<3)
1385 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX3_FLAG_SHIFT 3
1386 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX4_FLAG (0x1<<4)
1387 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX4_FLAG_SHIFT 4
1388 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED60 (0x1<<5)
1389 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED60_SHIFT 5
1390 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED_ACK_TO_FE_UPDATED_EN (0x1<<6)
1391 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED_ACK_TO_FE_UPDATED_EN_SHIFT 6
1392 #define XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_SIDEBAND_SENT_CF_EN (0x1<<7)
1393 #define XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_SIDEBAND_SENT_CF_EN_SHIFT 7
1394 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED_TX_FIN_FLAG_EN (0x1<<8)
1395 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED_TX_FIN_FLAG_EN_SHIFT 8
1396 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX1_FLAG (0x1<<9)
1397 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX1_FLAG_SHIFT 9
1398 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_SET_RTO_CF (0x3<<10)
1399 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_SET_RTO_CF_SHIFT 10
1400 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_TS_TO_ECHO_UPDATED_CF (0x3<<12)
1401 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_TS_TO_ECHO_UPDATED_CF_SHIFT 12
1402 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_TX_DEST_UPDATED_CF (0x3<<14)
1403 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_TX_DEST_UPDATED_CF_SHIFT 14
1404 #elif defined(__LITTLE_ENDIAN)
1406 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED57 (0x1<<0)
1407 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED57_SHIFT 0
1408 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED58 (0x1<<1)
1409 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED58_SHIFT 1
1410 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED59 (0x1<<2)
1411 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED59_SHIFT 2
1412 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX3_FLAG (0x1<<3)
1413 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX3_FLAG_SHIFT 3
1414 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX4_FLAG (0x1<<4)
1415 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX4_FLAG_SHIFT 4
1416 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED60 (0x1<<5)
1417 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED60_SHIFT 5
1418 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED_ACK_TO_FE_UPDATED_EN (0x1<<6)
1419 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED_ACK_TO_FE_UPDATED_EN_SHIFT 6
1420 #define XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_SIDEBAND_SENT_CF_EN (0x1<<7)
1421 #define XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_SIDEBAND_SENT_CF_EN_SHIFT 7
1422 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED_TX_FIN_FLAG_EN (0x1<<8)
1423 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_RESERVED_TX_FIN_FLAG_EN_SHIFT 8
1424 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX1_FLAG (0x1<<9)
1425 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_AUX1_FLAG_SHIFT 9
1426 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_SET_RTO_CF (0x3<<10)
1427 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_SET_RTO_CF_SHIFT 10
1428 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_TS_TO_ECHO_UPDATED_CF (0x3<<12)
1429 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_TS_TO_ECHO_UPDATED_CF_SHIFT 12
1430 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_TX_DEST_UPDATED_CF (0x3<<14)
1431 #define __XSTORM_FCOE_EXTRA_AG_CONTEXT_SECTION_TX_DEST_UPDATED_CF_SHIFT 14
1435 u32 __sq_base_addr_lo
;
1436 u32 __sq_base_addr_hi
;
1437 u32 __xfrq_base_addr_lo
;
1438 u32 __xfrq_base_addr_hi
;
1439 #if defined(__BIG_ENDIAN)
1442 #elif defined(__LITTLE_ENDIAN)
1446 #if defined(__BIG_ENDIAN)
1450 u8 __reserved_force_pure_ack_cnt
;
1451 #elif defined(__LITTLE_ENDIAN)
1452 u8 __reserved_force_pure_ack_cnt
;
1457 u32 __tcp_agg_vars6
;
1458 #if defined(__BIG_ENDIAN)
1460 u16 __tcp_agg_vars7
;
1461 #elif defined(__LITTLE_ENDIAN)
1462 u16 __tcp_agg_vars7
;
1467 #if defined(__BIG_ENDIAN)
1471 #elif defined(__LITTLE_ENDIAN)
1479 * The fcoe aggregative context of Xstorm
1481 struct xstorm_fcoe_ag_context
{
1482 #if defined(__BIG_ENDIAN)
1485 #define __XSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
1486 #define __XSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
1487 #define __XSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
1488 #define __XSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
1489 #define __XSTORM_FCOE_AG_CONTEXT_RESERVED51 (0x1<<2)
1490 #define __XSTORM_FCOE_AG_CONTEXT_RESERVED51_SHIFT 2
1491 #define __XSTORM_FCOE_AG_CONTEXT_RESERVED52 (0x1<<3)
1492 #define __XSTORM_FCOE_AG_CONTEXT_RESERVED52_SHIFT 3
1493 #define __XSTORM_FCOE_AG_CONTEXT_MORE_TO_SEND_EN (0x1<<4)
1494 #define __XSTORM_FCOE_AG_CONTEXT_MORE_TO_SEND_EN_SHIFT 4
1495 #define XSTORM_FCOE_AG_CONTEXT_NAGLE_EN (0x1<<5)
1496 #define XSTORM_FCOE_AG_CONTEXT_NAGLE_EN_SHIFT 5
1497 #define __XSTORM_FCOE_AG_CONTEXT_DQ_SPARE_FLAG (0x1<<6)
1498 #define __XSTORM_FCOE_AG_CONTEXT_DQ_SPARE_FLAG_SHIFT 6
1499 #define __XSTORM_FCOE_AG_CONTEXT_RESERVED_UNA_GT_NXT_EN (0x1<<7)
1500 #define __XSTORM_FCOE_AG_CONTEXT_RESERVED_UNA_GT_NXT_EN_SHIFT 7
1502 #elif defined(__LITTLE_ENDIAN)
1505 #define __XSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
1506 #define __XSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
1507 #define __XSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
1508 #define __XSTORM_FCOE_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
1509 #define __XSTORM_FCOE_AG_CONTEXT_RESERVED51 (0x1<<2)
1510 #define __XSTORM_FCOE_AG_CONTEXT_RESERVED51_SHIFT 2
1511 #define __XSTORM_FCOE_AG_CONTEXT_RESERVED52 (0x1<<3)
1512 #define __XSTORM_FCOE_AG_CONTEXT_RESERVED52_SHIFT 3
1513 #define __XSTORM_FCOE_AG_CONTEXT_MORE_TO_SEND_EN (0x1<<4)
1514 #define __XSTORM_FCOE_AG_CONTEXT_MORE_TO_SEND_EN_SHIFT 4
1515 #define XSTORM_FCOE_AG_CONTEXT_NAGLE_EN (0x1<<5)
1516 #define XSTORM_FCOE_AG_CONTEXT_NAGLE_EN_SHIFT 5
1517 #define __XSTORM_FCOE_AG_CONTEXT_DQ_SPARE_FLAG (0x1<<6)
1518 #define __XSTORM_FCOE_AG_CONTEXT_DQ_SPARE_FLAG_SHIFT 6
1519 #define __XSTORM_FCOE_AG_CONTEXT_RESERVED_UNA_GT_NXT_EN (0x1<<7)
1520 #define __XSTORM_FCOE_AG_CONTEXT_RESERVED_UNA_GT_NXT_EN_SHIFT 7
1523 #if defined(__BIG_ENDIAN)
1527 #define XSTORM_FCOE_AG_CONTEXT_PHYSICAL_QUEUE_NUM2 (0x3F<<0)
1528 #define XSTORM_FCOE_AG_CONTEXT_PHYSICAL_QUEUE_NUM2_SHIFT 0
1529 #define __XSTORM_FCOE_AG_CONTEXT_AUX19_CF (0x3<<6)
1530 #define __XSTORM_FCOE_AG_CONTEXT_AUX19_CF_SHIFT 6
1532 #define __XSTORM_FCOE_AG_CONTEXT_DQ_CF (0x3<<0)
1533 #define __XSTORM_FCOE_AG_CONTEXT_DQ_CF_SHIFT 0
1534 #define __XSTORM_FCOE_AG_CONTEXT_DQ_SPARE_FLAG_EN (0x1<<2)
1535 #define __XSTORM_FCOE_AG_CONTEXT_DQ_SPARE_FLAG_EN_SHIFT 2
1536 #define __XSTORM_FCOE_AG_CONTEXT_AUX8_FLAG (0x1<<3)
1537 #define __XSTORM_FCOE_AG_CONTEXT_AUX8_FLAG_SHIFT 3
1538 #define __XSTORM_FCOE_AG_CONTEXT_AUX9_FLAG (0x1<<4)
1539 #define __XSTORM_FCOE_AG_CONTEXT_AUX9_FLAG_SHIFT 4
1540 #define XSTORM_FCOE_AG_CONTEXT_DECISION_RULE1 (0x3<<5)
1541 #define XSTORM_FCOE_AG_CONTEXT_DECISION_RULE1_SHIFT 5
1542 #define __XSTORM_FCOE_AG_CONTEXT_DQ_CF_EN (0x1<<7)
1543 #define __XSTORM_FCOE_AG_CONTEXT_DQ_CF_EN_SHIFT 7
1544 #elif defined(__LITTLE_ENDIAN)
1546 #define __XSTORM_FCOE_AG_CONTEXT_DQ_CF (0x3<<0)
1547 #define __XSTORM_FCOE_AG_CONTEXT_DQ_CF_SHIFT 0
1548 #define __XSTORM_FCOE_AG_CONTEXT_DQ_SPARE_FLAG_EN (0x1<<2)
1549 #define __XSTORM_FCOE_AG_CONTEXT_DQ_SPARE_FLAG_EN_SHIFT 2
1550 #define __XSTORM_FCOE_AG_CONTEXT_AUX8_FLAG (0x1<<3)
1551 #define __XSTORM_FCOE_AG_CONTEXT_AUX8_FLAG_SHIFT 3
1552 #define __XSTORM_FCOE_AG_CONTEXT_AUX9_FLAG (0x1<<4)
1553 #define __XSTORM_FCOE_AG_CONTEXT_AUX9_FLAG_SHIFT 4
1554 #define XSTORM_FCOE_AG_CONTEXT_DECISION_RULE1 (0x3<<5)
1555 #define XSTORM_FCOE_AG_CONTEXT_DECISION_RULE1_SHIFT 5
1556 #define __XSTORM_FCOE_AG_CONTEXT_DQ_CF_EN (0x1<<7)
1557 #define __XSTORM_FCOE_AG_CONTEXT_DQ_CF_EN_SHIFT 7
1559 #define XSTORM_FCOE_AG_CONTEXT_PHYSICAL_QUEUE_NUM2 (0x3F<<0)
1560 #define XSTORM_FCOE_AG_CONTEXT_PHYSICAL_QUEUE_NUM2_SHIFT 0
1561 #define __XSTORM_FCOE_AG_CONTEXT_AUX19_CF (0x3<<6)
1562 #define __XSTORM_FCOE_AG_CONTEXT_AUX19_CF_SHIFT 6
1567 #if defined(__BIG_ENDIAN)
1569 #define XSTORM_FCOE_AG_CONTEXT_DECISION_RULE5 (0x3<<0)
1570 #define XSTORM_FCOE_AG_CONTEXT_DECISION_RULE5_SHIFT 0
1571 #define XSTORM_FCOE_AG_CONTEXT_PHYSICAL_QUEUE_NUM0 (0x3F<<2)
1572 #define XSTORM_FCOE_AG_CONTEXT_PHYSICAL_QUEUE_NUM0_SHIFT 2
1573 #define XSTORM_FCOE_AG_CONTEXT_PHYSICAL_QUEUE_NUM1 (0x3F<<8)
1574 #define XSTORM_FCOE_AG_CONTEXT_PHYSICAL_QUEUE_NUM1_SHIFT 8
1575 #define __XSTORM_FCOE_AG_CONTEXT_CONFQ_DEC_RULE (0x3<<14)
1576 #define __XSTORM_FCOE_AG_CONTEXT_CONFQ_DEC_RULE_SHIFT 14
1578 #elif defined(__LITTLE_ENDIAN)
1581 #define XSTORM_FCOE_AG_CONTEXT_DECISION_RULE5 (0x3<<0)
1582 #define XSTORM_FCOE_AG_CONTEXT_DECISION_RULE5_SHIFT 0
1583 #define XSTORM_FCOE_AG_CONTEXT_PHYSICAL_QUEUE_NUM0 (0x3F<<2)
1584 #define XSTORM_FCOE_AG_CONTEXT_PHYSICAL_QUEUE_NUM0_SHIFT 2
1585 #define XSTORM_FCOE_AG_CONTEXT_PHYSICAL_QUEUE_NUM1 (0x3F<<8)
1586 #define XSTORM_FCOE_AG_CONTEXT_PHYSICAL_QUEUE_NUM1_SHIFT 8
1587 #define __XSTORM_FCOE_AG_CONTEXT_CONFQ_DEC_RULE (0x3<<14)
1588 #define __XSTORM_FCOE_AG_CONTEXT_CONFQ_DEC_RULE_SHIFT 14
1590 struct xstorm_fcoe_extra_ag_context_section __extra_section
;
1591 #if defined(__BIG_ENDIAN)
1593 #define __XSTORM_FCOE_AG_CONTEXT_AGG_VAL11_DECISION_RULE (0x7<<0)
1594 #define __XSTORM_FCOE_AG_CONTEXT_AGG_VAL11_DECISION_RULE_SHIFT 0
1595 #define __XSTORM_FCOE_AG_CONTEXT_AUX13_FLAG (0x1<<3)
1596 #define __XSTORM_FCOE_AG_CONTEXT_AUX13_FLAG_SHIFT 3
1597 #define __XSTORM_FCOE_AG_CONTEXT_QUEUE0_CF (0x3<<4)
1598 #define __XSTORM_FCOE_AG_CONTEXT_QUEUE0_CF_SHIFT 4
1599 #define XSTORM_FCOE_AG_CONTEXT_DECISION_RULE3 (0x3<<6)
1600 #define XSTORM_FCOE_AG_CONTEXT_DECISION_RULE3_SHIFT 6
1601 #define XSTORM_FCOE_AG_CONTEXT_AUX1_CF (0x3<<8)
1602 #define XSTORM_FCOE_AG_CONTEXT_AUX1_CF_SHIFT 8
1603 #define __XSTORM_FCOE_AG_CONTEXT_RESERVED62 (0x1<<10)
1604 #define __XSTORM_FCOE_AG_CONTEXT_RESERVED62_SHIFT 10
1605 #define __XSTORM_FCOE_AG_CONTEXT_AUX1_CF_EN (0x1<<11)
1606 #define __XSTORM_FCOE_AG_CONTEXT_AUX1_CF_EN_SHIFT 11
1607 #define __XSTORM_FCOE_AG_CONTEXT_AUX10_FLAG (0x1<<12)
1608 #define __XSTORM_FCOE_AG_CONTEXT_AUX10_FLAG_SHIFT 12
1609 #define __XSTORM_FCOE_AG_CONTEXT_AUX11_FLAG (0x1<<13)
1610 #define __XSTORM_FCOE_AG_CONTEXT_AUX11_FLAG_SHIFT 13
1611 #define __XSTORM_FCOE_AG_CONTEXT_AUX12_FLAG (0x1<<14)
1612 #define __XSTORM_FCOE_AG_CONTEXT_AUX12_FLAG_SHIFT 14
1613 #define __XSTORM_FCOE_AG_CONTEXT_AUX2_FLAG (0x1<<15)
1614 #define __XSTORM_FCOE_AG_CONTEXT_AUX2_FLAG_SHIFT 15
1617 #define XSTORM_FCOE_AG_CONTEXT_DECISION_RULE6 (0x7<<0)
1618 #define XSTORM_FCOE_AG_CONTEXT_DECISION_RULE6_SHIFT 0
1619 #define __XSTORM_FCOE_AG_CONTEXT_XFRQ_DEC_RULE (0x7<<3)
1620 #define __XSTORM_FCOE_AG_CONTEXT_XFRQ_DEC_RULE_SHIFT 3
1621 #define __XSTORM_FCOE_AG_CONTEXT_SQ_DEC_RULE (0x3<<6)
1622 #define __XSTORM_FCOE_AG_CONTEXT_SQ_DEC_RULE_SHIFT 6
1623 #elif defined(__LITTLE_ENDIAN)
1625 #define XSTORM_FCOE_AG_CONTEXT_DECISION_RULE6 (0x7<<0)
1626 #define XSTORM_FCOE_AG_CONTEXT_DECISION_RULE6_SHIFT 0
1627 #define __XSTORM_FCOE_AG_CONTEXT_XFRQ_DEC_RULE (0x7<<3)
1628 #define __XSTORM_FCOE_AG_CONTEXT_XFRQ_DEC_RULE_SHIFT 3
1629 #define __XSTORM_FCOE_AG_CONTEXT_SQ_DEC_RULE (0x3<<6)
1630 #define __XSTORM_FCOE_AG_CONTEXT_SQ_DEC_RULE_SHIFT 6
1633 #define __XSTORM_FCOE_AG_CONTEXT_AGG_VAL11_DECISION_RULE (0x7<<0)
1634 #define __XSTORM_FCOE_AG_CONTEXT_AGG_VAL11_DECISION_RULE_SHIFT 0
1635 #define __XSTORM_FCOE_AG_CONTEXT_AUX13_FLAG (0x1<<3)
1636 #define __XSTORM_FCOE_AG_CONTEXT_AUX13_FLAG_SHIFT 3
1637 #define __XSTORM_FCOE_AG_CONTEXT_QUEUE0_CF (0x3<<4)
1638 #define __XSTORM_FCOE_AG_CONTEXT_QUEUE0_CF_SHIFT 4
1639 #define XSTORM_FCOE_AG_CONTEXT_DECISION_RULE3 (0x3<<6)
1640 #define XSTORM_FCOE_AG_CONTEXT_DECISION_RULE3_SHIFT 6
1641 #define XSTORM_FCOE_AG_CONTEXT_AUX1_CF (0x3<<8)
1642 #define XSTORM_FCOE_AG_CONTEXT_AUX1_CF_SHIFT 8
1643 #define __XSTORM_FCOE_AG_CONTEXT_RESERVED62 (0x1<<10)
1644 #define __XSTORM_FCOE_AG_CONTEXT_RESERVED62_SHIFT 10
1645 #define __XSTORM_FCOE_AG_CONTEXT_AUX1_CF_EN (0x1<<11)
1646 #define __XSTORM_FCOE_AG_CONTEXT_AUX1_CF_EN_SHIFT 11
1647 #define __XSTORM_FCOE_AG_CONTEXT_AUX10_FLAG (0x1<<12)
1648 #define __XSTORM_FCOE_AG_CONTEXT_AUX10_FLAG_SHIFT 12
1649 #define __XSTORM_FCOE_AG_CONTEXT_AUX11_FLAG (0x1<<13)
1650 #define __XSTORM_FCOE_AG_CONTEXT_AUX11_FLAG_SHIFT 13
1651 #define __XSTORM_FCOE_AG_CONTEXT_AUX12_FLAG (0x1<<14)
1652 #define __XSTORM_FCOE_AG_CONTEXT_AUX12_FLAG_SHIFT 14
1653 #define __XSTORM_FCOE_AG_CONTEXT_AUX2_FLAG (0x1<<15)
1654 #define __XSTORM_FCOE_AG_CONTEXT_AUX2_FLAG_SHIFT 15
1656 #if defined(__BIG_ENDIAN)
1659 #elif defined(__LITTLE_ENDIAN)
1663 #if defined(__BIG_ENDIAN)
1667 #elif defined(__LITTLE_ENDIAN)
1672 #if defined(__BIG_ENDIAN)
1675 #elif defined(__LITTLE_ENDIAN)
1680 #define XSTORM_FCOE_AG_CONTEXT_AGG_MISC2 (0xFFFFFF<<0)
1681 #define XSTORM_FCOE_AG_CONTEXT_AGG_MISC2_SHIFT 0
1682 #define XSTORM_FCOE_AG_CONTEXT_AGG_MISC3 (0xFF<<24)
1683 #define XSTORM_FCOE_AG_CONTEXT_AGG_MISC3_SHIFT 24
1684 #if defined(__BIG_ENDIAN)
1687 #elif defined(__LITTLE_ENDIAN)
1691 #if defined(__BIG_ENDIAN)
1696 #elif defined(__LITTLE_ENDIAN)
1702 #if defined(__BIG_ENDIAN)
1705 #elif defined(__LITTLE_ENDIAN)
1710 u32 confq_pbl_base_lo
;
1711 u32 confq_pbl_base_hi
;
1717 * The tcp aggregative context section of Xstorm
1719 struct xstorm_tcp_tcp_ag_context_section
{
1720 #if defined(__BIG_ENDIAN)
1722 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SET_DA_TIMER_CF (0x3<<0)
1723 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SET_DA_TIMER_CF_SHIFT 0
1724 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_ACK_TO_FE_UPDATED (0x3<<2)
1725 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_ACK_TO_FE_UPDATED_SHIFT 2
1726 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SIDEBAND_SENT_CF (0x3<<4)
1727 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SIDEBAND_SENT_CF_SHIFT 4
1728 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_CLEAR_DA_TIMER_EN (0x1<<6)
1729 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_CLEAR_DA_TIMER_EN_SHIFT 6
1730 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_EXPIRATION_FLAG (0x1<<7)
1731 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_EXPIRATION_FLAG_SHIFT 7
1734 #elif defined(__LITTLE_ENDIAN)
1738 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SET_DA_TIMER_CF (0x3<<0)
1739 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SET_DA_TIMER_CF_SHIFT 0
1740 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_ACK_TO_FE_UPDATED (0x3<<2)
1741 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_ACK_TO_FE_UPDATED_SHIFT 2
1742 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SIDEBAND_SENT_CF (0x3<<4)
1743 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SIDEBAND_SENT_CF_SHIFT 4
1744 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_CLEAR_DA_TIMER_EN (0x1<<6)
1745 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_CLEAR_DA_TIMER_EN_SHIFT 6
1746 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_EXPIRATION_FLAG (0x1<<7)
1747 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_EXPIRATION_FLAG_SHIFT 7
1753 #if defined(__BIG_ENDIAN)
1757 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_FIN_FLAG (0x1<<0)
1758 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_FIN_FLAG_SHIFT 0
1759 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_UNBLOCKED (0x1<<1)
1760 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_UNBLOCKED_SHIFT 1
1761 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_TIMER_ACTIVE (0x1<<2)
1762 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_TIMER_ACTIVE_SHIFT 2
1763 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX3_FLAG (0x1<<3)
1764 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX3_FLAG_SHIFT 3
1765 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX4_FLAG (0x1<<4)
1766 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX4_FLAG_SHIFT 4
1767 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_ENABLE (0x1<<5)
1768 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_ENABLE_SHIFT 5
1769 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_ACK_TO_FE_UPDATED_EN (0x1<<6)
1770 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_ACK_TO_FE_UPDATED_EN_SHIFT 6
1771 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SIDEBAND_SENT_CF_EN (0x1<<7)
1772 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SIDEBAND_SENT_CF_EN_SHIFT 7
1773 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_FIN_FLAG_EN (0x1<<8)
1774 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_FIN_FLAG_EN_SHIFT 8
1775 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_FLAG (0x1<<9)
1776 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_FLAG_SHIFT 9
1777 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SET_RTO_CF (0x3<<10)
1778 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SET_RTO_CF_SHIFT 10
1779 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TS_TO_ECHO_UPDATED_CF (0x3<<12)
1780 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TS_TO_ECHO_UPDATED_CF_SHIFT 12
1781 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_DEST_UPDATED_CF (0x3<<14)
1782 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_DEST_UPDATED_CF_SHIFT 14
1783 #elif defined(__LITTLE_ENDIAN)
1785 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_FIN_FLAG (0x1<<0)
1786 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_FIN_FLAG_SHIFT 0
1787 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_UNBLOCKED (0x1<<1)
1788 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_UNBLOCKED_SHIFT 1
1789 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_TIMER_ACTIVE (0x1<<2)
1790 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_TIMER_ACTIVE_SHIFT 2
1791 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX3_FLAG (0x1<<3)
1792 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX3_FLAG_SHIFT 3
1793 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX4_FLAG (0x1<<4)
1794 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX4_FLAG_SHIFT 4
1795 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_ENABLE (0x1<<5)
1796 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DA_ENABLE_SHIFT 5
1797 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_ACK_TO_FE_UPDATED_EN (0x1<<6)
1798 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_ACK_TO_FE_UPDATED_EN_SHIFT 6
1799 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SIDEBAND_SENT_CF_EN (0x1<<7)
1800 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SIDEBAND_SENT_CF_EN_SHIFT 7
1801 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_FIN_FLAG_EN (0x1<<8)
1802 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_FIN_FLAG_EN_SHIFT 8
1803 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_FLAG (0x1<<9)
1804 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX1_FLAG_SHIFT 9
1805 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SET_RTO_CF (0x3<<10)
1806 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_SET_RTO_CF_SHIFT 10
1807 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TS_TO_ECHO_UPDATED_CF (0x3<<12)
1808 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TS_TO_ECHO_UPDATED_CF_SHIFT 12
1809 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_DEST_UPDATED_CF (0x3<<14)
1810 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_DEST_UPDATED_CF_SHIFT 14
1818 #if defined(__BIG_ENDIAN)
1821 #elif defined(__LITTLE_ENDIAN)
1825 #if defined(__BIG_ENDIAN)
1829 u8 __force_pure_ack_cnt
;
1830 #elif defined(__LITTLE_ENDIAN)
1831 u8 __force_pure_ack_cnt
;
1837 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TS_TO_ECHO_CF_EN (0x1<<0)
1838 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TS_TO_ECHO_CF_EN_SHIFT 0
1839 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_DEST_UPDATED_CF_EN (0x1<<1)
1840 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TX_DEST_UPDATED_CF_EN_SHIFT 1
1841 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX9_CF_EN (0x1<<2)
1842 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX9_CF_EN_SHIFT 2
1843 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX10_CF_EN (0x1<<3)
1844 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX10_CF_EN_SHIFT 3
1845 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX6_FLAG (0x1<<4)
1846 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX6_FLAG_SHIFT 4
1847 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX7_FLAG (0x1<<5)
1848 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX7_FLAG_SHIFT 5
1849 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX5_CF (0x3<<6)
1850 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX5_CF_SHIFT 6
1851 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX9_CF (0x3<<8)
1852 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX9_CF_SHIFT 8
1853 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX10_CF (0x3<<10)
1854 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX10_CF_SHIFT 10
1855 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX11_CF (0x3<<12)
1856 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX11_CF_SHIFT 12
1857 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX12_CF (0x3<<14)
1858 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX12_CF_SHIFT 14
1859 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX13_CF (0x3<<16)
1860 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX13_CF_SHIFT 16
1861 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX14_CF (0x3<<18)
1862 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX14_CF_SHIFT 18
1863 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX15_CF (0x3<<20)
1864 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX15_CF_SHIFT 20
1865 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX16_CF (0x3<<22)
1866 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX16_CF_SHIFT 22
1867 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX17_CF (0x3<<24)
1868 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_AUX17_CF_SHIFT 24
1869 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_ECE_FLAG (0x1<<26)
1870 #define XSTORM_TCP_TCP_AG_CONTEXT_SECTION_ECE_FLAG_SHIFT 26
1871 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_RESERVED71 (0x1<<27)
1872 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_RESERVED71_SHIFT 27
1873 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_FORCE_PURE_ACK_CNT_DIRTY (0x1<<28)
1874 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_FORCE_PURE_ACK_CNT_DIRTY_SHIFT 28
1875 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TCP_AUTO_STOP_FLAG (0x1<<29)
1876 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_TCP_AUTO_STOP_FLAG_SHIFT 29
1877 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DO_TS_UPDATE_FLAG (0x1<<30)
1878 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_DO_TS_UPDATE_FLAG_SHIFT 30
1879 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_CANCEL_RETRANSMIT_FLAG (0x1<<31)
1880 #define __XSTORM_TCP_TCP_AG_CONTEXT_SECTION_CANCEL_RETRANSMIT_FLAG_SHIFT 31
1881 #if defined(__BIG_ENDIAN)
1883 u16 __tcp_agg_vars7
;
1884 #elif defined(__LITTLE_ENDIAN)
1885 u16 __tcp_agg_vars7
;
1890 #if defined(__BIG_ENDIAN)
1894 #elif defined(__LITTLE_ENDIAN)
1902 * The iscsi aggregative context of Xstorm
1904 struct xstorm_iscsi_ag_context
{
1905 #if defined(__BIG_ENDIAN)
1908 #define __XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
1909 #define __XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
1910 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
1911 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
1912 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<2)
1913 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 2
1914 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<3)
1915 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 3
1916 #define __XSTORM_ISCSI_AG_CONTEXT_MORE_TO_SEND_EN (0x1<<4)
1917 #define __XSTORM_ISCSI_AG_CONTEXT_MORE_TO_SEND_EN_SHIFT 4
1918 #define XSTORM_ISCSI_AG_CONTEXT_NAGLE_EN (0x1<<5)
1919 #define XSTORM_ISCSI_AG_CONTEXT_NAGLE_EN_SHIFT 5
1920 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_SPARE_FLAG (0x1<<6)
1921 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_SPARE_FLAG_SHIFT 6
1922 #define __XSTORM_ISCSI_AG_CONTEXT_UNA_GT_NXT_EN (0x1<<7)
1923 #define __XSTORM_ISCSI_AG_CONTEXT_UNA_GT_NXT_EN_SHIFT 7
1925 #elif defined(__LITTLE_ENDIAN)
1928 #define __XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
1929 #define __XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
1930 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
1931 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
1932 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<2)
1933 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 2
1934 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<3)
1935 #define XSTORM_ISCSI_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 3
1936 #define __XSTORM_ISCSI_AG_CONTEXT_MORE_TO_SEND_EN (0x1<<4)
1937 #define __XSTORM_ISCSI_AG_CONTEXT_MORE_TO_SEND_EN_SHIFT 4
1938 #define XSTORM_ISCSI_AG_CONTEXT_NAGLE_EN (0x1<<5)
1939 #define XSTORM_ISCSI_AG_CONTEXT_NAGLE_EN_SHIFT 5
1940 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_SPARE_FLAG (0x1<<6)
1941 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_SPARE_FLAG_SHIFT 6
1942 #define __XSTORM_ISCSI_AG_CONTEXT_UNA_GT_NXT_EN (0x1<<7)
1943 #define __XSTORM_ISCSI_AG_CONTEXT_UNA_GT_NXT_EN_SHIFT 7
1946 #if defined(__BIG_ENDIAN)
1950 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM2 (0x3F<<0)
1951 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM2_SHIFT 0
1952 #define __XSTORM_ISCSI_AG_CONTEXT_RX_TS_EN_CF (0x3<<6)
1953 #define __XSTORM_ISCSI_AG_CONTEXT_RX_TS_EN_CF_SHIFT 6
1955 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_CF (0x3<<0)
1956 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_CF_SHIFT 0
1957 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_SPARE_FLAG_EN (0x1<<2)
1958 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_SPARE_FLAG_EN_SHIFT 2
1959 #define __XSTORM_ISCSI_AG_CONTEXT_AUX8_FLAG (0x1<<3)
1960 #define __XSTORM_ISCSI_AG_CONTEXT_AUX8_FLAG_SHIFT 3
1961 #define __XSTORM_ISCSI_AG_CONTEXT_AUX9_FLAG (0x1<<4)
1962 #define __XSTORM_ISCSI_AG_CONTEXT_AUX9_FLAG_SHIFT 4
1963 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE1 (0x3<<5)
1964 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE1_SHIFT 5
1965 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_CF_EN (0x1<<7)
1966 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_CF_EN_SHIFT 7
1967 #elif defined(__LITTLE_ENDIAN)
1969 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_CF (0x3<<0)
1970 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_CF_SHIFT 0
1971 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_SPARE_FLAG_EN (0x1<<2)
1972 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_SPARE_FLAG_EN_SHIFT 2
1973 #define __XSTORM_ISCSI_AG_CONTEXT_AUX8_FLAG (0x1<<3)
1974 #define __XSTORM_ISCSI_AG_CONTEXT_AUX8_FLAG_SHIFT 3
1975 #define __XSTORM_ISCSI_AG_CONTEXT_AUX9_FLAG (0x1<<4)
1976 #define __XSTORM_ISCSI_AG_CONTEXT_AUX9_FLAG_SHIFT 4
1977 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE1 (0x3<<5)
1978 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE1_SHIFT 5
1979 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_CF_EN (0x1<<7)
1980 #define __XSTORM_ISCSI_AG_CONTEXT_DQ_CF_EN_SHIFT 7
1982 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM2 (0x3F<<0)
1983 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM2_SHIFT 0
1984 #define __XSTORM_ISCSI_AG_CONTEXT_RX_TS_EN_CF (0x3<<6)
1985 #define __XSTORM_ISCSI_AG_CONTEXT_RX_TS_EN_CF_SHIFT 6
1990 #if defined(__BIG_ENDIAN)
1992 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE5 (0x3<<0)
1993 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE5_SHIFT 0
1994 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM0 (0x3F<<2)
1995 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM0_SHIFT 2
1996 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM1 (0x3F<<8)
1997 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM1_SHIFT 8
1998 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE2 (0x3<<14)
1999 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE2_SHIFT 14
2001 #elif defined(__LITTLE_ENDIAN)
2004 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE5 (0x3<<0)
2005 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE5_SHIFT 0
2006 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM0 (0x3F<<2)
2007 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM0_SHIFT 2
2008 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM1 (0x3F<<8)
2009 #define XSTORM_ISCSI_AG_CONTEXT_PHYSICAL_QUEUE_NUM1_SHIFT 8
2010 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE2 (0x3<<14)
2011 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE2_SHIFT 14
2013 struct xstorm_tcp_tcp_ag_context_section tcp
;
2014 #if defined(__BIG_ENDIAN)
2016 #define __XSTORM_ISCSI_AG_CONTEXT_AGG_VAL11_DECISION_RULE (0x7<<0)
2017 #define __XSTORM_ISCSI_AG_CONTEXT_AGG_VAL11_DECISION_RULE_SHIFT 0
2018 #define __XSTORM_ISCSI_AG_CONTEXT_AUX13_FLAG (0x1<<3)
2019 #define __XSTORM_ISCSI_AG_CONTEXT_AUX13_FLAG_SHIFT 3
2020 #define __XSTORM_ISCSI_AG_CONTEXT_STORMS_SYNC_CF (0x3<<4)
2021 #define __XSTORM_ISCSI_AG_CONTEXT_STORMS_SYNC_CF_SHIFT 4
2022 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE3 (0x3<<6)
2023 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE3_SHIFT 6
2024 #define XSTORM_ISCSI_AG_CONTEXT_AUX1_CF (0x3<<8)
2025 #define XSTORM_ISCSI_AG_CONTEXT_AUX1_CF_SHIFT 8
2026 #define __XSTORM_ISCSI_AG_CONTEXT_COMPLETION_SEQ_DECISION_MASK (0x1<<10)
2027 #define __XSTORM_ISCSI_AG_CONTEXT_COMPLETION_SEQ_DECISION_MASK_SHIFT 10
2028 #define __XSTORM_ISCSI_AG_CONTEXT_AUX1_CF_EN (0x1<<11)
2029 #define __XSTORM_ISCSI_AG_CONTEXT_AUX1_CF_EN_SHIFT 11
2030 #define __XSTORM_ISCSI_AG_CONTEXT_AUX10_FLAG (0x1<<12)
2031 #define __XSTORM_ISCSI_AG_CONTEXT_AUX10_FLAG_SHIFT 12
2032 #define __XSTORM_ISCSI_AG_CONTEXT_AUX11_FLAG (0x1<<13)
2033 #define __XSTORM_ISCSI_AG_CONTEXT_AUX11_FLAG_SHIFT 13
2034 #define __XSTORM_ISCSI_AG_CONTEXT_AUX12_FLAG (0x1<<14)
2035 #define __XSTORM_ISCSI_AG_CONTEXT_AUX12_FLAG_SHIFT 14
2036 #define __XSTORM_ISCSI_AG_CONTEXT_RX_WND_SCL_EN (0x1<<15)
2037 #define __XSTORM_ISCSI_AG_CONTEXT_RX_WND_SCL_EN_SHIFT 15
2040 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE6 (0x7<<0)
2041 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE6_SHIFT 0
2042 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE7 (0x7<<3)
2043 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE7_SHIFT 3
2044 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE4 (0x3<<6)
2045 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE4_SHIFT 6
2046 #elif defined(__LITTLE_ENDIAN)
2048 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE6 (0x7<<0)
2049 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE6_SHIFT 0
2050 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE7 (0x7<<3)
2051 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE7_SHIFT 3
2052 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE4 (0x3<<6)
2053 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE4_SHIFT 6
2056 #define __XSTORM_ISCSI_AG_CONTEXT_AGG_VAL11_DECISION_RULE (0x7<<0)
2057 #define __XSTORM_ISCSI_AG_CONTEXT_AGG_VAL11_DECISION_RULE_SHIFT 0
2058 #define __XSTORM_ISCSI_AG_CONTEXT_AUX13_FLAG (0x1<<3)
2059 #define __XSTORM_ISCSI_AG_CONTEXT_AUX13_FLAG_SHIFT 3
2060 #define __XSTORM_ISCSI_AG_CONTEXT_STORMS_SYNC_CF (0x3<<4)
2061 #define __XSTORM_ISCSI_AG_CONTEXT_STORMS_SYNC_CF_SHIFT 4
2062 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE3 (0x3<<6)
2063 #define XSTORM_ISCSI_AG_CONTEXT_DECISION_RULE3_SHIFT 6
2064 #define XSTORM_ISCSI_AG_CONTEXT_AUX1_CF (0x3<<8)
2065 #define XSTORM_ISCSI_AG_CONTEXT_AUX1_CF_SHIFT 8
2066 #define __XSTORM_ISCSI_AG_CONTEXT_COMPLETION_SEQ_DECISION_MASK (0x1<<10)
2067 #define __XSTORM_ISCSI_AG_CONTEXT_COMPLETION_SEQ_DECISION_MASK_SHIFT 10
2068 #define __XSTORM_ISCSI_AG_CONTEXT_AUX1_CF_EN (0x1<<11)
2069 #define __XSTORM_ISCSI_AG_CONTEXT_AUX1_CF_EN_SHIFT 11
2070 #define __XSTORM_ISCSI_AG_CONTEXT_AUX10_FLAG (0x1<<12)
2071 #define __XSTORM_ISCSI_AG_CONTEXT_AUX10_FLAG_SHIFT 12
2072 #define __XSTORM_ISCSI_AG_CONTEXT_AUX11_FLAG (0x1<<13)
2073 #define __XSTORM_ISCSI_AG_CONTEXT_AUX11_FLAG_SHIFT 13
2074 #define __XSTORM_ISCSI_AG_CONTEXT_AUX12_FLAG (0x1<<14)
2075 #define __XSTORM_ISCSI_AG_CONTEXT_AUX12_FLAG_SHIFT 14
2076 #define __XSTORM_ISCSI_AG_CONTEXT_RX_WND_SCL_EN (0x1<<15)
2077 #define __XSTORM_ISCSI_AG_CONTEXT_RX_WND_SCL_EN_SHIFT 15
2079 #if defined(__BIG_ENDIAN)
2082 #elif defined(__LITTLE_ENDIAN)
2086 #if defined(__BIG_ENDIAN)
2090 #elif defined(__LITTLE_ENDIAN)
2095 #if defined(__BIG_ENDIAN)
2098 #elif defined(__LITTLE_ENDIAN)
2103 #define XSTORM_ISCSI_AG_CONTEXT_AGG_MISC2 (0xFFFFFF<<0)
2104 #define XSTORM_ISCSI_AG_CONTEXT_AGG_MISC2_SHIFT 0
2105 #define XSTORM_ISCSI_AG_CONTEXT_AGG_MISC3 (0xFF<<24)
2106 #define XSTORM_ISCSI_AG_CONTEXT_AGG_MISC3_SHIFT 24
2107 #if defined(__BIG_ENDIAN)
2110 #elif defined(__LITTLE_ENDIAN)
2114 #if defined(__BIG_ENDIAN)
2119 #elif defined(__LITTLE_ENDIAN)
2125 #if defined(__BIG_ENDIAN)
2128 #elif defined(__LITTLE_ENDIAN)
2132 u32 hq_cons_tcp_seq
;
2139 * The L5cm aggregative context of XStorm
2141 struct xstorm_l5cm_ag_context
{
2142 #if defined(__BIG_ENDIAN)
2145 #define __XSTORM_L5CM_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
2146 #define __XSTORM_L5CM_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
2147 #define XSTORM_L5CM_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
2148 #define XSTORM_L5CM_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
2149 #define XSTORM_L5CM_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<2)
2150 #define XSTORM_L5CM_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 2
2151 #define XSTORM_L5CM_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<3)
2152 #define XSTORM_L5CM_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 3
2153 #define __XSTORM_L5CM_AG_CONTEXT_MORE_TO_SEND_EN (0x1<<4)
2154 #define __XSTORM_L5CM_AG_CONTEXT_MORE_TO_SEND_EN_SHIFT 4
2155 #define XSTORM_L5CM_AG_CONTEXT_NAGLE_EN (0x1<<5)
2156 #define XSTORM_L5CM_AG_CONTEXT_NAGLE_EN_SHIFT 5
2157 #define __XSTORM_L5CM_AG_CONTEXT_DQ_SPARE_FLAG (0x1<<6)
2158 #define __XSTORM_L5CM_AG_CONTEXT_DQ_SPARE_FLAG_SHIFT 6
2159 #define __XSTORM_L5CM_AG_CONTEXT_UNA_GT_NXT_EN (0x1<<7)
2160 #define __XSTORM_L5CM_AG_CONTEXT_UNA_GT_NXT_EN_SHIFT 7
2162 #elif defined(__LITTLE_ENDIAN)
2165 #define __XSTORM_L5CM_AG_CONTEXT_EXISTS_IN_QM0 (0x1<<0)
2166 #define __XSTORM_L5CM_AG_CONTEXT_EXISTS_IN_QM0_SHIFT 0
2167 #define XSTORM_L5CM_AG_CONTEXT_EXISTS_IN_QM1 (0x1<<1)
2168 #define XSTORM_L5CM_AG_CONTEXT_EXISTS_IN_QM1_SHIFT 1
2169 #define XSTORM_L5CM_AG_CONTEXT_EXISTS_IN_QM2 (0x1<<2)
2170 #define XSTORM_L5CM_AG_CONTEXT_EXISTS_IN_QM2_SHIFT 2
2171 #define XSTORM_L5CM_AG_CONTEXT_EXISTS_IN_QM3 (0x1<<3)
2172 #define XSTORM_L5CM_AG_CONTEXT_EXISTS_IN_QM3_SHIFT 3
2173 #define __XSTORM_L5CM_AG_CONTEXT_MORE_TO_SEND_EN (0x1<<4)
2174 #define __XSTORM_L5CM_AG_CONTEXT_MORE_TO_SEND_EN_SHIFT 4
2175 #define XSTORM_L5CM_AG_CONTEXT_NAGLE_EN (0x1<<5)
2176 #define XSTORM_L5CM_AG_CONTEXT_NAGLE_EN_SHIFT 5
2177 #define __XSTORM_L5CM_AG_CONTEXT_DQ_SPARE_FLAG (0x1<<6)
2178 #define __XSTORM_L5CM_AG_CONTEXT_DQ_SPARE_FLAG_SHIFT 6
2179 #define __XSTORM_L5CM_AG_CONTEXT_UNA_GT_NXT_EN (0x1<<7)
2180 #define __XSTORM_L5CM_AG_CONTEXT_UNA_GT_NXT_EN_SHIFT 7
2183 #if defined(__BIG_ENDIAN)
2187 #define XSTORM_L5CM_AG_CONTEXT_PHYSICAL_QUEUE_NUM2 (0x3F<<0)
2188 #define XSTORM_L5CM_AG_CONTEXT_PHYSICAL_QUEUE_NUM2_SHIFT 0
2189 #define __XSTORM_L5CM_AG_CONTEXT_RX_TS_EN_CF (0x3<<6)
2190 #define __XSTORM_L5CM_AG_CONTEXT_RX_TS_EN_CF_SHIFT 6
2192 #define XSTORM_L5CM_AG_CONTEXT_AUX4_CF (0x3<<0)
2193 #define XSTORM_L5CM_AG_CONTEXT_AUX4_CF_SHIFT 0
2194 #define __XSTORM_L5CM_AG_CONTEXT_DQ_SPARE_FLAG_EN (0x1<<2)
2195 #define __XSTORM_L5CM_AG_CONTEXT_DQ_SPARE_FLAG_EN_SHIFT 2
2196 #define __XSTORM_L5CM_AG_CONTEXT_AUX8_FLAG (0x1<<3)
2197 #define __XSTORM_L5CM_AG_CONTEXT_AUX8_FLAG_SHIFT 3
2198 #define __XSTORM_L5CM_AG_CONTEXT_AUX9_FLAG (0x1<<4)
2199 #define __XSTORM_L5CM_AG_CONTEXT_AUX9_FLAG_SHIFT 4
2200 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE1 (0x3<<5)
2201 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE1_SHIFT 5
2202 #define XSTORM_L5CM_AG_CONTEXT_AUX4_CF_EN (0x1<<7)
2203 #define XSTORM_L5CM_AG_CONTEXT_AUX4_CF_EN_SHIFT 7
2204 #elif defined(__LITTLE_ENDIAN)
2206 #define XSTORM_L5CM_AG_CONTEXT_AUX4_CF (0x3<<0)
2207 #define XSTORM_L5CM_AG_CONTEXT_AUX4_CF_SHIFT 0
2208 #define __XSTORM_L5CM_AG_CONTEXT_DQ_SPARE_FLAG_EN (0x1<<2)
2209 #define __XSTORM_L5CM_AG_CONTEXT_DQ_SPARE_FLAG_EN_SHIFT 2
2210 #define __XSTORM_L5CM_AG_CONTEXT_AUX8_FLAG (0x1<<3)
2211 #define __XSTORM_L5CM_AG_CONTEXT_AUX8_FLAG_SHIFT 3
2212 #define __XSTORM_L5CM_AG_CONTEXT_AUX9_FLAG (0x1<<4)
2213 #define __XSTORM_L5CM_AG_CONTEXT_AUX9_FLAG_SHIFT 4
2214 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE1 (0x3<<5)
2215 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE1_SHIFT 5
2216 #define XSTORM_L5CM_AG_CONTEXT_AUX4_CF_EN (0x1<<7)
2217 #define XSTORM_L5CM_AG_CONTEXT_AUX4_CF_EN_SHIFT 7
2219 #define XSTORM_L5CM_AG_CONTEXT_PHYSICAL_QUEUE_NUM2 (0x3F<<0)
2220 #define XSTORM_L5CM_AG_CONTEXT_PHYSICAL_QUEUE_NUM2_SHIFT 0
2221 #define __XSTORM_L5CM_AG_CONTEXT_RX_TS_EN_CF (0x3<<6)
2222 #define __XSTORM_L5CM_AG_CONTEXT_RX_TS_EN_CF_SHIFT 6
2227 #if defined(__BIG_ENDIAN)
2229 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE5 (0x3<<0)
2230 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE5_SHIFT 0
2231 #define XSTORM_L5CM_AG_CONTEXT_PHYSICAL_QUEUE_NUM0 (0x3F<<2)
2232 #define XSTORM_L5CM_AG_CONTEXT_PHYSICAL_QUEUE_NUM0_SHIFT 2
2233 #define XSTORM_L5CM_AG_CONTEXT_PHYSICAL_QUEUE_NUM1 (0x3F<<8)
2234 #define XSTORM_L5CM_AG_CONTEXT_PHYSICAL_QUEUE_NUM1_SHIFT 8
2235 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE2 (0x3<<14)
2236 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE2_SHIFT 14
2238 #elif defined(__LITTLE_ENDIAN)
2241 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE5 (0x3<<0)
2242 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE5_SHIFT 0
2243 #define XSTORM_L5CM_AG_CONTEXT_PHYSICAL_QUEUE_NUM0 (0x3F<<2)
2244 #define XSTORM_L5CM_AG_CONTEXT_PHYSICAL_QUEUE_NUM0_SHIFT 2
2245 #define XSTORM_L5CM_AG_CONTEXT_PHYSICAL_QUEUE_NUM1 (0x3F<<8)
2246 #define XSTORM_L5CM_AG_CONTEXT_PHYSICAL_QUEUE_NUM1_SHIFT 8
2247 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE2 (0x3<<14)
2248 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE2_SHIFT 14
2250 struct xstorm_tcp_tcp_ag_context_section tcp
;
2251 #if defined(__BIG_ENDIAN)
2253 #define __XSTORM_L5CM_AG_CONTEXT_AGG_VAL11_DECISION_RULE (0x7<<0)
2254 #define __XSTORM_L5CM_AG_CONTEXT_AGG_VAL11_DECISION_RULE_SHIFT 0
2255 #define __XSTORM_L5CM_AG_CONTEXT_AUX13_FLAG (0x1<<3)
2256 #define __XSTORM_L5CM_AG_CONTEXT_AUX13_FLAG_SHIFT 3
2257 #define __XSTORM_L5CM_AG_CONTEXT_STORMS_SYNC_CF (0x3<<4)
2258 #define __XSTORM_L5CM_AG_CONTEXT_STORMS_SYNC_CF_SHIFT 4
2259 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE3 (0x3<<6)
2260 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE3_SHIFT 6
2261 #define XSTORM_L5CM_AG_CONTEXT_AUX1_CF (0x3<<8)
2262 #define XSTORM_L5CM_AG_CONTEXT_AUX1_CF_SHIFT 8
2263 #define __XSTORM_L5CM_AG_CONTEXT_COMPLETION_SEQ_DECISION_MASK (0x1<<10)
2264 #define __XSTORM_L5CM_AG_CONTEXT_COMPLETION_SEQ_DECISION_MASK_SHIFT 10
2265 #define __XSTORM_L5CM_AG_CONTEXT_AUX1_CF_EN (0x1<<11)
2266 #define __XSTORM_L5CM_AG_CONTEXT_AUX1_CF_EN_SHIFT 11
2267 #define __XSTORM_L5CM_AG_CONTEXT_AUX10_FLAG (0x1<<12)
2268 #define __XSTORM_L5CM_AG_CONTEXT_AUX10_FLAG_SHIFT 12
2269 #define __XSTORM_L5CM_AG_CONTEXT_AUX11_FLAG (0x1<<13)
2270 #define __XSTORM_L5CM_AG_CONTEXT_AUX11_FLAG_SHIFT 13
2271 #define __XSTORM_L5CM_AG_CONTEXT_AUX12_FLAG (0x1<<14)
2272 #define __XSTORM_L5CM_AG_CONTEXT_AUX12_FLAG_SHIFT 14
2273 #define __XSTORM_L5CM_AG_CONTEXT_RX_WND_SCL_EN (0x1<<15)
2274 #define __XSTORM_L5CM_AG_CONTEXT_RX_WND_SCL_EN_SHIFT 15
2277 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE6 (0x7<<0)
2278 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE6_SHIFT 0
2279 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE7 (0x7<<3)
2280 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE7_SHIFT 3
2281 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE4 (0x3<<6)
2282 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE4_SHIFT 6
2283 #elif defined(__LITTLE_ENDIAN)
2285 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE6 (0x7<<0)
2286 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE6_SHIFT 0
2287 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE7 (0x7<<3)
2288 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE7_SHIFT 3
2289 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE4 (0x3<<6)
2290 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE4_SHIFT 6
2293 #define __XSTORM_L5CM_AG_CONTEXT_AGG_VAL11_DECISION_RULE (0x7<<0)
2294 #define __XSTORM_L5CM_AG_CONTEXT_AGG_VAL11_DECISION_RULE_SHIFT 0
2295 #define __XSTORM_L5CM_AG_CONTEXT_AUX13_FLAG (0x1<<3)
2296 #define __XSTORM_L5CM_AG_CONTEXT_AUX13_FLAG_SHIFT 3
2297 #define __XSTORM_L5CM_AG_CONTEXT_STORMS_SYNC_CF (0x3<<4)
2298 #define __XSTORM_L5CM_AG_CONTEXT_STORMS_SYNC_CF_SHIFT 4
2299 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE3 (0x3<<6)
2300 #define XSTORM_L5CM_AG_CONTEXT_DECISION_RULE3_SHIFT 6
2301 #define XSTORM_L5CM_AG_CONTEXT_AUX1_CF (0x3<<8)
2302 #define XSTORM_L5CM_AG_CONTEXT_AUX1_CF_SHIFT 8
2303 #define __XSTORM_L5CM_AG_CONTEXT_COMPLETION_SEQ_DECISION_MASK (0x1<<10)
2304 #define __XSTORM_L5CM_AG_CONTEXT_COMPLETION_SEQ_DECISION_MASK_SHIFT 10
2305 #define __XSTORM_L5CM_AG_CONTEXT_AUX1_CF_EN (0x1<<11)
2306 #define __XSTORM_L5CM_AG_CONTEXT_AUX1_CF_EN_SHIFT 11
2307 #define __XSTORM_L5CM_AG_CONTEXT_AUX10_FLAG (0x1<<12)
2308 #define __XSTORM_L5CM_AG_CONTEXT_AUX10_FLAG_SHIFT 12
2309 #define __XSTORM_L5CM_AG_CONTEXT_AUX11_FLAG (0x1<<13)
2310 #define __XSTORM_L5CM_AG_CONTEXT_AUX11_FLAG_SHIFT 13
2311 #define __XSTORM_L5CM_AG_CONTEXT_AUX12_FLAG (0x1<<14)
2312 #define __XSTORM_L5CM_AG_CONTEXT_AUX12_FLAG_SHIFT 14
2313 #define __XSTORM_L5CM_AG_CONTEXT_RX_WND_SCL_EN (0x1<<15)
2314 #define __XSTORM_L5CM_AG_CONTEXT_RX_WND_SCL_EN_SHIFT 15
2316 #if defined(__BIG_ENDIAN)
2319 #elif defined(__LITTLE_ENDIAN)
2323 #if defined(__BIG_ENDIAN)
2327 #elif defined(__LITTLE_ENDIAN)
2332 #if defined(__BIG_ENDIAN)
2335 #elif defined(__LITTLE_ENDIAN)
2340 #define XSTORM_L5CM_AG_CONTEXT_AGG_MISC2 (0xFFFFFF<<0)
2341 #define XSTORM_L5CM_AG_CONTEXT_AGG_MISC2_SHIFT 0
2342 #define XSTORM_L5CM_AG_CONTEXT_AGG_MISC3 (0xFF<<24)
2343 #define XSTORM_L5CM_AG_CONTEXT_AGG_MISC3_SHIFT 24
2344 #if defined(__BIG_ENDIAN)
2347 #elif defined(__LITTLE_ENDIAN)
2351 #if defined(__BIG_ENDIAN)
2356 #elif defined(__LITTLE_ENDIAN)
2362 #if defined(__BIG_ENDIAN)
2365 #elif defined(__LITTLE_ENDIAN)
2375 * ABTS info $$KEEP_ENDIANNESS$$
2377 struct fcoe_abts_info
{
2378 __le16 aborted_task_id
;
2385 * Fixed size structure in order to plant it in Union structure
2386 * $$KEEP_ENDIANNESS$$
2388 struct fcoe_abts_rsp_union
{
2391 __le32 abts_rsp_payload
[7];
2396 * 4 regs size $$KEEP_ENDIANNESS$$
2398 struct fcoe_bd_ctx
{
2409 * FCoE cached sges context $$KEEP_ENDIANNESS$$
2411 struct fcoe_cached_sge_ctx
{
2412 struct regpair cur_buf_addr
;
2414 __le16 second_buf_rem
;
2415 struct regpair second_buf_addr
;
2420 * Cleanup info $$KEEP_ENDIANNESS$$
2422 struct fcoe_cleanup_info
{
2423 __le16 cleaned_task_id
;
2424 __le16 rolled_tx_seq_cnt
;
2425 __le32 rolled_tx_data_offset
;
2430 * Fcp RSP flags $$KEEP_ENDIANNESS$$
2432 struct fcoe_fcp_rsp_flags
{
2434 #define FCOE_FCP_RSP_FLAGS_FCP_RSP_LEN_VALID (0x1<<0)
2435 #define FCOE_FCP_RSP_FLAGS_FCP_RSP_LEN_VALID_SHIFT 0
2436 #define FCOE_FCP_RSP_FLAGS_FCP_SNS_LEN_VALID (0x1<<1)
2437 #define FCOE_FCP_RSP_FLAGS_FCP_SNS_LEN_VALID_SHIFT 1
2438 #define FCOE_FCP_RSP_FLAGS_FCP_RESID_OVER (0x1<<2)
2439 #define FCOE_FCP_RSP_FLAGS_FCP_RESID_OVER_SHIFT 2
2440 #define FCOE_FCP_RSP_FLAGS_FCP_RESID_UNDER (0x1<<3)
2441 #define FCOE_FCP_RSP_FLAGS_FCP_RESID_UNDER_SHIFT 3
2442 #define FCOE_FCP_RSP_FLAGS_FCP_CONF_REQ (0x1<<4)
2443 #define FCOE_FCP_RSP_FLAGS_FCP_CONF_REQ_SHIFT 4
2444 #define FCOE_FCP_RSP_FLAGS_FCP_BIDI_FLAGS (0x7<<5)
2445 #define FCOE_FCP_RSP_FLAGS_FCP_BIDI_FLAGS_SHIFT 5
2449 * Fcp RSP payload $$KEEP_ENDIANNESS$$
2451 struct fcoe_fcp_rsp_payload
{
2452 struct regpair reserved0
;
2454 u8 scsi_status_code
;
2455 struct fcoe_fcp_rsp_flags fcp_flags
;
2456 __le16 retry_delay_timer
;
2462 * Fixed size structure in order to plant it in Union structure
2463 * $$KEEP_ENDIANNESS$$
2465 struct fcoe_fcp_rsp_union
{
2466 struct fcoe_fcp_rsp_payload payload
;
2467 struct regpair reserved0
;
2471 * FC header $$KEEP_ENDIANNESS$$
2473 struct fcoe_fc_hdr
{
2489 * FC header union $$KEEP_ENDIANNESS$$
2491 struct fcoe_mp_rsp_union
{
2492 struct fcoe_fc_hdr fc_hdr
;
2493 __le32 mp_payload_len
;
2498 * Completion information $$KEEP_ENDIANNESS$$
2500 union fcoe_comp_flow_info
{
2501 struct fcoe_fcp_rsp_union fcp_rsp
;
2502 struct fcoe_abts_rsp_union abts_rsp
;
2503 struct fcoe_mp_rsp_union mp_rsp
;
2509 * External ABTS info $$KEEP_ENDIANNESS$$
2511 struct fcoe_ext_abts_info
{
2513 struct fcoe_abts_info ctx
;
2518 * External cleanup info $$KEEP_ENDIANNESS$$
2520 struct fcoe_ext_cleanup_info
{
2522 struct fcoe_cleanup_info ctx
;
2527 * Fcoe FW Tx sequence context $$KEEP_ENDIANNESS$$
2529 struct fcoe_fw_tx_seq_ctx
{
2536 * Fcoe external FW Tx sequence context $$KEEP_ENDIANNESS$$
2538 struct fcoe_ext_fw_tx_seq_ctx
{
2540 struct fcoe_fw_tx_seq_ctx ctx
;
2545 * FCoE multiple sges context $$KEEP_ENDIANNESS$$
2547 struct fcoe_mul_sges_ctx
{
2548 struct regpair cur_sge_addr
;
2555 * FCoE external multiple sges context $$KEEP_ENDIANNESS$$
2557 struct fcoe_ext_mul_sges_ctx
{
2558 struct fcoe_mul_sges_ctx mul_sgl
;
2559 struct regpair rsrv0
;
2564 * FCP CMD payload $$KEEP_ENDIANNESS$$
2566 struct fcoe_fcp_cmd_payload
{
2575 * Fcp xfr rdy payload $$KEEP_ENDIANNESS$$
2577 struct fcoe_fcp_xfr_rdy_payload
{
2584 * FC frame $$KEEP_ENDIANNESS$$
2586 struct fcoe_fc_frame
{
2587 struct fcoe_fc_hdr fc_hdr
;
2588 __le32 reserved0
[2];
2595 * FCoE KCQ CQE parameters $$KEEP_ENDIANNESS$$
2597 union fcoe_kcqe_params
{
2598 __le32 reserved0
[4];
2602 * FCoE KCQ CQE $$KEEP_ENDIANNESS$$
2605 __le32 fcoe_conn_id
;
2606 __le32 completion_status
;
2607 __le32 fcoe_conn_context_id
;
2608 union fcoe_kcqe_params params
;
2612 #define FCOE_KCQE_RESERVED0 (0x7<<0)
2613 #define FCOE_KCQE_RESERVED0_SHIFT 0
2614 #define FCOE_KCQE_RAMROD_COMPLETION (0x1<<3)
2615 #define FCOE_KCQE_RAMROD_COMPLETION_SHIFT 3
2616 #define FCOE_KCQE_LAYER_CODE (0x7<<4)
2617 #define FCOE_KCQE_LAYER_CODE_SHIFT 4
2618 #define FCOE_KCQE_LINKED_WITH_NEXT (0x1<<7)
2619 #define FCOE_KCQE_LINKED_WITH_NEXT_SHIFT 7
2625 * FCoE KWQE header $$KEEP_ENDIANNESS$$
2627 struct fcoe_kwqe_header
{
2630 #define FCOE_KWQE_HEADER_RESERVED0 (0xF<<0)
2631 #define FCOE_KWQE_HEADER_RESERVED0_SHIFT 0
2632 #define FCOE_KWQE_HEADER_LAYER_CODE (0x7<<4)
2633 #define FCOE_KWQE_HEADER_LAYER_CODE_SHIFT 4
2634 #define FCOE_KWQE_HEADER_RESERVED1 (0x1<<7)
2635 #define FCOE_KWQE_HEADER_RESERVED1_SHIFT 7
2639 * FCoE firmware init request 1 $$KEEP_ENDIANNESS$$
2641 struct fcoe_kwqe_init1
{
2643 struct fcoe_kwqe_header hdr
;
2644 __le32 task_list_pbl_addr_lo
;
2645 __le32 task_list_pbl_addr_hi
;
2646 __le32 dummy_buffer_addr_lo
;
2647 __le32 dummy_buffer_addr_hi
;
2650 __le16 rq_buffer_log_size
;
2653 u8 num_sessions_log
;
2655 #define FCOE_KWQE_INIT1_LOG_PAGE_SIZE (0xF<<0)
2656 #define FCOE_KWQE_INIT1_LOG_PAGE_SIZE_SHIFT 0
2657 #define FCOE_KWQE_INIT1_LOG_CACHED_PBES_PER_FUNC (0x7<<4)
2658 #define FCOE_KWQE_INIT1_LOG_CACHED_PBES_PER_FUNC_SHIFT 4
2659 #define FCOE_KWQE_INIT1_RESERVED1 (0x1<<7)
2660 #define FCOE_KWQE_INIT1_RESERVED1_SHIFT 7
2664 * FCoE firmware init request 2 $$KEEP_ENDIANNESS$$
2666 struct fcoe_kwqe_init2
{
2667 u8 hsi_major_version
;
2668 u8 hsi_minor_version
;
2669 struct fcoe_kwqe_header hdr
;
2670 __le32 hash_tbl_pbl_addr_lo
;
2671 __le32 hash_tbl_pbl_addr_hi
;
2672 __le32 t2_hash_tbl_addr_lo
;
2673 __le32 t2_hash_tbl_addr_hi
;
2674 __le32 t2_ptr_hash_tbl_addr_lo
;
2675 __le32 t2_ptr_hash_tbl_addr_hi
;
2676 __le32 free_list_count
;
2680 * FCoE firmware init request 3 $$KEEP_ENDIANNESS$$
2682 struct fcoe_kwqe_init3
{
2684 struct fcoe_kwqe_header hdr
;
2685 __le32 error_bit_map_lo
;
2686 __le32 error_bit_map_hi
;
2689 __le32 reserved2
[4];
2693 * FCoE connection offload request 1 $$KEEP_ENDIANNESS$$
2695 struct fcoe_kwqe_conn_offload1
{
2696 __le16 fcoe_conn_id
;
2697 struct fcoe_kwqe_header hdr
;
2700 __le32 rq_pbl_addr_lo
;
2701 __le32 rq_pbl_addr_hi
;
2702 __le32 rq_first_pbe_addr_lo
;
2703 __le32 rq_first_pbe_addr_hi
;
2709 * FCoE connection offload request 2 $$KEEP_ENDIANNESS$$
2711 struct fcoe_kwqe_conn_offload2
{
2712 __le16 tx_max_fc_pay_len
;
2713 struct fcoe_kwqe_header hdr
;
2716 __le32 xferq_addr_lo
;
2717 __le32 xferq_addr_hi
;
2718 __le32 conn_db_addr_lo
;
2719 __le32 conn_db_addr_hi
;
2724 * FCoE connection offload request 3 $$KEEP_ENDIANNESS$$
2726 struct fcoe_kwqe_conn_offload3
{
2728 #define FCOE_KWQE_CONN_OFFLOAD3_VLAN_ID (0xFFF<<0)
2729 #define FCOE_KWQE_CONN_OFFLOAD3_VLAN_ID_SHIFT 0
2730 #define FCOE_KWQE_CONN_OFFLOAD3_CFI (0x1<<12)
2731 #define FCOE_KWQE_CONN_OFFLOAD3_CFI_SHIFT 12
2732 #define FCOE_KWQE_CONN_OFFLOAD3_PRIORITY (0x7<<13)
2733 #define FCOE_KWQE_CONN_OFFLOAD3_PRIORITY_SHIFT 13
2734 struct fcoe_kwqe_header hdr
;
2736 u8 tx_max_conc_seqs_c3
;
2739 #define FCOE_KWQE_CONN_OFFLOAD3_B_MUL_N_PORT_IDS (0x1<<0)
2740 #define FCOE_KWQE_CONN_OFFLOAD3_B_MUL_N_PORT_IDS_SHIFT 0
2741 #define FCOE_KWQE_CONN_OFFLOAD3_B_E_D_TOV_RES (0x1<<1)
2742 #define FCOE_KWQE_CONN_OFFLOAD3_B_E_D_TOV_RES_SHIFT 1
2743 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONT_INCR_SEQ_CNT (0x1<<2)
2744 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONT_INCR_SEQ_CNT_SHIFT 2
2745 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONF_REQ (0x1<<3)
2746 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONF_REQ_SHIFT 3
2747 #define FCOE_KWQE_CONN_OFFLOAD3_B_REC_VALID (0x1<<4)
2748 #define FCOE_KWQE_CONN_OFFLOAD3_B_REC_VALID_SHIFT 4
2749 #define FCOE_KWQE_CONN_OFFLOAD3_B_C2_VALID (0x1<<5)
2750 #define FCOE_KWQE_CONN_OFFLOAD3_B_C2_VALID_SHIFT 5
2751 #define FCOE_KWQE_CONN_OFFLOAD3_B_ACK_0 (0x1<<6)
2752 #define FCOE_KWQE_CONN_OFFLOAD3_B_ACK_0_SHIFT 6
2753 #define FCOE_KWQE_CONN_OFFLOAD3_B_VLAN_FLAG (0x1<<7)
2754 #define FCOE_KWQE_CONN_OFFLOAD3_B_VLAN_FLAG_SHIFT 7
2756 __le32 confq_first_pbe_addr_lo
;
2757 __le32 confq_first_pbe_addr_hi
;
2758 __le16 tx_total_conc_seqs
;
2759 __le16 rx_max_fc_pay_len
;
2760 __le16 rx_total_conc_seqs
;
2761 u8 rx_max_conc_seqs_c3
;
2762 u8 rx_open_seqs_exch_c3
;
2766 * FCoE connection offload request 4 $$KEEP_ENDIANNESS$$
2768 struct fcoe_kwqe_conn_offload4
{
2769 u8 e_d_tov_timer_val
;
2771 struct fcoe_kwqe_header hdr
;
2772 u8 src_mac_addr_lo
[2];
2773 u8 src_mac_addr_mid
[2];
2774 u8 src_mac_addr_hi
[2];
2775 u8 dst_mac_addr_hi
[2];
2776 u8 dst_mac_addr_lo
[2];
2777 u8 dst_mac_addr_mid
[2];
2780 __le32 confq_pbl_base_addr_lo
;
2781 __le32 confq_pbl_base_addr_hi
;
2785 * FCoE connection enable request $$KEEP_ENDIANNESS$$
2787 struct fcoe_kwqe_conn_enable_disable
{
2789 struct fcoe_kwqe_header hdr
;
2790 u8 src_mac_addr_lo
[2];
2791 u8 src_mac_addr_mid
[2];
2792 u8 src_mac_addr_hi
[2];
2794 #define FCOE_KWQE_CONN_ENABLE_DISABLE_VLAN_ID (0xFFF<<0)
2795 #define FCOE_KWQE_CONN_ENABLE_DISABLE_VLAN_ID_SHIFT 0
2796 #define FCOE_KWQE_CONN_ENABLE_DISABLE_CFI (0x1<<12)
2797 #define FCOE_KWQE_CONN_ENABLE_DISABLE_CFI_SHIFT 12
2798 #define FCOE_KWQE_CONN_ENABLE_DISABLE_PRIORITY (0x7<<13)
2799 #define FCOE_KWQE_CONN_ENABLE_DISABLE_PRIORITY_SHIFT 13
2800 u8 dst_mac_addr_lo
[2];
2801 u8 dst_mac_addr_mid
[2];
2802 u8 dst_mac_addr_hi
[2];
2814 * FCoE connection destroy request $$KEEP_ENDIANNESS$$
2816 struct fcoe_kwqe_conn_destroy
{
2818 struct fcoe_kwqe_header hdr
;
2821 __le32 reserved1
[5];
2825 * FCoe destroy request $$KEEP_ENDIANNESS$$
2827 struct fcoe_kwqe_destroy
{
2829 struct fcoe_kwqe_header hdr
;
2830 __le32 reserved1
[7];
2834 * FCoe statistics request $$KEEP_ENDIANNESS$$
2836 struct fcoe_kwqe_stat
{
2838 struct fcoe_kwqe_header hdr
;
2839 __le32 stat_params_addr_lo
;
2840 __le32 stat_params_addr_hi
;
2841 __le32 reserved1
[5];
2845 * FCoE KWQ WQE $$KEEP_ENDIANNESS$$
2848 struct fcoe_kwqe_init1 init1
;
2849 struct fcoe_kwqe_init2 init2
;
2850 struct fcoe_kwqe_init3 init3
;
2851 struct fcoe_kwqe_conn_offload1 conn_offload1
;
2852 struct fcoe_kwqe_conn_offload2 conn_offload2
;
2853 struct fcoe_kwqe_conn_offload3 conn_offload3
;
2854 struct fcoe_kwqe_conn_offload4 conn_offload4
;
2855 struct fcoe_kwqe_conn_enable_disable conn_enable_disable
;
2856 struct fcoe_kwqe_conn_destroy conn_destroy
;
2857 struct fcoe_kwqe_destroy destroy
;
2858 struct fcoe_kwqe_stat statistics
;
2877 * TX SGL context $$KEEP_ENDIANNESS$$
2879 union fcoe_sgl_union_ctx
{
2880 struct fcoe_cached_sge_ctx cached_sge
;
2881 struct fcoe_ext_mul_sges_ctx sgl
;
2886 * Data-In/ELS/BLS information $$KEEP_ENDIANNESS$$
2888 struct fcoe_read_flow_info
{
2889 union fcoe_sgl_union_ctx sgl_ctx
;
2895 * Fcoe stat context $$KEEP_ENDIANNESS$$
2897 struct fcoe_s_stat_ctx
{
2899 #define FCOE_S_STAT_CTX_ACTIVE (0x1<<0)
2900 #define FCOE_S_STAT_CTX_ACTIVE_SHIFT 0
2901 #define FCOE_S_STAT_CTX_ACK_ABORT_SEQ_COND (0x1<<1)
2902 #define FCOE_S_STAT_CTX_ACK_ABORT_SEQ_COND_SHIFT 1
2903 #define FCOE_S_STAT_CTX_ABTS_PERFORMED (0x1<<2)
2904 #define FCOE_S_STAT_CTX_ABTS_PERFORMED_SHIFT 2
2905 #define FCOE_S_STAT_CTX_SEQ_TIMEOUT (0x1<<3)
2906 #define FCOE_S_STAT_CTX_SEQ_TIMEOUT_SHIFT 3
2907 #define FCOE_S_STAT_CTX_P_RJT (0x1<<4)
2908 #define FCOE_S_STAT_CTX_P_RJT_SHIFT 4
2909 #define FCOE_S_STAT_CTX_ACK_EOFT (0x1<<5)
2910 #define FCOE_S_STAT_CTX_ACK_EOFT_SHIFT 5
2911 #define FCOE_S_STAT_CTX_RSRV1 (0x3<<6)
2912 #define FCOE_S_STAT_CTX_RSRV1_SHIFT 6
2916 * Fcoe rx seq context $$KEEP_ENDIANNESS$$
2918 struct fcoe_rx_seq_ctx
{
2920 struct fcoe_s_stat_ctx s_stat
;
2928 * Fcoe rx_wr union context $$KEEP_ENDIANNESS$$
2930 union fcoe_rx_wr_union_ctx
{
2931 struct fcoe_read_flow_info read_info
;
2932 union fcoe_comp_flow_info comp_info
;
2939 * FCoE SQ element $$KEEP_ENDIANNESS$$
2943 #define FCOE_SQE_TASK_ID (0x7FFF<<0)
2944 #define FCOE_SQE_TASK_ID_SHIFT 0
2945 #define FCOE_SQE_TOGGLE_BIT (0x1<<15)
2946 #define FCOE_SQE_TOGGLE_BIT_SHIFT 15
2952 * 14 regs $$KEEP_ENDIANNESS$$
2954 struct fcoe_tce_tx_only
{
2955 union fcoe_sgl_union_ctx sgl_ctx
;
2960 * 32 bytes (8 regs) used for TX only purposes $$KEEP_ENDIANNESS$$
2962 union fcoe_tx_wr_rx_rd_union_ctx
{
2963 struct fcoe_fc_frame tx_frame
;
2964 struct fcoe_fcp_cmd_payload fcp_cmd
;
2965 struct fcoe_ext_cleanup_info cleanup
;
2966 struct fcoe_ext_abts_info abts
;
2967 struct fcoe_ext_fw_tx_seq_ctx tx_seq
;
2972 * tce_tx_wr_rx_rd_const $$KEEP_ENDIANNESS$$
2974 struct fcoe_tce_tx_wr_rx_rd_const
{
2976 #define FCOE_TCE_TX_WR_RX_RD_CONST_TASK_TYPE (0x7<<0)
2977 #define FCOE_TCE_TX_WR_RX_RD_CONST_TASK_TYPE_SHIFT 0
2978 #define FCOE_TCE_TX_WR_RX_RD_CONST_DEV_TYPE (0x1<<3)
2979 #define FCOE_TCE_TX_WR_RX_RD_CONST_DEV_TYPE_SHIFT 3
2980 #define FCOE_TCE_TX_WR_RX_RD_CONST_CLASS_TYPE (0x1<<4)
2981 #define FCOE_TCE_TX_WR_RX_RD_CONST_CLASS_TYPE_SHIFT 4
2982 #define FCOE_TCE_TX_WR_RX_RD_CONST_CACHED_SGE (0x3<<5)
2983 #define FCOE_TCE_TX_WR_RX_RD_CONST_CACHED_SGE_SHIFT 5
2984 #define FCOE_TCE_TX_WR_RX_RD_CONST_SUPPORT_REC_TOV (0x1<<7)
2985 #define FCOE_TCE_TX_WR_RX_RD_CONST_SUPPORT_REC_TOV_SHIFT 7
2987 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_VALID (0x1<<0)
2988 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_VALID_SHIFT 0
2989 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_STATE (0xF<<1)
2990 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_STATE_SHIFT 1
2991 #define FCOE_TCE_TX_WR_RX_RD_CONST_RSRV1 (0x1<<5)
2992 #define FCOE_TCE_TX_WR_RX_RD_CONST_RSRV1_SHIFT 5
2993 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_SEQ_INIT (0x1<<6)
2994 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_SEQ_INIT_SHIFT 6
2995 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_COMP_TRNS (0x1<<7)
2996 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_COMP_TRNS_SHIFT 7
2998 __le32 verify_tx_seq
;
3002 * tce_tx_wr_rx_rd $$KEEP_ENDIANNESS$$
3004 struct fcoe_tce_tx_wr_rx_rd
{
3005 union fcoe_tx_wr_rx_rd_union_ctx union_ctx
;
3006 struct fcoe_tce_tx_wr_rx_rd_const const_ctx
;
3010 * tce_rx_wr_tx_rd_const $$KEEP_ENDIANNESS$$
3012 struct fcoe_tce_rx_wr_tx_rd_const
{
3015 #define FCOE_TCE_RX_WR_TX_RD_CONST_CID (0xFFFFFF<<0)
3016 #define FCOE_TCE_RX_WR_TX_RD_CONST_CID_SHIFT 0
3017 #define FCOE_TCE_RX_WR_TX_RD_CONST_RSRV0 (0xFF<<24)
3018 #define FCOE_TCE_RX_WR_TX_RD_CONST_RSRV0_SHIFT 24
3022 * tce_rx_wr_tx_rd_var $$KEEP_ENDIANNESS$$
3024 struct fcoe_tce_rx_wr_tx_rd_var
{
3026 #define FCOE_TCE_RX_WR_TX_RD_VAR_RSRV1 (0xF<<0)
3027 #define FCOE_TCE_RX_WR_TX_RD_VAR_RSRV1_SHIFT 0
3028 #define FCOE_TCE_RX_WR_TX_RD_VAR_NUM_RQ_WQE (0x7<<4)
3029 #define FCOE_TCE_RX_WR_TX_RD_VAR_NUM_RQ_WQE_SHIFT 4
3030 #define FCOE_TCE_RX_WR_TX_RD_VAR_CONF_REQ (0x1<<7)
3031 #define FCOE_TCE_RX_WR_TX_RD_VAR_CONF_REQ_SHIFT 7
3032 #define FCOE_TCE_RX_WR_TX_RD_VAR_RX_STATE (0xF<<8)
3033 #define FCOE_TCE_RX_WR_TX_RD_VAR_RX_STATE_SHIFT 8
3034 #define FCOE_TCE_RX_WR_TX_RD_VAR_EXP_FIRST_FRAME (0x1<<12)
3035 #define FCOE_TCE_RX_WR_TX_RD_VAR_EXP_FIRST_FRAME_SHIFT 12
3036 #define FCOE_TCE_RX_WR_TX_RD_VAR_RX_SEQ_INIT (0x1<<13)
3037 #define FCOE_TCE_RX_WR_TX_RD_VAR_RX_SEQ_INIT_SHIFT 13
3038 #define FCOE_TCE_RX_WR_TX_RD_VAR_RSRV2 (0x1<<14)
3039 #define FCOE_TCE_RX_WR_TX_RD_VAR_RSRV2_SHIFT 14
3040 #define FCOE_TCE_RX_WR_TX_RD_VAR_RX_VALID (0x1<<15)
3041 #define FCOE_TCE_RX_WR_TX_RD_VAR_RX_VALID_SHIFT 15
3043 struct fcoe_fcp_xfr_rdy_payload fcp_xfr_rdy
;
3047 * tce_rx_wr_tx_rd $$KEEP_ENDIANNESS$$
3049 struct fcoe_tce_rx_wr_tx_rd
{
3050 struct fcoe_tce_rx_wr_tx_rd_const const_ctx
;
3051 struct fcoe_tce_rx_wr_tx_rd_var var_ctx
;
3055 * tce_rx_only $$KEEP_ENDIANNESS$$
3057 struct fcoe_tce_rx_only
{
3058 struct fcoe_rx_seq_ctx rx_seq_ctx
;
3059 union fcoe_rx_wr_union_ctx union_ctx
;
3063 * task_ctx_entry $$KEEP_ENDIANNESS$$
3065 struct fcoe_task_ctx_entry
{
3066 struct fcoe_tce_tx_only txwr_only
;
3067 struct fcoe_tce_tx_wr_rx_rd txwr_rxrd
;
3068 struct fcoe_tce_rx_wr_tx_rd rxwr_txrd
;
3069 struct fcoe_tce_rx_only rxwr_only
;
3082 * FCoE XFRQ element $$KEEP_ENDIANNESS$$
3086 #define FCOE_XFRQE_TASK_ID (0x7FFF<<0)
3087 #define FCOE_XFRQE_TASK_ID_SHIFT 0
3088 #define FCOE_XFRQE_TOGGLE_BIT (0x1<<15)
3089 #define FCOE_XFRQE_TOGGLE_BIT_SHIFT 15
3094 * Cached SGEs $$KEEP_ENDIANNESS$$
3096 struct common_fcoe_sgl
{
3097 struct fcoe_bd_ctx sge
[3];
3102 * FCoE SQ\XFRQ element
3104 struct fcoe_cached_wqe
{
3105 struct fcoe_sqe sqe
;
3106 struct fcoe_xfrqe xfrqe
;
3111 * FCoE connection enable\disable params passed by driver to FW in FCoE enable
3112 * ramrod $$KEEP_ENDIANNESS$$
3114 struct fcoe_conn_enable_disable_ramrod_params
{
3115 struct fcoe_kwqe_conn_enable_disable enable_disable_kwqe
;
3120 * FCoE connection offload params passed by driver to FW in FCoE offload ramrod
3121 * $$KEEP_ENDIANNESS$$
3123 struct fcoe_conn_offload_ramrod_params
{
3124 struct fcoe_kwqe_conn_offload1 offload_kwqe1
;
3125 struct fcoe_kwqe_conn_offload2 offload_kwqe2
;
3126 struct fcoe_kwqe_conn_offload3 offload_kwqe3
;
3127 struct fcoe_kwqe_conn_offload4 offload_kwqe4
;
3131 struct ustorm_fcoe_mng_ctx
{
3132 #if defined(__BIG_ENDIAN)
3133 u8 mid_seq_proc_flag
;
3136 u8 en_cached_tce_flag
;
3137 #elif defined(__LITTLE_ENDIAN)
3138 u8 en_cached_tce_flag
;
3141 u8 mid_seq_proc_flag
;
3143 #if defined(__BIG_ENDIAN)
3145 u8 cached_conn_flag
;
3147 #elif defined(__LITTLE_ENDIAN)
3149 u8 cached_conn_flag
;
3152 #if defined(__BIG_ENDIAN)
3153 u16 dma_tce_ram_addr
;
3155 #elif defined(__LITTLE_ENDIAN)
3157 u16 dma_tce_ram_addr
;
3159 #if defined(__BIG_ENDIAN)
3162 #elif defined(__LITTLE_ENDIAN)
3166 struct regpair task_addr
;
3170 * Parameters initialized during offloaded according to FLOGI/PLOGI/PRLI and
3171 * used in FCoE context section
3173 struct ustorm_fcoe_params
{
3174 #if defined(__BIG_ENDIAN)
3177 #define USTORM_FCOE_PARAMS_B_MUL_N_PORT_IDS (0x1<<0)
3178 #define USTORM_FCOE_PARAMS_B_MUL_N_PORT_IDS_SHIFT 0
3179 #define USTORM_FCOE_PARAMS_B_E_D_TOV_RES (0x1<<1)
3180 #define USTORM_FCOE_PARAMS_B_E_D_TOV_RES_SHIFT 1
3181 #define USTORM_FCOE_PARAMS_B_CONT_INCR_SEQ_CNT (0x1<<2)
3182 #define USTORM_FCOE_PARAMS_B_CONT_INCR_SEQ_CNT_SHIFT 2
3183 #define USTORM_FCOE_PARAMS_B_CONF_REQ (0x1<<3)
3184 #define USTORM_FCOE_PARAMS_B_CONF_REQ_SHIFT 3
3185 #define USTORM_FCOE_PARAMS_B_REC_VALID (0x1<<4)
3186 #define USTORM_FCOE_PARAMS_B_REC_VALID_SHIFT 4
3187 #define USTORM_FCOE_PARAMS_B_CQ_TOGGLE_BIT (0x1<<5)
3188 #define USTORM_FCOE_PARAMS_B_CQ_TOGGLE_BIT_SHIFT 5
3189 #define USTORM_FCOE_PARAMS_B_XFRQ_TOGGLE_BIT (0x1<<6)
3190 #define USTORM_FCOE_PARAMS_B_XFRQ_TOGGLE_BIT_SHIFT 6
3191 #define USTORM_FCOE_PARAMS_RSRV0 (0x1FF<<7)
3192 #define USTORM_FCOE_PARAMS_RSRV0_SHIFT 7
3193 #elif defined(__LITTLE_ENDIAN)
3195 #define USTORM_FCOE_PARAMS_B_MUL_N_PORT_IDS (0x1<<0)
3196 #define USTORM_FCOE_PARAMS_B_MUL_N_PORT_IDS_SHIFT 0
3197 #define USTORM_FCOE_PARAMS_B_E_D_TOV_RES (0x1<<1)
3198 #define USTORM_FCOE_PARAMS_B_E_D_TOV_RES_SHIFT 1
3199 #define USTORM_FCOE_PARAMS_B_CONT_INCR_SEQ_CNT (0x1<<2)
3200 #define USTORM_FCOE_PARAMS_B_CONT_INCR_SEQ_CNT_SHIFT 2
3201 #define USTORM_FCOE_PARAMS_B_CONF_REQ (0x1<<3)
3202 #define USTORM_FCOE_PARAMS_B_CONF_REQ_SHIFT 3
3203 #define USTORM_FCOE_PARAMS_B_REC_VALID (0x1<<4)
3204 #define USTORM_FCOE_PARAMS_B_REC_VALID_SHIFT 4
3205 #define USTORM_FCOE_PARAMS_B_CQ_TOGGLE_BIT (0x1<<5)
3206 #define USTORM_FCOE_PARAMS_B_CQ_TOGGLE_BIT_SHIFT 5
3207 #define USTORM_FCOE_PARAMS_B_XFRQ_TOGGLE_BIT (0x1<<6)
3208 #define USTORM_FCOE_PARAMS_B_XFRQ_TOGGLE_BIT_SHIFT 6
3209 #define USTORM_FCOE_PARAMS_RSRV0 (0x1FF<<7)
3210 #define USTORM_FCOE_PARAMS_RSRV0_SHIFT 7
3213 #if defined(__BIG_ENDIAN)
3218 #elif defined(__LITTLE_ENDIAN)
3224 #if defined(__BIG_ENDIAN)
3225 u16 rx_total_conc_seqs
;
3226 u16 rx_max_fc_pay_len
;
3227 #elif defined(__LITTLE_ENDIAN)
3228 u16 rx_max_fc_pay_len
;
3229 u16 rx_total_conc_seqs
;
3231 #if defined(__BIG_ENDIAN)
3232 u8 task_pbe_idx_off
;
3233 u8 task_in_page_log_size
;
3234 u16 rx_max_conc_seqs
;
3235 #elif defined(__LITTLE_ENDIAN)
3236 u16 rx_max_conc_seqs
;
3237 u8 task_in_page_log_size
;
3238 u8 task_pbe_idx_off
;
3243 * FCoE 16-bits index structure
3245 struct fcoe_idx16_fields
{
3247 #define FCOE_IDX16_FIELDS_IDX (0x7FFF<<0)
3248 #define FCOE_IDX16_FIELDS_IDX_SHIFT 0
3249 #define FCOE_IDX16_FIELDS_MSB (0x1<<15)
3250 #define FCOE_IDX16_FIELDS_MSB_SHIFT 15
3254 * FCoE 16-bits index union
3256 union fcoe_idx16_field_union
{
3257 struct fcoe_idx16_fields fields
;
3262 * Parameters required for placement according to SGL
3264 struct ustorm_fcoe_data_place_mng
{
3265 #if defined(__BIG_ENDIAN)
3269 #elif defined(__LITTLE_ENDIAN)
3277 * Parameters required for placement according to SGL
3279 struct ustorm_fcoe_data_place
{
3280 struct ustorm_fcoe_data_place_mng cached_mng
;
3281 struct fcoe_bd_ctx cached_sge
[2];
3285 * TX processing shall write and RX processing shall read from this section
3287 union fcoe_u_tce_tx_wr_rx_rd_union
{
3288 struct fcoe_abts_info abts
;
3289 struct fcoe_cleanup_info cleanup
;
3290 struct fcoe_fw_tx_seq_ctx tx_seq_ctx
;
3295 * TX processing shall write and RX processing shall read from this section
3297 struct fcoe_u_tce_tx_wr_rx_rd
{
3298 union fcoe_u_tce_tx_wr_rx_rd_union union_ctx
;
3299 struct fcoe_tce_tx_wr_rx_rd_const const_ctx
;
3302 struct ustorm_fcoe_tce
{
3303 struct fcoe_u_tce_tx_wr_rx_rd txwr_rxrd
;
3304 struct fcoe_tce_rx_wr_tx_rd rxwr_txrd
;
3305 struct fcoe_tce_rx_only rxwr
;
3308 struct ustorm_fcoe_cache_ctx
{
3310 struct ustorm_fcoe_data_place data_place
;
3311 struct ustorm_fcoe_tce tce
;
3315 * Ustorm FCoE Storm Context
3317 struct ustorm_fcoe_st_context
{
3318 struct ustorm_fcoe_mng_ctx mng_ctx
;
3319 struct ustorm_fcoe_params fcoe_params
;
3320 struct regpair cq_base_addr
;
3321 struct regpair rq_pbl_base
;
3322 struct regpair rq_cur_page_addr
;
3323 struct regpair confq_pbl_base_addr
;
3324 struct regpair conn_db_base
;
3325 struct regpair xfrq_base_addr
;
3326 struct regpair lcq_base_addr
;
3327 #if defined(__BIG_ENDIAN)
3328 union fcoe_idx16_field_union rq_cons
;
3329 union fcoe_idx16_field_union rq_prod
;
3330 #elif defined(__LITTLE_ENDIAN)
3331 union fcoe_idx16_field_union rq_prod
;
3332 union fcoe_idx16_field_union rq_cons
;
3334 #if defined(__BIG_ENDIAN)
3337 #elif defined(__LITTLE_ENDIAN)
3341 #if defined(__BIG_ENDIAN)
3343 u16 hc_cram_address
;
3344 #elif defined(__LITTLE_ENDIAN)
3345 u16 hc_cram_address
;
3348 #if defined(__BIG_ENDIAN)
3349 u16 sq_xfrq_lcq_confq_size
;
3351 #elif defined(__LITTLE_ENDIAN)
3353 u16 sq_xfrq_lcq_confq_size
;
3355 #if defined(__BIG_ENDIAN)
3360 #elif defined(__LITTLE_ENDIAN)
3366 #if defined(__BIG_ENDIAN)
3368 u16 pbf_ack_ram_addr
;
3369 #elif defined(__LITTLE_ENDIAN)
3370 u16 pbf_ack_ram_addr
;
3373 struct ustorm_fcoe_cache_ctx cache_ctx
;
3377 * The FCoE non-aggregative context of Tstorm
3379 struct tstorm_fcoe_st_context
{
3380 struct regpair reserved0
;
3381 struct regpair reserved1
;
3385 * Ethernet context section
3387 struct xstorm_fcoe_eth_context_section
{
3388 #if defined(__BIG_ENDIAN)
3393 #elif defined(__LITTLE_ENDIAN)
3399 #if defined(__BIG_ENDIAN)
3404 #elif defined(__LITTLE_ENDIAN)
3410 #if defined(__BIG_ENDIAN)
3411 u16 reserved_vlan_type
;
3413 #define XSTORM_FCOE_ETH_CONTEXT_SECTION_VLAN_ID (0xFFF<<0)
3414 #define XSTORM_FCOE_ETH_CONTEXT_SECTION_VLAN_ID_SHIFT 0
3415 #define XSTORM_FCOE_ETH_CONTEXT_SECTION_CFI (0x1<<12)
3416 #define XSTORM_FCOE_ETH_CONTEXT_SECTION_CFI_SHIFT 12
3417 #define XSTORM_FCOE_ETH_CONTEXT_SECTION_PRIORITY (0x7<<13)
3418 #define XSTORM_FCOE_ETH_CONTEXT_SECTION_PRIORITY_SHIFT 13
3419 #elif defined(__LITTLE_ENDIAN)
3421 #define XSTORM_FCOE_ETH_CONTEXT_SECTION_VLAN_ID (0xFFF<<0)
3422 #define XSTORM_FCOE_ETH_CONTEXT_SECTION_VLAN_ID_SHIFT 0
3423 #define XSTORM_FCOE_ETH_CONTEXT_SECTION_CFI (0x1<<12)
3424 #define XSTORM_FCOE_ETH_CONTEXT_SECTION_CFI_SHIFT 12
3425 #define XSTORM_FCOE_ETH_CONTEXT_SECTION_PRIORITY (0x7<<13)
3426 #define XSTORM_FCOE_ETH_CONTEXT_SECTION_PRIORITY_SHIFT 13
3427 u16 reserved_vlan_type
;
3429 #if defined(__BIG_ENDIAN)
3434 #elif defined(__LITTLE_ENDIAN)
3443 * Flags used in FCoE context section - 1 byte
3445 struct xstorm_fcoe_context_flags
{
3447 #define XSTORM_FCOE_CONTEXT_FLAGS_B_PROC_Q (0x3<<0)
3448 #define XSTORM_FCOE_CONTEXT_FLAGS_B_PROC_Q_SHIFT 0
3449 #define XSTORM_FCOE_CONTEXT_FLAGS_B_MID_SEQ (0x1<<2)
3450 #define XSTORM_FCOE_CONTEXT_FLAGS_B_MID_SEQ_SHIFT 2
3451 #define XSTORM_FCOE_CONTEXT_FLAGS_B_BLOCK_SQ (0x1<<3)
3452 #define XSTORM_FCOE_CONTEXT_FLAGS_B_BLOCK_SQ_SHIFT 3
3453 #define XSTORM_FCOE_CONTEXT_FLAGS_B_REC_SUPPORT (0x1<<4)
3454 #define XSTORM_FCOE_CONTEXT_FLAGS_B_REC_SUPPORT_SHIFT 4
3455 #define XSTORM_FCOE_CONTEXT_FLAGS_B_SQ_TOGGLE (0x1<<5)
3456 #define XSTORM_FCOE_CONTEXT_FLAGS_B_SQ_TOGGLE_SHIFT 5
3457 #define XSTORM_FCOE_CONTEXT_FLAGS_B_XFRQ_TOGGLE (0x1<<6)
3458 #define XSTORM_FCOE_CONTEXT_FLAGS_B_XFRQ_TOGGLE_SHIFT 6
3459 #define XSTORM_FCOE_CONTEXT_FLAGS_B_VNTAG_VLAN (0x1<<7)
3460 #define XSTORM_FCOE_CONTEXT_FLAGS_B_VNTAG_VLAN_SHIFT 7
3463 struct xstorm_fcoe_tce
{
3464 struct fcoe_tce_tx_only txwr
;
3465 struct fcoe_tce_tx_wr_rx_rd txwr_rxrd
;
3469 * FCP_DATA parameters required for transmission
3471 struct xstorm_fcoe_fcp_data
{
3473 #if defined(__BIG_ENDIAN)
3477 #elif defined(__LITTLE_ENDIAN)
3484 #if defined(__BIG_ENDIAN)
3485 u16 num_of_pending_tasks
;
3487 #elif defined(__LITTLE_ENDIAN)
3489 u16 num_of_pending_tasks
;
3493 #if defined(__BIG_ENDIAN)
3494 u16 task_pbe_idx_off
;
3496 #elif defined(__LITTLE_ENDIAN)
3498 u16 task_pbe_idx_off
;
3502 #if defined(__BIG_ENDIAN)
3505 #elif defined(__LITTLE_ENDIAN)
3512 * vlan configuration
3514 struct xstorm_fcoe_vlan_conf
{
3516 #define XSTORM_FCOE_VLAN_CONF_PRIORITY (0x7<<0)
3517 #define XSTORM_FCOE_VLAN_CONF_PRIORITY_SHIFT 0
3518 #define XSTORM_FCOE_VLAN_CONF_INNER_VLAN_FLAG (0x1<<3)
3519 #define XSTORM_FCOE_VLAN_CONF_INNER_VLAN_FLAG_SHIFT 3
3520 #define XSTORM_FCOE_VLAN_CONF_RESERVED (0xF<<4)
3521 #define XSTORM_FCOE_VLAN_CONF_RESERVED_SHIFT 4
3525 * FCoE 16-bits vlan structure
3527 struct fcoe_vlan_fields
{
3529 #define FCOE_VLAN_FIELDS_VID (0xFFF<<0)
3530 #define FCOE_VLAN_FIELDS_VID_SHIFT 0
3531 #define FCOE_VLAN_FIELDS_CLI (0x1<<12)
3532 #define FCOE_VLAN_FIELDS_CLI_SHIFT 12
3533 #define FCOE_VLAN_FIELDS_PRI (0x7<<13)
3534 #define FCOE_VLAN_FIELDS_PRI_SHIFT 13
3538 * FCoE 16-bits vlan union
3540 union fcoe_vlan_field_union
{
3541 struct fcoe_vlan_fields fields
;
3546 * FCoE 16-bits vlan, vif union
3548 union fcoe_vlan_vif_field_union
{
3549 union fcoe_vlan_field_union vlan
;
3554 * FCoE context section
3556 struct xstorm_fcoe_context_section
{
3557 #if defined(__BIG_ENDIAN)
3560 #elif defined(__LITTLE_ENDIAN)
3564 #if defined(__BIG_ENDIAN)
3567 #elif defined(__LITTLE_ENDIAN)
3571 #if defined(__BIG_ENDIAN)
3572 u16 sq_xfrq_lcq_confq_size
;
3573 u16 tx_max_fc_pay_len
;
3574 #elif defined(__LITTLE_ENDIAN)
3575 u16 tx_max_fc_pay_len
;
3576 u16 sq_xfrq_lcq_confq_size
;
3579 #if defined(__BIG_ENDIAN)
3583 struct xstorm_fcoe_context_flags tx_flags
;
3584 #elif defined(__LITTLE_ENDIAN)
3585 struct xstorm_fcoe_context_flags tx_flags
;
3590 #if defined(__BIG_ENDIAN)
3594 #elif defined(__LITTLE_ENDIAN)
3599 struct regpair confq_curr_page_addr
;
3600 struct fcoe_cached_wqe cached_wqe
[8];
3601 struct regpair lcq_base_addr
;
3602 struct xstorm_fcoe_tce tce
;
3603 struct xstorm_fcoe_fcp_data fcp_data
;
3604 #if defined(__BIG_ENDIAN)
3605 u8 tx_max_conc_seqs_c3
;
3608 u8 data_pb_cmd_size
;
3609 #elif defined(__LITTLE_ENDIAN)
3610 u8 data_pb_cmd_size
;
3613 u8 tx_max_conc_seqs_c3
;
3615 #if defined(__BIG_ENDIAN)
3616 u16 fcoe_tx_stat_params_ram_addr
;
3617 u16 fcoe_tx_fc_seq_ram_addr
;
3618 #elif defined(__LITTLE_ENDIAN)
3619 u16 fcoe_tx_fc_seq_ram_addr
;
3620 u16 fcoe_tx_stat_params_ram_addr
;
3622 #if defined(__BIG_ENDIAN)
3623 u8 fcp_cmd_line_credit
;
3626 #elif defined(__LITTLE_ENDIAN)
3629 u8 fcp_cmd_line_credit
;
3631 #if defined(__BIG_ENDIAN)
3632 union fcoe_vlan_vif_field_union multi_func_val
;
3634 struct xstorm_fcoe_vlan_conf orig_vlan_conf
;
3635 #elif defined(__LITTLE_ENDIAN)
3636 struct xstorm_fcoe_vlan_conf orig_vlan_conf
;
3638 union fcoe_vlan_vif_field_union multi_func_val
;
3640 #if defined(__BIG_ENDIAN)
3641 u16 fcp_cmd_frame_size
;
3643 #elif defined(__LITTLE_ENDIAN)
3645 u16 fcp_cmd_frame_size
;
3647 #if defined(__BIG_ENDIAN)
3652 #elif defined(__LITTLE_ENDIAN)
3662 * Xstorm FCoE Storm Context
3664 struct xstorm_fcoe_st_context
{
3665 struct xstorm_fcoe_eth_context_section eth
;
3666 struct xstorm_fcoe_context_section fcoe
;
3670 * Fcoe connection context
3672 struct fcoe_context
{
3673 struct ustorm_fcoe_st_context ustorm_st_context
;
3674 struct tstorm_fcoe_st_context tstorm_st_context
;
3675 struct xstorm_fcoe_ag_context xstorm_ag_context
;
3676 struct tstorm_fcoe_ag_context tstorm_ag_context
;
3677 struct ustorm_fcoe_ag_context ustorm_ag_context
;
3678 struct timers_block_context timers_context
;
3679 struct xstorm_fcoe_st_context xstorm_st_context
;
3683 * FCoE init params passed by driver to FW in FCoE init ramrod
3684 * $$KEEP_ENDIANNESS$$
3686 struct fcoe_init_ramrod_params
{
3687 struct fcoe_kwqe_init1 init_kwqe1
;
3688 struct fcoe_kwqe_init2 init_kwqe2
;
3689 struct fcoe_kwqe_init3 init_kwqe3
;
3690 struct regpair eq_pbl_base
;
3701 * FCoE statistics params buffer passed by driver to FW in FCoE statistics
3702 * ramrod $$KEEP_ENDIANNESS$$
3704 struct fcoe_stat_ramrod_params
{
3705 struct fcoe_kwqe_stat stat_kwqe
;
3709 * CQ DB CQ producer and pending completion counter
3711 struct iscsi_cq_db_prod_pnd_cmpltn_cnt
{
3712 #if defined(__BIG_ENDIAN)
3715 #elif defined(__LITTLE_ENDIAN)
3722 * CQ DB pending completion ITT array
3724 struct iscsi_cq_db_prod_pnd_cmpltn_cnt_arr
{
3725 struct iscsi_cq_db_prod_pnd_cmpltn_cnt prod_pend_comp
[8];
3729 * Cstorm CQ sequence to notify array, updated by driver
3731 struct iscsi_cq_db_sqn_2_notify_arr
{
3736 * Cstorm iSCSI Storm Context
3738 struct cstorm_iscsi_st_context
{
3739 struct iscsi_cq_db_prod_pnd_cmpltn_cnt_arr cq_c_prod_pend_comp_ctr_arr
;
3740 struct iscsi_cq_db_sqn_2_notify_arr cq_c_prod_sqn_arr
;
3741 struct iscsi_cq_db_sqn_2_notify_arr cq_c_sqn_2_notify_arr
;
3742 struct regpair hq_pbl_base
;
3743 struct regpair hq_curr_pbe
;
3744 struct regpair task_pbl_base
;
3745 struct regpair cq_db_base
;
3746 #if defined(__BIG_ENDIAN)
3749 #elif defined(__LITTLE_ENDIAN)
3753 u32 hq_bd_data_segment_len
;
3754 u32 hq_bd_buffer_offset
;
3755 #if defined(__BIG_ENDIAN)
3757 u8 cq_proc_en_bit_map
;
3758 u8 cq_pend_comp_itt_valid_bit_map
;
3760 #elif defined(__LITTLE_ENDIAN)
3762 u8 cq_pend_comp_itt_valid_bit_map
;
3763 u8 cq_proc_en_bit_map
;
3767 #if defined(__BIG_ENDIAN)
3769 #define CSTORM_ISCSI_ST_CONTEXT_DATA_DIGEST_EN (0x1<<0)
3770 #define CSTORM_ISCSI_ST_CONTEXT_DATA_DIGEST_EN_SHIFT 0
3771 #define CSTORM_ISCSI_ST_CONTEXT_HDR_DIGEST_EN (0x1<<1)
3772 #define CSTORM_ISCSI_ST_CONTEXT_HDR_DIGEST_EN_SHIFT 1
3773 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_CTXT_VALID (0x1<<2)
3774 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_CTXT_VALID_SHIFT 2
3775 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_LCL_CMPLN_FLG (0x1<<3)
3776 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_LCL_CMPLN_FLG_SHIFT 3
3777 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_WRITE_TASK (0x1<<4)
3778 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_WRITE_TASK_SHIFT 4
3779 #define CSTORM_ISCSI_ST_CONTEXT_CTRL_FLAGS_RSRV (0x7FF<<5)
3780 #define CSTORM_ISCSI_ST_CONTEXT_CTRL_FLAGS_RSRV_SHIFT 5
3782 #elif defined(__LITTLE_ENDIAN)
3785 #define CSTORM_ISCSI_ST_CONTEXT_DATA_DIGEST_EN (0x1<<0)
3786 #define CSTORM_ISCSI_ST_CONTEXT_DATA_DIGEST_EN_SHIFT 0
3787 #define CSTORM_ISCSI_ST_CONTEXT_HDR_DIGEST_EN (0x1<<1)
3788 #define CSTORM_ISCSI_ST_CONTEXT_HDR_DIGEST_EN_SHIFT 1
3789 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_CTXT_VALID (0x1<<2)
3790 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_CTXT_VALID_SHIFT 2
3791 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_LCL_CMPLN_FLG (0x1<<3)
3792 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_LCL_CMPLN_FLG_SHIFT 3
3793 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_WRITE_TASK (0x1<<4)
3794 #define CSTORM_ISCSI_ST_CONTEXT_HQ_BD_WRITE_TASK_SHIFT 4
3795 #define CSTORM_ISCSI_ST_CONTEXT_CTRL_FLAGS_RSRV (0x7FF<<5)
3796 #define CSTORM_ISCSI_ST_CONTEXT_CTRL_FLAGS_RSRV_SHIFT 5
3798 struct regpair rsrv1
;
3803 * SCSI read/write SQ WQE
3805 struct iscsi_cmd_pdu_hdr_little_endian
{
3806 #if defined(__BIG_ENDIAN)
3809 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_ATTRIBUTES (0x7<<0)
3810 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_ATTRIBUTES_SHIFT 0
3811 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_RSRV1 (0x3<<3)
3812 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_RSRV1_SHIFT 3
3813 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_WRITE_FLAG (0x1<<5)
3814 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_WRITE_FLAG_SHIFT 5
3815 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_READ_FLAG (0x1<<6)
3816 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_READ_FLAG_SHIFT 6
3817 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_FINAL_FLAG (0x1<<7)
3818 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_FINAL_FLAG_SHIFT 7
3820 #elif defined(__LITTLE_ENDIAN)
3823 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_ATTRIBUTES (0x7<<0)
3824 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_ATTRIBUTES_SHIFT 0
3825 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_RSRV1 (0x3<<3)
3826 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_RSRV1_SHIFT 3
3827 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_WRITE_FLAG (0x1<<5)
3828 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_WRITE_FLAG_SHIFT 5
3829 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_READ_FLAG (0x1<<6)
3830 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_READ_FLAG_SHIFT 6
3831 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_FINAL_FLAG (0x1<<7)
3832 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_FINAL_FLAG_SHIFT 7
3836 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_DATA_SEGMENT_LENGTH (0xFFFFFF<<0)
3837 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_DATA_SEGMENT_LENGTH_SHIFT 0
3838 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_TOTAL_AHS_LENGTH (0xFF<<24)
3839 #define ISCSI_CMD_PDU_HDR_LITTLE_ENDIAN_TOTAL_AHS_LENGTH_SHIFT 24
3842 u32 expected_data_transfer_length
;
3845 u32 scsi_command_block
[4];
3850 * Buffer per connection, used in Tstorm
3852 struct iscsi_conn_buf
{
3853 struct regpair reserved
[8];
3858 * iSCSI context region, used only in iSCSI
3860 struct ustorm_iscsi_rq_db
{
3861 struct regpair pbl_base
;
3862 struct regpair curr_pbe
;
3866 * iSCSI context region, used only in iSCSI
3868 struct ustorm_iscsi_r2tq_db
{
3869 struct regpair pbl_base
;
3870 struct regpair curr_pbe
;
3874 * iSCSI context region, used only in iSCSI
3876 struct ustorm_iscsi_cq_db
{
3877 #if defined(__BIG_ENDIAN)
3880 #elif defined(__LITTLE_ENDIAN)
3884 struct regpair curr_pbe
;
3888 * iSCSI context region, used only in iSCSI
3891 struct ustorm_iscsi_rq_db rq
;
3892 struct ustorm_iscsi_r2tq_db r2tq
;
3893 struct ustorm_iscsi_cq_db cq
[8];
3894 #if defined(__BIG_ENDIAN)
3897 #elif defined(__LITTLE_ENDIAN)
3901 struct regpair cq_pbl_base
;
3905 * iSCSI context region, used only in iSCSI
3907 struct ustorm_iscsi_placement_db
{
3910 u32 local_sge_0_address_hi
;
3911 u32 local_sge_0_address_lo
;
3912 #if defined(__BIG_ENDIAN)
3913 u16 curr_sge_offset
;
3914 u16 local_sge_0_size
;
3915 #elif defined(__LITTLE_ENDIAN)
3916 u16 local_sge_0_size
;
3917 u16 curr_sge_offset
;
3919 u32 local_sge_1_address_hi
;
3920 u32 local_sge_1_address_lo
;
3921 #if defined(__BIG_ENDIAN)
3924 u16 local_sge_1_size
;
3925 #elif defined(__LITTLE_ENDIAN)
3926 u16 local_sge_1_size
;
3930 #if defined(__BIG_ENDIAN)
3932 u8 local_sge_index_2b
;
3934 #elif defined(__LITTLE_ENDIAN)
3936 u8 local_sge_index_2b
;
3940 u32 place_db_bitfield_1
;
3941 #define USTORM_ISCSI_PLACEMENT_DB_REM_PDU_PAYLOAD (0xFFFFFF<<0)
3942 #define USTORM_ISCSI_PLACEMENT_DB_REM_PDU_PAYLOAD_SHIFT 0
3943 #define USTORM_ISCSI_PLACEMENT_DB_CQ_ID (0xFF<<24)
3944 #define USTORM_ISCSI_PLACEMENT_DB_CQ_ID_SHIFT 24
3945 u32 place_db_bitfield_2
;
3946 #define USTORM_ISCSI_PLACEMENT_DB_BYTES_2_TRUNCATE (0xFFFFFF<<0)
3947 #define USTORM_ISCSI_PLACEMENT_DB_BYTES_2_TRUNCATE_SHIFT 0
3948 #define USTORM_ISCSI_PLACEMENT_DB_HOST_SGE_INDEX (0xFF<<24)
3949 #define USTORM_ISCSI_PLACEMENT_DB_HOST_SGE_INDEX_SHIFT 24
3951 #define USTORM_ISCSI_PLACEMENT_DB_REM_SGE_SIZE (0xFFFFFF<<0)
3952 #define USTORM_ISCSI_PLACEMENT_DB_REM_SGE_SIZE_SHIFT 0
3953 #define USTORM_ISCSI_PLACEMENT_DB_EXP_DIGEST_3B (0xFF<<24)
3954 #define USTORM_ISCSI_PLACEMENT_DB_EXP_DIGEST_3B_SHIFT 24
3958 * Ustorm iSCSI Storm Context
3960 struct ustorm_iscsi_st_context
{
3963 struct rings_db ring
;
3964 struct regpair task_pbl_base
;
3965 struct regpair tce_phy_addr
;
3966 struct ustorm_iscsi_placement_db place_db
;
3969 #if defined(__BIG_ENDIAN)
3972 #elif defined(__LITTLE_ENDIAN)
3977 #if defined(__BIG_ENDIAN)
3978 u8 hdr_second_byte_union
;
3980 #define USTORM_ISCSI_ST_CONTEXT_BMIDDLEOFPDU (0x1<<0)
3981 #define USTORM_ISCSI_ST_CONTEXT_BMIDDLEOFPDU_SHIFT 0
3982 #define USTORM_ISCSI_ST_CONTEXT_BFENCECQE (0x1<<1)
3983 #define USTORM_ISCSI_ST_CONTEXT_BFENCECQE_SHIFT 1
3984 #define USTORM_ISCSI_ST_CONTEXT_BRESETCRC (0x1<<2)
3985 #define USTORM_ISCSI_ST_CONTEXT_BRESETCRC_SHIFT 2
3986 #define USTORM_ISCSI_ST_CONTEXT_RESERVED1 (0x1F<<3)
3987 #define USTORM_ISCSI_ST_CONTEXT_RESERVED1_SHIFT 3
3988 u8 task_pdu_cache_index
;
3989 u8 task_pbe_cache_index
;
3990 #elif defined(__LITTLE_ENDIAN)
3991 u8 task_pbe_cache_index
;
3992 u8 task_pdu_cache_index
;
3994 #define USTORM_ISCSI_ST_CONTEXT_BMIDDLEOFPDU (0x1<<0)
3995 #define USTORM_ISCSI_ST_CONTEXT_BMIDDLEOFPDU_SHIFT 0
3996 #define USTORM_ISCSI_ST_CONTEXT_BFENCECQE (0x1<<1)
3997 #define USTORM_ISCSI_ST_CONTEXT_BFENCECQE_SHIFT 1
3998 #define USTORM_ISCSI_ST_CONTEXT_BRESETCRC (0x1<<2)
3999 #define USTORM_ISCSI_ST_CONTEXT_BRESETCRC_SHIFT 2
4000 #define USTORM_ISCSI_ST_CONTEXT_RESERVED1 (0x1F<<3)
4001 #define USTORM_ISCSI_ST_CONTEXT_RESERVED1_SHIFT 3
4002 u8 hdr_second_byte_union
;
4004 #if defined(__BIG_ENDIAN)
4008 #elif defined(__LITTLE_ENDIAN)
4014 #if defined(__BIG_ENDIAN)
4018 #elif defined(__LITTLE_ENDIAN)
4024 #define USTORM_ISCSI_ST_CONTEXT_MAX_RECV_PDU_LENGTH (0xFFFFFF<<0)
4025 #define USTORM_ISCSI_ST_CONTEXT_MAX_RECV_PDU_LENGTH_SHIFT 0
4026 #define USTORM_ISCSI_ST_CONTEXT_MAX_OUTSTANDING_R2TS (0xFF<<24)
4027 #define USTORM_ISCSI_ST_CONTEXT_MAX_OUTSTANDING_R2TS_SHIFT 24
4028 u32 negotiated_rx_and_flags
;
4029 #define USTORM_ISCSI_ST_CONTEXT_MAX_BURST_LENGTH (0xFFFFFF<<0)
4030 #define USTORM_ISCSI_ST_CONTEXT_MAX_BURST_LENGTH_SHIFT 0
4031 #define USTORM_ISCSI_ST_CONTEXT_B_CQE_POSTED_OR_HEADER_CACHED (0x1<<24)
4032 #define USTORM_ISCSI_ST_CONTEXT_B_CQE_POSTED_OR_HEADER_CACHED_SHIFT 24
4033 #define USTORM_ISCSI_ST_CONTEXT_B_HDR_DIGEST_EN (0x1<<25)
4034 #define USTORM_ISCSI_ST_CONTEXT_B_HDR_DIGEST_EN_SHIFT 25
4035 #define USTORM_ISCSI_ST_CONTEXT_B_DATA_DIGEST_EN (0x1<<26)
4036 #define USTORM_ISCSI_ST_CONTEXT_B_DATA_DIGEST_EN_SHIFT 26
4037 #define USTORM_ISCSI_ST_CONTEXT_B_PROTOCOL_ERROR (0x1<<27)
4038 #define USTORM_ISCSI_ST_CONTEXT_B_PROTOCOL_ERROR_SHIFT 27
4039 #define USTORM_ISCSI_ST_CONTEXT_B_TASK_VALID (0x1<<28)
4040 #define USTORM_ISCSI_ST_CONTEXT_B_TASK_VALID_SHIFT 28
4041 #define USTORM_ISCSI_ST_CONTEXT_TASK_TYPE (0x3<<29)
4042 #define USTORM_ISCSI_ST_CONTEXT_TASK_TYPE_SHIFT 29
4043 #define USTORM_ISCSI_ST_CONTEXT_B_ALL_DATA_ACKED (0x1<<31)
4044 #define USTORM_ISCSI_ST_CONTEXT_B_ALL_DATA_ACKED_SHIFT 31
4048 * TCP context region, shared in TOE, RDMA and ISCSI
4050 struct tstorm_tcp_st_context_section
{
4052 #define TSTORM_TCP_ST_CONTEXT_SECTION_RTT_SRTT (0xFFFFFF<<0)
4053 #define TSTORM_TCP_ST_CONTEXT_SECTION_RTT_SRTT_SHIFT 0
4054 #define TSTORM_TCP_ST_CONTEXT_SECTION_PAWS_INVALID (0x1<<24)
4055 #define TSTORM_TCP_ST_CONTEXT_SECTION_PAWS_INVALID_SHIFT 24
4056 #define TSTORM_TCP_ST_CONTEXT_SECTION_TIMESTAMP_EXISTS (0x1<<25)
4057 #define TSTORM_TCP_ST_CONTEXT_SECTION_TIMESTAMP_EXISTS_SHIFT 25
4058 #define TSTORM_TCP_ST_CONTEXT_SECTION_RESERVED0 (0x1<<26)
4059 #define TSTORM_TCP_ST_CONTEXT_SECTION_RESERVED0_SHIFT 26
4060 #define TSTORM_TCP_ST_CONTEXT_SECTION_STOP_RX_PAYLOAD (0x1<<27)
4061 #define TSTORM_TCP_ST_CONTEXT_SECTION_STOP_RX_PAYLOAD_SHIFT 27
4062 #define TSTORM_TCP_ST_CONTEXT_SECTION_KA_ENABLED (0x1<<28)
4063 #define TSTORM_TCP_ST_CONTEXT_SECTION_KA_ENABLED_SHIFT 28
4064 #define TSTORM_TCP_ST_CONTEXT_SECTION_FIRST_RTO_ESTIMATE (0x1<<29)
4065 #define TSTORM_TCP_ST_CONTEXT_SECTION_FIRST_RTO_ESTIMATE_SHIFT 29
4066 #define TSTORM_TCP_ST_CONTEXT_SECTION_MAX_SEG_RETRANSMIT_EN (0x1<<30)
4067 #define TSTORM_TCP_ST_CONTEXT_SECTION_MAX_SEG_RETRANSMIT_EN_SHIFT 30
4068 #define TSTORM_TCP_ST_CONTEXT_SECTION_LAST_ISLE_HAS_FIN (0x1<<31)
4069 #define TSTORM_TCP_ST_CONTEXT_SECTION_LAST_ISLE_HAS_FIN_SHIFT 31
4071 #define TSTORM_TCP_ST_CONTEXT_SECTION_RTT_VARIATION (0xFFFFFF<<0)
4072 #define TSTORM_TCP_ST_CONTEXT_SECTION_RTT_VARIATION_SHIFT 0
4073 #define TSTORM_TCP_ST_CONTEXT_SECTION_DA_EN (0x1<<24)
4074 #define TSTORM_TCP_ST_CONTEXT_SECTION_DA_EN_SHIFT 24
4075 #define TSTORM_TCP_ST_CONTEXT_SECTION_DA_COUNTER_EN (0x1<<25)
4076 #define TSTORM_TCP_ST_CONTEXT_SECTION_DA_COUNTER_EN_SHIFT 25
4077 #define __TSTORM_TCP_ST_CONTEXT_SECTION_KA_PROBE_SENT (0x1<<26)
4078 #define __TSTORM_TCP_ST_CONTEXT_SECTION_KA_PROBE_SENT_SHIFT 26
4079 #define __TSTORM_TCP_ST_CONTEXT_SECTION_PERSIST_PROBE_SENT (0x1<<27)
4080 #define __TSTORM_TCP_ST_CONTEXT_SECTION_PERSIST_PROBE_SENT_SHIFT 27
4081 #define TSTORM_TCP_ST_CONTEXT_SECTION_UPDATE_L2_STATSTICS (0x1<<28)
4082 #define TSTORM_TCP_ST_CONTEXT_SECTION_UPDATE_L2_STATSTICS_SHIFT 28
4083 #define TSTORM_TCP_ST_CONTEXT_SECTION_UPDATE_L4_STATSTICS (0x1<<29)
4084 #define TSTORM_TCP_ST_CONTEXT_SECTION_UPDATE_L4_STATSTICS_SHIFT 29
4085 #define __TSTORM_TCP_ST_CONTEXT_SECTION_IN_WINDOW_RST_ATTACK (0x1<<30)
4086 #define __TSTORM_TCP_ST_CONTEXT_SECTION_IN_WINDOW_RST_ATTACK_SHIFT 30
4087 #define __TSTORM_TCP_ST_CONTEXT_SECTION_IN_WINDOW_SYN_ATTACK (0x1<<31)
4088 #define __TSTORM_TCP_ST_CONTEXT_SECTION_IN_WINDOW_SYN_ATTACK_SHIFT 31
4089 #if defined(__BIG_ENDIAN)
4093 #elif defined(__LITTLE_ENDIAN)
4099 u32 timestamp_recent
;
4100 u32 timestamp_recent_time
;
4105 u32 expected_rel_seq
;
4107 #if defined(__BIG_ENDIAN)
4108 u8 retransmit_count
;
4109 u8 ka_max_probe_count
;
4110 u8 persist_probe_count
;
4112 #elif defined(__LITTLE_ENDIAN)
4114 u8 persist_probe_count
;
4115 u8 ka_max_probe_count
;
4116 u8 retransmit_count
;
4118 #if defined(__BIG_ENDIAN)
4119 u8 statistics_counter_id
;
4120 u8 ooo_support_mode
;
4123 #elif defined(__LITTLE_ENDIAN)
4126 u8 ooo_support_mode
;
4127 u8 statistics_counter_id
;
4129 u32 retransmit_start_time
;
4134 #if defined(__BIG_ENDIAN)
4135 u16 second_isle_address
;
4137 #elif defined(__LITTLE_ENDIAN)
4139 u16 second_isle_address
;
4141 #if defined(__BIG_ENDIAN)
4142 u8 max_isles_ever_happened
;
4144 u16 last_isle_address
;
4145 #elif defined(__LITTLE_ENDIAN)
4146 u16 last_isle_address
;
4148 u8 max_isles_ever_happened
;
4151 #if defined(__BIG_ENDIAN)
4152 u16 lsb_mac_address
;
4154 #elif defined(__LITTLE_ENDIAN)
4156 u16 lsb_mac_address
;
4158 #if defined(__BIG_ENDIAN)
4159 u16 msb_mac_address
;
4160 u16 mid_mac_address
;
4161 #elif defined(__LITTLE_ENDIAN)
4162 u16 mid_mac_address
;
4163 u16 msb_mac_address
;
4165 u32 rightmost_received_seq
;
4169 * Termination variables
4171 struct iscsi_term_vars
{
4173 #define ISCSI_TERM_VARS_TCP_STATE (0xF<<0)
4174 #define ISCSI_TERM_VARS_TCP_STATE_SHIFT 0
4175 #define ISCSI_TERM_VARS_FIN_RECEIVED_SBIT (0x1<<4)
4176 #define ISCSI_TERM_VARS_FIN_RECEIVED_SBIT_SHIFT 4
4177 #define ISCSI_TERM_VARS_ACK_ON_FIN_RECEIVED_SBIT (0x1<<5)
4178 #define ISCSI_TERM_VARS_ACK_ON_FIN_RECEIVED_SBIT_SHIFT 5
4179 #define ISCSI_TERM_VARS_TERM_ON_CHIP (0x1<<6)
4180 #define ISCSI_TERM_VARS_TERM_ON_CHIP_SHIFT 6
4181 #define ISCSI_TERM_VARS_RSRV (0x1<<7)
4182 #define ISCSI_TERM_VARS_RSRV_SHIFT 7
4186 * iSCSI context region, used only in iSCSI
4188 struct tstorm_iscsi_st_context_section
{
4191 #if defined(__BIG_ENDIAN)
4194 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_HDR_DIGEST_EN (0x1<<0)
4195 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_HDR_DIGEST_EN_SHIFT 0
4196 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_DATA_DIGEST_EN (0x1<<1)
4197 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_DATA_DIGEST_EN_SHIFT 1
4198 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_PARTIAL_HEADER (0x1<<2)
4199 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_PARTIAL_HEADER_SHIFT 2
4200 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_FULL_FEATURE (0x1<<3)
4201 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_FULL_FEATURE_SHIFT 3
4202 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_DROP_ALL_PDUS (0x1<<4)
4203 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_DROP_ALL_PDUS_SHIFT 4
4204 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_NALLEN (0x3<<5)
4205 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_NALLEN_SHIFT 5
4206 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_RSRV0 (0x1<<7)
4207 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_RSRV0_SHIFT 7
4208 u8 hdr_bytes_2_fetch
;
4209 #elif defined(__LITTLE_ENDIAN)
4210 u8 hdr_bytes_2_fetch
;
4212 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_HDR_DIGEST_EN (0x1<<0)
4213 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_HDR_DIGEST_EN_SHIFT 0
4214 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_DATA_DIGEST_EN (0x1<<1)
4215 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_DATA_DIGEST_EN_SHIFT 1
4216 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_PARTIAL_HEADER (0x1<<2)
4217 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_PARTIAL_HEADER_SHIFT 2
4218 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_FULL_FEATURE (0x1<<3)
4219 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_FULL_FEATURE_SHIFT 3
4220 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_DROP_ALL_PDUS (0x1<<4)
4221 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_B_DROP_ALL_PDUS_SHIFT 4
4222 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_NALLEN (0x3<<5)
4223 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_NALLEN_SHIFT 5
4224 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_RSRV0 (0x1<<7)
4225 #define TSTORM_ISCSI_ST_CONTEXT_SECTION_RSRV0_SHIFT 7
4228 struct regpair rq_db_phy_addr
;
4229 #if defined(__BIG_ENDIAN)
4230 struct iscsi_term_vars term_vars
;
4233 #elif defined(__LITTLE_ENDIAN)
4236 struct iscsi_term_vars term_vars
;
4242 * The iSCSI non-aggregative context of Tstorm
4244 struct tstorm_iscsi_st_context
{
4245 struct tstorm_tcp_st_context_section tcp
;
4246 struct tstorm_iscsi_st_context_section iscsi
;
4250 * Ethernet context section, shared in TOE, RDMA and ISCSI
4252 struct xstorm_eth_context_section
{
4253 #if defined(__BIG_ENDIAN)
4258 #elif defined(__LITTLE_ENDIAN)
4264 #if defined(__BIG_ENDIAN)
4269 #elif defined(__LITTLE_ENDIAN)
4275 #if defined(__BIG_ENDIAN)
4276 u16 reserved_vlan_type
;
4278 #define XSTORM_ETH_CONTEXT_SECTION_VLAN_ID (0xFFF<<0)
4279 #define XSTORM_ETH_CONTEXT_SECTION_VLAN_ID_SHIFT 0
4280 #define XSTORM_ETH_CONTEXT_SECTION_CFI (0x1<<12)
4281 #define XSTORM_ETH_CONTEXT_SECTION_CFI_SHIFT 12
4282 #define XSTORM_ETH_CONTEXT_SECTION_PRIORITY (0x7<<13)
4283 #define XSTORM_ETH_CONTEXT_SECTION_PRIORITY_SHIFT 13
4284 #elif defined(__LITTLE_ENDIAN)
4286 #define XSTORM_ETH_CONTEXT_SECTION_VLAN_ID (0xFFF<<0)
4287 #define XSTORM_ETH_CONTEXT_SECTION_VLAN_ID_SHIFT 0
4288 #define XSTORM_ETH_CONTEXT_SECTION_CFI (0x1<<12)
4289 #define XSTORM_ETH_CONTEXT_SECTION_CFI_SHIFT 12
4290 #define XSTORM_ETH_CONTEXT_SECTION_PRIORITY (0x7<<13)
4291 #define XSTORM_ETH_CONTEXT_SECTION_PRIORITY_SHIFT 13
4292 u16 reserved_vlan_type
;
4294 #if defined(__BIG_ENDIAN)
4299 #elif defined(__LITTLE_ENDIAN)
4308 * IpV4 context section, shared in TOE, RDMA and ISCSI
4310 struct xstorm_ip_v4_context_section
{
4311 #if defined(__BIG_ENDIAN)
4312 u16 __pbf_hdr_cmd_rsvd_id
;
4313 u16 __pbf_hdr_cmd_rsvd_flags_offset
;
4314 #elif defined(__LITTLE_ENDIAN)
4315 u16 __pbf_hdr_cmd_rsvd_flags_offset
;
4316 u16 __pbf_hdr_cmd_rsvd_id
;
4318 #if defined(__BIG_ENDIAN)
4319 u8 __pbf_hdr_cmd_rsvd_ver_ihl
;
4321 u16 __pbf_hdr_cmd_rsvd_length
;
4322 #elif defined(__LITTLE_ENDIAN)
4323 u16 __pbf_hdr_cmd_rsvd_length
;
4325 u8 __pbf_hdr_cmd_rsvd_ver_ihl
;
4328 #if defined(__BIG_ENDIAN)
4330 u8 __pbf_hdr_cmd_rsvd_protocol
;
4331 u16 __pbf_hdr_cmd_rsvd_csum
;
4332 #elif defined(__LITTLE_ENDIAN)
4333 u16 __pbf_hdr_cmd_rsvd_csum
;
4334 u8 __pbf_hdr_cmd_rsvd_protocol
;
4337 u32 __pbf_hdr_cmd_rsvd_1
;
4342 * context section, shared in TOE, RDMA and ISCSI
4344 struct xstorm_padded_ip_v4_context_section
{
4345 struct xstorm_ip_v4_context_section ip_v4
;
4350 * IpV6 context section, shared in TOE, RDMA and ISCSI
4352 struct xstorm_ip_v6_context_section
{
4353 #if defined(__BIG_ENDIAN)
4354 u16 pbf_hdr_cmd_rsvd_payload_len
;
4355 u8 pbf_hdr_cmd_rsvd_nxt_hdr
;
4357 #elif defined(__LITTLE_ENDIAN)
4359 u8 pbf_hdr_cmd_rsvd_nxt_hdr
;
4360 u16 pbf_hdr_cmd_rsvd_payload_len
;
4362 u32 priority_flow_label
;
4363 #define XSTORM_IP_V6_CONTEXT_SECTION_FLOW_LABEL (0xFFFFF<<0)
4364 #define XSTORM_IP_V6_CONTEXT_SECTION_FLOW_LABEL_SHIFT 0
4365 #define XSTORM_IP_V6_CONTEXT_SECTION_TRAFFIC_CLASS (0xFF<<20)
4366 #define XSTORM_IP_V6_CONTEXT_SECTION_TRAFFIC_CLASS_SHIFT 20
4367 #define XSTORM_IP_V6_CONTEXT_SECTION_PBF_HDR_CMD_RSVD_VER (0xF<<28)
4368 #define XSTORM_IP_V6_CONTEXT_SECTION_PBF_HDR_CMD_RSVD_VER_SHIFT 28
4369 u32 ip_local_addr_lo_hi
;
4370 u32 ip_local_addr_lo_lo
;
4371 u32 ip_local_addr_hi_hi
;
4372 u32 ip_local_addr_hi_lo
;
4373 u32 ip_remote_addr_lo_hi
;
4374 u32 ip_remote_addr_lo_lo
;
4375 u32 ip_remote_addr_hi_hi
;
4376 u32 ip_remote_addr_hi_lo
;
4379 union xstorm_ip_context_section_types
{
4380 struct xstorm_padded_ip_v4_context_section padded_ip_v4
;
4381 struct xstorm_ip_v6_context_section ip_v6
;
4385 * TCP context section, shared in TOE, RDMA and ISCSI
4387 struct xstorm_tcp_context_section
{
4389 #if defined(__BIG_ENDIAN)
4392 #elif defined(__LITTLE_ENDIAN)
4396 #if defined(__BIG_ENDIAN)
4397 u8 original_nagle_1b
;
4400 #define XSTORM_TCP_CONTEXT_SECTION_TOTAL_HEADER_SIZE (0xFF<<0)
4401 #define XSTORM_TCP_CONTEXT_SECTION_TOTAL_HEADER_SIZE_SHIFT 0
4402 #define __XSTORM_TCP_CONTEXT_SECTION_ECT_BIT (0x1<<8)
4403 #define __XSTORM_TCP_CONTEXT_SECTION_ECT_BIT_SHIFT 8
4404 #define __XSTORM_TCP_CONTEXT_SECTION_ECN_ENABLED (0x1<<9)
4405 #define __XSTORM_TCP_CONTEXT_SECTION_ECN_ENABLED_SHIFT 9
4406 #define XSTORM_TCP_CONTEXT_SECTION_SACK_ENABLED (0x1<<10)
4407 #define XSTORM_TCP_CONTEXT_SECTION_SACK_ENABLED_SHIFT 10
4408 #define XSTORM_TCP_CONTEXT_SECTION_SMALL_WIN_ADV (0x1<<11)
4409 #define XSTORM_TCP_CONTEXT_SECTION_SMALL_WIN_ADV_SHIFT 11
4410 #define XSTORM_TCP_CONTEXT_SECTION_FIN_SENT_FLAG (0x1<<12)
4411 #define XSTORM_TCP_CONTEXT_SECTION_FIN_SENT_FLAG_SHIFT 12
4412 #define XSTORM_TCP_CONTEXT_SECTION_WINDOW_SATURATED (0x1<<13)
4413 #define XSTORM_TCP_CONTEXT_SECTION_WINDOW_SATURATED_SHIFT 13
4414 #define XSTORM_TCP_CONTEXT_SECTION_SLOWPATH_QUEUES_FLUSH_COUNTER (0x3<<14)
4415 #define XSTORM_TCP_CONTEXT_SECTION_SLOWPATH_QUEUES_FLUSH_COUNTER_SHIFT 14
4416 #elif defined(__LITTLE_ENDIAN)
4418 #define XSTORM_TCP_CONTEXT_SECTION_TOTAL_HEADER_SIZE (0xFF<<0)
4419 #define XSTORM_TCP_CONTEXT_SECTION_TOTAL_HEADER_SIZE_SHIFT 0
4420 #define __XSTORM_TCP_CONTEXT_SECTION_ECT_BIT (0x1<<8)
4421 #define __XSTORM_TCP_CONTEXT_SECTION_ECT_BIT_SHIFT 8
4422 #define __XSTORM_TCP_CONTEXT_SECTION_ECN_ENABLED (0x1<<9)
4423 #define __XSTORM_TCP_CONTEXT_SECTION_ECN_ENABLED_SHIFT 9
4424 #define XSTORM_TCP_CONTEXT_SECTION_SACK_ENABLED (0x1<<10)
4425 #define XSTORM_TCP_CONTEXT_SECTION_SACK_ENABLED_SHIFT 10
4426 #define XSTORM_TCP_CONTEXT_SECTION_SMALL_WIN_ADV (0x1<<11)
4427 #define XSTORM_TCP_CONTEXT_SECTION_SMALL_WIN_ADV_SHIFT 11
4428 #define XSTORM_TCP_CONTEXT_SECTION_FIN_SENT_FLAG (0x1<<12)
4429 #define XSTORM_TCP_CONTEXT_SECTION_FIN_SENT_FLAG_SHIFT 12
4430 #define XSTORM_TCP_CONTEXT_SECTION_WINDOW_SATURATED (0x1<<13)
4431 #define XSTORM_TCP_CONTEXT_SECTION_WINDOW_SATURATED_SHIFT 13
4432 #define XSTORM_TCP_CONTEXT_SECTION_SLOWPATH_QUEUES_FLUSH_COUNTER (0x3<<14)
4433 #define XSTORM_TCP_CONTEXT_SECTION_SLOWPATH_QUEUES_FLUSH_COUNTER_SHIFT 14
4435 u8 original_nagle_1b
;
4437 #if defined(__BIG_ENDIAN)
4439 u16 window_scaling_factor
;
4440 #elif defined(__LITTLE_ENDIAN)
4441 u16 window_scaling_factor
;
4444 #if defined(__BIG_ENDIAN)
4446 u8 statistics_counter_id
;
4447 u8 statistics_params
;
4448 #define XSTORM_TCP_CONTEXT_SECTION_UPDATE_L2_STATSTICS (0x1<<0)
4449 #define XSTORM_TCP_CONTEXT_SECTION_UPDATE_L2_STATSTICS_SHIFT 0
4450 #define XSTORM_TCP_CONTEXT_SECTION_UPDATE_L4_STATSTICS (0x1<<1)
4451 #define XSTORM_TCP_CONTEXT_SECTION_UPDATE_L4_STATSTICS_SHIFT 1
4452 #define XSTORM_TCP_CONTEXT_SECTION_RESERVED (0x3F<<2)
4453 #define XSTORM_TCP_CONTEXT_SECTION_RESERVED_SHIFT 2
4454 #elif defined(__LITTLE_ENDIAN)
4455 u8 statistics_params
;
4456 #define XSTORM_TCP_CONTEXT_SECTION_UPDATE_L2_STATSTICS (0x1<<0)
4457 #define XSTORM_TCP_CONTEXT_SECTION_UPDATE_L2_STATSTICS_SHIFT 0
4458 #define XSTORM_TCP_CONTEXT_SECTION_UPDATE_L4_STATSTICS (0x1<<1)
4459 #define XSTORM_TCP_CONTEXT_SECTION_UPDATE_L4_STATSTICS_SHIFT 1
4460 #define XSTORM_TCP_CONTEXT_SECTION_RESERVED (0x3F<<2)
4461 #define XSTORM_TCP_CONTEXT_SECTION_RESERVED_SHIFT 2
4462 u8 statistics_counter_id
;
4466 u32 __next_timer_expir
;
4470 * Common context section, shared in TOE, RDMA and ISCSI
4472 struct xstorm_common_context_section
{
4473 struct xstorm_eth_context_section ethernet
;
4474 union xstorm_ip_context_section_types ip_union
;
4475 struct xstorm_tcp_context_section tcp
;
4476 #if defined(__BIG_ENDIAN)
4479 #define XSTORM_COMMON_CONTEXT_SECTION_PHYSQ_INITIALIZED (0x1<<0)
4480 #define XSTORM_COMMON_CONTEXT_SECTION_PHYSQ_INITIALIZED_SHIFT 0
4481 #define XSTORM_COMMON_CONTEXT_SECTION_PBF_PORT (0x7<<1)
4482 #define XSTORM_COMMON_CONTEXT_SECTION_PBF_PORT_SHIFT 1
4483 #define XSTORM_COMMON_CONTEXT_SECTION_VLAN_MODE (0x1<<4)
4484 #define XSTORM_COMMON_CONTEXT_SECTION_VLAN_MODE_SHIFT 4
4485 #define XSTORM_COMMON_CONTEXT_SECTION_ORIGINAL_PRIORITY (0x7<<5)
4486 #define XSTORM_COMMON_CONTEXT_SECTION_ORIGINAL_PRIORITY_SHIFT 5
4489 #elif defined(__LITTLE_ENDIAN)
4493 #define XSTORM_COMMON_CONTEXT_SECTION_PHYSQ_INITIALIZED (0x1<<0)
4494 #define XSTORM_COMMON_CONTEXT_SECTION_PHYSQ_INITIALIZED_SHIFT 0
4495 #define XSTORM_COMMON_CONTEXT_SECTION_PBF_PORT (0x7<<1)
4496 #define XSTORM_COMMON_CONTEXT_SECTION_PBF_PORT_SHIFT 1
4497 #define XSTORM_COMMON_CONTEXT_SECTION_VLAN_MODE (0x1<<4)
4498 #define XSTORM_COMMON_CONTEXT_SECTION_VLAN_MODE_SHIFT 4
4499 #define XSTORM_COMMON_CONTEXT_SECTION_ORIGINAL_PRIORITY (0x7<<5)
4500 #define XSTORM_COMMON_CONTEXT_SECTION_ORIGINAL_PRIORITY_SHIFT 5
4506 * Flags used in ISCSI context section
4508 struct xstorm_iscsi_context_flags
{
4510 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_IMMEDIATE_DATA (0x1<<0)
4511 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_IMMEDIATE_DATA_SHIFT 0
4512 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_INITIAL_R2T (0x1<<1)
4513 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_INITIAL_R2T_SHIFT 1
4514 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_EN_HEADER_DIGEST (0x1<<2)
4515 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_EN_HEADER_DIGEST_SHIFT 2
4516 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_EN_DATA_DIGEST (0x1<<3)
4517 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_EN_DATA_DIGEST_SHIFT 3
4518 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_HQ_BD_WRITTEN (0x1<<4)
4519 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_HQ_BD_WRITTEN_SHIFT 4
4520 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_LAST_OP_SQ (0x1<<5)
4521 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_LAST_OP_SQ_SHIFT 5
4522 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_UPDATE_SND_NXT (0x1<<6)
4523 #define XSTORM_ISCSI_CONTEXT_FLAGS_B_UPDATE_SND_NXT_SHIFT 6
4524 #define XSTORM_ISCSI_CONTEXT_FLAGS_RESERVED4 (0x1<<7)
4525 #define XSTORM_ISCSI_CONTEXT_FLAGS_RESERVED4_SHIFT 7
4528 struct iscsi_task_context_entry_x
{
4529 u32 data_out_buffer_offset
;
4534 struct iscsi_task_context_entry_xuc_x_write_only
{
4538 struct iscsi_task_context_entry_xuc_xu_write_both
{
4541 #if defined(__BIG_ENDIAN)
4545 #elif defined(__LITTLE_ENDIAN)
4553 * iSCSI context section
4555 struct xstorm_iscsi_context_section
{
4556 u32 first_burst_length
;
4557 u32 max_send_pdu_length
;
4558 struct regpair sq_pbl_base
;
4559 struct regpair sq_curr_pbe
;
4560 struct regpair hq_pbl_base
;
4561 struct regpair hq_curr_pbe_base
;
4562 struct regpair r2tq_pbl_base
;
4563 struct regpair r2tq_curr_pbe_base
;
4564 struct regpair task_pbl_base
;
4565 #if defined(__BIG_ENDIAN)
4567 struct xstorm_iscsi_context_flags flags
;
4568 u8 task_pbl_cache_idx
;
4569 #elif defined(__LITTLE_ENDIAN)
4570 u8 task_pbl_cache_idx
;
4571 struct xstorm_iscsi_context_flags flags
;
4574 u32 seq_more_2_send
;
4575 u32 pdu_more_2_send
;
4576 struct iscsi_task_context_entry_x temp_tce_x
;
4577 struct iscsi_task_context_entry_xuc_x_write_only temp_tce_x_wr
;
4578 struct iscsi_task_context_entry_xuc_xu_write_both temp_tce_xu_wr
;
4580 u32 exp_data_transfer_len_ttt
;
4581 u32 pdu_data_2_rxmit
;
4582 u32 rxmit_bytes_2_dr
;
4583 #if defined(__BIG_ENDIAN)
4584 u16 rxmit_sge_offset
;
4586 #elif defined(__LITTLE_ENDIAN)
4588 u16 rxmit_sge_offset
;
4590 #if defined(__BIG_ENDIAN)
4593 #define XSTORM_ISCSI_CONTEXT_SECTION_B_NEW_HQ_BD (0x1<<0)
4594 #define XSTORM_ISCSI_CONTEXT_SECTION_B_NEW_HQ_BD_SHIFT 0
4595 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_PDU_HDR (0x1<<1)
4596 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_PDU_HDR_SHIFT 1
4597 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_END_PDU (0x1<<2)
4598 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_END_PDU_SHIFT 2
4599 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_DR (0x1<<3)
4600 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_DR_SHIFT 3
4601 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_START_DR (0x1<<4)
4602 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_START_DR_SHIFT 4
4603 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_PADDING (0x3<<5)
4604 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_PADDING_SHIFT 5
4605 #define XSTORM_ISCSI_CONTEXT_SECTION_B_ISCSI_CONT_FAST_RXMIT (0x1<<7)
4606 #define XSTORM_ISCSI_CONTEXT_SECTION_B_ISCSI_CONT_FAST_RXMIT_SHIFT 7
4608 #elif defined(__LITTLE_ENDIAN)
4611 #define XSTORM_ISCSI_CONTEXT_SECTION_B_NEW_HQ_BD (0x1<<0)
4612 #define XSTORM_ISCSI_CONTEXT_SECTION_B_NEW_HQ_BD_SHIFT 0
4613 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_PDU_HDR (0x1<<1)
4614 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_PDU_HDR_SHIFT 1
4615 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_END_PDU (0x1<<2)
4616 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_END_PDU_SHIFT 2
4617 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_DR (0x1<<3)
4618 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_DR_SHIFT 3
4619 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_START_DR (0x1<<4)
4620 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_START_DR_SHIFT 4
4621 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_PADDING (0x3<<5)
4622 #define XSTORM_ISCSI_CONTEXT_SECTION_B_RXMIT_PADDING_SHIFT 5
4623 #define XSTORM_ISCSI_CONTEXT_SECTION_B_ISCSI_CONT_FAST_RXMIT (0x1<<7)
4624 #define XSTORM_ISCSI_CONTEXT_SECTION_B_ISCSI_CONT_FAST_RXMIT_SHIFT 7
4627 u32 hq_rxmit_tcp_seq
;
4631 * Xstorm iSCSI Storm Context
4633 struct xstorm_iscsi_st_context
{
4634 struct xstorm_common_context_section common
;
4635 struct xstorm_iscsi_context_section iscsi
;
4639 * Iscsi connection context
4641 struct iscsi_context
{
4642 struct ustorm_iscsi_st_context ustorm_st_context
;
4643 struct tstorm_iscsi_st_context tstorm_st_context
;
4644 struct xstorm_iscsi_ag_context xstorm_ag_context
;
4645 struct tstorm_iscsi_ag_context tstorm_ag_context
;
4646 struct cstorm_iscsi_ag_context cstorm_ag_context
;
4647 struct ustorm_iscsi_ag_context ustorm_ag_context
;
4648 struct timers_block_context timers_context
;
4649 struct regpair upb_context
;
4650 struct xstorm_iscsi_st_context xstorm_st_context
;
4651 struct regpair xpb_context
;
4652 struct cstorm_iscsi_st_context cstorm_st_context
;
4657 * PDU header of an iSCSI DATA-OUT
4659 struct iscsi_data_pdu_hdr_little_endian
{
4660 #if defined(__BIG_ENDIAN)
4663 #define ISCSI_DATA_PDU_HDR_LITTLE_ENDIAN_RSRV1 (0x7F<<0)
4664 #define ISCSI_DATA_PDU_HDR_LITTLE_ENDIAN_RSRV1_SHIFT 0
4665 #define ISCSI_DATA_PDU_HDR_LITTLE_ENDIAN_FINAL_FLAG (0x1<<7)
4666 #define ISCSI_DATA_PDU_HDR_LITTLE_ENDIAN_FINAL_FLAG_SHIFT 7
4668 #elif defined(__LITTLE_ENDIAN)
4671 #define ISCSI_DATA_PDU_HDR_LITTLE_ENDIAN_RSRV1 (0x7F<<0)
4672 #define ISCSI_DATA_PDU_HDR_LITTLE_ENDIAN_RSRV1_SHIFT 0
4673 #define ISCSI_DATA_PDU_HDR_LITTLE_ENDIAN_FINAL_FLAG (0x1<<7)
4674 #define ISCSI_DATA_PDU_HDR_LITTLE_ENDIAN_FINAL_FLAG_SHIFT 7
4678 #define ISCSI_DATA_PDU_HDR_LITTLE_ENDIAN_DATA_SEGMENT_LENGTH (0xFFFFFF<<0)
4679 #define ISCSI_DATA_PDU_HDR_LITTLE_ENDIAN_DATA_SEGMENT_LENGTH_SHIFT 0
4680 #define ISCSI_DATA_PDU_HDR_LITTLE_ENDIAN_TOTAL_AHS_LENGTH (0xFF<<24)
4681 #define ISCSI_DATA_PDU_HDR_LITTLE_ENDIAN_TOTAL_AHS_LENGTH_SHIFT 24
4695 * PDU header of an iSCSI login request
4697 struct iscsi_login_req_hdr_little_endian
{
4698 #if defined(__BIG_ENDIAN)
4701 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_NSG (0x3<<0)
4702 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_NSG_SHIFT 0
4703 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_CSG (0x3<<2)
4704 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_CSG_SHIFT 2
4705 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_RSRV0 (0x3<<4)
4706 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_RSRV0_SHIFT 4
4707 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_CONTINUE_FLG (0x1<<6)
4708 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_CONTINUE_FLG_SHIFT 6
4709 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_TRANSIT (0x1<<7)
4710 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_TRANSIT_SHIFT 7
4713 #elif defined(__LITTLE_ENDIAN)
4717 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_NSG (0x3<<0)
4718 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_NSG_SHIFT 0
4719 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_CSG (0x3<<2)
4720 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_CSG_SHIFT 2
4721 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_RSRV0 (0x3<<4)
4722 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_RSRV0_SHIFT 4
4723 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_CONTINUE_FLG (0x1<<6)
4724 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_CONTINUE_FLG_SHIFT 6
4725 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_TRANSIT (0x1<<7)
4726 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_TRANSIT_SHIFT 7
4730 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_DATA_SEGMENT_LENGTH (0xFFFFFF<<0)
4731 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_DATA_SEGMENT_LENGTH_SHIFT 0
4732 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_TOTAL_AHS_LENGTH (0xFF<<24)
4733 #define ISCSI_LOGIN_REQ_HDR_LITTLE_ENDIAN_TOTAL_AHS_LENGTH_SHIFT 24
4735 #if defined(__BIG_ENDIAN)
4738 #elif defined(__LITTLE_ENDIAN)
4743 #if defined(__BIG_ENDIAN)
4746 #elif defined(__LITTLE_ENDIAN)
4756 * PDU header of an iSCSI logout request
4758 struct iscsi_logout_req_hdr_little_endian
{
4759 #if defined(__BIG_ENDIAN)
4762 #define ISCSI_LOGOUT_REQ_HDR_LITTLE_ENDIAN_REASON_CODE (0x7F<<0)
4763 #define ISCSI_LOGOUT_REQ_HDR_LITTLE_ENDIAN_REASON_CODE_SHIFT 0
4764 #define ISCSI_LOGOUT_REQ_HDR_LITTLE_ENDIAN_RSRV1_1 (0x1<<7)
4765 #define ISCSI_LOGOUT_REQ_HDR_LITTLE_ENDIAN_RSRV1_1_SHIFT 7
4767 #elif defined(__LITTLE_ENDIAN)
4770 #define ISCSI_LOGOUT_REQ_HDR_LITTLE_ENDIAN_REASON_CODE (0x7F<<0)
4771 #define ISCSI_LOGOUT_REQ_HDR_LITTLE_ENDIAN_REASON_CODE_SHIFT 0
4772 #define ISCSI_LOGOUT_REQ_HDR_LITTLE_ENDIAN_RSRV1_1 (0x1<<7)
4773 #define ISCSI_LOGOUT_REQ_HDR_LITTLE_ENDIAN_RSRV1_1_SHIFT 7
4777 #define ISCSI_LOGOUT_REQ_HDR_LITTLE_ENDIAN_DATA_SEGMENT_LENGTH (0xFFFFFF<<0)
4778 #define ISCSI_LOGOUT_REQ_HDR_LITTLE_ENDIAN_DATA_SEGMENT_LENGTH_SHIFT 0
4779 #define ISCSI_LOGOUT_REQ_HDR_LITTLE_ENDIAN_TOTAL_AHS_LENGTH (0xFF<<24)
4780 #define ISCSI_LOGOUT_REQ_HDR_LITTLE_ENDIAN_TOTAL_AHS_LENGTH_SHIFT 24
4783 #if defined(__BIG_ENDIAN)
4786 #elif defined(__LITTLE_ENDIAN)
4796 * PDU header of an iSCSI TMF request
4798 struct iscsi_tmf_req_hdr_little_endian
{
4799 #if defined(__BIG_ENDIAN)
4802 #define ISCSI_TMF_REQ_HDR_LITTLE_ENDIAN_FUNCTION (0x7F<<0)
4803 #define ISCSI_TMF_REQ_HDR_LITTLE_ENDIAN_FUNCTION_SHIFT 0
4804 #define ISCSI_TMF_REQ_HDR_LITTLE_ENDIAN_RSRV1_1 (0x1<<7)
4805 #define ISCSI_TMF_REQ_HDR_LITTLE_ENDIAN_RSRV1_1_SHIFT 7
4807 #elif defined(__LITTLE_ENDIAN)
4810 #define ISCSI_TMF_REQ_HDR_LITTLE_ENDIAN_FUNCTION (0x7F<<0)
4811 #define ISCSI_TMF_REQ_HDR_LITTLE_ENDIAN_FUNCTION_SHIFT 0
4812 #define ISCSI_TMF_REQ_HDR_LITTLE_ENDIAN_RSRV1_1 (0x1<<7)
4813 #define ISCSI_TMF_REQ_HDR_LITTLE_ENDIAN_RSRV1_1_SHIFT 7
4817 #define ISCSI_TMF_REQ_HDR_LITTLE_ENDIAN_DATA_SEGMENT_LENGTH (0xFFFFFF<<0)
4818 #define ISCSI_TMF_REQ_HDR_LITTLE_ENDIAN_DATA_SEGMENT_LENGTH_SHIFT 0
4819 #define ISCSI_TMF_REQ_HDR_LITTLE_ENDIAN_TOTAL_AHS_LENGTH (0xFF<<24)
4820 #define ISCSI_TMF_REQ_HDR_LITTLE_ENDIAN_TOTAL_AHS_LENGTH_SHIFT 24
4823 u32 referenced_task_tag
;
4832 * PDU header of an iSCSI Text request
4834 struct iscsi_text_req_hdr_little_endian
{
4835 #if defined(__BIG_ENDIAN)
4838 #define ISCSI_TEXT_REQ_HDR_LITTLE_ENDIAN_RSRV1 (0x3F<<0)
4839 #define ISCSI_TEXT_REQ_HDR_LITTLE_ENDIAN_RSRV1_SHIFT 0
4840 #define ISCSI_TEXT_REQ_HDR_LITTLE_ENDIAN_CONTINUE_FLG (0x1<<6)
4841 #define ISCSI_TEXT_REQ_HDR_LITTLE_ENDIAN_CONTINUE_FLG_SHIFT 6
4842 #define ISCSI_TEXT_REQ_HDR_LITTLE_ENDIAN_FINAL (0x1<<7)
4843 #define ISCSI_TEXT_REQ_HDR_LITTLE_ENDIAN_FINAL_SHIFT 7
4845 #elif defined(__LITTLE_ENDIAN)
4848 #define ISCSI_TEXT_REQ_HDR_LITTLE_ENDIAN_RSRV1 (0x3F<<0)
4849 #define ISCSI_TEXT_REQ_HDR_LITTLE_ENDIAN_RSRV1_SHIFT 0
4850 #define ISCSI_TEXT_REQ_HDR_LITTLE_ENDIAN_CONTINUE_FLG (0x1<<6)
4851 #define ISCSI_TEXT_REQ_HDR_LITTLE_ENDIAN_CONTINUE_FLG_SHIFT 6
4852 #define ISCSI_TEXT_REQ_HDR_LITTLE_ENDIAN_FINAL (0x1<<7)
4853 #define ISCSI_TEXT_REQ_HDR_LITTLE_ENDIAN_FINAL_SHIFT 7
4857 #define ISCSI_TEXT_REQ_HDR_LITTLE_ENDIAN_DATA_SEGMENT_LENGTH (0xFFFFFF<<0)
4858 #define ISCSI_TEXT_REQ_HDR_LITTLE_ENDIAN_DATA_SEGMENT_LENGTH_SHIFT 0
4859 #define ISCSI_TEXT_REQ_HDR_LITTLE_ENDIAN_TOTAL_AHS_LENGTH (0xFF<<24)
4860 #define ISCSI_TEXT_REQ_HDR_LITTLE_ENDIAN_TOTAL_AHS_LENGTH_SHIFT 24
4870 * PDU header of an iSCSI Nop-Out
4872 struct iscsi_nop_out_hdr_little_endian
{
4873 #if defined(__BIG_ENDIAN)
4876 #define ISCSI_NOP_OUT_HDR_LITTLE_ENDIAN_RSRV1 (0x7F<<0)
4877 #define ISCSI_NOP_OUT_HDR_LITTLE_ENDIAN_RSRV1_SHIFT 0
4878 #define ISCSI_NOP_OUT_HDR_LITTLE_ENDIAN_RSRV2_1 (0x1<<7)
4879 #define ISCSI_NOP_OUT_HDR_LITTLE_ENDIAN_RSRV2_1_SHIFT 7
4881 #elif defined(__LITTLE_ENDIAN)
4884 #define ISCSI_NOP_OUT_HDR_LITTLE_ENDIAN_RSRV1 (0x7F<<0)
4885 #define ISCSI_NOP_OUT_HDR_LITTLE_ENDIAN_RSRV1_SHIFT 0
4886 #define ISCSI_NOP_OUT_HDR_LITTLE_ENDIAN_RSRV2_1 (0x1<<7)
4887 #define ISCSI_NOP_OUT_HDR_LITTLE_ENDIAN_RSRV2_1_SHIFT 7
4891 #define ISCSI_NOP_OUT_HDR_LITTLE_ENDIAN_DATA_SEGMENT_LENGTH (0xFFFFFF<<0)
4892 #define ISCSI_NOP_OUT_HDR_LITTLE_ENDIAN_DATA_SEGMENT_LENGTH_SHIFT 0
4893 #define ISCSI_NOP_OUT_HDR_LITTLE_ENDIAN_TOTAL_AHS_LENGTH (0xFF<<24)
4894 #define ISCSI_NOP_OUT_HDR_LITTLE_ENDIAN_TOTAL_AHS_LENGTH_SHIFT 24
4904 * iscsi pdu headers in little endian form.
4906 union iscsi_pdu_headers_little_endian
{
4907 u32 fullHeaderSize
[12];
4908 struct iscsi_cmd_pdu_hdr_little_endian command_pdu_hdr
;
4909 struct iscsi_data_pdu_hdr_little_endian data_out_pdu_hdr
;
4910 struct iscsi_login_req_hdr_little_endian login_req_pdu_hdr
;
4911 struct iscsi_logout_req_hdr_little_endian logout_req_pdu_hdr
;
4912 struct iscsi_tmf_req_hdr_little_endian tmf_req_pdu_hdr
;
4913 struct iscsi_text_req_hdr_little_endian text_req_pdu_hdr
;
4914 struct iscsi_nop_out_hdr_little_endian nop_out_pdu_hdr
;
4917 struct iscsi_hq_bd
{
4918 union iscsi_pdu_headers_little_endian pdu_header
;
4919 #if defined(__BIG_ENDIAN)
4922 #elif defined(__LITTLE_ENDIAN)
4928 #if defined(__BIG_ENDIAN)
4932 #elif defined(__LITTLE_ENDIAN)
4941 * CQE data for L2 OOO connection $$KEEP_ENDIANNESS$$
4943 struct iscsi_l2_ooo_data
{
4957 struct iscsi_task_context_entry_xuc_c_write_only
{
4958 u32 total_data_acked
;
4961 struct iscsi_task_context_r2t_table_entry
{
4963 u32 desired_data_len
;
4966 struct iscsi_task_context_entry_xuc_u_write_only
{
4968 struct iscsi_task_context_r2t_table_entry r2t_table
[4];
4969 #if defined(__BIG_ENDIAN)
4973 #elif defined(__LITTLE_ENDIAN)
4980 struct iscsi_task_context_entry_xuc
{
4981 struct iscsi_task_context_entry_xuc_c_write_only write_c
;
4982 u32 exp_data_transfer_len
;
4983 struct iscsi_task_context_entry_xuc_x_write_only write_x
;
4985 struct iscsi_task_context_entry_xuc_xu_write_both write_xu
;
4987 struct iscsi_task_context_entry_xuc_u_write_only write_u
;
4990 struct iscsi_task_context_entry_u
{
4991 u32 exp_r2t_buff_offset
;
4996 struct iscsi_task_context_entry
{
4997 struct iscsi_task_context_entry_x tce_x
;
4998 #if defined(__BIG_ENDIAN)
5001 #elif defined(__LITTLE_ENDIAN)
5005 struct iscsi_task_context_entry_xuc tce_xuc
;
5006 struct iscsi_task_context_entry_u tce_u
;
5017 struct iscsi_task_context_entry_xuc_x_init_only
{
5019 u32 exp_data_transfer_len
;
5051 * l5cm- connection identification params
5053 struct l5cm_conn_addr_params
{
5055 #if defined(__BIG_ENDIAN)
5060 #elif defined(__LITTLE_ENDIAN)
5066 #if defined(__BIG_ENDIAN)
5068 #define L5CM_CONN_ADDR_PARAMS_IP_VERSION (0x1<<0)
5069 #define L5CM_CONN_ADDR_PARAMS_IP_VERSION_SHIFT 0
5070 #define L5CM_CONN_ADDR_PARAMS_RSRV (0x7FFF<<1)
5071 #define L5CM_CONN_ADDR_PARAMS_RSRV_SHIFT 1
5074 #elif defined(__LITTLE_ENDIAN)
5078 #define L5CM_CONN_ADDR_PARAMS_IP_VERSION (0x1<<0)
5079 #define L5CM_CONN_ADDR_PARAMS_IP_VERSION_SHIFT 0
5080 #define L5CM_CONN_ADDR_PARAMS_RSRV (0x7FFF<<1)
5081 #define L5CM_CONN_ADDR_PARAMS_RSRV_SHIFT 1
5083 struct ip_v6_addr local_ip_addr
;
5084 struct ip_v6_addr remote_ip_addr
;
5085 u32 ipv6_flow_label_20b
;
5087 #if defined(__BIG_ENDIAN)
5088 u16 remote_tcp_port
;
5090 #elif defined(__LITTLE_ENDIAN)
5092 u16 remote_tcp_port
;
5097 * l5cm-xstorm connection buffer
5099 struct l5cm_xstorm_conn_buffer
{
5100 #if defined(__BIG_ENDIAN)
5103 #define L5CM_XSTORM_CONN_BUFFER_NAGLE_ENABLE (0x1<<0)
5104 #define L5CM_XSTORM_CONN_BUFFER_NAGLE_ENABLE_SHIFT 0
5105 #define L5CM_XSTORM_CONN_BUFFER_RSRV (0x7FFF<<1)
5106 #define L5CM_XSTORM_CONN_BUFFER_RSRV_SHIFT 1
5107 #elif defined(__LITTLE_ENDIAN)
5109 #define L5CM_XSTORM_CONN_BUFFER_NAGLE_ENABLE (0x1<<0)
5110 #define L5CM_XSTORM_CONN_BUFFER_NAGLE_ENABLE_SHIFT 0
5111 #define L5CM_XSTORM_CONN_BUFFER_RSRV (0x7FFF<<1)
5112 #define L5CM_XSTORM_CONN_BUFFER_RSRV_SHIFT 1
5115 #if defined(__BIG_ENDIAN)
5117 u16 pseudo_header_checksum
;
5118 #elif defined(__LITTLE_ENDIAN)
5119 u16 pseudo_header_checksum
;
5124 struct regpair context_addr
;
5128 * l5cm-tstorm connection buffer
5130 struct l5cm_tstorm_conn_buffer
{
5132 #if defined(__BIG_ENDIAN)
5134 #define L5CM_TSTORM_CONN_BUFFER_DELAYED_ACK_ENABLE (0x1<<0)
5135 #define L5CM_TSTORM_CONN_BUFFER_DELAYED_ACK_ENABLE_SHIFT 0
5136 #define L5CM_TSTORM_CONN_BUFFER_RSRV (0x7FFF<<1)
5137 #define L5CM_TSTORM_CONN_BUFFER_RSRV_SHIFT 1
5138 u8 ka_max_probe_count
;
5140 #elif defined(__LITTLE_ENDIAN)
5142 u8 ka_max_probe_count
;
5144 #define L5CM_TSTORM_CONN_BUFFER_DELAYED_ACK_ENABLE (0x1<<0)
5145 #define L5CM_TSTORM_CONN_BUFFER_DELAYED_ACK_ENABLE_SHIFT 0
5146 #define L5CM_TSTORM_CONN_BUFFER_RSRV (0x7FFF<<1)
5147 #define L5CM_TSTORM_CONN_BUFFER_RSRV_SHIFT 1
5155 * l5cm connection buffer for active side
5157 struct l5cm_active_conn_buffer
{
5158 struct l5cm_conn_addr_params conn_addr_buf
;
5159 struct l5cm_xstorm_conn_buffer xstorm_conn_buffer
;
5160 struct l5cm_tstorm_conn_buffer tstorm_conn_buffer
;
5166 * The l5cm opaque buffer passed in add new connection ramrod passive side
5168 struct l5cm_hash_input_string
{
5170 #if defined(__BIG_ENDIAN)
5173 #elif defined(__LITTLE_ENDIAN)
5177 struct ip_v6_addr __opaque4
;
5178 struct ip_v6_addr __opaque5
;
5185 * syn cookie component
5187 struct l5cm_syn_cookie_comp
{
5192 * data related to listeners of a TCP port
5194 struct l5cm_port_listener_data
{
5196 #define L5CM_PORT_LISTENER_DATA_ENABLE (0x1<<0)
5197 #define L5CM_PORT_LISTENER_DATA_ENABLE_SHIFT 0
5198 #define L5CM_PORT_LISTENER_DATA_IP_INDEX (0xF<<1)
5199 #define L5CM_PORT_LISTENER_DATA_IP_INDEX_SHIFT 1
5200 #define L5CM_PORT_LISTENER_DATA_NET_FILTER (0x1<<5)
5201 #define L5CM_PORT_LISTENER_DATA_NET_FILTER_SHIFT 5
5202 #define L5CM_PORT_LISTENER_DATA_DEFFERED_MODE (0x1<<6)
5203 #define L5CM_PORT_LISTENER_DATA_DEFFERED_MODE_SHIFT 6
5204 #define L5CM_PORT_LISTENER_DATA_MPA_MODE (0x1<<7)
5205 #define L5CM_PORT_LISTENER_DATA_MPA_MODE_SHIFT 7
5209 * Opaque structure passed from U to X when final ack arrives
5211 struct l5cm_opaque_buf
{
5216 struct l5cm_syn_cookie_comp __opaque5
;
5217 #if defined(__BIG_ENDIAN)
5220 struct l5cm_port_listener_data __opaque6
;
5221 #elif defined(__LITTLE_ENDIAN)
5222 struct l5cm_port_listener_data __opaque6
;
5230 * l5cm slow path element
5232 struct l5cm_packet_size
{
5239 * The final-ack union structure in PCS entry after final ack arrived
5241 struct l5cm_pcse_ack
{
5242 struct l5cm_xstorm_conn_buffer tx_socket_params
;
5243 struct l5cm_opaque_buf opaque_buf
;
5244 struct l5cm_tstorm_conn_buffer rx_socket_params
;
5249 * The syn union structure in PCS entry after syn arrived
5251 struct l5cm_pcse_syn
{
5252 struct l5cm_opaque_buf opaque_buf
;
5258 * pcs entry data for passive connections
5260 struct l5cm_pcs_attributes
{
5261 #if defined(__BIG_ENDIAN)
5265 #define L5CM_PCS_ATTRIBUTES_NET_FILTER (0x1<<0)
5266 #define L5CM_PCS_ATTRIBUTES_NET_FILTER_SHIFT 0
5267 #define L5CM_PCS_ATTRIBUTES_CALCULATE_HASH (0x1<<1)
5268 #define L5CM_PCS_ATTRIBUTES_CALCULATE_HASH_SHIFT 1
5269 #define L5CM_PCS_ATTRIBUTES_COMPARE_HASH_RESULT (0x1<<2)
5270 #define L5CM_PCS_ATTRIBUTES_COMPARE_HASH_RESULT_SHIFT 2
5271 #define L5CM_PCS_ATTRIBUTES_QUERY_ULP_ACCEPT (0x1<<3)
5272 #define L5CM_PCS_ATTRIBUTES_QUERY_ULP_ACCEPT_SHIFT 3
5273 #define L5CM_PCS_ATTRIBUTES_FIND_DEST_MAC (0x1<<4)
5274 #define L5CM_PCS_ATTRIBUTES_FIND_DEST_MAC_SHIFT 4
5275 #define L5CM_PCS_ATTRIBUTES_L4_OFFLOAD (0x1<<5)
5276 #define L5CM_PCS_ATTRIBUTES_L4_OFFLOAD_SHIFT 5
5277 #define L5CM_PCS_ATTRIBUTES_FORWARD_PACKET (0x1<<6)
5278 #define L5CM_PCS_ATTRIBUTES_FORWARD_PACKET_SHIFT 6
5279 #define L5CM_PCS_ATTRIBUTES_RSRV (0x1<<7)
5280 #define L5CM_PCS_ATTRIBUTES_RSRV_SHIFT 7
5281 #elif defined(__LITTLE_ENDIAN)
5283 #define L5CM_PCS_ATTRIBUTES_NET_FILTER (0x1<<0)
5284 #define L5CM_PCS_ATTRIBUTES_NET_FILTER_SHIFT 0
5285 #define L5CM_PCS_ATTRIBUTES_CALCULATE_HASH (0x1<<1)
5286 #define L5CM_PCS_ATTRIBUTES_CALCULATE_HASH_SHIFT 1
5287 #define L5CM_PCS_ATTRIBUTES_COMPARE_HASH_RESULT (0x1<<2)
5288 #define L5CM_PCS_ATTRIBUTES_COMPARE_HASH_RESULT_SHIFT 2
5289 #define L5CM_PCS_ATTRIBUTES_QUERY_ULP_ACCEPT (0x1<<3)
5290 #define L5CM_PCS_ATTRIBUTES_QUERY_ULP_ACCEPT_SHIFT 3
5291 #define L5CM_PCS_ATTRIBUTES_FIND_DEST_MAC (0x1<<4)
5292 #define L5CM_PCS_ATTRIBUTES_FIND_DEST_MAC_SHIFT 4
5293 #define L5CM_PCS_ATTRIBUTES_L4_OFFLOAD (0x1<<5)
5294 #define L5CM_PCS_ATTRIBUTES_L4_OFFLOAD_SHIFT 5
5295 #define L5CM_PCS_ATTRIBUTES_FORWARD_PACKET (0x1<<6)
5296 #define L5CM_PCS_ATTRIBUTES_FORWARD_PACKET_SHIFT 6
5297 #define L5CM_PCS_ATTRIBUTES_RSRV (0x1<<7)
5298 #define L5CM_PCS_ATTRIBUTES_RSRV_SHIFT 7
5305 union l5cm_seg_params
{
5306 struct l5cm_pcse_syn syn_seg_params
;
5307 struct l5cm_pcse_ack ack_seg_params
;
5311 * pcs entry data for passive connections
5313 struct l5cm_pcs_hdr
{
5314 struct l5cm_hash_input_string hash_input_string
;
5315 struct l5cm_conn_addr_params conn_addr_buf
;
5318 union l5cm_seg_params seg_params
;
5319 struct l5cm_pcs_attributes att
;
5320 #if defined(__BIG_ENDIAN)
5323 #elif defined(__LITTLE_ENDIAN)
5330 * pcs entry for passive connections
5332 struct l5cm_pcs_entry
{
5333 struct l5cm_pcs_hdr hdr
;
5334 u8 rx_segment
[1516];
5341 * l5cm connection parameters
5343 union l5cm_reduce_param_union
{
5349 * l5cm connection parameters
5351 struct l5cm_reduce_conn
{
5352 union l5cm_reduce_param_union opaque1
;
5357 * l5cm slow path element
5359 union l5cm_specific_data
{
5360 u8 protocol_data
[8];
5361 struct regpair phy_address
;
5362 struct l5cm_packet_size packet_size
;
5363 struct l5cm_reduce_conn reduced_conn
;
5367 * l5 slow path element
5371 union l5cm_specific_data data
;
5378 * Termination variables
5380 struct l5cm_term_vars
{
5382 #define L5CM_TERM_VARS_TCP_STATE (0xF<<0)
5383 #define L5CM_TERM_VARS_TCP_STATE_SHIFT 0
5384 #define L5CM_TERM_VARS_FIN_RECEIVED_SBIT (0x1<<4)
5385 #define L5CM_TERM_VARS_FIN_RECEIVED_SBIT_SHIFT 4
5386 #define L5CM_TERM_VARS_ACK_ON_FIN_RECEIVED_SBIT (0x1<<5)
5387 #define L5CM_TERM_VARS_ACK_ON_FIN_RECEIVED_SBIT_SHIFT 5
5388 #define L5CM_TERM_VARS_TERM_ON_CHIP (0x1<<6)
5389 #define L5CM_TERM_VARS_TERM_ON_CHIP_SHIFT 6
5390 #define L5CM_TERM_VARS_RSRV (0x1<<7)
5391 #define L5CM_TERM_VARS_RSRV_SHIFT 7
5400 struct tstorm_l5cm_tcp_flags
{
5402 #define TSTORM_L5CM_TCP_FLAGS_VLAN_ID (0xFFF<<0)
5403 #define TSTORM_L5CM_TCP_FLAGS_VLAN_ID_SHIFT 0
5404 #define TSTORM_L5CM_TCP_FLAGS_DELAYED_ACK_EN (0x1<<12)
5405 #define TSTORM_L5CM_TCP_FLAGS_DELAYED_ACK_SHIFT 12
5406 #define TSTORM_L5CM_TCP_FLAGS_TS_ENABLED (0x1<<13)
5407 #define TSTORM_L5CM_TCP_FLAGS_TS_ENABLED_SHIFT 13
5408 #define TSTORM_L5CM_TCP_FLAGS_RSRV1 (0x3<<14)
5409 #define TSTORM_L5CM_TCP_FLAGS_RSRV1_SHIFT 14
5416 struct xstorm_l5cm_tcp_flags
{
5418 #define XSTORM_L5CM_TCP_FLAGS_ENC_ENABLED (0x1<<0)
5419 #define XSTORM_L5CM_TCP_FLAGS_ENC_ENABLED_SHIFT 0
5420 #define XSTORM_L5CM_TCP_FLAGS_TS_ENABLED (0x1<<1)
5421 #define XSTORM_L5CM_TCP_FLAGS_TS_ENABLED_SHIFT 1
5422 #define XSTORM_L5CM_TCP_FLAGS_WND_SCL_EN (0x1<<2)
5423 #define XSTORM_L5CM_TCP_FLAGS_WND_SCL_EN_SHIFT 2
5424 #define XSTORM_L5CM_TCP_FLAGS_RSRV (0x1F<<3)
5425 #define XSTORM_L5CM_TCP_FLAGS_RSRV_SHIFT 3
5431 * Out-of-order states
5433 enum tcp_ooo_event
{
5434 TCP_EVENT_ADD_PEN
= 0,
5435 TCP_EVENT_ADD_NEW_ISLE
= 1,
5436 TCP_EVENT_ADD_ISLE_RIGHT
= 2,
5437 TCP_EVENT_ADD_ISLE_LEFT
= 3,
5447 enum tcp_tstorm_ooo
{
5448 TCP_TSTORM_OOO_DROP_AND_PROC_ACK
= 0,
5449 TCP_TSTORM_OOO_SEND_PURE_ACK
= 1,
5450 TCP_TSTORM_OOO_SUPPORTED
= 2,
5462 #endif /* __5710_HSI_CNIC_LE__ */