Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
elxu_sli4.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-2015, Emulex
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice,
9  * this list of conditions and the following disclaimer.
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright notice,
12  * this list of conditions and the following disclaimer in the documentation
13  * and/or other materials provided with the distribution.
14  *
15  * 3. Neither the name of the copyright holder nor the names of its contributors
16  * may be used to endorse or promote products derived from this software
17  * without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  *
31  */
32 
33 #if !defined(__ELXU_SLI4_H__)
34 #define __ELXU_SLI4_H__
35 
36 #include <stdint.h>
37 
38 
39 #define SLI4_PCI_SOFT_RESET_CSR 0x005c
40 #define SLI4_PCI_SOFT_RESET_MASK 0x0080
41 
42 #define SLI4_PHYSDEV_CONTROL 0x0414
43 #define SLI4_PHYSDEV_CONTROL_FRST 0x02
44 #define SLI4_PHYSDEV_CONTROL_DD 0x04
45 #define SLI4_PHYSDEV_CONTROL_FRL_MASK 0x00f0
46 
47 #define SLI4_SLIPORT_STATUS 0x0404
48 #define SLI4_SLIPORT_STATUS_RDY (0x1 << 23)
49 
50 #define SLI4_SLIPORT_SEMAPHORE_LAN 0x400
51 #define SLI4_SLIPORT_SEMAPHORE_SH 0xac
52 #define SLI4_SLIPORT_PORT_STATUS_MASK 0xffff
53 #define SLI4_PORT_READY 0xc000
54 
55 #define SLI4_BMBX 0x0160
56 #define SLI4_BMBX_RDY 0x01
57 
58 #define SLI4_SLIPORT_CONTROL 0x408
59 #define SLI4_SLIPORT_CONTROL_IP (0x1 << 27)
60 
61 // Mailbox commands
62 #define MBOX_SLI_CONFIG 0x9B
63 #define MBOX_READ_STATUS 0x0E
64 #define MBOX_READ_REV 0x11
65 #define MBOX_READ_LNK_STAT 0x12
66 #define MBOX_WRITE_NVPARMS 0x03
67 #define MBOX_READ_NVPARMS 0x02
68 #define MBOX_SET_LINK_DIAG_STATE 0x22
69 #define MBOX_SET_DPORT_MODE 0x27
70 #define MBOX_GET_DPORT_RESULTS 0x28
71 #define MBOX_RUN_BIU_DIAG 0x84
72 
73 // ======== Subsystems and Opcodes used by the MBOX_SLI_CONFIG command ========
74 
75 // Common Mailbox subsystems
76 #define MBOX_SUBSYSTEM_COMMON 0x1
77 #define MBOX_SUBSYSTEM_FCOE 0xC
78 
79 // Common Mailbox opcodes
80 #define OPCODE_COMMON_READ_FLASHROM 0x06 // Skyhawk only
81 #define OPCODE_COMMON_WRITE_FLASHROM 0x07 // Skyhawk only
82 #define OPCODE_COMMON_GET_CNTL_ATTRIBUTES 0x20
83 #define OPCODE_COMMON_GET_FAT 0x28 // Skyhawk only
84 #define OPCODE_COMMON_ENABLE_DISABLE_PORT 0x3e // iSCSI only
85 #define OPCODE_COMMON_GET_BE_CONFIGURATION_AND_RESOURCES 0x51 // iSCSI only
86 #define OPCODE_COMMON_SET_BE_CONFIGURATION_AND_RESOURCES 0x52 // iSCSI only
87 #define OPCODE_COMMON_MANAGE_FAT 0x44 // Skyhawk only
88 #define OPCODE_COMMON_READ_TRANCEIVER_DATA 0x49 // Skyhawk only
89 #define OPCODE_COMMON_GET_EXT_FAT_CAPABILITIES 0x7D // Skyhawk only
90 #define OPCODE_COMMON_SET_EXT_FAT_CAPABILITIES 0x7E // Skyhawk only
91 #define OPCODE_COMMON_EXT_FAT_CONFIGURE_SNAPSHOT 0x7F // Skyhawk only
92 #define OPCODE_COMMON_EXT_FAT_RETRIEVE_SHAPSHOT 0x80 // Skyhawk only
93 #define OPCODE_COMMON_EXT_FAT_READ_STRING_TABLE 0x82 // Skyhawk only
94 #define OPCODE_COMMON_GET_FUNCTION_CONFIG 0xa0
95 #define OPCODE_COMMON_GET_PROFILE_CONFIG 0xa4
96 #define OPCODE_COMMON_SET_PROFILE_CONFIG 0xa5
97 #define OPCODE_COMMON_GET_PROFILE_LIST 0xa6
98 #define OPCODE_COMMON_GET_ACTIVE_PROFILE 0xa7
99 #define OPCODE_COMMON_SET_ACTIVE_PROFILE 0xa8
100 #define OPCODE_COMMON_READ_OBJECT 0xAB // Lancer only
101 #define OPCODE_COMMON_WRITE_OBJECT 0xAC // Lancer only
102 #define OPCODE_COMMON_READ_OBJECT_LIST 0xAD // Lancer only
103 #define OPCODE_COMMON_DELETE_OBJECT 0xAE // Lancer only
104 #define OPCODE_COMMON_GET_RECONFIG_LINK_INFO 0xC9 // Skyhawk only
105 #define OPCODE_COMMON_SET_RECONFIG_LINK_INFO 0xCA // Skyhawk only
106 #define OPCODE_COMMON_SET_DUMP_LOCATION 0xB8 // Lancer Only
107 
108 
109 // Common iSCSI mailbox subsystem
110 #define MBOX_SUBSYSTEM_COMMON_ISCSI 0x02
111 
112 // Common iSCSI mailbox commands
113 #define OPCODE_COMMON_ISCSI_SET_TCP_PARAMETERS 0x48
114 #define OPCODE_COMMON_ISCSI_CONNECTION_UPDATE 0x49
115 #define OPCODE_COMMON_ISCSI_GET_CONNECTION_INFO 0x4a
116 
117 // DMTF Mailbox subsystem
118 #define MBOX_SUBSYSTEM_DMTF 0x11
119 
120 // DMTF Mailbox commands
121 #define OPCODE_DMTF_EXEC_CLP_CMD 0x01
122 
123 #define MBOX_ENTRY_LENGTH 256
124 
125 // mbox_sge_t - SGE used by SLI_CONFIG commands
126 typedef struct {
127  uint32_t address_low;
128  uint32_t address_high;
129  unsigned length:24;
130  unsigned :8;
131 } mbox_sge_t;
132 
133 // mbox_hbd_t - Host Buffer Descripitor
134 typedef struct {
135  unsigned buffer_length:24;
136  unsigned :8;
139 } mbox_hbd_t;
140 
141 // Generic Mailbox Command
142 typedef union {
143  struct {
144  uint32_t :8;
145  uint32_t command:8;
146  uint32_t :16;
147  uint32_t payload[63];
148  } request;
149  struct {
150  uint32_t :8;
151  uint32_t command:8;
152  uint32_t status:16;
153  uint32_t payload[63];
154  }response;
156 
157 // mbox_sli_config_t - SLI_CONFIG data
158 typedef struct {
159  unsigned reserved:8;
160  unsigned command:8;
161  unsigned status:16;
162 
163  unsigned emb:1;
164  unsigned :2;
165  unsigned pcmd_count:5;
166  unsigned :24;
167 
168  uint32_t payload_length;
169 
170  uint32_t tag_lo;
171 
172  uint32_t tag_hi;
173 
174  unsigned :32;
175 
176  mbox_sge_t sge[0];
177 
178 
180 
181 
182 
183 typedef struct{
184  unsigned reserved:8;
185  unsigned command:8;
186  unsigned status:16;
187 
188  uint32_t :16,
189  sli_level:4,
190  fcoem:1,
191  ceev:2,
192  :6,
193  vpd:1,
194  :2;
195  uint32_t first_hw_revision;
197  uint32_t rsvd4;
199  uint32_t fc_ph_low:8,
200  fc_ph_high:8,
201  feature_level_low:8,
202  feature_level_high:8;
203  uint32_t rsvd7;
204  uint32_t first_fw_id;
205  char first_fw_name[16];
206  uint32_t second_fw_id;
207  char second_fw_name[16];
208  uint32_t rsvd18[30];
209  uint32_t available_length:24,
210  :8;
211  uint32_t physical_address_low;
216 
217 typedef struct{
218  unsigned :8;
219  unsigned command:8;
220  unsigned status:16;
221 
222  unsigned cc:1;
223  unsigned :15;
224 
225  unsigned :32;
226 
242 
243 typedef struct {
244  // word 0 is common
245  unsigned :8;
246  unsigned command:8;
247  unsigned status:16;
248 
249  // word 1
250  uint32_t rec:1;
251  uint32_t gec:1;
252 
253  uint32_t w02of:1;
254  uint32_t w03of:1;
255  uint32_t w04of:1;
256  uint32_t w05of:1;
257  uint32_t w06of:1;
258  uint32_t w07of:1;
259  uint32_t w08of:1;
260  uint32_t w09of:1;
261  uint32_t w10of:1;
262  uint32_t w11of:1;
263  uint32_t w12of:1;
264  uint32_t w13of:1;
265  uint32_t w14of:1;
266  uint32_t w15of:1;
267  uint32_t w16of:1;
268  uint32_t w17of:1;
269  uint32_t w18of:1;
270  uint32_t w19of:1;
271  uint32_t w20of:1;
272  uint32_t w21of:1;
273  uint32_t :8;
274 
275  uint32_t clrc:1;
276  uint32_t clof:1;
277 
283  uint32_t crc_error_count;
300  uint32_t lrr_count_local;
301  uint32_t lr_count_remote;
303 
304 typedef struct sli4_req_hdr_s {
305  uint32_t opcode:8,
306  subsystem:8,
307  :16;
308  uint32_t timeout;
309  uint32_t request_length;
310  uint32_t version:8,
311  :24;
313 
314 typedef struct sli4_run_biu_diag_hdr_s {
315  uint32_t :8,
316  command:8,
317  status:16;
318  uint32_t rsvd;
320 
321 typedef struct sli4_res_hdr_s {
322  uint32_t opcode:8,
323  subsystem:8,
324  :16;
325  uint32_t status:8,
326  additional_status:8,
327  :16;
328  uint32_t response_length;
331 
332 typedef struct mbox_req_fcoe_set_link_diag_state_s {
334  uint32_t diag:1,
335  shrd:1,
336  div:1,
337  shv:1,
338  :12,
339  link_number:6,
340  link_type:2,
341  :8;
343 
344 typedef struct mbox_res_fcoe_set_link_diag_state_s {
347 
348 typedef struct mbox_req_run_biu_diag_s {
350  uint32_t tx_buf_len:24,
351  tx_buf_flags:8;
352  uint32_t tx_phy_add_low;
353  uint32_t tx_phy_add_high;
354  uint32_t rx_buf_len:24,
355  rx_buf_flags:8;
356  uint32_t rx_phy_add_low;
357  uint32_t rx_phy_add_high;
359 
360 typedef struct mbox_req_fcoe_set_dport_mode_s {
362  uint32_t stop:1,
363  dport_mode:3,
364  enable:1,
365  :27;
366  uint32_t link_number:6,
367  link_type:2,
368  test_bitmask:8,
369  pre_defined_pattern:16;
370  uint32_t frame_size:16,
371  frame_count:16;
373  uint32_t test_duration;
375 
376 typedef struct mbox_res_fcoe_set_dport_mode_s {
378  uint32_t ev:1,
379  enabled:1,
380  :30;
382 
383 typedef struct mbox_req_fcoe_get_dport_results_s {
385  uint32_t link_number:6,
386  link_type:2,
387  query_type:1,
388  :23;
390 
391 typedef struct fcoe_test_result_descriptor_s {
392  uint32_t test_phase_result:8,
393  test_phase:8,
394  err:1,
395  :15;
396  uint32_t w1;
397  uint32_t w2;
399 
400 typedef struct mbox_res_fcoe_get_dport_results_s {
402  uint32_t overall_test_result:8,
403  num_phases:8,
404  :14,
405  remote:1,
406  local:1;
408  uint32_t link_distance;
409  uint16_t frame_size;
413 
414 
415 typedef struct {
416  uint32_t :8,
417  command:8,
418  status:16;
419  uint32_t rsvd1[4];
420  uint8_t wwpn[8];
421  uint8_t wwnn[8];
422  uint32_t hard_alpa:8,
423  preferred_d_id:24;
425 
426 // P.37
427 // 5.3.1 Mailbox Command/Response Header
428 //
429 // only for SLI_CONFIG family mailbox commands
430 //
431 // common mailbox header
432 typedef struct {
433  uint32_t opcode:8;
434  uint32_t subsystem:8;
435  uint32_t :16;
436 
437  union {
438 
439  struct {
440  uint32_t timeout; // (out) timeout (in) status/add'l status
441  } out;
442 
443  struct {
444  uint32_t status:8;
445  uint32_t additional_status:8;
446  uint32_t :16;
447  } in;
448  } word1;
449 
450  uint32_t request_length;
451 
453 } mbox_common_t;
454 
455 // 6.6 READ_COMMON_FLASHROM
456 typedef struct {
459  #define MGMT_FLASHROM_OPCODE_FLASH 0x1
460  #define MGMT_FLASHROM_OPCODE_SAVE 0x2
461  #define MGMT_FLASHROM_OPCODE_CLEAR 0x3
462  #define MGMT_FLASHROM_OPCODE_REPORT 0x4
463  #define MGMT_FLASHROM_OPCODE_IMAGE_INFO 0x5
464  #define MGMT_FLASHROM_OPCODE_IMAGE_CRC 0x6
465  #define MGMT_FLASHROM_OPCODE_OFFSET_BASED_FLASH 0x7
466  #define MGMT_FLASHROM_OPCODE_OFFSET_BASED_SAVE 0x8
468  #define MGMT_FLASHROM_OPTYPE_CODE_FIRMWARE 0x0
469  #define MGMT_FLASHROM_OPTYPE_CODE_REDBOOT 0x1
470  #define MGMT_FLASHROM_OPTYPE_CODE_BIOS 0x2
471  #define MGMT_FLASHROM_OPTYPE_CODE_PXE_BIOS 0x3
472  #define MGMT_FLASHROM_OPTYPE_CODE_CTRLS 0x4
473  #define MGMT_FLASHROM_OPTYPE_CFG_IPSEC 0x5
474  #define MGMT_FLASHROM_OPTYPE_CFG_INI 0x6
475  #define MGMT_FLASHROM_OPTYPE_ROM_OFFSET_SPECIFIED 0x7
476  #define MGMT_FLASHROM_OPTYPE_CODE_FCOE_BIOS 0x8
477  #define MGMT_FLASHROM_OPTYPE_CODE_iSCSI_FW_BACKUP 0x9
478  #define MGMT_FLASHROM_OPTYPE_CODE_FCOE_FW_ACTIVE 0xa
479  #define MGMT_FLASHROM_OPTYPE_CODE_FCOE_FW_BACKUP 0xb
480  #define MGMT_FLASHROM_OPTYPE_CODE_CTRLP 0xc
481  #define MGMT_FLASHROM_OPTYPE_CODE_NCSI_FW 0xd
483  uint32_t offset;
484  uint32_t data_buffer[0];
486 
488 
489 // mbox_common_get_fat
490 typedef struct {
492  union {
493  struct {
494  uint32_t clear_log:8;
495  uint32_t num_pages:8;
496  uint32_t page_offset:16;
497  uint64_t buffer_addr[27];
498  } request;
499  struct {
500  uint32_t log_size;
502  } response;
503  } params;
505 
506 
507 // mbox_common_manage_fat
508 typedef struct {
510  union {
511  struct {
512  uint32_t fat_operation;
513  #define FAT_OPERATION_RETRIEVE 0x0
514  #define FAT_OPERATION_QUERY 0x1
515  #define FAT_OPERATION_CLEAR 0x2
516  #define FAT_OPERATION_TRIGGER 0x3
517  uint32_t read_log_offset;
518  uint32_t read_log_length;
520  uint32_t data_buffer[0];
521  } request;
522  struct {
523  uint32_t log_size;
524  uint32_t read_log_length;
525  uint32_t :32;
526  uint32_t :32;
527  uint32_t data_buffer[0];
528  } response;
529  } params;
531 
532 // mbox_common_read_object_t;
533 typedef struct {
534  uint32_t opcode:8;
535  uint32_t sybsystem:8;
536  uint32_t :16;
537 
538  uint32_t timeout;
539 
540  uint32_t request_length;
541 
542  uint32_t version:8;
543  uint32_t reserved:24;
544 
545  uint32_t desired_read_length:24;
546  uint32_t :8;
547 
548  uint32_t read_offset;
549 
550 #define OBJECT_NAME_LENGTH 26
551  uint32_t object_name[OBJECT_NAME_LENGTH]; // NULL terminated little endian string
552 
554 
555  mbox_hbd_t device_buffer_descriptor[0];
557 
558 typedef struct {
559  uint32_t opcode:8;
560  uint32_t sybsystem:8;
561  uint32_t :16;
562 
563  uint32_t status:8;
564  uint32_t additional_status:8;
565  uint32_t :16;
566 
567  uint32_t response_length;
570 
571  uint32_t :31;
572  uint32_t eof:1;
574 
575 
576 // mbox_common_write_object_t;
577 typedef struct {
578  uint32_t opcode:8;
579  uint32_t subsystem:8;
580  uint32_t :16;
581 
582  uint32_t timeout;
583 
584  uint32_t request_length;
585 
586  uint32_t version:8;
587  uint32_t reserved:24;
588 
589  uint32_t desired_write_length:24;
590  uint32_t :6;
591  uint32_t noc:1;
592  uint32_t eof:1;
593 
594  uint32_t write_offset;
595 
596  uint32_t object_name[OBJECT_NAME_LENGTH]; // NULL terminated little endian string
597 
599 
600  mbox_hbd_t device_buffer_descriptor[1];
602 
603 // mbox_common_write_object_rsp_t;
604 typedef struct {
605  uint32_t opcode:8;
606  uint32_t sybsystem:8;
607  uint32_t :16;
608 
609  uint32_t status:8;
610  uint32_t additional_status:8;
611  uint32_t :16;
612 
613  uint32_t response_length;
616  uint32_t change_status:8,
617  :24;
619 
620 // mbox_common_set_dump_location_t;
621 typedef struct {
622  uint32_t opcode:8;
623  uint32_t subsystem:8;
624  uint32_t :16;
625 
626  uint32_t timeout;
627 
628  uint32_t request_length;
629 
630  uint32_t version:8;
631  uint32_t reserved:24;
632  uint32_t buffer_length:24,
633  :5,
634  fdb:1,
635  blp:1,
636  qry:1;
637  uint32_t buf_addr_low;
638  uint32_t buf_addr_high;
640 
641 // mbox_common_set_dump_location_rsp_t;
642 typedef struct {
643  uint32_t opcode:8;
644  uint32_t subsystem:8;
645  uint32_t :16;
646 
647  uint32_t timeout;
648 
649  uint32_t request_length;
650 
651  uint32_t version:8;
652  uint32_t reserved:24;
653  uint32_t buffer_length:24,
654  :8;
656 
657 // mbox_common_read_object_list_t
658 typedef struct {
659  uint32_t opcode:8;
660  uint32_t sybsystem:8;
661  uint32_t :16;
662 
663  uint32_t timeout;
664 
665  uint32_t request_length;
666 
667  uint32_t version:8;
668  uint32_t reserved:24;
669 
670  uint32_t descriptor_count:16;
671  uint32_t descriptor_offset:16;
672 
673  uint32_t :32;
674 
675  uint32_t object_directory_name[OBJECT_NAME_LENGTH];
676 
678 
679  mbox_hbd_t device_buffer_descriptor[0];
681 
682 // mbox_common_read_object_list_rsp_t;
683 typedef struct {
684  uint32_t opcode:8;
685  uint32_t sybsystem:8;
686  uint32_t :16;
687 
688  uint32_t status:8;
689  uint32_t additional_status:8;
690  uint32_t :16;
691 
692  uint32_t response_length;
694  uint32_t actual_descriptor_count:16;
695  uint32_t :16;
697 
698 // mbox_common_read_object_list_desc_t;
699 typedef struct {
700  uint32_t object_handle:24;
701  uint32_t :5;
702  uint32_t oft:3;
703  #define OFT_NORMAL_OBJECT 0
704  #define OFT_DIRECTORY_OBJECT 1
705  #define OFT_LINKED_OBJECT 2
706 
707  uint32_t object_info;
708  #define OBJECT_BASE_NAME_LENGTH 6
709  #define REV_NAME_LENGTH 32
710  uint32_t object_base_name[OBJECT_BASE_NAME_LENGTH];
711  uint32_t rev_name[REV_NAME_LENGTH];
713 
714 // mbox_common_delete_object_t
715 typedef struct {
716  uint32_t opcode:8;
717  uint32_t sybsystem:8;
718  uint32_t :16;
719 
720  uint32_t timeout;
721 
722  uint32_t request_length;
723 
724  uint32_t version:8;
725  uint32_t reserved:24;
726 
727  uint32_t :32;
728  uint32_t :32;
729 
730  uint32_t object_name[OBJECT_NAME_LENGTH];
731 
733 
734 // mbox_common_delete_object_rsp_t
735 typedef struct {
736  uint32_t opcode:8;
737  uint32_t sybsystem:8;
738  uint32_t :16;
739 
740  uint32_t status:8;
741  uint32_t additional_status:8;
742  uint32_t :24;
743 
744  uint32_t response_length;
747 
748 
749 #define MBOX_MAX_BUFFER (1024)
750 
751 typedef struct {
752  uint32_t mode:8;
753  uint32_t :8;
754  uint32_t port_mask:16;
755  uint32_t trace_level;
756  uint64_t function_mask;
757 } __attribute__((packed)) ext_fat_mode_t;
758 
759 typedef struct {
760  uint8_t module_str[32];
761  uint32_t module_id;
762  uint32_t num_modes;
763  ext_fat_mode_t mode_trace_level[1];
765 
766 typedef struct {
767  uint32_t max_log_entries;
768  uint32_t log_entry_size;
769  uint32_t logging_type:8;
770  uint32_t max_logging_functions:8;
771  uint32_t max_logging_ports:8;
772  uint32_t :8;
773  uint32_t supported_modes;
774  #define LOG_MODE_UART_MASK (1U << 0)
775  #define LOG_MODE_RAM_MASK (1U << 1)
776  #define LOG_MODE_NVRAM_MASK (1U << 2)
777  #define LOG_MODE_NWTK_MASK (1U << 3)
778  uint32_t num_modules;
779  ext_fat_module_t debug_module[1];
781 
782 // mbox_common_get_ext_fat_capabilities_t
783 typedef struct {
785  union {
786  struct {
787  uint32_t parameter_type;
788  #define EXT_FAT_PARAM_TYPE_DEFAULT 0x0
789  #define EXT_FAT_PARAM_TYPE_CURRENT 0x1
790  } request;
791  struct {
793  } response;
794  } params;
796 
797 // mbox_common_set_ext_fat_capabilties_t
798 typedef struct {
800  union {
801  struct {
803  } request;
804  } params;
806 
807 typedef struct {
808  uint8_t version;
809  uint8_t phy_port;
810  uint16_t fid;
811  uint32_t trace_level;
812  uint64_t module_mask;
814  uint32_t timestamp;
815  uint8_t str_data[16];
816  uint32_t data[6];
818 
819 // mbox_common_ext_fat_configure_snapshot_t
820 typedef struct {
822  union {
823  struct {
825  } response;
826  } params;
828 
829 // mbox_ioctl_common_ext_fat_retrieve_snapshot_t
830 typedef struct {
832  union {
833  struct {
834  #define EXT_FAT_RETRIEVE_MODE_VRAM 0x0
835  #define EXT_FAT_RETRIEVE_MODE_NVRAM 0x1
836  uint32_t snapshot_mode ;
837  uint32_t start_index;
838  uint32_t num_log_entries;
839  } request;
840  struct {
841  uint32_t num_log_entries;
843  } response;
844  } params;
846 
847 typedef struct {
850  uint8_t table_data[0];
852 
853 // ioctl_common_ext_fat_read_string_table_t
854 typedef struct {
856  union {
857  struct {
858  uint32_t byte_offset;
859  uint32_t num_bytes;
860  } request;
861  struct {
863  } response;
864  } params;
866 
867 // mbox_common_iscsi_set_tcp_parameters
868 typedef struct {
870  union {
871  struct {
872  uint32_t request_flags;
873  #define ISCSI_UPDATE_DELAYED_ACK_TIMER 0x01
874  #define ISCSI_UPDATE_ACK_FREQUENCY 0x04
876  uint32_t reserved;
877  uint32_t ack_frequency;
878  } request;
879  } params;
881 
882 // mbox_common_iscsi_connection_update
883 typedef struct {
885  union {
886  struct {
887  uint32_t connection_id:16;
888  uint32_t :16;
889  uint32_t request_flags;
890  #define ISCSI_UPDATE_TCP_WINDOW 0x01
892  } request;
893  } params;
895 
896 // mbox_common_iscsi_get_connection_info
897 typedef struct {
899  union {
900  struct {
902  } request;
903  struct {
904  uint32_t source_ip_address[6];
905  uint32_t dest_ip_address[6];
906  uint32_t source_port : 16,
907  dest_port : 16;
908  uint32_t tcp_mss;
910  uint32_t window_scale_shift_count : 8,
911  reserved : 24;
912 
913  } response;
914  } params;
916 
917 typedef struct {
918  uint32_t opcode:8,
919  subsystem:8,
920  port_number:8,
921  domain:8;
922  uint32_t timeout;
923  uint32_t request_length;
924  uint32_t version:8,
925  :8,
926  pf_number:8,
927  vh_number:8;
929 
930 typedef struct {
931  uint32_t opcode:8,
932  subsystem:8,
933  :8,
934  domain:8;
935  uint32_t status:8,
936  additional_status:8,
937  :16;
938  uint32_t response_length;
941 
942 typedef union {
946 
947 typedef struct {
949  uint32_t port_status;
951 
952 typedef struct sli4_sge_s {
955  uint32_t data_offset:27,
956  sge_type:4,
957  last:1;
958  uint32_t buffer_length;
959 } sli4_sge_t;
960 
961 /**
962  * be_resources struct
963  */
964 
965 // 64 bytes per struct
966 typedef struct {
967  uint32_t pf_num:8,
968  vf_domain:8,
969  :16;
970 
971  uint32_t valid_fields;
972 
973  uint32_t session_count:16,
974  icd_count:16;
975 
976  uint16_t cq_count;
977  uint8_t iscsi_mac_address[6];
978 
980  uint8_t bw_percent;
981  uint16_t vlan_id;
982 
983  uint8_t rsvd1[40];
985 
986 typedef struct {
987  uint32_t resource_type:8,
988  :24;
989 
990  be_resources_iscsi_v1 resource_descriptor; // only need iscsi type...
992 
993 typedef struct {
995 
997  be_resources_v1 be_resources[28]; // Skyhawk will return 28 resource descriptors
999 
1000 typedef struct {
1002 
1004  be_resources_v1 be_resources[1];
1006 
1007 typedef struct sli4_res_common_get_cntl_attributes_s {
1009  uint8_t version_str[32];
1010  uint8_t manufacturer_name[32];
1014  uint8_t rsvd0[2];
1017  uint8_t ncsi_version_string[12];
1019  uint8_t controller_model_number[32];
1020  uint8_t controller_description[64];
1021  uint8_t controller_serial_number[32];
1022  uint8_t ip_version_string[32];
1023  uint8_t firmware_version_string[32];
1024  uint8_t bios_version_string[32];
1025  uint8_t redboot_version_string[32];
1026  uint8_t driver_version_string[32];
1027  uint8_t fw_on_flash_version_string[32];
1029  uint16_t max_cdblength;
1030  uint8_t asic_revision;
1031  uint8_t generational_guid[16];
1036  uint8_t cache_valid;
1037  uint8_t hba_status;
1039  uint8_t phy_port;
1041  uint32_t hba_mtu[8];
1044  uint8_t future_u8[2];
1045  uint32_t future_u32[3];
1046  uint16_t pci_vendor_id;
1047  uint16_t pci_device_id;
1055  uint8_t netfilters;
1056  uint8_t rsvd1[3];
1057  uint32_t future2_u32[4];
1059 
1060 typedef struct sli4_req_common_get_iface_mac_list_s {
1062  uint32_t mac_type:8,
1063  permanent_override:8,
1064  iface_id:16;
1065  uint32_t mac_id;
1067 
1068 typedef struct sli4_res_common_get_iface_mac_list_s {
1074  uint32_t num_tpo_mac:8,
1075  num_ppo_mac:8,
1076  max_sz_mac_list:8,
1077  resv:8;
1078  uint32_t po_mac_address[64];
1080 
1081 typedef struct sli4_req_common_get_function_config_s {
1084 
1085 typedef struct sli4_res_common_get_function_config_s {
1087  uint32_t desc_count;
1088  uint32_t desc[0];
1090 
1091 typedef struct sli4_req_common_get_profile_config_s {
1093  uint32_t profile_id:8,
1094  typ:2,
1095  census_mode:1,
1096  :21;
1098 
1099 typedef struct sli4_res_common_get_profile_config_s {
1101  uint32_t desc_count;
1102  uint32_t desc[0];
1104 
1105 typedef struct sli4_req_common_set_profile_config_s {
1107  uint32_t profile_id:8,
1108  :23,
1109  isap:1;
1110  uint32_t desc_count;
1111  uint32_t desc[0];
1113 
1114 typedef struct sli4_res_common_set_profile_config_s {
1117 
1118 #define MAX_DESCRIPTION 128*4
1119 typedef struct sli4_profile_descriptor_s {
1120  uint32_t profile_id:8,
1121  :8,
1122  profile_index:8,
1123  :8;
1124  uint8_t profile_description_string[MAX_DESCRIPTION];
1126 
1127 typedef struct sli4_req_common_get_profile_list_s {
1129  uint32_t start_profile_index:8,
1130  :24;
1132 
1133 typedef struct sli4_res_common_get_profile_list_s {
1135  uint32_t desc_count;
1138 
1139 typedef struct sli4_req_common_get_active_profile_s {
1142 
1143 typedef struct sli4_res_common_get_active_profile_s {
1145  uint32_t active_profile_id:8,
1146  :8,
1147  next_profile_id:8,
1148  :8;
1150 
1151 typedef struct sli4_req_common_set_active_profile_s {
1153  uint32_t active_profile_id:8,
1154  :23,
1155  fd:1;
1157 
1158 typedef struct sli4_res_common_set_active_profile_s {
1161 
1162 typedef struct {
1163  uint32_t type:8,
1164  length:8,
1165  :6,
1166  pool:1,
1167  lldv:1,
1168  :1,
1169  macv:1,
1170  vlv:1,
1171  :1,
1172  qun:1,
1173  del:1,
1174  imm:1,
1175  nosv:1;
1176  uint32_t :16,
1177  pf_number:10,
1178  :6;
1179  uint32_t session_count:16,
1180  icd_count:16;
1181  uint16_t cq_count;
1182  uint8_t mac_address[6];
1183  uint32_t other[17];
1185 
1186 typedef struct {
1187  uint32_t type:8,
1188  length:8,
1189  :6,
1190  pool:1,
1191  lldv:1,
1192  icfv:1,
1193  macv:1,
1194  vlv:1,
1195  vft:1,
1196  qun:1,
1197  del:1,
1198  imm:1,
1199  nosv:1;
1200  uint32_t vf_number:8,
1201  :8,
1202  pf_number:10,
1203  :6;
1204  uint16_t unicast_count;
1205  uint8_t mac_address[6];
1206  uint32_t other[18];
1208 
1209 typedef struct {
1210  uint32_t type:8,
1211  :15,
1212  lldv:1,
1213  icfv:1,
1214  macv:1,
1215  vlv:1,
1216  vft:1,
1217  qun:1,
1218  del:1,
1219  imm:1,
1220  nosv:1;
1221  uint32_t vf_number:8,
1222  :8,
1223  pf_number:10,
1224  :6;
1225  uint16_t unicast_count;
1226  uint8_t mac_address[6];
1227  uint32_t other[14];
1229 
1230 typedef struct {
1231  uint32_t type:8,
1232  :18,
1233  vlv:1,
1234  vft:1,
1235  qun:1,
1236  del:1,
1237  imm:1,
1238  nosv:1;
1239  uint32_t vf_number:8,
1240  :8,
1241  pf_number:10,
1242  :6;
1243  uint16_t counts[8];
1244  uint8_t wwnn[8];
1245  uint8_t wwpn[8];
1246  uint8_t mac_addr[6];
1247  uint16_t rsvd1;
1248  uint32_t other[6];
1250 
1251 typedef struct {
1253  uint32_t cmd_buf_length;
1260 
1261 typedef struct {
1263  uint32_t rsvd1;
1264  uint32_t resp_length;
1265  uint32_t rsvd2[4];
1266  uint32_t clp_status;
1269 
1270 /* Link Config Descriptor for link config functions */
1271 typedef struct {
1272  uint32_t link_config_id:8,
1273  :24;
1274  uint32_t config_description[8];
1276 
1277 #define MAX_LINK_CONFIG_DESCRIPTORS 10
1278 typedef struct {
1281 
1282 typedef struct {
1284  uint32_t active_link_config_id:8,
1285  :8,
1286  next_link_config_id:8,
1287  :8;
1288  uint32_t link_config_desc_count;
1291 
1292 typedef struct {
1294  uint32_t next_link_config_id:8,
1295  :23,
1296  factory_default:1;
1298 
1299 typedef struct {
1302 #endif // __ELXU_SLI4_H__
#define REV_NAME_LENGTH
Definition: elxu_sli4.h:709
uint32_t tag_hi
Definition: elxu_sli4.h:172
uint32_t total_exchanges_responder
Definition: elxu_sli4.h:234
uint32_t buffer_length
Definition: elxu_sli4.h:958
sli4_ioctl_header_t hdr
Definition: elxu_sli4.h:1252
uint32_t payload_length
Definition: elxu_sli4.h:168
uint32_t buffer_address_low
Definition: elxu_sli4.h:137
uint32_t rsvd7
Definition: elxu_sli4.h:203
sli4_ioctl_header_t hdr
Definition: elxu_sli4.h:1262
sli4_ioctl_request_header_t req
Definition: elxu_sli4.h:943
uint32_t uint32_t timeout
Definition: elxu_sli4.h:305
#define MAX_LINK_CONFIG_DESCRIPTORS
Definition: elxu_sli4.h:1277
uint32_t total_exchanges_originator
Definition: elxu_sli4.h:233
uint32_t actual_vpd_length
Definition: elxu_sli4.h:214
uint32_t module_id
Definition: elxu_sli4.h:761
uint32_t second_fw_id
Definition: elxu_sli4.h:206
uint32_t trace_level
Definition: elxu_sli4.h:755
uint32_t buffer_address_high
Definition: elxu_sli4.h:138
mbox_common_t common
Definition: elxu_sli4.h:491
mbox_ext_fat_read_string_params_t stringtbl
Definition: elxu_sli4.h:862
uint32_t num_modes
Definition: elxu_sli4.h:762
ext_fat_config_params_t config
Definition: elxu_sli4.h:802
uint64_t module_mask
Definition: elxu_sli4.h:812
uint32_t second_hw_revision
Definition: elxu_sli4.h:196
uint32_t actual_response_length
Definition: elxu_sli4.h:329
uint32_t rsvd4
Definition: elxu_sli4.h:197
uint32_t device_buffer_descriptor_count
Definition: elxu_sli4.h:598
uint32_t receive_frame_count
Definition: elxu_sli4.h:230
uint32_t uint32_t physical_address_low
Definition: elxu_sli4.h:209
ext_fat_config_params_t config
Definition: elxu_sli4.h:792
uint32_t dropped_frames_due_to_no_xri_count
Definition: elxu_sli4.h:239
mbox_common_t common
Definition: elxu_sli4.h:509
uint32_t empty_rq_timeout_count
Definition: elxu_sli4.h:238
uint32_t receive_p_bsy_count
Definition: elxu_sli4.h:235
uint32_t third_hw_revision
Definition: elxu_sli4.h:198
#define OBJECT_NAME_LENGTH
Definition: elxu_sli4.h:550
uint32_t address_low
Definition: elxu_sli4.h:127
uint32_t receive_sequence_count
Definition: elxu_sli4.h:232
uint32_t tag_lo
Definition: elxu_sli4.h:170
uint32_t receive_kbyte_count
Definition: elxu_sli4.h:228
uint32_t empty_xri_pool_count
Definition: elxu_sli4.h:240
uint32_t dropped_frames_due_to_no_rq_buffer_count
Definition: elxu_sli4.h:237
uint32_t transmit_frame_count
Definition: elxu_sli4.h:229
#define OBJECT_BASE_NAME_LENGTH
Definition: elxu_sli4.h:708
uint32_t timeout
Definition: elxu_sli4.h:440
uint32_t request_length
Definition: elxu_sli4.h:450
mbox_common_read_flashrom_t mbox_common_write_flashrom_t
Definition: elxu_sli4.h:487
#define MAX_DESCRIPTION
Definition: elxu_sli4.h:1118
sli4_ioctl_response_header_t res
Definition: elxu_sli4.h:944
uint32_t trace_table_index
Definition: elxu_sli4.h:813
uint32_t device_buffer_descriptor_count
Definition: elxu_sli4.h:553
uint32_t address_high
Definition: elxu_sli4.h:128
uint32_t uint32_t w1
Definition: elxu_sli4.h:392
uint32_t buffer_address_low
Definition: elxu_sli4.h:954
uint32_t trace_level
Definition: elxu_sli4.h:811
uint32_t timestamp
Definition: elxu_sli4.h:814
sli4_run_biu_diag_hdr_t hdr
Definition: elxu_sli4.h:349
uint32_t transmit_sequence_count
Definition: elxu_sli4.h:231
uint32_t buffer_address_high
Definition: elxu_sli4.h:953
uint32_t transmit_kbyte_count
Definition: elxu_sli4.h:227
uint32_t bytes_transferred
Definition: elxu_sli4.h:501
uint32_t returned_vpd_length
Definition: elxu_sli4.h:213
uint32_t physical_address_high
Definition: elxu_sli4.h:212
uint32_t request_length
Definition: elxu_sli4.h:309
uint32_t actual_response_length
Definition: elxu_sli4.h:452
uint32_t first_fw_id
Definition: elxu_sli4.h:204
uint32_t receive_f_bsy_count
Definition: elxu_sli4.h:236
uint64_t function_mask
Definition: elxu_sli4.h:756