1 /****************************************************************************
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  *
21  * Copyright 2014 QLogic Corporation
22  * The contents of this file are subject to the terms of the
23  * QLogic End User License (the "License").
24  * You may not use this file except in compliance with the License.
25  *
26  * You can obtain a copy of the License at
27  * http://www.qlogic.com/Resources/Documents/DriverDownloadHelp/
28  * QLogic_End_User_Software_License.txt
29  * See the License for the specific language governing permissions
30  * and limitations under the License.
31  *
32  *
33  * FILE NAME:       ncsi_cmds.h
34  *
35  * DESCRIPTION:     Note that the response definitions include the notion of
36  *                  a rsp Payload consisting of the actual data returned for a
37  *                  given rsp, and the rsp frame Payload consisting of the rsp
38  *                  Payload plus all padding and checksum bytes.  The size of
39  *                  each of these must be understood independently for proper
40  *                  programming of the rsp pkt header, and the actual UMP TX
41  *                  operation.
42  *
43  * CONVENTIONS:
44  *
45  * AUTHOR:          Tim Sharp
46  *
47  * CREATION DATE:   2007
48  *
49  *
50  ****************************************************************************/
51 
52 
53 #ifndef NCSI_CMDS_H
54 #define NCSI_CMDS_H
55 
56 
57 
58 /*----------------------------------------------------------------------------
59 ------------------------------ include files ---------------------------------
60 ----------------------------------------------------------------------------*/
61 
62 #include "bcmtype.h"
63 #include "ncsi_basic_types.h"
64 
65 /*----------------------------------------------------------------------------
66 ------------------------------ local definitions -----------------------------
67 
68 structs, unions, typedefs, #defines, etc belong here...
69 
70 ----------------------------------------------------------------------------*/
71 
72 
73 typedef enum NcsiGetParameterSelector
74 {
75 
76 	NCSI_PARAM_BOOTCODE_REV             = 0,
77 	NCSI_PARAM_HOST_L2_MAC,
78 	NCSI_PARAM_ALT_HOST_L2_MAC,
79 	NCSI_PARAM_HOST_ISCSI_MAC,
80 	NCSI_PARAM_ALT_HOST_ISCSI_MAC,
81 	NCSI_PARAM_PXE_BOOT_REV,
82 	NCSI_PARAM_ISCSI_BOOT_REV,
83 	NCSI_PARAM_PCI_DEVICE_ID,
84 	NCSI_PARAM_PCI_VENDOR_ID,
85 	NCSI_PARAM_PCI_SUBSYSTEM_ID,
86 	NCSI_PARAM_PCI_SUBSYSTEM_VENDOR_ID
87 
88 }NcsiGetParameterSelector_t;
89 
90 
91 
92 /*****************************************************************************
93 
94 NcsiRmiiControlPktHeader_t
95 
96     this structure definition is for the common UMP command/response frame
97     header used in both cmd and rsp pkts.
98 
99     UMP frame header idntifies wheteher a received packet is to be processed
100     locally or forwarded for transmission.
101 
102 *****************************************************************************/
103 #define NCSI_CMD_CHANNEL_ID_MAX_VALUE       1
104 
105 #define NCSI_CMD_HEADER_SIZE                16
106 
107 
108 
109 typedef struct NcsiControlPktHeader
110 #if defined (BIG_ENDIAN)
111 {
112 	u16_t   PlusTwoPadding;                  /* for plus 2 alignment */
113 	u8_t    DestAddr[SIZEOF_MAC_ADDRESS];    /* 6                    */
114 	u8_t    SrcAddr[SIZEOF_MAC_ADDRESS];     /* 12                    */
115 
116 
117 	u16_t   EtherType;                       /* 14 ids pkt as cmd       */
118 #define NCSI_ETHER_TYPE_ID             (0x88F8)
119 	u8_t    McId;
120 
121 
122 	u8_t    HeaderRevNum;                 /* 16 ids        */
123 	u8_t    Reserved0;
124 	u8_t    InstanceId;                     /* 18 ids order of pkts    */
125 
126 
127 	u8_t    TypeCode;                        /* 19 ids specific command */
128 #define NCSI_CMD_TYPE_AEN                                   (0xFF)
129 #define NCSI_CMD_TYPE_MASK                                     (0x7F)
130 #define NCSI_CMD_TYPE_CLEAR_INITIAL_STATE                       (0x00)
131 #define NCSI_CMD_TYPE_PACKAGE_SELECT                            (0x01)
132 #define NCSI_CMD_TYPE_PACKAGE_DESELECT                          (0x02)
133 #define NCSI_CMD_TYPE_ENABLE_CHANNEL                            (0x03)
134 #define NCSI_CMD_TYPE_DISABLE_CHANNEL                           (0x04)
135 #define NCSI_CMD_TYPE_RESET_CHANNEL                             (0x05)
136 #define NCSI_CMD_TYPE_ENABLE_CHANNEL_EGRESS_TX                  (0x06)
137 #define NCSI_CMD_TYPE_DISABLE_CHANNEL_EGRESS_TX                 (0x07)
138 #define NCSI_CMD_TYPE_ENABLE_AEN                                (0x08)
139 #define NCSI_CMD_TYPE_SET_LINK                                  (0x09)
140 #define NCSI_CMD_TYPE_GET_LINK_STATUS                           (0x0A)
141 #define NCSI_CMD_TYPE_SET_VLAN_FILTERS                          (0x0B)
142 #define NCSI_CMD_TYPE_ENABLE_VLAN                               (0x0C)
143 #define NCSI_CMD_TYPE_DISABLE_VLAN                              (0x0D)
144 #define NCSI_CMD_TYPE_SET_MAC_ADDRESS                           (0x0E)
145 #define NCSI_CMD_TYPE_ENABLE_BROADCAST_PKT_FILTER               (0x10)
146 #define NCSI_CMD_TYPE_DISABLE_BROADCAST_PKT_FILTER              (0x11)
147 #define NCSI_CMD_TYPE_ENABLE_MULTICAST_PKT_FILTER               (0x12)
148 #define NCSI_CMD_TYPE_DISABLE_MULTICAST_PKT_FILTER              (0x13)
149 #define NCSI_CMD_TYPE_SET_NCSI_FLOW_CONTROL                     (0x14)
150 #define NCSI_CMD_TYPE_GET_VERSION_ID                            (0x15)
151 #define NCSI_CMD_TYPE_GET_CAPABILITIES                          (0x16)
152 #define NCSI_CMD_TYPE_GET_PARAMETERS                            (0x17)
153 #define NCSI_CMD_TYPE_GET_IF_STATISTICS                         (0x18)
154 #define NCSI_CMD_TYPE_GET_NCSI_STATISTICS                       (0x19)
155 #define NCSI_CMD_TYPE_GET_NCSI_PASS_THROUGH_STATISTICS          (0x1A)
156 #define NCSI_CMD_TYPE_LAST_NON_OEM_CMD                          NCSI_CMD_TYPE_GET_NCSI_PASS_THROUGH_STATISTICS
157 #define NCSI_CMD_TYPE_OEM                                       (0x50)
158 #define NCSI_CMD_RESPONSE_BIT                                     (0x80)
159 
160 
161 	u8_t    ChannelId;                       /* 20 ids specific bcm5706 */
162 #define NCSI_CMD_CHANNEL_ID_MASK            0x1F
163 #define NCSI_CMD_PACKAGE_ID_MASK            0xE0
164 	u16_t   PayloadSize;                     /* 22 ids how much Payload */
165 	u32_t   Reserved1[2];
166 
167 } NcsiRmiiControlPktHeader_t;
168 #elif defined (LITTLE_ENDIAN)
169 {
170 	   u8_t    DestAddr[SIZEOF_MAC_ADDRESS+2];    /* 6 + 2 padding     */
171 	   u8_t    SrcAddr[SIZEOF_MAC_ADDRESS-2];
172 	   u16_t   EtherType;                       /* 14 ids pkt as cmd       */
173 #define NCSI_ETHER_TYPE_ID             (0x88F8)
174 	   u8_t    SrcAddr_lsw[2];
175 
176 	   u8_t    InstanceId;
177 	   u8_t    Reserved0;
178 	   u8_t    HeaderRevNum;
179 	   u8_t    McId;
180 
181 	   u16_t   PayloadSize;                     /* 22 ids how much Payload */
182 
183 	   u8_t    ChannelId;
184 #define NCSI_CMD_PACKAGE_ID_MASK            0xE0
185 #define NCSI_CMD_CHANNEL_ID_MASK            0x1F
186 	   u8_t    TypeCode;
187 #define NCSI_CMD_RESPONSE_BIT                                     (0x80)
188 #define NCSI_CMD_TYPE_OEM                                       (0x50)
189 #define NCSI_CMD_TYPE_LAST_NON_OEM_CMD                          NCSI_CMD_TYPE_GET_NCSI_PASS_THROUGH_STATISTICS
190 #define NCSI_CMD_TYPE_GET_NCSI_PASS_THROUGH_STATISTICS          (0x1A)
191 #define NCSI_CMD_TYPE_GET_NCSI_STATISTICS                       (0x19)
192 #define NCSI_CMD_TYPE_GET_IF_STATISTICS                         (0x18)
193 #define NCSI_CMD_TYPE_GET_PARAMETERS                            (0x17)
194 #define NCSI_CMD_TYPE_GET_CAPABILITIES                          (0x16)
195 #define NCSI_CMD_TYPE_GET_VERSION_ID                            (0x15)
196 #define NCSI_CMD_TYPE_SET_NCSI_FLOW_CONTROL                     (0x14)
197 #define NCSI_CMD_TYPE_DISABLE_MULTICAST_PKT_FILTER              (0x13)
198 #define NCSI_CMD_TYPE_ENABLE_MULTICAST_PKT_FILTER               (0x12)
199 #define NCSI_CMD_TYPE_DISABLE_BROADCAST_PKT_FILTER              (0x11)
200 #define NCSI_CMD_TYPE_ENABLE_BROADCAST_PKT_FILTER               (0x10)
201 #define NCSI_CMD_TYPE_SET_MAC_ADDRESS                           (0x0E)
202 #define NCSI_CMD_TYPE_DISABLE_VLAN                              (0x0D)
203 #define NCSI_CMD_TYPE_ENABLE_VLAN                               (0x0C)
204 #define NCSI_CMD_TYPE_SET_VLAN_FILTERS                          (0x0B)
205 #define NCSI_CMD_TYPE_GET_LINK_STATUS                           (0x0A)
206 #define NCSI_CMD_TYPE_SET_LINK                                  (0x09)
207 #define NCSI_CMD_TYPE_ENABLE_AEN                                (0x08)
208 #define NCSI_CMD_TYPE_DISABLE_CHANNEL_EGRESS_TX                 (0x07)
209 #define NCSI_CMD_TYPE_ENABLE_CHANNEL_EGRESS_TX                  (0x06)
210 #define NCSI_CMD_TYPE_RESET_CHANNEL                             (0x05)
211 #define NCSI_CMD_TYPE_DISABLE_CHANNEL                           (0x04)
212 #define NCSI_CMD_TYPE_ENABLE_CHANNEL                            (0x03)
213 #define NCSI_CMD_TYPE_PACKAGE_DESELECT                          (0x02)
214 #define NCSI_CMD_TYPE_PACKAGE_SELECT                            (0x01)
215 #define NCSI_CMD_TYPE_CLEAR_INITIAL_STATE                       (0x00)
216 #define NCSI_CMD_TYPE_MASK                                     (0x7F)
217 #define NCSI_CMD_TYPE_AEN                                   (0xFF)
218 
219 	   u32_t   Reserved1[2];
220 
221 }
222    NcsiRmiiControlPktHeader_t;
223 #endif // ENDIAN
224 
225 typedef NcsiRmiiControlPktHeader_t *pNcsiRmiiControlPktHeader_t;
226 
227 #define NCSI_DEFS_SIZE_OF_NCSI_FRAME_HEADER  (sizeof (NcsiRmiiControlPktHeader_t))
228 
229 
230 
231 /*****************************************************************************
232 
233 FwTestCmdPayload_t
234 
235     Structure definition for most basic UMP cmd Payload
236 
237     Write command is not bounded.
238 
239     Read command is bounded to 128 bytes, or 32 dwords.  That fits in with
240     existing statistics command response payload size, and handles existing
241     testing needs.
242 
243 *****************************************************************************/
244 
245 typedef struct FwTestCmdPayload
246 {
247 	u32_t     OperationType;
248 #define NCSI_TEST_READ                              0x0   // read N register dwords starting at address provided (word count, address )
249 #define NCSI_TEST_WRITE                             0x1   // write N words starting at address provided with Value provided (word count, address, value)
250 #define NCSI_TEST_READ_FW_STATE                     0x2   // read and return internal fw state word
251 #define NCSI_TEST_SAVE_SET_OS_PRES_FLAG             0x3   // canned functional meaning
252 #define NCSI_TEST_RESTORE_OS_PRES_FLAG              0x4   // canned functional meaning
253 #define NCSI_TEST_SAVE_SET_EXCEED_LOW_POWER_FLAG    0x5   // canned functional meaning
254 #define NCSI_TEST_RESTORE_EXCEED_LOW_POWER_FLAG     0x6   // canned functional meaning
255 	union {
256 		struct {
257 			u32_t    Address;
258 			u32_t    WordCount;
259 		} Read;
260 
261 		struct {
262 			u32_t    Address;
263 			u32_t    WordCount;
264 			u32_t    Value;
265 
266 		} Write;
267 
268 	} OperationParameters;
269 
270 } FwTestCmdPayload_t;
271 
272 // type definitions for Dual Media Support
273 typedef enum PhyPrioritySel
274 {
275 	PHY_PRI_HW_PIN,          // HW pin strapping value
276 	PHY_PRI_COPPER_FIRST,          // Copper priority selection
277 	PHY_PRI_XAUI_FIRST,          // XAUI  priority selection
278 	PHY_PRI_COPPER_ONLY,          // use copper, ignore XAUI priority
279 	PHY_PRI_XAUI_ONLY              // use XAUI, ignore copper priority
280 }PhyPrioritySel_t;
281 
282 
283 /*****************************************************************************
284 
285 SetDualMediaParametersPayload_t
286 
287     Structure definitions for Dual Media support
288 
289 *****************************************************************************/
290 #define NCSI_CMD_SET_PHY_PRIORITY_RSP_PAYLOAD_VERSION     0
291 
292 typedef struct SetDualMediaParametersPayload
293 #if defined (BIG_ENDIAN)
294 {
295 	u8_t     Reserved[3];
296 	u8_t     PhyPrioritySelection;
297 } SetDualMediaParametersPayload_t;
298 #elif defined (LITTLE_ENDIAN)
299 {
300 	   u8_t     PhyPrioritySelection;
301 	   u8_t     Reserved[3];
302 }
303    SetDualMediaParametersPayload_t;
304 #endif // ENDIAN
305 
306 typedef struct NcsiOemGetDualMediaParametersPayload
307 #if defined (BIG_ENDIAN)
308 {
309 	u16_t    Reserved;
310 	u8_t     PhySelection;
311 	u8_t     PhyPrioritySelection;
312 } NcsiOemGetDualMediaParametersPayload_t;
313 #elif defined (LITTLE_ENDIAN)
314 {
315 	   u8_t     PhyPrioritySelection;
316 	   u8_t     PhySelection;
317 	   u16_t    Reserved;
318 }
319    NcsiOemGetDualMediaParametersPayload_t;
320 #endif // ENDIAN
321 
322 
323 #define NCSI_CMD_SET_MAC_OEM_CMD_PAYLOAD_VERSION    0
324 typedef struct BrcmOemCmdRspHeader
325 {
326 #if defined (BIG_ENDIAN)
327 	u8_t     PayloadVersion;
328 	u8_t     CommandType;
329 #define BRCM_OEM_SET_ALT_HOST_MAC_ADDRESS_CMD                     0x00
330 #define BRCM_OEM_GET_NCSI_PARAMETERS_CMD                          0x01
331 #define BRCM_OEM_NCSI_TEST_CMD                                    0x02
332 #define BRCM_OEM_SET_PHY_PRIORITY_CMD                             0x03
333 #define BRCM_OEM_GET_PHY_PRIORITY_CMD                             0x04
334 	u16_t    PayloadLength;
335 	u32_t    Reserved;
336 
337 #elif defined (LITTLE_ENDIAN)
338 	u16_t    PayloadLength;
339 	u8_t     CommandType;
340 #define BRCM_OEM_SET_ALT_HOST_MAC_ADDRESS_CMD                     0x00
341 #define BRCM_OEM_GET_NCSI_PARAMETERS_CMD                          0x01
342 #define BRCM_OEM_NCSI_TEST_CMD                                    0x02
343 #define BRCM_OEM_SET_PHY_PRIORITY_CMD                             0x03
344 #define BRCM_OEM_GET_PHY_PRIORITY_CMD                             0x04
345 	u8_t     PayloadVersion;
346 	u32_t    Reserved;
347 
348 #endif // ENDIAN
349 } BrcmOemCmdRspHeader_t;
350 
351 
352 typedef struct ModifyHostMacAddrCmdPayload
353 #if defined (BIG_ENDIAN)
354 {
355 	u8_t     Res;
356 	u8_t     Flags;
357 #define NCSI_OEM_CMD_SET_ALT_HOST_MAC_ADDR_FLAG_FIELD_ENABLE_MAC_ADDR       0x01
358 #define NCSI_OEM_CMD_SET_ALT_HOST_MAC_ADDR_FLAG_FIELD_ISCSI_MAC_ADDR_SELECT 0x02
359 
360 	u16_t    MacHigh;
361 	u16_t    MacMiddle;
362 	u16_t    MacLow;
363 
364 
365 } ModifyHostMacAddrCmdPayload_t;
366 #elif defined (LITTLE_ENDIAN)
367 {
368 
369 	   u16_t    MacHigh;
370 	   u8_t     Flags;
371 #define NCSI_OEM_CMD_SET_ALT_HOST_MAC_ADDR_FLAG_FIELD_ENABLE_MAC_ADDR       0x01
372 #define NCSI_OEM_CMD_SET_ALT_HOST_MAC_ADDR_FLAG_FIELD_ISCSI_MAC_ADDR_SELECT 0x02
373 	   u8_t     Res;
374 	   u16_t    MacLow;
375 	   u16_t    MacMiddle;
376 
377 
378 }
379    ModifyHostMacAddrCmdPayload_t;
380 #endif // ENDIAN
381 
382 
383 
384 typedef union BrcmOemCmdPayload
385 {
386 	ModifyHostMacAddrCmdPayload_t   ModifyHostMacAddrCmd;          // BRCM_OEM_SET_ALT_HOST_MAC_ADDRESS_CMD
387 	FwTestCmdPayload_t              NsciTestCmd;                   // BRCM_OEM_NCSI_TEST_CMD
388 
389 	SetDualMediaParametersPayload_t         SetDualMediaParametersCmd;            // BRCM_OEM_SET_PHY_PRIORITY_CMD
390 
391 } BrcmOemCmdPayload_t;
392 
393 /* OEM command ID */
394 #define DELL_OEM_GET_INVENTORY_CMD                                               0x00
395 #define DELL_OEM_GET_EXTENDED_CAPABILITIES_CMD                                   0x01
396 #define DELL_OEM_GET_PARTITION_INFORMATION_CMD                                   0x02
397 #define DELL_OEM_GET_FCOE_CAPABILITIES_CMD                                       0x03
398 #define DELL_OEM_GET_VIRTUAL_LINK_CMD                                            0x04
399 #define DELL_OEM_GET_LAN_STATISTICS_CMD                                          0x05
400 #define DELL_OEM_GET_FCOE_STATISTICS_CMD                                         0x06
401 #define DELL_OEM_SET_ADDR_CMD                                                    0x07
402 #define DELL_OEM_GET_ADDR_CMD                                                    0x08
403 #define DELL_OEM_SET_LICENSE_CMD                                                 0x09
404 #define DELL_OEM_GET_LICENSE_CMD                                                 0x0A
405 #define DELL_OEM_SET_PASSTHRU_CONTROL_CMD                                        0x0B
406 #define DELL_OEM_GET_PASSTHRU_CONTROL_CMD                                        0x0C
407 #define DELL_OEM_SET_PARTITION_TX_BANDWIDTH_CMD                                  0x0D
408 #define DELL_OEM_GET_PARTITION_TX_BANDWIDTH_CMD                                  0x0E
409 #define DELL_OEM_SET_MC_IP_ADDRESS_CMD                                           0x0F
410 #define DELL_OEM_GET_TEAMING_INFORMATION_CMD                                     0x10
411 #define DELL_OEM_ENABLE_PORTS_CMD                                                0x11
412 #define DELL_OEM_DISABLE_PORTS_CMD                                               0x12
413 #define DELL_OEM_GET_TEMPERATURE_CMD                                             0x13
414 #define DELL_OEM_SET_LINK_TUNING_CMD                                             0x14
415 #define DELL_OEM_ENABLE_OUTOFBOX_WOL_CMD                                         0x15
416 #define DELL_OEM_DISABLE_OUTOFBOX_WOL_CMD                                        0x16
417 #define DELL_OEM_GET_SUPP_PAYLOAD_VERSION_CMD                                    0x1A
418 #define DELL_OEM_GET_OS_DRIVER_VERSION_CMD                                       0x1C
419 #define DELL_OEM_GET_ISCSI_BOOT_INITIATOR_CONFIG_CMD                             0x1D
420 #define DELL_OEM_SET_ISCSI_BOOT_INITIATOR_CONFIG_CMD                             0x1E
421 #define DELL_OEM_GET_ISCSI_BOOT_TARGET_CONFIG_CMD                                0x1F
422 #define DELL_OEM_SET_ISCSI_BOOT_TARGET_CONFIG_CMD                                0x20
423 #define DELL_OEM_GET_FCOE_BOOT_TARGET_CONFIG_CMD                                 0x21
424 #define DELL_OEM_SET_FCOE_BOOT_TARGET_CONFIG_CMD                                 0x22
425 #define DELL_OEM_NVRAM_COMMIT_CMD        		                         0x23
426 #define DELL_OEM_NVRAM_COMMIT_STATUS_CMD                                         0x24
427 
428 /* ManufacturerId IANA */
429 #define NCSI_QLOGIC_IANA                                  (0x113D)
430 #define NCSI_DELL_IANA                                      (0x2A2)
431 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
432 //  0x00    Get Inventory   Used to get the inventory information for the Ethernet Controller   0x00    (Mandatory)
433 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
434 #define DELL_OEM_PAYLOAD_V1	(1<<1)
435 #define DELL_OEM_PAYLOAD_V2	(1<<2)
436 
437 typedef struct DellDfltCmd
438 {
439 #if defined (BIG_ENDIAN)
440 	u32_t    ManufacturerId;         /* ManufacturerId IANA */
441 	u8_t     PayloadVersion;
442 	u8_t     CommandType; /* OEM command ID */
443 	u16_t    Pad;
444 
445 #elif defined (LITTLE_ENDIAN)
446 	u32_t    ManufacturerId;         /* ManufacturerId IANA */
447 	u16_t    Pad;
448 	u8_t     CommandType; /* OEM command ID */
449 	u8_t     PayloadVersion;
450 #endif // ENDIAN
451 }DellDfltCmd_t;
452 
453 typedef struct DellDfltCmdRspData
454 {
455 #if defined (BIG_ENDIAN)
456 	u16_t    ResponseCode;          /* ids outcome of cmd   */
457 	u16_t    ReasonCode;            /* ids reasons for rsp  */
458 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
459 	u8_t     PayloadVersion;
460 	u8_t     CommandType;           /* OEM command ID */
461 	u16_t    Pad;
462 #elif defined (LITTLE_ENDIAN)
463 	u16_t    ReasonCode;            /* ids reasons for rsp  */
464 	u16_t    ResponseCode;          /* ids outcome of cmd   */
465 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
466 	u16_t    Pad;
467 	u8_t     CommandType;           /* OEM command ID */
468 	u8_t     PayloadVersion;
469 #endif // endian
470 } DellDfltCmdRspData_t;
471 
472 
473 typedef DellDfltCmd_t DellGetInventoryCmd_t;
474 
475 typedef struct DellGetInventoryCmdRspData
476 {
477 #if defined (BIG_ENDIAN)
478 	u16_t    ResponseCode;          /* ids outcome of cmd   */
479 	u16_t    ReasonCode;            /* ids reasons for rsp  */
480 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
481 	u8_t     PayloadVersion;
482 	u8_t     CommandType;       /* OEM command ID */
483 	u16_t     MediaType;
484 #define MEDIA_BASE_T        0x0001  // 0    Base-T      0b =    Base-T is not supported.  1b =  Base-T is supported.
485 #define MEDIA_BASE_KR       0x0002  // 1    Base-KR     0b =    Base-KR is not supported. 1b =  Base-KR is supported.
486 #define MEDIA_BASE_KX       0x0004  // 2    Base-KX     0b =    Base-KX is not supported. 1b =  Base-KX is supported.
487 #define MEDIA_BASE_KX4      0x0008  // 3    Base-KX4    0b =    Base-KX4 is not supported.1b =  Base-KX4 is supported.
488 #define MEDIA_SR            0x0010  // 4    SR          0b =    SR is not supported.      1b =  SR is supported.
489 #define MEDIA_SFP           0x0020  // 5    SFP         0b =    SFP is not supported.     1b =  SFP is supported.
490 #define MEDIA_SFP_PLUS      0x0040  // 6    SFP+        0b =    SFP+ is not supported.    1b =  SFP+ is supported.
491 #define MEDIA_DCA           0x0080  // 7    DCA         0b =    DCA is not supported.     1b =  DCA is supported.
492 #define MEDIA_RESERVED      0xFF00  // 8-15 Reserved
493 	u32_t     FamilyFWVer;
494 #define FW_VER_MAJOR_MASK          0xFF000000
495 #define FW_VER_MINOR_MASK          0x00FF0000
496 #define FW_VER_BUILD_MASK          0x0000FF00
497 #define FW_VER_SUB_BUILD_MASK      0x000000FF
498 	u32_t     FamilyDrvVer;
499 #define DRV_FW_VER_MAJOR_MASK          0xFF000000
500 #define DRV_FW_VER_MINOR_MASK          0x00FF0000
501 #define DRV_FW_VER_BUILD_MASK          0x0000FF00
502 #define DRV_FW_VER_SUB_BUILD_MASK      0x000000FF
503 	u8_t   FirstInventoryLength;
504 	u8_t   FirstInventoryType;
505 #define INVENTORY_TYPE_DEVICE     0x0 // = Device Name
506 #define INVENTORY_TYPE_VENDOR     0x1 // = Vendor Name
507 	//    0x2-0xFF = Reserved
508 	u8_t   InventoryNameBuf[];
509 #elif defined (LITTLE_ENDIAN)
510 	u16_t     ReasonCode;            /* ids reasons for rsp  */
511 	u16_t     ResponseCode;          /* ids outcome of cmd   */
512 	u32_t     ManufacturerId;        /* ManufacturerId IANA */
513 	u16_t     MediaType;
514 #define MEDIA_BASE_T        0x0001  // 0    Base-T      0b =    Base-T is not supported.  1b =  Base-T is supported.
515 #define MEDIA_BASE_KR       0x0002  // 1    Base-KR     0b =    Base-KR is not supported. 1b =  Base-KR is supported.
516 #define MEDIA_BASE_KX       0x0004  // 2    Base-KX     0b =    Base-KX is not supported. 1b =  Base-KX is supported.
517 #define MEDIA_BASE_KX4      0x0008  // 3    Base-KX4    0b =    Base-KX4 is not supported.1b =  Base-KX4 is supported.
518 #define MEDIA_SR            0x0010  // 4    SR          0b =    SR is not supported.      1b =  SR is supported.
519 #define MEDIA_SFP           0x0020  // 5    SFP         0b =    SFP is not supported.     1b =  SFP is supported.
520 #define MEDIA_SFP_PLUS      0x0040  // 6    SFP+        0b =    SFP+ is not supported.    1b =  SFP+ is supported.
521 #define MEDIA_DCA           0x0080  // 7    DCA         0b =    DCA is not supported.     1b =  DCA is supported.
522 #define MEDIA_RESERVED      0xFF00  // 8-15 Reserved
523 	u8_t     CommandType;   /* OEM command ID */
524 	u8_t     PayloadVersion;
525 	u32_t     FamilyFWVer;
526 #define FW_VER_MAJOR_MASK          0xFF000000
527 #define FW_VER_MINOR_MASK          0x00FF0000
528 #define FW_VER_BUILD_MASK          0x0000FF00
529 #define FW_VER_SUB_BUILD_MASK      0x000000FF
530 	u32_t     FamilyDrvVer;
531 #define DRV_FW_VER_MAJOR_MASK          0xFF000000
532 #define DRV_FW_VER_MINOR_MASK          0x00FF0000
533 #define DRV_FW_VER_BUILD_MASK          0x0000FF00
534 #define DRV_FW_VER_SUB_BUILD_MASK      0x000000FF
535 	u8_t   FirstInventoryNameBuf[2];
536 	u8_t   FirstInventoryLength;
537 	u8_t   FirstInventoryType;
538 #define INVENTORY_TYPE_DEVICE     0x0 // = Device Name
539 #define INVENTORY_TYPE_VENDOR     0x1 // = Vendor Name
540 	//    0x2-0xFF = Reserved
541 	u8_t   InventoryNameBuf[];
542 #endif // endian
543 } DellGetInventoryCmdRspData_t;
544 
545 
546 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
547 //  0x01    Get Extended Capabilities   Used to get the feature capabilities of a channel.  0x01    (Mandatory)
548 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
549 typedef DellDfltCmd_t DellGetExtendedCapabilitiesCmd_t;
550 
551 typedef struct DellGetExtendedCapabilitiesCmdRspData
552 {
553 #if defined (BIG_ENDIAN)
554 	u16_t    ResponseCode;          /* ids outcome of cmd   */
555 	u16_t    ReasonCode;            /* ids reasons for rsp  */
556 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
557 	u8_t     PayloadVersion;
558 	u8_t     CommandType;       /* OEM command ID */
559 	u16_t     CapabilitiesHiWord;
560 	// 16-17    Reserved
561 #define CAP_PXE_SUPPORT_SUPPORT                  (1<< (18-16))  // 18   PXE 0b = PXE is not supported.                                     1b = PXE is supported.
562 #define CAP_ISCSI_BOOT_SUPPORT                   (1<< (19-16))  // 19   iSCSI Boot (iBFT or HBA)    0b = iSCSI Boot is not supported.      1b = iSCSI Boot is supported.
563 #define CAP_FCOE_BOOT_SUPPORT                    (1<< (20-16))  // 20   FCoE Boot   0b = FCoE Boot is not supported.                       1b = FCoE Boot is supported.
564 #define CAP_STORAGE_BOOT_M_PROVISIONING          (1<< (21-16)) // 20   Storage Boot Parameter Provisioning   0b =  not supported.         1b = is supported.
565 	// 22-23    Reserved
566 #define CAP_NIC_PARTITIONING_SUPPORT             (1<< (24-16))  // 24   NIC Partitioning    0b = NIC Partitioning is not supported.        1b = NIC Partitioning is supported.
567 #define CAP_SRIOV_SUPPORT                        (1<< (25-16))  // 25   SR-IOV  0b = SR-IOV is not supported.                              1b = SR-IOV is supported.
568 #define CAP_DELL_LICENSE_MGR_SUPPORT             (1<< (26-16))  // 26   Dell License Manager    0b = Dell License Manager is not supported 1b = Dell License Manager is supported
569 #define CAP_IPSEC_OFFLOAD_SUPPORT                (1<< (27-16))  // 27   IPSec Offload   0b = IPSec Offload is not supported                1b = IPSec Offload is supported
570 #define CAP_MACSEC_SUPPORT                       (1<< (28-16))  // 28   MACSec  0b = MACSec is not supported                               1b = MACSec is supported
571 #define CAP_RDMA_SUPPORT                         (1<< (29-16))  // 29   RDMA    0b = RDMA is not supported                                 1b = RDMA is supported
572 	// 30-31    Reserved
573 	u16_t     CapabilitiesLoWord;
574 #define CAP_VIRTUAL_ADDRESSING_SUPPORT              0x0001  // 0    Virtual Addressing  0b =    Virtual Addressing is not supported.   1b = Virtual Addressing is supported.
575 #define CAP_LINK_TUNING_SUPPORT                     0x0002  // 1    Link Tuning 0b =    Link Tuning is not supported.                  1b = Link Tuning is supported.
576 #define CAP_REMOTEPHY_SUPPORT                       0x0004  // 2    RemotePHY   0b = RemotePHY is not supported                        1b = RemotePHY is supported
577 #define CAP_OPTION_ROM_PRESENT_SUPPORT              0x0008  // 3    Option ROM Present  0b = OPROM is not present                      1b = OPROM is present
578 #define CAP_UEFI_SUPPORT                            0x0010  // 4    uEFI    0b = uEFI is not supported                                 1b = uEFI is supported
579 #define CAP_WOL_SUPPORT                             0x0020  // 5    WakeOnLAN   0b = WakeOnLAN is not supported.                       1b = WakeOnLAN is supported.
580 #define CAP_NETWORK_MGMT_PASS_THRU_SUPPORT          0x0040  // 6    Network Management pass through 0b = Network Management pass through is not supported. 1b = Network Management pass through is supported.
581 #define CAP_OS_BMC_PASS_THRU_SUPPORT                0x0080  // 7    OS-BMC pass through 0b = OS-BMC pass through is not supported.     1b = OS-BMC pass through is supported.
582 #define CAP_EEE_SUPPORT                             0x0100  // 8    Energy Efficient Ethernet   0b = EEE is not supported.             1b = EEE is supported.
583 #define CAP_ON_CHIP_THERMAL_SENSOR_SUPPORT          0x0200  // 9    On chip thermal sensor  0b = On chip thermal sensor is supported.  1b = On chip thermal sensor is not supported.
584 	// 10-11    Reserved
585 #define CAP_TCP_OFFLOAD_SUPPORT                     0x1000  // 12   TCP Offload 0b = TCP Offload is not supported.                     1b = TCP Offload is supported.
586 #define CAP_ISCSI_OFFLOAD_SUPPORT                   0x2000  // 13   iSCSI Offload   0b = iSCSI Offload is not supported.               1b = iSCSI Offload is supported.
587 #define CAP_FCOE_SUPPORT                            0x4000  // 14   Fibre Channel over Ethernet 0b = Fibre Channel over Ethernet is not supported. 1b = Fibre Channel over Ethernet is supported.
588 	// 15       Reserved
589 	u8_t      Reserved;
590 	u8_t     DCB_Capabilities;
591 #define DCB_CAP_ETS_SUPPORT                         0x0001  // 0    Enhanced Transmission Selection (ETS)   0b =    ETS is not supported.  1b = ETS is supported.
592 #define DCB_CAP_PFC_SUPPORT                         0x0002  // 1    Priority Flow Control (PFC) 0b =    PFC is not supported.              1b = PFC is supported.
593 #define DCB_CAP_CN_SUPPORT                          0x0004  // 2    Congestion Notification (CN)    0b =    CN is not supported.           1b = CN is supported.
594 #define DCB_CAP_DCBX_SUPPORT                        0x0008  // 3    DCB Exchange Protocol (DCBXP)   0b =    DCBXP is not supported.        1b = DCBXP is supported.
595 	// 4-7  Reserved
596 	u8_t     NP_Capabilities;
597 #define NP_CAP_WOL                                  0x01    // 0    WakeOnLan   0b =    WakeOnLan is not supported.                1b = WakeOnLan is supported.
598 #define NP_CAP_VIRTUAL_LINK_CTRL                    0x02    // 1    Virtual Link Control    0b =    Virtual Link Control is not supported. 1b = Virtual Link Control is supported.
599 #define NP_CAP_RX_FLOW_CTRL                         0x04    // 2    Receive Flow Control    0b =    Receive Flow Control is not supported. 1b = Receive Flow Control is supported
600 #define NP_CAP_TX_FLOW_CTRL                         0x08    // 3    Transmit Flow Control   0b =    Transmit Flow Control is not supported.1b = Transmit Flow Control is supported
601 #define NP_CAP_TX_BW_CTRL_MAX                       0x10    // 4    Transmit Bandwidth Control Maximum  0b =    TX Bandwidth Control Maximum is not supported. 1b = TX Bandwidth Control Maximum is supported.
602 #define NP_CAP_TX_BW_CTRL_MIN                       0x20    // 5    Transmit Bandwidth Control Minimum  0b =    TX Bandwidth Control Minimum is not supported. 1b = TX Bandwidth Control Minimum is supported.
603 	// 6-7  Reserved
604 	u8_t    E_Switch_Capabilities;
605 #define E_SWITCH_CAP_VEB                            0x0001  // 0   VEB         0b =  VEB is not supported.  1b = VEB is supported.
606 #define E_SWITCH_CAP_BIT1                           0x0002  // 1   Reserved
607 #define E_SWITCH_CAP_BIT2                           0x0004  // 2   Reserved
608 #define E_SWITCH_CAP_BPE                            0x0008  // 3   BPE         0b =  BPE is not supported. 1b =  BPE is supported.
609 #define E_SWITCH_CAP_OPEN_FLOW                      0x0010  // 4   Open Flow   0b =  Open Flow is not supported. 1b = Open Flow is supported.
610 	// 5-7 Reserved
611 	u8_t    PF_num;                                         // Number of PCI Physical functions
612 	u8_t    VF_num;                                         // Number of PCI Virtual functions
613 #elif defined (LITTLE_ENDIAN)
614 	u16_t    ReasonCode;            /* ids reasons for rsp  */
615 	u16_t    ResponseCode;          /* ids outcome of cmd   */
616 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
617 	u16_t     CapabilitiesHiWord;
618 	// 16-17    Reserved
619 #define CAP_PXE_SUPPORT_SUPPORT                      (1<< (18-16)) // 18   PXE 0b = PXE is not supported.                                     1b = PXE is supported.
620 #define CAP_ISCSI_BOOT_SUPPORT                       (1<< (19-16)) // 19   iSCSI Boot (iBFT or HBA)    0b = iSCSI Boot is not supported.      1b = iSCSI Boot is supported.
621 #define CAP_FCOE_BOOT_SUPPORT                        (1<< (20-16)) // 20   FCoE Boot   0b = FCoE Boot is not supported.                       1b = FCoE Boot is supported.
622 #define CAP_STORAGE_BOOT_M_PROVISIONING              (1<< (21-16)) // 20   Storage Boot Parameter Provisioning   0b =  not supported.         1b = is supported.
623 
624 	// 22-23    Reserved
625 #define CAP_NIC_PARTITIONING_SUPPORT                 (1<< (24-16)) // 24   NIC Partitioning    0b = NIC Partitioning is not supported.        1b = NIC Partitioning is supported.
626 #define CAP_SRIOV_SUPPORT                            (1<< (25-16)) // 25   SR-IOV  0b = SR-IOV is not supported.                              1b = SR-IOV is supported.
627 #define CAP_DELL_LICENSE_MGR_SUPPORT                 (1<< (26-16)) // 26   Dell License Manager    0b = Dell License Manager is not supported 1b = Dell License Manager is supported
628 #define CAP_IPSEC_OFFLOAD_SUPPORT                    (1<< (27-16)) // 27   IPSec Offload   0b = IPSec Offload is not supported                1b = IPSec Offload is supported
629 #define CAP_MACSEC_SUPPORT                           (1<< (28-16)) // 28   MACSec  0b = MACSec is not supported                               1b = MACSec is supported
630 #define CAP_RDMA_SUPPORT                             (1<< (29-16)) // 29   RDMA    0b = RDMA is not supported                                 1b = RDMA is supported
631 	u8_t     CommandType;           /* OEM command ID */
632 	u8_t     PayloadVersion;
633 	// 30-31    Reserved
634 	u8_t     DCB_Capabilities;
635 #define DCB_CAP_ETS_SUPPORT                         0x0001  // 0    Enhanced Transmission Selection (ETS)   0b =    ETS is not supported.  1b = ETS is supported.
636 #define DCB_CAP_PFC_SUPPORT                         0x0002  // 1    Priority Flow Control (PFC) 0b =    PFC is not supported.              1b = PFC is supported.
637 #define DCB_CAP_CN_SUPPORT                          0x0004  // 2    Congestion Notification (CN)    0b =    CN is not supported.           1b = CN is supported.
638 #define DCB_CAP_DCBX_SUPPORT                        0x0008  // 3    DCB Exchange Protocol (DCBXP)   0b =    DCBXP is not supported.        1b = DCBXP is supported.
639 	// 4-7  Reserved
640 	u8_t      Reserved;
641 	u16_t     CapabilitiesLoWord;
642 #define CAP_VIRTUAL_ADDRESSING_SUPPORT              0x0001  // 0    Virtual Addressing  0b =    Virtual Addressing is not supported.   1b = Virtual Addressing is supported.
643 #define CAP_LINK_TUNING_SUPPORT                     0x0002  // 1    Link Tuning 0b =    Link Tuning is not supported.                  1b = Link Tuning is supported.
644 #define CAP_REMOTEPHY_SUPPORT                       0x0004  // 2    RemotePHY   0b = RemotePHY is not supported                        1b = RemotePHY is supported
645 #define CAP_OPTION_ROM_PRESENT_SUPPORT              0x0008  // 3    Option ROM Present  0b = OPROM is not present                      1b = OPROM is present
646 #define CAP_UEFI_SUPPORT                            0x0010  // 4    uEFI    0b = uEFI is not supported                                 1b = uEFI is supported
647 #define CAP_WOL_SUPPORT                             0x0020  // 5    WakeOnLAN   0b = WakeOnLAN is not supported.                       1b = WakeOnLAN is supported.
648 #define CAP_NETWORK_MGMT_PASS_THRU_SUPPORT          0x0040  // 6    Network Management pass through 0b = Network Management pass through is not supported. 1b = Network Management pass through is supported.
649 #define CAP_OS_BMC_PASS_THRU_SUPPORT                0x0080  // 7    OS-BMC pass through 0b = OS-BMC pass through is not supported.     1b = OS-BMC pass through is supported.
650 #define CAP_EEE_SUPPORT                             0x0100  // 8    Energy Efficient Ethernet   0b = EEE is not supported.             1b = EEE is supported.
651 #define CAP_ON_CHIP_THERMAL_SENSOR_SUPPORT          0x0200  // 9    On chip thermal sensor  0b = On chip thermal sensor is supported.  1b = On chip thermal sensor is not supported.
652 	// 10-11    Reserved
653 #define CAP_TCP_OFFLOAD_SUPPORT                     0x1000  // 12   TCP Offload 0b = TCP Offload is not supported.                     1b = TCP Offload is supported.
654 #define CAP_ISCSI_OFFLOAD_SUPPORT                   0x2000  // 13   iSCSI Offload   0b = iSCSI Offload is not supported.               1b = iSCSI Offload is supported.
655 #define CAP_FCOE_SUPPORT                            0x4000  // 14   Fibre Channel over Ethernet 0b = Fibre Channel over Ethernet is not supported. 1b = Fibre Channel over Ethernet is supported.
656 	// 15       Reserved
657 	u8_t    VF_num;                                         // Number of PCI Virtual functions
658 	u8_t    PF_num;                                         // Number of PCI Physical functions
659 	u8_t    E_Switch_Capabilities;
660 #define E_SWITCH_CAP_VEB                            0x0001  // 0   VEB         0b =  VEB is not supported.  1b = VEB is supported.
661 	// 1   Reserved
662 	// 2   Reserved
663 #define E_SWITCH_CAP_BPE                            0x0008  // 3   BPE         0b =  BPE is not supported. 1b =  BPE is supported.
664 #define E_SWITCH_CAP_OPEN_FLOW                      0x0010  // 4   Open Flow   0b =  Open Flow is not supported. 1b = Open Flow is supported.
665 	// 5-7 Reserved
666 	u8_t     NP_Capabilities;
667 #define NP_CAP_WOL                                  0x01    // 0    WakeOnLan   0b =    WakeOnLan is not supported.                1b = WakeOnLan is supported.
668 #define NP_CAP_VIRTUAL_LINK_CTRL                    0x02    // 1    Virtual Link Control    0b =    Virtual Link Control is not supported. 1b = Virtual Link Control is supported.
669 #define NP_CAP_RX_FLOW_CTRL                         0x04    // 2    Receive Flow Control    0b =    Receive Flow Control is not supported. 1b = Receive Flow Control is supported
670 #define NP_CAP_TX_FLOW_CTRL                         0x08    // 3    Transmit Flow Control   0b =    Transmit Flow Control is not supported.1b = Transmit Flow Control is supported
671 #define NP_CAP_TX_BW_CTRL_MAX                       0x10    // 4    Transmit Bandwidth Control Maximum  0b =    TX Bandwidth Control Maximum is not supported. 1b = TX Bandwidth Control Maximum is supported.
672 #define NP_CAP_TX_BW_CTRL_MIN                       0x20    // 5    Transmit Bandwidth Control Minimum  0b =    TX Bandwidth Control Minimum is not supported. 1b = TX Bandwidth Control Minimum is supported.
673 	// 6-7  Reserved
674 #endif // endian
675 } DellGetExtendedCapabilitiesCmdRspData_t;
676 
677 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
678 //  0x02    Get Partition Information   Used to get NIC Partition information of a channel. 0x02    (Mandatory)
679 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
680 typedef DellDfltCmd_t DellGetPartitionInfoCmd_t;
681 
682 typedef struct DellGetPartitionInfoCmdRspData
683 {
684 #if defined (BIG_ENDIAN)
685 	u16_t    ResponseCode;          /* ids outcome of cmd   */
686 	u16_t    ReasonCode;            /* ids reasons for rsp  */
687 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
688 	u8_t     PayloadVersion;
689 	u8_t     CommandType;           /* OEM command ID */
690 	u8_t     Enabled_PF_num;    // Number of PCI Physical Functions Enabled
691 	u8_t     PartitionId;       // Partition ID #1
692 	u16_t    PartitionStatus;  // Partition Status
693 #define PARTITION_STATUS_PERSONALITIES_NUM_MASK       0x07   // 0..2    Number of personalities configured  Number of personalities configured on the partition.
694 #define PARTITION_STATUS_LAN                          0x08   // 3   LAN             0b = LAN is not configured 1b = LAN is configured
695 #define PARTITION_STATUS_ISOE                         0x10   // 4   iSOE (Stateful) 0b = iSOE is not configured 1b = iSOE is configured  iSOE = iSCSI Offload Engine
696 #define PARTITION_STATUS_FCOE                         0x20   // 5   FCoE (Stateful) 0b = FCoE is not configured 1b = FCoE is configured  FCoE = Fibre Channel Over Ethernet
697 	// 6-15    Reserved
698 	u8_t    FirstPartitionInterfaceLength;
699 	u8_t    FirstPartitionInterfaceType;
700 #define PARTITION_INTERFACE_LAN     0x0   // 0x0 = LAN
701 #define PARTITION_INTERFACE_ISCSI   0x1   // 0x1 = iSCSI
702 #define PARTITION_INTERFACE_FCOE    0x2   // 0x2 = FCoE
703 	// 0x3-0xFF = Reserved
704 	u8_t    InterfaceBuf[4*2*44]; // worst case scenario == 4 pf * 2 personalities * 44 bytes/personality
705 #elif defined (LITTLE_ENDIAN)
706 	u16_t    ReasonCode;            /* ids reasons for rsp  */
707 	u16_t    ResponseCode;          /* ids outcome of cmd   */
708 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
709 	u8_t     PartitionId;       // Partition ID #1
710 	u8_t     Enabled_PF_num;    // Number of PCI Physical Functions Enabled
711 	u8_t     CommandType;           /* OEM command ID */
712 	u8_t     PayloadVersion;
713 	// 30-31    Reserved
714 	u16_t    PartitionStatus;  // Partition Status
715 #define PARTITION_STATUS_PERSONALITIES_NUM_MASK       0x07   // 0..2    Number of personalities configured  Number of personalities configured on the partition.
716 #define PARTITION_STATUS_LAN                          0x08   // 3   LAN             0b = LAN is not configured 1b = LAN is configured
717 #define PARTITION_STATUS_ISOE                         0x10   // 4   iSOE (Stateful) 0b = iSOE is not configured 1b = iSOE is configured  iSOE = iSCSI Offload Engine
718 #define PARTITION_STATUS_FCOE                         0x20   // 5   FCoE (Stateful) 0b = FCoE is not configured 1b = FCoE is configured  FCoE = Fibre Channel Over Ethernet
719 	// 6-15    Reserved
720 	u8_t     FirstPartitionInterfaceType;
721 #define PARTITION_INTERFACE_LAN     0x0   // 0x0 = LAN
722 #define PARTITION_INTERFACE_ISCSI   0x1   // 0x1 = iSCSI
723 #define PARTITION_INTERFACE_FCOE    0x2   // 0x2 = FCoE
724 	// 0x3-0xFF = Reserved
725 	u8_t     FirstPartitionInterfaceLength;
726 	u8_t     InterfaceBuf[4*2*44]; // worst case scenario == 4 pf * 2 personalities * 44 bytes/personality
727 #endif // endian
728 } DellGetPartitionInfoCmdRspData_t;
729 
730 
731 
732 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
733 //  0x03    Get FCoE Capabilities   Used to get FCoE Capabilities of a channel. 0x03    (Conditional)
734 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
735 typedef DellDfltCmd_t DellGetFcoeCapabilitiesCmd_t;
736 
737 typedef struct DellGetFcoeCapabilitiesCmdRspData
738 {
739 #if defined (BIG_ENDIAN)
740 	u16_t    ResponseCode;          /* ids outcome of cmd   */
741 	u16_t    ReasonCode;            /* ids reasons for rsp  */
742 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
743 	u8_t     PayloadVersion;
744 	u8_t     CommandType;           /* OEM command ID */
745 	u8_t     Reserved;                     // Reserved
746 	u8_t     FcoeFeatureSettings;          // FCoE Feature Settings
747 #define FCOE_FEATURE_FCOE_SUPPORT              0x0001  // 0    FCoE Support 0b = Stateless Offload   1b = Stateful Offload
748 	// 7..1  Reserved
749 	u16_t    MaxIoPerConnection;           // Maximum number of I/Os per connection
750 	u16_t    MaxLoginsPerPort;             // Maximum number of Logins per port
751 	u16_t    MaxExchanges;                 // Maximum number of exchanges
752 	u16_t    MaxNPIV_WWN_PerPort;          // Maximum NPIV WWN per port
753 	u16_t    MaxSupportedTargets;          // Maximum number of targets supported
754 	u16_t    MaxOutstandingCmds;           // Maximum number of outstanding commands across all connections
755 #elif defined (LITTLE_ENDIAN)
756 	u16_t    ReasonCode;            /* ids reasons for rsp  */
757 	u16_t    ResponseCode;          /* ids outcome of cmd   */
758 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
759 	u8_t     FcoeFeatureSettings;          // FCoE Feature Settings
760 #define FCOE_FEATURE_FCOE_SUPPORT              0x0001  // 0    FCoE Support 0b = Stateless Offload   1b = Stateful Offload
761 	// 7..1  Reserved
762 
763 	u8_t     Reserved;                     // Reserved
764 
765 	u8_t     CommandType;           /* OEM command ID */
766 	u8_t     PayloadVersion;
767 
768 	u16_t    MaxLoginsPerPort;             // Maximum number of Logins per port
769 	u16_t    MaxIoPerConnection;           // Maximum number of I/Os per connection
770 	u16_t    MaxNPIV_WWN_PerPort;          // Maximum NPIV WWN per port
771 	u16_t    MaxExchanges;                 // Maximum number of exchanges
772 	u16_t    MaxOutstandingCmds;           // Maximum number of outstanding commands across all connections
773 	u16_t    MaxSupportedTargets;          // Maximum number of targets supported
774 #endif // endian
775 } DellGetFcoeCapabilitiesCmdRspData_t;
776 
777 
778 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
779 //  0x04    Get Virtual Link    Used to get virtual link status of a partition enabled in a specific channel.   0x04    (Conditional)
780 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
781 typedef struct DellGetVirtualLinkCmd
782 {
783 #if defined (BIG_ENDIAN)
784 	u32_t    ManufacturerId;         /* ManufacturerId IANA */
785 	u8_t     PayloadVersion;
786 	u8_t     CommandType;            /* OEM command ID */
787 	u8_t    PartitionId;
788 	u8_t    Pad;
789 
790 #elif defined (LITTLE_ENDIAN)
791 	u32_t   ManufacturerId;         /* ManufacturerId IANA */
792 	u8_t    Pad;
793 	u8_t    PartitionId;
794 	u8_t    CommandType; /* OEM command ID */
795 	u8_t    PayloadVersion;
796 #endif // ENDIAN
797 }DellCmdPartition_t;
798 
799 typedef DellCmdPartition_t DellGetVirtualLinkCmd_t;
800 typedef struct DellGetVirtualLinkCmdRspData
801 {
802 #if defined (BIG_ENDIAN)
803 	u16_t    ResponseCode;          /* ids outcome of cmd   */
804 	u16_t    ReasonCode;            /* ids reasons for rsp  */
805 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
806 	u8_t     PayloadVersion;
807 	u8_t     CommandType;       /* OEM command ID */
808 	u8_t    PartitionId;
809 	u8_t     Status;
810 #define VIRTUAL_LINK_STATUS           (0x1 << 0)                                // 0   Virtual Link    0b = Virtual Link is up  1b = Virtual Link is down
811 #define LAN_HOST_DRV_STATE_MASK       (0X3 << 1)                                // 2..1   LAN Host driver state
812 #define LAN_HOST_DRV_NOT_IMPLEMENTED  (0x0 << 1)                            //     0x0 = LAN Host driver state feature is not implemented.
813 #define LAN_HOST_DRV_NOT_OPERATIONAL  (0x1 << 1)                            //     0x1 = LAN Host driver state is not operational
814 #define LAN_HOST_DRV_OPERATIONAL      (0x2 << 1)                            //     0x2 = LAN Host driver state is operational
815 	//     0x3 = Reserved
816 #define ISOE_HOST_DRV_STATE_MASK      (0x3 << 3)                                // 4..3    iSOE Host driver state
817 #define ISOE_HOST_DRV_NOT_IMPLEMENTED (0x0 << 3)                            //     0x0 = iSOE Host driver state feature is not implemented.
818 #define ISOE_HOST_DRV_NOT_OPERATIONAL (0x1 << 3)                            //     0x1 = iSOE Host driver state is not operational
819 #define ISOE_HOST_DRV_OPERATIONAL     (0x2 << 3)                            //     0x2 = iSOE Host driver state is operational
820 	//     0x3 = Reserved
821 #define FCOE_HOST_DRV_STATE_MASK      (0x3 << 5)                                // 6..5    FCoE Host driver state
822 #define FCOE_HOST_DRV_NOT_IMPLEMENTED (0x0 << 5)                            //     0x0 = FCoE Host driver state feature is not implemented.
823 #define FCOE_HOST_DRV_NOT_OPERATIONAL (0x1 << 5)                            //     0x1 = FCoE Host driver state is not operational
824 #define FCOE_HOST_DRV_OPERATIONAL     (0x2 << 5)                            //     0x2 = FCoE Host driver state is operational
825 	//     0x3 = Reserved
826 	// 7   Reserved
827 #elif defined (LITTLE_ENDIAN)
828 	u16_t    ReasonCode;            /* ids reasons for rsp  */
829 	u16_t    ResponseCode;          /* ids outcome of cmd   */
830 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
831 	u8_t     Status;
832 #define VIRTUAL_LINK_STATUS           (0x1 << 0)                                // 0   Virtual Link    0b = Virtual Link is up  1b = Virtual Link is down
833 #define LAN_HOST_DRV_STATE_MASK       (0X3 << 1)                                // 2..1   LAN Host driver state
834 #define LAN_HOST_DRV_NOT_IMPLEMENTED  (0x0 << 1)                            //     0x0 = LAN Host driver state feature is not implemented.
835 #define LAN_HOST_DRV_NOT_OPERATIONAL  (0x1 << 1)                            //     0x1 = LAN Host driver state is not operational
836 #define LAN_HOST_DRV_OPERATIONAL      (0x2 << 1)                            //     0x2 = LAN Host driver state is operational
837 	//     0x3 = Reserved
838 #define ISOE_HOST_DRV_STATE_MASK      (0x3 << 3)                                // 4..3    iSOE Host driver state
839 #define ISOE_HOST_DRV_NOT_IMPLEMENTED (0x0 << 3)                            //     0x0 = iSOE Host driver state feature is not implemented.
840 #define ISOE_HOST_DRV_NOT_OPERATIONAL (0x1 << 3)                            //     0x1 = iSOE Host driver state is not operational
841 #define ISOE_HOST_DRV_OPERATIONAL     (0x2 << 3)                            //     0x2 = iSOE Host driver state is operational
842 	//     0x3 = Reserved
843 #define FCOE_HOST_DRV_STATE_MASK      (0x3 << 5)                                // 6..5    FCoE Host driver state
844 #define FCOE_HOST_DRV_NOT_IMPLEMENTED (0x0 << 5)                            //     0x0 = FCoE Host driver state feature is not implemented.
845 #define FCOE_HOST_DRV_NOT_OPERATIONAL (0x1 << 5)                            //     0x1 = FCoE Host driver state is not operational
846 #define FCOE_HOST_DRV_OPERATIONAL     (0x2 << 5)                            //     0x2 = FCoE Host driver state is operational
847 	//     0x3 = Reserved
848 	// 7   Reserved
849 	u8_t    PartitionId;
850 
851 	u8_t    CommandType;           /* OEM command ID */
852 	u8_t    PayloadVersion;
853 #endif // endian
854 } DellGetVirtualLinkCmdRspData_t;
855 
856 
857 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
858 //  0x05    Get LAN Statistics  Used to get LAN statistics of a partition enabled in a specific channel.    0x05    (Conditional)
859 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
860 
861 typedef DellCmdPartition_t DellGetLanStatisticsCmd_t;
862 
863 
864 typedef struct DellGetLanStatisticsCmdRspData
865 {
866 #if defined (BIG_ENDIAN)
867 	u16_t    ResponseCode;          /* ids outcome of cmd   */
868 	u16_t    ReasonCode;            /* ids reasons for rsp  */
869 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
870 	u8_t     PayloadVersion;
871 	u8_t     CommandType;           /* OEM command ID */
872 
873 	u8_t     PartitionId;                                            // Partition ID
874 	u8_t     CountersClearedFromLastRead;                            // Counters Cleared from Last Read
875 #define    TOTAL_UNICAST_PKT_RCVD_CLEARED             0x01 //     0   Total Unicast Packets Received  0b =    Not Cleared  1b =   Cleared
876 #define    TOTAL_UNICAST_PKT_XMIT_CLEARED             0x02 //     1   Total Unicast Packets Transmitted   0b =    Not Cleared 1b =    Cleared
877 #define    FCS_ERRORS_CLEARED                         0x04 //     2   FCS Receive Errors  0b =    Not Cleared 1b = Cleared
878 	//     7:3 Reserved
879 	u32_t    TotalUnicastPktsRcvdHi;                                 // 64-bit Total Unicast Packets Received
880 	u32_t    TotalUnicastPktsRcvdLo;                                 // 64-bit Total Unicast Packets Received
881 	u32_t    TotalUnicastPktsXmitHi;                                 // 64-bit Total Unicast Packets Transmitted
882 	u32_t    TotalUnicastPktsXmitLo;                                 // 64-bit Total Unicast Packets Transmitted
883 	u32_t FCS_Errors;                                             // FCS Receive Errors
884 #elif defined (LITTLE_ENDIAN)
885 	u16_t     ReasonCode;            /* ids reasons for rsp  */
886 	u16_t     ResponseCode;          /* ids outcome of cmd   */
887 	u32_t     ManufacturerId;        /* ManufacturerId IANA */
888 	u8_t      CountersClearedFromLastRead;                            // Counters Cleared from Last Read
889 #define    TOTAL_UNICAST_PKT_RCVD_CLEARED             0x01 //     0   Total Unicast Packets Received  0b =    Not Cleared  1b =   Cleared
890 #define    TOTAL_UNICAST_PKT_XMIT_CLEARED             0x02 //     1   Total Unicast Packets Transmitted   0b =    Not Cleared 1b =    Cleared
891 #define    FCS_ERRORS_CLEARED                         0x04 //     2   FCS Receive Errors  0b =    Not Cleared 1b = Cleared
892 	//     7:3 Reserved
893 
894 	u8_t     PartitionId;                                            // Partition ID
895 	u8_t     CommandType;            /* OEM command ID */
896 	u8_t     PayloadVersion;
897 	u32_t    TotalUnicastPktsRcvdHi;                                 // 64-bit Total Unicast Packets Received
898 	u32_t    TotalUnicastPktsRcvdLo;                                 // 64-bit Total Unicast Packets Received
899 	u32_t    TotalUnicastPktsXmitHi;                                 // 64-bit Total Unicast Packets Transmitted
900 	u32_t    TotalUnicastPktsXmitLo;                                 // 64-bit Total Unicast Packets Transmitted
901 	u32_t    FCS_Errors;                                             // FCS Receive Errors
902 #endif // endian
903 } DellGetLanStatisticsCmdRspData_t;
904 
905 
906 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
907 //  0x06    Get FCoE Statistics Used to get FCoE statistics of a partition enabled in a specific channel.   0x06    (Conditional)
908 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
909 typedef DellCmdPartition_t DellGetFcoeStatisticsCmd_t;
910 
911 typedef struct DellFcoeStat
912 {
913 	u32_t TotalFcoePktsRcvdHi;                                      // 64-bit Total FCoE Packets Received
914 	u32_t TotalFcoePktsRcvdLo;                                      // 64-bit Total FCoE Packets Received
915 	u32_t TotalFcoePktsXmitHi;                                      // 64-bit Total FCoE Packets Transmitted
916 	u32_t TotalFcoePktsXmitLo;                                      // 64-bit Total FCoE Packets Transmitted
917 	u32_t FCS_Errors;                                             // FCS Receive Errors
918 	u32_t FC_ErrCnt;                                              // FC CRC Error Count
919 	u32_t FIP_LoginFailureCnt;                                    // FIP Login Failure Count
920 }DellFcoeStat_t;
921 
922 typedef struct DellGetFcoeStatisticsCmdRspData
923 {
924 #if defined (BIG_ENDIAN)
925 	u16_t    ResponseCode;          /* ids outcome of cmd   */
926 	u16_t    ReasonCode;            /* ids reasons for rsp  */
927 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
928 	u8_t     PayloadVersion;
929 	u8_t     CommandType;            /* OEM command ID */
930 
931 	u8_t  PartitionId;                                            // Partition ID
932 	u8_t  CountersClearedFromLastRead;                            // Counters Cleared from Last Read
933 #define    TOTAL_UNICAST_PKT_RCVD_CLEARED            0x01 // 0  Total FCoE Packets Received 0b =    Not Cleared 1b =    Cleared
934 #define    TOTAL_UNICAST_PKT_XMIT_CLEARED            0x02 // 1  Total FCoE Packets Transmitted  0b =    Not Cleared 1b =    Cleared
935 #define    FCS_ERRORS_CLEARED                        0x04 // 2  FCS Receive Errors  0b =    Not Cleared 1b = Cleared
936 #define    FC_CRC_ERR_CNT_CLEARED                    0x08 // 3  FC CRC Error Count  0b =    Not Cleared 1b = Cleared
937 #define    FIP_LOGIN_FAILURE_CNT_CLEARED             0x10 // 4  FIP Login Failure Count 0b =    Not Cleared 1b = Cleared
938 	// 7:5    Reserved
939 	DellFcoeStat_t  stat;
940 #elif defined (LITTLE_ENDIAN)
941 	u16_t    ReasonCode;            /* ids reasons for rsp  */
942 	u16_t    ResponseCode;          /* ids outcome of cmd   */
943 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
944 	u8_t     CountersClearedFromLastRead;                            // Counters Cleared from Last Read
945 #define    TOTAL_UNICAST_PKT_RCVD_CLEARED            0x01 // 0  Total FCoE Packets Received 0b =    Not Cleared 1b =    Cleared
946 #define    TOTAL_UNICAST_PKT_XMIT_CLEARED            0x02 // 1  Total FCoE Packets Transmitted  0b =    Not Cleared 1b =    Cleared
947 #define    FCS_ERRORS_CLEARED                        0x04 // 2  FCS Receive Errors  0b =    Not Cleared 1b = Cleared
948 #define    FC_CRC_ERR_CNT_CLEARED                    0x08 // 3  FC CRC Error Count  0b =    Not Cleared 1b = Cleared
949 #define    FIP_LOGIN_FAILURE_CNT_CLEARED             0x10 // 4  FIP Login Failure Count 0b =    Not Cleared 1b = Cleared
950 	// 7:5    Reserved
951 	u8_t     PartitionId;                                            // Partition ID
952 	u8_t     CommandType;          /* OEM command ID */
953 	u8_t     PayloadVersion;
954 	DellFcoeStat_t  stat;
955 #endif // endian
956 } DellGetFcoeStatisticsCmdRspData_t;
957 
958 
959 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
960 //  0x07    Set Address Used to program virtual addresses of a partition enabled in a specific channel. 0x07    (Mandatory)
961 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
962 typedef struct DellSetAddrCmd
963 {
964 #if defined (BIG_ENDIAN)
965 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
966 	u8_t     PayloadVersion;
967 	u8_t     CommandType;
968 	// OEM command ID
969 	u8_t     PartitionId;
970 	// The Partition ID field indicates the PCI identity of the partition
971 #define NP_DEVICE_ID_MASK              0x18
972 #define NP_DEVICE_ID_MASK_SHIFT          3
973 #define NP_FUNC_ID_MASK                0x7
974 #define NP_FUNC_ID_MASK_SHIFT            0
975 	u8_t   AddrLength;
976 #define          MAC_ADDR_LENGTH_MAX                      8
977 	u8_t     AddrType;
978 	// Field to define type of address that follows
979 	// 0x0 = Reserved
980 	// 0x1 = LAN
981 	// 0x2 = iSCSI
982 	// 0x3 = WWN
983 	// 0x4 = FCoE-FIP
984 	// 0x5 = IB GUID
985 	// 0x6 = LAN/iSCSI
986 	// 0x7 = LAN/FCoE-FIP
987 	// 0x8 = iSCSI/FCoE-FIP
988 	// 0x9-0xFF = Reserved
989 #define          MAC_ADDR_TYPE_RESERVED                   0x0
990 #define          MAC_ADDR_TYPE_LAN                        0x1
991 #define          MAC_ADDR_TYPE_ISCSI                      0x2
992 #define          MAC_ADDR_TYPE_WWN                        0x3
993 #define          MAC_ADDR_TYPE_FCOE_FIP                   0x4
994 #define          MAC_ADDR_TYPE_IB GUID                    0x5
995 #define          MAC_ADDR_TYPE_MAX                        0x6
996 
997 	u8_t   AddrBuf[MAC_ADDR_LENGTH_MAX];
998 #elif defined (LITTLE_ENDIAN)
999 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
1000 	u8_t     AddrLength;
1001 #define          MAC_ADDR_LENGTH_MAX                      8
1002 	u8_t     PartitionId;
1003 	// The Partition ID field indicates the PCI identity of the partition
1004 #define NP_DEVICE_ID_MASK              0x18
1005 #define NP_DEVICE_ID_MASK_SHIFT          3
1006 #define NP_FUNC_ID_MASK                0x7
1007 #define NP_FUNC_ID_MASK_SHIFT            0
1008 	u8_t     CommandType;          /* OEM command ID */
1009 	u8_t     PayloadVersion;
1010 
1011 	u8_t     AddrBufTemp[3];  // the rest of TLV data up to 16 bytes
1012 
1013 	u8_t     AddrType;
1014 	// The MAC Addr Type
1015 	// Field to define type of address that follows
1016 	// 0x0 = Reserved
1017 	// 0x1 = LAN
1018 	// 0x2 = iSCSI
1019 	// 0x3 = WWN
1020 	// 0x4 = FCoE-FIP
1021 	// 0x5 = IB GUID
1022 	// 0x6 = LAN/iSCSI
1023 	// 0x7 = LAN/FCoE-FIP
1024 	// 0x8 = iSCSI/FCoE-FIP
1025 	// 0x9-0xFF = Reserved
1026 #define          MAC_ADDR_TYPE_RESERVED                   0x0
1027 #define          MAC_ADDR_TYPE_LAN                        0x1
1028 #define          MAC_ADDR_TYPE_ISCSI                      0x2
1029 #define          MAC_ADDR_TYPE_WWN                        0x3
1030 #define          MAC_ADDR_TYPE_FCOE_FIP                   0x4
1031 #define          MAC_ADDR_TYPE_IB GUID                    0x5
1032 #define          MAC_ADDR_TYPE_MAX                        0x6
1033 	u8_t     AddrBuf[MAC_ADDR_LENGTH_MAX-3];
1034 #endif // ENDIAN
1035 }DellSetAddrCmd_t;
1036 
1037 
1038 typedef struct DellRspsPartition
1039 {
1040 #if defined (BIG_ENDIAN)
1041 	u16_t    ResponseCode;          /* ids outcome of cmd   */
1042 	u16_t    ReasonCode;            /* ids reasons for rsp  */
1043 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
1044 	u8_t     PayloadVersion;
1045 	u8_t     CommandType;
1046 	// OEM command ID
1047 	u8_t     PartitionId;
1048 	// The Partition ID field indicates the PCI identity of the partition
1049 #define NP_DEVICE_ID_MASK              0x18
1050 #define NP_DEVICE_ID_MASK_SHIFT          3
1051 #define NP_FUNC_ID_MASK                0x7
1052 #define NP_FUNC_ID_MASK_SHIFT            0
1053 	u8_t     Reserved;
1054 
1055 #elif defined (LITTLE_ENDIAN)
1056 	u16_t    ReasonCode;            /* ids reasons for rsp  */
1057 	u16_t    ResponseCode;          /* ids outcome of cmd   */
1058 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
1059 	u8_t     Reserved;
1060 	u8_t     PartitionId;
1061 	// The Partition ID field indicates the PCI identity of the partition
1062 #define NP_DEVICE_ID_MASK              0x18
1063 #define NP_DEVICE_ID_MASK_SHIFT          3
1064 #define NP_FUNC_ID_MASK                0x7
1065 #define NP_FUNC_ID_MASK_SHIFT            0
1066 	u8_t     CommandType;          /* OEM command ID */
1067 	u8_t     PayloadVersion;
1068 #endif // endian
1069 } DellRspsPartition_t;
1070 typedef DellRspsPartition_t DellSetAddrCmdRspData_t;
1071 
1072 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1073 //  0x08    Get Address Used to read virtual and permanent addresses of a partition enabled in a specific channel.  0x08    (Mandatory)
1074 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1075 typedef struct DellGetAddrCmd
1076 {
1077 #if defined (BIG_ENDIAN)
1078 	u32_t    anufacturerId;  /* ManufacturerId IANA */
1079 	u8_t     PayloadVersion;
1080 	u8_t     CommandType; /* OEM command ID */
1081 	u8_t     PartitionId;
1082 	// The Partition ID field indicates the PCI identity of the partition
1083 #define NP_DEVICE_ID_MASK              0x18
1084 #define NP_DEVICE_ID_MASK_SHIFT          3
1085 #define NP_FUNC_ID_MASK                0x7
1086 #define NP_FUNC_ID_MASK_SHIFT            0
1087 	u8_t     AddrVer;
1088 	// The MAC Addr Type
1089 	// bit 0 MAC Source 0b = Permanent MAC Address
1090 	//                  1b = Active MAC Address
1091 #define MAC_ADDR_VER_MAC_SOURCE_MASK         0x1
1092 #define          MAC_ADDR_VER_MAC_SOURCE_PERMANENT    0x0
1093 #define          MAC_ADDR_VER_MAC_SOURCE_VIRTUAL      0x1
1094 
1095 #elif defined (LITTLE_ENDIAN)
1096 	u32_t    ManufacturerId;    /* ManufacturerId IANA */
1097 	u8_t     AddrVer;
1098 	// The MAC Addr Type
1099 	// bit 0 MAC Source 0b = Permanent MAC Address
1100 	//                  1b = Active MAC Address
1101 #define MAC_ADDR_VER_MAC_SOURCE_MASK         0x1
1102 #define          MAC_ADDR_VER_MAC_SOURCE_PERMANENT    0x0
1103 #define          MAC_ADDR_VER_MAC_SOURCE_VIRTUAL      0x1
1104 	u8_t     PartitionId;
1105 	// The Partition ID field indicates the PCI identity of the partition
1106 #define NP_DEVICE_ID_MASK              0x18
1107 #define NP_DEVICE_ID_MASK_SHIFT          3
1108 #define NP_FUNC_ID_MASK                0x7
1109 #define NP_FUNC_ID_MASK_SHIFT            0
1110 	u8_t     CommandType; /* OEM command ID */
1111 	u8_t     PayloadVersion;
1112 #endif // ENDIAN
1113 }DellGetAddrCmd_t;
1114 
1115 typedef struct DellGetAddrCmdRspData
1116 {
1117 #if defined (BIG_ENDIAN)
1118 	u16_t    ResponseCode;          /* ids outcome of cmd   */
1119 	u16_t    ReasonCode;            /* ids reasons for rsp  */
1120 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
1121 	u8_t     PayloadVersion;
1122 	u8_t     CommandType;
1123 	// OEM command ID
1124 	u8_t     PartitionId;
1125 	// The Partition ID field indicates the PCI identity of the partition
1126 #define NP_DEVICE_ID_MASK              0x18
1127 #define NP_DEVICE_ID_MASK_SHIFT          3
1128 #define NP_FUNC_ID_MASK                0x7
1129 #define NP_FUNC_ID_MASK_SHIFT            0
1130 	u8_t   FirstAddrLength;
1131 #define          MAC_ADDR_LENGTH_MAX                      8
1132 	u8_t     FirstAddrType;
1133 	// Field to define type of address that follows
1134 	// 0x0 = Reserved
1135 	// 0x1 = LAN
1136 	// 0x2 = iSCSI
1137 	// 0x3 = WWN
1138 	// 0x4 = FCoE-FIP
1139 	// 0x5 = IB GUID
1140 	// 0x6 = LAN/iSCSI
1141 	// 0x7 = LAN/FCoE-FIP
1142 	// 0x8 = iSCSI/FCoE-FIP
1143 	// 0x9-0xFF = Reserved
1144 #define          MAC_ADDR_TYPE_RESERVED                   0x0
1145 #define          MAC_ADDR_TYPE_LAN                        0x1
1146 #define          MAC_ADDR_TYPE_ISCSI                      0x2
1147 #define          MAC_ADDR_TYPE_WWN                        0x3
1148 #define          MAC_ADDR_TYPE_FCOE_FIP                   0x4
1149 #define          MAC_ADDR_TYPE_IB GUID                    0x5
1150 #define          MAC_ADDR_TYPE_MAX                        0x6
1151 	u8_t   AddrBuf[5*(MAC_ADDR_LENGTH_MAX + 2)];
1152 	// In the future, we might have up to 5 addresses for each PF
1153 
1154 #elif defined (LITTLE_ENDIAN)
1155 	u16_t                            ReasonCode;            /* ids reasons for rsp  */
1156 	u16_t                            ResponseCode;          /* ids outcome of cmd   */
1157 	u32_t                            ManufacturerId;        /* ManufacturerId IANA */
1158 	u8_t   FirstAddrLength;
1159 #define          MAC_ADDR_LENGTH_MAX                      8
1160 	u8_t     PartitionId;
1161 	// The Partition ID field indicates the PCI identity of the partition
1162 #define NP_DEVICE_ID_MASK              0x18
1163 #define NP_DEVICE_ID_MASK_SHIFT          3
1164 #define NP_FUNC_ID_MASK                0x7
1165 #define NP_FUNC_ID_MASK_SHIFT            0
1166 	u8_t     CommandType;
1167 	// OEM command ID
1168 	u8_t     PayloadVersion;
1169 
1170 
1171 	u8_t   AddrBufTemp[3];
1172 	u8_t     FirstAddrType;
1173 	// Field to define type of address that follows
1174 	// 0x0 = Reserved
1175 	// 0x1 = LAN
1176 	// 0x2 = iSCSI
1177 	// 0x3 = WWN
1178 	// 0x4 = FCoE-FIP
1179 	// 0x5 = IB GUID
1180 	// 0x6 = LAN/iSCSI
1181 	// 0x7 = LAN/FCoE-FIP
1182 	// 0x8 = iSCSI/FCoE-FIP
1183 	// 0x9-0xFF = Reserved
1184 #define          MAC_ADDR_TYPE_RESERVED                   0x0
1185 #define          MAC_ADDR_TYPE_LAN                        0x1
1186 #define          MAC_ADDR_TYPE_ISCSI                      0x2
1187 #define          MAC_ADDR_TYPE_WWN                        0x3
1188 #define          MAC_ADDR_TYPE_FCOE_FIP                   0x4
1189 #define          MAC_ADDR_TYPE_IB GUID                    0x5
1190 #define          MAC_ADDR_TYPE_MAX                        0x6
1191 	u8_t   AddrBuf[5*(MAC_ADDR_LENGTH_MAX + 2)-3];
1192 
1193 #endif // endian
1194 } DellGetAddrCmdRspData_t;
1195 
1196 
1197 
1198 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1199 //  0x09    Set License Used to program license for licensable features of Ethernet Controller. 0x09    (Conditional)
1200 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1201 typedef struct DellSetLicenseCmd
1202 {
1203 #if defined (BIG_ENDIAN)
1204 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
1205 	u8_t     PayloadVersion;
1206 	u8_t     CommandType;
1207 	// OEM command ID
1208 	u16_t           Reserved;
1209 	u32_t           FEB;            // Feature Enablement Bitmap (FEB)
1210 #define FEB_ISOE       1    // 0   iSOE    0b = Disable the License for iSOE 1b = Enable the License for iSOE
1211 #define FEB_FCOE       2    // 1   FCoE    0b = Disable the License for FCoE 1b = Enable the License for FCoE
1212 	// 2-31    Reserved
1213 	u8_t            EPO[24];        // EntitlementID Plus Object (EPO)
1214 					// EntitlementID Plus object field is a 24 byte ASCII string
1215 					// defined by the Dell license manager. Ethernet Controllers
1216 					// shall store the information when provided by the Management Controller.
1217 #elif defined (LITTLE_ENDIAN)
1218 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
1219 	u16_t           Reserved;
1220 	u8_t     CommandType;
1221 	// OEM command ID
1222 	u8_t     PayloadVersion;
1223 	u32_t           FEB;            // Feature Enablement Bitmap (FEB)
1224 #define FEB_ISOE       1    // 0   iSOE    0b = Disable the License for iSOE 1b = Enable the License for iSOE
1225 #define FEB_FCOE       2    // 1   FCoE    0b = Disable the License for FCoE 1b = Enable the License for FCoE
1226 	// 2-31    Reserved
1227 	u8_t            EPO[24];        // EntitlementID Plus Object (EPO)
1228 					// EntitlementID Plus object field is a 24 byte ASCII string
1229 					// defined by the Dell license manager. Ethernet Controllers
1230 					// shall store the information when provided by the Management Controller.
1231 #endif // ENDIAN
1232 }DellSetLicenseCmd_t;
1233 
1234 typedef struct DellSetLicenseCmdRspData
1235 {
1236 #if defined (BIG_ENDIAN)
1237 	u16_t    ResponseCode;          /* ids outcome of cmd   */
1238 	u16_t    ReasonCode;            /* ids reasons for rsp  */
1239 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
1240 	u8_t     PayloadVersion;
1241 	u8_t     CommandType;
1242 	// OEM command ID
1243 
1244 	u16_t           Reserved;
1245 	u32_t           EFB;            // Enabled Features Bitmap Field
1246 #define EFB_ISOE       1    // 0    iSOE    0b = Disable the License for iSOE  1b = Enable the License for iSOE
1247 #define EFB_FCOE       2    // 1    FCoE    0b = Disable the License for FCoE  1b = Enable the License for FCoE
1248 	// 2-31 Reserved    2-31    Reserved
1249 #elif defined (LITTLE_ENDIAN)
1250 	u16_t    ReasonCode;            /* ids reasons for rsp  */
1251 	u16_t    ResponseCode;          /* ids outcome of cmd   */
1252 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
1253 	u16_t           Reserved;
1254 	u8_t     CommandType;
1255 	// OEM command ID
1256 	u8_t     PayloadVersion;
1257 	u32_t           EFB;            // Enabled Features Bitmap Field
1258 #define EFB_ISOE       1    // 0    iSOE    0b = Disable the License for iSOE  1b = Enable the License for iSOE
1259 #define EFB_FCOE       2    // 1    FCoE    0b = Disable the License for FCoE  1b = Enable the License for FCoE
1260 #endif // endian
1261 } DellSetLicenseCmdRspData_t;
1262 
1263 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1264 //  0x0A    Get License Used to read licensable features information of the Ethernet Controller.    0x0A    (Conditional)
1265 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1266 typedef DellDfltCmd_t DellGetLicenseCmd_t;
1267 
1268 typedef struct DellGetLicenseCmdRspData
1269 {
1270 #if defined (BIG_ENDIAN)
1271 	u16_t    ResponseCode;          /* ids outcome of cmd   */
1272 	u16_t    ReasonCode;            /* ids reasons for rsp  */
1273 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
1274 	u8_t     PayloadVersion;
1275 	u8_t     CommandType;
1276 	// OEM command ID
1277 
1278 	u8_t        StorageType;                  // Storage Type
1279 #define LICENSE_PERSISTENT         1  // 0   Storage Type    0b = License is persistent 1b = License is not persistent
1280 	// 1-7 Reserved
1281 	u8_t        Reserved;                     // Reserved
1282 	u32_t       EFB;                          // Enabled Features  Bitmap (EFB)
1283 #define EFB_iSOE    (1)               // 0   iSOE    0b = iSOE license is disabled 1b = iSOE license is enabled
1284 #define EFB_FCoE    (2)               // 1   FCoE    0b = FCoE license is disabled 1b = FCoE license is enabled
1285 	// 2-31    Reserved
1286 	//
1287 	u32_t       FCB;                          // Feature Capability Bitmap  (FCB)
1288 #define FCB_iSOE    (1)               // 0   iSOE    0b = Not capable of licensing iSOE  1b = Capable of licensing iSOE
1289 #define FCB_FCoE    (2)               // 1   FCoE    0b = Not capable of licensing FCoE  1b = Capable of licensing FCoE
1290 	// 2-31    Reserved
1291 	u8_t            UID[16];                  // Unique Identifier (UID)
1292 						  // The Unique Identifier field is a 16 byte ASCII string defined to uniquely identify the Ethernet Controller. It is generated using the permanent MAC address of PCI physical function 0 of the Ethernet Controller. The least 12 bytes is the permanent LAN MAC address of the PCI Physical function 0 and most significant 4 bytes is padded with zeroes.  UID shall be all zeros if the Ethernet Controller cannot provide it.
1293 						  // Example:  "00000019D2485C12" for MAC address 00:19:D2:48:5C:12
1294 	u8_t            EPO[24];                  // EntitlementID Plus Object (EPO)
1295 						  // EntitlementID Plus object field is a 24 byte string defined by the Dell license manager. Ethernet Controllers shall store the information when provided by the Management Controller. EPO shall be all zeroes if not provided by the Management Controller.
1296 #elif defined (LITTLE_ENDIAN)
1297 	u16_t                            ReasonCode;            /* ids reasons for rsp  */
1298 	u16_t                            ResponseCode;          /* ids outcome of cmd   */
1299 	u32_t                            ManufacturerId;        /* ManufacturerId IANA */
1300 	u8_t        Reserved;                     // Reserved
1301 	u8_t        StorageType;                  // Storage Type
1302 #define LICENSE_PERSISTENT         1  // 0   Storage Type    0b = License is persistent 1b = License is not persistent
1303 	// 1-7 Reserved
1304 	u8_t     CommandType;
1305 	// OEM command ID
1306 
1307 	u8_t     PayloadVersion;
1308 	u32_t       EFB;                          // Enabled Features  Bitmap (EFB)
1309 #define EFB_iSOE    (1)               // 0   iSOE    0b = iSOE license is disabled 1b = iSOE license is enabled
1310 #define EFB_FCoE    (2)               // 1   FCoE    0b = FCoE license is disabled 1b = FCoE license is enabled
1311 	// 2-31    Reserved
1312 	//
1313 	u32_t       FCB;                          // Feature Capability Bitmap  (FCB)
1314 #define FCB_iSOE    (1)               // 0   iSOE    0b = Not capable of licensing iSOE  1b = Capable of licensing iSOE
1315 #define FCB_FCoE    (2)               // 1   FCoE    0b = Not capable of licensing FCoE  1b = Capable of licensing FCoE
1316 	// 2-31    Reserved
1317 	u8_t            UID[16];                  // Unique Identifier (UID)
1318 						  // The Unique Identifier field is a 16 byte ASCII string defined to uniquely identify the Ethernet Controller. It is generated using the permanent MAC address of PCI physical function 0 of the Ethernet Controller. The least 12 bytes is the permanent LAN MAC address of the PCI Physical function 0 and most significant 4 bytes is padded with zeroes.  UID shall be all zeros if the Ethernet Controller cannot provide it.
1319 						  // Example:  "00000019D2485C12" for MAC address 00:19:D2:48:5C:12
1320 	u8_t            EPO[24];                  // EntitlementID Plus Object (EPO)
1321 						  // EntitlementID Plus object field is a 24 byte string defined by the Dell license manager. Ethernet Controllers shall store the information when provided by the Management Controller. EPO shall be all zeroes if not provided by the Management Controller.
1322 #endif // endian
1323 } DellGetLicenseCmdRspData_t;
1324 
1325 
1326 
1327 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1328 //  0x0B    Set Passthru Control    Used to enable/disable different passthru data paths in the Controller. 0x0B    (Conditional)
1329 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1330 
1331 typedef struct DellSetPassthruCtrlCmd
1332 {
1333 #if defined (BIG_ENDIAN)
1334 	u32_t    ManufacturerId;      /* ManufacturerId IANA */
1335 	u8_t     PayloadVersion;
1336 	u8_t     CommandType;
1337 	// OEM command ID
1338 	u8_t    PassthruType;    // Passthru Type
1339 #define PASSTHRU_ENABLE                  1               // 0   Status  0b = Disable 1b = Enable
1340 #define PASSTHRU_MASK               (1<<1)               // 7..1    Type
1341 #define OS_BMC_PASSTHRU             (0<<1)           //     0x00 = OS-BMC Passthru
1342 #define NETW_BMC_PASSTHRU           (1<<1)           //     0x01 = Network-BMC Passthru
1343 	//     0x02-0x7F = Reserved
1344 	u8_t    Pad;                                // Pad (0x00)
1345 #elif defined (LITTLE_ENDIAN)
1346 	u32_t   ManufacturerId;    /* ManufacturerId IANA */
1347 	u8_t    Pad;                                // Pad (0x00)
1348 	u8_t    PassthruType;    // Passthru Type
1349 #define PASSTHRU_ENABLE                  1               // 0   Status  0b = Disable 1b = Enable
1350 #define PASSTHRU_MASK               (1<<1)               // 7..1    Type
1351 #define OS_BMC_PASSTHRU             (0<<1)           //     0x00 = OS-BMC Passthru
1352 #define NETW_BMC_PASSTHRU           (1<<1)           //     0x01 = Network-BMC Passthru
1353 	//     0x02-0x7F = Reserved
1354 	u8_t     CommandType;
1355 	// OEM command ID
1356 	u8_t     PayloadVersion;
1357 #endif // ENDIAN
1358 }DellSetPassthruCtrlCmd_t;
1359 
1360 typedef struct DellRspsDefault
1361 {
1362 #if defined (BIG_ENDIAN)
1363 	u16_t    ResponseCode;          /* ids outcome of cmd   */
1364 	u16_t    ReasonCode;            /* ids reasons for rsp  */
1365 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
1366 	u8_t     PayloadVersion;
1367 	u8_t     CommandType;
1368 	// OEM command ID
1369 
1370 	u16_t    Pad;                                // Pad (0x00)
1371 #elif defined (LITTLE_ENDIAN)
1372 	u16_t                            ReasonCode;            /* ids reasons for rsp  */
1373 	u16_t                            ResponseCode;          /* ids outcome of cmd   */
1374 	u32_t                            ManufacturerId;        /* ManufacturerId IANA */
1375 	u16_t    Pad;                                // Pad (0x00)
1376 	u8_t     CommandType;
1377 	// OEM command ID
1378 
1379 	u8_t     PayloadVersion;
1380 #endif // endian
1381 } DellRspsDefault_t;
1382 
1383 typedef DellRspsDefault_t DellSetPassthruCtrlCmdRspData_t;
1384 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1385 //  0x0C    Get Passthru Control    Used to read current status of different passthru data paths in the Controller  0x0C    (Mandatory)
1386 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1387 typedef struct DellGetPassthruCtrlCmd
1388 {
1389 #if defined (BIG_ENDIAN)
1390 	u32_t    ManufacturerId;         /* ManufacturerId IANA */
1391 	u8_t     PayloadVersion;
1392 	u8_t     CommandType;
1393 	// OEM command ID
1394 	u8_t    PassthruType;    // Passthru Type
1395 				 // 0   Reserved
1396 #define PASSTHRU_MASK               (1<<1)               // 7..1    Type
1397 #define OS_BMC_PASSTHRU             (0<<1)           //     0x00 = OS-BMC Passthru
1398 #define NETW_BMC_PASSTHRU           (1<<1)           //     0x01 = Network-BMC Passthru
1399 	//     0x02-0x7F = Reserved
1400 	u8_t    Pad;                                // Pad (0x00)
1401 #elif defined (LITTLE_ENDIAN)
1402 	u32_t   ManufacturerId;         /* ManufacturerId IANA */
1403 	u8_t    Pad;                                // Pad (0x00)
1404 	u8_t    PassthruType;    // Passthru Type
1405 				 // 0   Reserved
1406 #define PASSTHRU_MASK               (1<<1)               // 7..1    Type
1407 #define OS_BMC_PASSTHRU             (0<<1)           //     0x00 = OS-BMC Passthru
1408 #define NETW_BMC_PASSTHRU           (1<<1)           //     0x01 = Network-BMC Passthru
1409 	//     0x02-0x7F = Reserved
1410 	u8_t     CommandType;
1411 	// OEM command ID
1412 	u8_t     PayloadVersion;
1413 #endif // ENDIAN
1414 }DellGetPassthruCtrlCmd_t;
1415 
1416 typedef struct DellGetPassthruCtrlCmdRspData
1417 {
1418 #if defined (BIG_ENDIAN)
1419 	u16_t    ResponseCode;          /* ids outcome of cmd   */
1420 	u16_t    ReasonCode;            /* ids reasons for rsp  */
1421 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
1422 	u8_t     PayloadVersion;
1423 	u8_t     CommandType;
1424 	// OEM command ID
1425 
1426 	u8_t    PassthruType;               // Passthru Type
1427 #define PASSTHRU_ENABLE                  1               // 0   Status  0b = Disable 1b = Enable
1428 #define PASSTHRU_MASK               (1<<1)               // 7..1    Type
1429 #define OS_BMC_PASSTHRU             (0<<1)           //     0x00 = OS-BMC Passthru
1430 #define NETW_BMC_PASSTHRU           (1<<1)           //     0x01 = Network-BMC Passthru
1431 	//     0x02-0x7F = Reserved
1432 	u8_t    Pad;                                // Pad (0x00)
1433 #elif defined (LITTLE_ENDIAN)
1434 	u16_t   ReasonCode;            /* ids reasons for rsp  */
1435 	u16_t   ResponseCode;          /* ids outcome of cmd   */
1436 	u32_t   ManufacturerId;        /* ManufacturerId IANA */
1437 	u8_t    Pad;                                // Pad (0x00)
1438 	u8_t    PassthruType;           // Passthru Type
1439 #define PASSTHRU_ENABLE                  1               // 0   Status  0b = Disable 1b = Enable
1440 #define PASSTHRU_MASK               (1<<1)               // 7..1    Type
1441 #define OS_BMC_PASSTHRU             (0<<1)           //     0x00 = OS-BMC Passthru
1442 #define NETW_BMC_PASSTHRU           (1<<1)           //     0x01 = Network-BMC Passthru
1443 	//     0x02-0x7F = Reserved
1444 	u8_t     CommandType;
1445 	// OEM command ID
1446 
1447 	u8_t     PayloadVersion;
1448 #endif // endian
1449 } DellGetPassthruCtrlCmdRspData_t;
1450 
1451 
1452 
1453 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1454 //  0x0D    Set Partition TX Bandwidth  Used to configure bandwidth of a partition enabled on a specific channel.   0x0D    (Conditional)
1455 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1456 typedef struct DellSetPartitionTxBandwidthCmd
1457 {
1458 #if defined (BIG_ENDIAN)
1459 	u32_t    ManufacturerId;   /* ManufacturerId IANA */
1460 	u8_t     PayloadVersion;
1461 	u8_t     CommandType;
1462 	// OEM command ID
1463 	u8_t    PartitionId;    //  Partition ID
1464 	u8_t    MinBandwidth;   //  Minimum Bandwidth   value ranges from 0 to 100
1465 	u8_t    MaxBandwidth;   //  Maximum Bandwidth   value ranges from 0 to 100
1466 	u8_t    Pad[3];                               // Pad
1467 #elif defined (LITTLE_ENDIAN)
1468 	u32_t   ManufacturerId;         /* ManufacturerId IANA */
1469 	u8_t    MinBandwidth;   //  Minimum Bandwidth   value ranges from 0 to 100
1470 	u8_t    PartitionId;    //  Partition ID
1471 	u8_t     CommandType;
1472 	// OEM command ID
1473 	u8_t     PayloadVersion;
1474 	u8_t    Pad[3];                               // Pad
1475 	u8_t    MaxBandwidth;   //  Maximum Bandwidth   value ranges from 0 to 100
1476 #endif // ENDIAN
1477 }DellSetPartitionTxBandwidthCmd_t;
1478 
1479 typedef DellRspsPartition_t DellSetPartitionTxBandwidthCmdRspData_t;
1480 
1481 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1482 //  0x0E    Get Partition TX Bandwidth  Used to read bandwidth of a partition enabled on a specific channel.    0x0E    (Conditional)
1483 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1484 typedef DellCmdPartition_t DellGetPartitionTxBandwidthCmd_t;
1485 
1486 typedef struct DellGetPartitionTxBandwidthCmdRspData
1487 {
1488 #if defined (BIG_ENDIAN)
1489 	u16_t    ResponseCode;          /* ids outcome of cmd   */
1490 	u16_t    ReasonCode;            /* ids reasons for rsp  */
1491 	u32_t    ManufacturerId;        /* IANA */
1492 	u8_t     PayloadVersion;
1493 	u8_t     CommandType;
1494 	// OEM command ID
1495 
1496 	u8_t    PartitionId;    //  Partition ID
1497 	u8_t    MinBandwidth;   //  Minimum Bandwidth   value ranges from 0 to 100
1498 	u8_t    MaxBandwidth;   //  Maximum Bandwidth   value ranges from 0 to 100
1499 	u8_t    Pad[3];                               // Pad
1500 #elif defined (LITTLE_ENDIAN)
1501 	u16_t   ReasonCode;            /* ids reasons for rsp  */
1502 	u16_t   ResponseCode;          /* ids outcome of cmd   */
1503 	u32_t   ManufacturerId;     /*     ManufacturerId IANA */
1504 	u8_t    MinBandwidth;   //  Minimum Bandwidth   value ranges from 0 to 100
1505 	u8_t    PartitionId;    //  Partition ID
1506 	u8_t     CommandType;
1507 	// OEM command ID
1508 	u8_t     PayloadVersion;
1509 	u8_t    Pad[3];                               // Pad
1510 	u8_t    MaxBandwidth;   //  Maximum Bandwidth   value ranges from 0 to 100
1511 #endif // endian
1512 } DellGetPartitionTxBandwidthCmdRspData_t;
1513 
1514 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1515 //  0x0F    Set MC IP Address   Used to program the IP address of the Management Controller.    0x0F    (Optional)
1516 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1517 //  The Set MC IP Address command allows the Management controller to provide
1518 //  its own IP address to the Ethernet Controller for OS-BMC operations. This
1519 //  IP address must be programmed before the OS-BMC feature is enabled.
1520 //  Type-Length and IP addresses fields are repeated if the Management
1521 //  Controller is to be configured to work in both IPv4 and IPV6 network
1522 //  environments.
1523 //
1524 //  The Set MC IP Address Command is addressed to the package, rather than
1525 //  to a particular channel (that is, the command is sent with a Channel ID
1526 //  where the Package ID subfield matches the ID of the intended package and
1527 //  the Internal Channel ID subfield is set to 0x1F).
1528 typedef struct DellSetMcIpAddrCmd
1529 {
1530 #if defined (BIG_ENDIAN)
1531 	u32_t    ManufacturerId;         //* ManufacturerId IANA */
1532 	u8_t     PayloadVersion;
1533 	u8_t     CommandType;
1534 	// OEM command ID
1535 	u8_t   AddrType;                                        // 7:0  IP Address Type     Field to define type of address that follows
1536 #define ADDR_TYPE_IPv4                0         //     0x0 = IPv4
1537 #define ADDR_TYPE_IPv6                1         //     0x1 = IPv6
1538 	//     0x2-0xFF = Reserved
1539 	u8_t   Length;                                          // 15:8 IP Address Length   The length indicates the number of bytes used to represent the IP Address.
1540 	u8_t   Addr[16];                                        //  IP Address shall be provided in hexadecimal and
1541 								//  the least significant byte of the IP Address
1542 								//  field should carry the first octet of the address.
1543 #elif defined (LITTLE_ENDIAN)
1544 	u32_t   ManufacturerId;         /* ManufacturerId IANA */
1545 	u8_t   Length;                                          // 15:8 IP Address Length   The length indicates the number of bytes used to represent the IP Address.
1546 	u8_t   AddrType;                                        // 7:0  IP Address Type     Field to define type of address that follows
1547 #define ADDR_TYPE_IPv4                0         //     0x0 = IPv4
1548 #define ADDR_TYPE_IPv6                1         //     0x1 = IPv6
1549 	//     0x2-0xFF = Reserved
1550 	u8_t     CommandType;
1551 	// OEM command ID
1552 	u8_t     PayloadVersion;
1553 	u8_t   Addr[16];                                        //  IP Address shall be provided in hexadecimal and
1554 								//  the least significant byte of the IP Address
1555 								//  field should carry the first octet of the address.
1556 
1557 #endif // ENDIAN
1558 }DellSetMcIpAddrCmd_t;
1559 
1560 
1561 typedef DellRspsDefault_t DellSetMcIpAddrCmdRspData_t;
1562 
1563 
1564 
1565 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1566 //  0x10    Get Teaming Information Used to read Network teaming information of a partition in a specific channel.  0x10    (Optional)
1567 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1568 typedef DellCmdPartition_t DellGetTeamingInfoCmd_t;
1569 
1570 typedef struct DellGetTeamingInfoCmdRspData
1571 {
1572 #if defined (BIG_ENDIAN)
1573 	u16_t    ResponseCode;          /* ids outcome of cmd   */
1574 	u16_t    ReasonCode;            /* ids reasons for rsp  */
1575 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
1576 	u8_t     PayloadVersion;
1577 	u8_t     CommandType;
1578 	// OEM command ID
1579 
1580 	u8_t    PartitionId;
1581 	u8_t    TeamingInfo;                            // Team Information
1582 #define     TEAMING_ENABLED    1            //  0   Network Teaming Status  0b = Network Teaming is not enabled 1b = Network Teaming is enabled
1583 #define     TEAMING_ID_MASK    (0x7F << 1)  //  7:1 Team ID Team ID represents the ID of the team of which the network interface on a partition is one of the members. The value ranges from 0x00 - 0x7F.
1584 	u8_t    TeamLength;                             //  15..8   Team Length:    Value indicates the length of the string to represent the name of the Team type. Ex: IEEE 802.3ad
1585 	u8_t    TeamType;                               //  7..0    Team Type
1586 #define TEAM_TYPE_UNKNOWNR          0x0 //      0x0 = Unknown
1587 #define TEAM_TYPE_FAILOVER          0x1 //      0x1 =  Failover
1588 #define TEAM_TYPE_LOAD_BALANCE      0x2 //      0x2 =  Load Balance
1589 #define TEAM_TYPE_LINK_AGGREGATION  0x3 //      0x3 =  Link Aggregation
1590 	//      0x4-0xFF = Reserved
1591 	u8_t    TeamName[16];
1592 #elif defined (LITTLE_ENDIAN)
1593 	u16_t   ReasonCode;            /* ids reasons for rsp  */
1594 	u16_t   ResponseCode;          /* ids outcome of cmd   */
1595 	u32_t   ManufacturerId;        /* ManufacturerId IANA */
1596 	u8_t    TeamingInfo;                            // Team Information
1597 	u8_t    PartitionId;
1598 
1599 	u8_t     CommandType;
1600 	// OEM command ID
1601 	u8_t     PayloadVersion;
1602 #define     TEAMING_ENABLED    1            //  0   Network Teaming Status  0b = Network Teaming is not enabled 1b = Network Teaming is enabled
1603 #define     TEAMING_ID_MASK    (0x7F << 1)  //  7:1 Team ID Team ID represents the ID of the team of which the network interface on a partition is one of the members. The value ranges from 0x00 - 0x7F.
1604 	u8_t    TeamNameExtra[2];
1605 	u8_t    TeamType;                               //  7..0    Team Type
1606 #define TEAM_TYPE_UNKNOWNR          0x0 //      0x0 = Unknown
1607 #define TEAM_TYPE_FAILOVER          0x1 //      0x1 =  Failover
1608 #define TEAM_TYPE_LOAD_BALANCE      0x2 //      0x2 =  Load Balance
1609 #define TEAM_TYPE_LINK_AGGREGATION  0x3 //      0x3 =  Link Aggregation
1610 	//      0x4-0xFF = Reserved
1611 	u8_t    TeamLength;                             //  15..8   Team Length:    Value indicates the length of the string to represent the name of the Team type. Ex: IEEE 802.3ad
1612 	u8_t    TeamName[16-2];
1613 #endif // endian
1614 } DellGetTeamingInfoCmdRspData_t;
1615 
1616 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1617 //  0x11    Enable Ports    Used to enable physical ports of the Ethernet Controller.   0x11    (Mandatory)
1618 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1619 typedef DellDfltCmd_t DellEnablePortsCmd_t;
1620 typedef DellRspsDefault_t DellEnablePortsCmdRspData_t;
1621 
1622 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1623 //  0x12    Disable Ports   Used to disable physical ports of the Ethernet Controller.  0x12    (Mandatory)
1624 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1625 typedef DellDfltCmd_t DellDisablePortsCmd_t;
1626 typedef DellRspsDefault_t DellDisablePortsCmdRspData_t;
1627 
1628 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1629 //  0x13    Get Temperature Used to read on-chip temperature values of the Ethernet Controller. 0x13    (Conditional)
1630 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1631 typedef DellDfltCmd_t DellGetTempCmd_t;
1632 typedef struct DellGetTempCmdRspData
1633 {
1634 #if defined (BIG_ENDIAN)
1635 	u16_t    ResponseCode;          /* ids outcome of cmd   */
1636 	u16_t    ReasonCode;            /* ids reasons for rsp  */
1637 	u32_t    ManufacturerId;        /* ManufacturerId IANA */
1638 	u8_t     PayloadVersion;
1639 	u8_t     CommandType;
1640 	// OEM command ID
1641 
1642 	u8_t MaxTemp;    // Maximum temperature in degrees Celsius
1643 	u8_t CurTemp;    // Current temperature in degrees Celsius
1644 #elif defined (LITTLE_ENDIAN)
1645 	u16_t   ReasonCode;            /* ids reasons for rsp  */
1646 	u16_t   ResponseCode;          /* ids outcome of cmd   */
1647 	u32_t   ManufacturerId;        /* ManufacturerId IANA */
1648 	u8_t CurTemp;    // Current temperature in degrees Celsius
1649 	u8_t MaxTemp;    // Maximum temperature in degrees Celsius
1650 
1651 	u8_t     CommandType;
1652 	// OEM command ID
1653 	u8_t     PayloadVersion;
1654 #endif // endian
1655 } DellGetTempCmdRspData_t;
1656 
1657 
1658 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1659 //  0x14    Set Link Tuning Used to configure Link Tuning parameters of a specific channel. 0x14    (Conditional)
1660 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1661 typedef struct DellSetLinkTuningCmd
1662 {
1663 #if defined (BIG_ENDIAN)
1664 	u32_t    ManufacturerId;         /* ManufacturerId IANA */
1665 	u8_t     PayloadVersion;
1666 	u8_t     CommandType;
1667 	// OEM command ID
1668 	u8_t    LinkTuning[8];         // Link Tuning Data is an 8 byte value defined in accordance with the Link Tuning and FlexAddress Interface Specification
1669 	u16_t    Pad;                               // Pad
1670 #elif defined (LITTLE_ENDIAN)
1671 	u32_t    ManufacturerId;         /* ManufacturerId IANA */
1672 	u8_t    LinkTuning_first[2];         // Link Tuning Data is an 8 byte value defined in accordance with the Link Tuning and FlexAddress Interface Specification
1673 	u8_t     CommandType;
1674 	// OEM command ID
1675 	u8_t     PayloadVersion;
1676 	u8_t    LinkTuning[4];         // Link Tuning Data is an 8 byte value defined in accordance with the Link Tuning and FlexAddress Interface Specification
1677 	u16_t    Pad;                               // Pad
1678 	u8_t    LinkTuning_last[2];    // Link Tuning Data is an 8 byte value defined in accordance with the Link Tuning and FlexAddress Interface Specification
1679 #endif // ENDIAN
1680 }DellSetLinkTuningCmd_t;
1681 
1682 
1683 typedef DellRspsDefault_t DellSetLinkTuningCmdRspData_t;
1684 
1685 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1686 //  0x15    Enable OutOfBox WOL Used to enable OutOfBox WOL on a specific channel.  0x15    (Mandatory)
1687 //  0x16    Disable OutOfBox WOL    Used to disable OutOfBox WOL on a specific channel. 0x16    (Mandatory)
1688 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1689 typedef DellDfltCmd_t DellEnableDisableOutOfBoxWolCmd_t;
1690 typedef DellRspsDefault_t DellEnableDisableOutOfBoxWolCmdRspData_t;
1691 
1692 /*MAX_TLV_COMMAND_SIZE :(i.e.  GetiSCSIBootTargetConfig)
1693 		connectTgt                         2+8 =10 (�Disabled�)
1694 		TgtIpAddress                     2+39=41 (IPv6 max size is 39)
1695 		TgtTcpPort                          2+5=7  (2^16 so 5 digits)
1696 		TgtBootLun                         2+3=5 (max support is 256)
1697 		TgtIscsiName                     2+128=130
1698 		TgtChapId                           2+128=130
1699 		TgtChapPwd                      2+16=18
1700 		TgtIpVer                              2+4= 6 (�IPv6�)
1701 
1702 		Total 347 *2 = 694 bytes (for 1st and 2nd target) just for TLVs
1703 */
1704 #define MAX_TLV_COMMAND_SIZE  (694)
1705 /*
1706 //  0x1A  Get Supported Payload Version - Used to indicate Payload Versions supported by controller (Mandatory)
1707 //  0x1C  Get iSCSI Offload Statistics - Used to get vendor version ID of the OS driver currently running on the
1708 //  partition(or Port) (Mandatory)
1709 //  0x1D  Get iSCSI Boot Initiator Config Command - query the channel (partition) for the iSCSI Boot Initiator settings
1710 //  configured on the channel (Mandatory)
1711 //  0x1E  Set iSCSI Boot Initiator Config Command - send to the channel (partition) the iSCSI Boot Initiator settings
1712 //  to be used by the channel (Mandatory)
1713 //  0x1F  Get iSCSI Boot Target Config Command - query the channel for the iSCSI Boot Target configuration settings of
1714 //  the port or partition (Mandatory)
1715 //  0x20  Set iSCSI Boot Target Config Command - send to the channel (partition) the iSCSI Boot Target settings to be
1716 //  used by the channel (Mandatory)
1717 //  0x21  Get FC/FCoE Boot Target Config Command - query the channel for the FC/FCoE Boot Target configuration settings
1718 //  of the port or partition (Mandatory)
1719 //  0x22  Set FC/FCoE Boot Target Config Command - send to the channel (partition) the FC/FCoE Boot Target settings to
1720 //  be used by the channel (Mandatory)
1721 //  0x23  NVRAM Commit Command - instructs the Ethernet or FC Controller to write attribute settings held in temporary
1722 //  storage to the controller�s NVRAM  (Mandatory)
1723 //  0x24  NVRAM Commit Status Command - send to the channel (partition) the iSCSI Boot Target settings to be used by
1724 //  the channel (Mandatory)
1725 */
1726 
1727 typedef struct
1728 {
1729 	u32_t    ManufacturerId; /* ManufacturerId IANA */
1730 	u8_t     PayloadVersion;
1731 	u8_t     CommandType;
1732 	u8_t     PartitionId;
1733 	u8_t     NumOfTLVs;
1734 	/*This is a place holder for the Maximum size in bytesof this command with all TLV's present*/
1735 	u8_t     buf[MAX_TLV_COMMAND_SIZE];
1736 } DellOemCmdPartitionTLV_t;
1737 
1738 typedef DellDfltCmd_t DellGetSupportedVerCmd_t;
1739 typedef DellCmdPartition_t DellGetOsDriverVerCmd_t;
1740 typedef DellCmdPartition_t DellGetiScsiInitiatorConfCmd_t;
1741 typedef DellOemCmdPartitionTLV_t DellSetiScsiInitiatorConfCmd_t;
1742 typedef DellCmdPartition_t DellGetiScsiTargetConfCmd_t;
1743 typedef DellOemCmdPartitionTLV_t DellSetiScsiTargetConfCmd_t;
1744 typedef DellCmdPartition_t DellGetFcoeTargetConfCmd_t;
1745 typedef DellOemCmdPartitionTLV_t DellSetFcoeTargetConfCmd_t;
1746 typedef DellDfltCmd_t DellCommitNvramCmd_t;
1747 typedef DellDfltCmd_t DellGetCommitNvramStatusCmd_t;
1748 
1749 typedef union DellOemCmdPayload
1750 {
1751 	// Dell OEM NCSI commands
1752 	DellGetInventoryCmd_t               GetInventoryCmd;              // DELL_OEM_GET_INVENTORY_CMD
1753 	DellGetExtendedCapabilitiesCmd_t    GetExtendedCapabilitiesCmd;   // DELL_OEM_GET_EXTENDED_CAPABILITIES_CMD
1754 	DellGetPartitionInfoCmd_t           GetPartitionInfoCmd;          // DELL_OEM_GET_PARTITION_INFORMATION_CMD
1755 	DellGetFcoeCapabilitiesCmd_t        GetFcoeCapabilitiesCmd;       // DELL_OEM_GET_FCOE_CAPABILITIES_CMD
1756 	DellGetVirtualLinkCmd_t             GetVirtualLinkCmd;            // DELL_OEM_GET_VIRTUAL_LINK_CMD
1757 	DellGetLanStatisticsCmd_t           GetLanStatisticsCmd;          // DELL_OEM_GET_LAN_STATISTICS_CMD
1758 	DellGetFcoeStatisticsCmd_t          GetFcoeStatisticsCmd;         // DELL_OEM_GET_FCOE_STATISTICS_CMD
1759 	DellSetAddrCmd_t                    SetAddrCmd;                   // DELL_OEM_SET_ADDR_CMD
1760 	DellGetAddrCmd_t                    GetAddrCmd;                   // DELL_OEM_GET_ADDR_CMD
1761 	DellSetLicenseCmd_t                 SetLicenseCmd;                // DELL_OEM_SET_LICENSE_CMD
1762 	DellGetLicenseCmd_t                 GetLicenseCmd;                // DELL_OEM_GET_LICENSE_CMD
1763 	DellSetPassthruCtrlCmd_t            SetPassthruCtrlCmd;           // DELL_OEM_SET_PASSTHRU_CONTROL_CMD
1764 	DellGetPassthruCtrlCmd_t            GetPassthruCtrlCmd;           // DELL_OEM_GET_PASSTHRU_CONTROL_CMD
1765 	DellSetPartitionTxBandwidthCmd_t    SetPartitionTxBandwidthCmd;   // DELL_OEM_SET_PARTITIONCmd_tX_BANDWIDTH_CMD
1766 	DellGetPartitionTxBandwidthCmd_t    GetPartitionTxBandwidthCmd;   // DELL_OEM_GET_PARTITIONCmd_tX_BANDWIDTH_CMD
1767 	DellSetMcIpAddrCmd_t                SetMcIpAddrCmd;               // DELL_OEM_SET_MC_IP_ADDRESS_CMD
1768 	DellGetTeamingInfoCmd_t             GetTeamingInfoCmd;            // DELL_OEM_GETCmd_tEAMING_INFORMATION_CMD
1769 	DellEnablePortsCmd_t                EnablePortsCmd;               // DELL_OEM_ENABLE_PORTS_CMD
1770 	DellDisablePortsCmd_t               DisablePortsCmd;              // DELL_OEM_DISABLE_PORTS_CMD
1771 	DellGetTempCmd_t                    GetTempCmd;                   // DELL_OEM_GET_TEMPERATURE_CMD
1772 	DellSetLinkTuningCmd_t              SetLinkTuningCmd;             // DELL_OEM_SET_LINKTUNING_CMD
1773 	DellEnableDisableOutOfBoxWolCmd_t   EnableDisableOutOfBoxWolCmd;  // DELL_OEM_ENABLE_OUTOFBOX_WOL_CMD and DELL_OEM_DISABLE_OUTOFBOX_WOL_CMD
1774 	DellGetSupportedVerCmd_t           GetSupportedVerCmd;        // DELL_OEM_GET_SUPP_PAYLOAD_VERSION_CMD
1775 	DellGetOsDriverVerCmd_t            GetOsDriverVerCmd;         // DELL_OEM_GET_OS_DRIVER_VERSION_CMD
1776 	DellGetiScsiInitiatorConfCmd_t     GetiScsiInitiatorConfCmd;      // DELL_OEM_GET_ISCSI_BOOT_INITIATOR_CONFIG_CMD
1777 	DellSetiScsiInitiatorConfCmd_t     SetiScsiInitiatorConfCmd;      // DELL_OEM_SET_ISCSI_BOOT_INITIATOR_CONFIG_CMD
1778 	DellGetiScsiTargetConfCmd_t        GetiScsiTargetConfCmd;         // DELL_OEM_GET_ISCSI_BOOT_TARGET_CONFIG_CMD
1779 	DellSetiScsiTargetConfCmd_t        SetiScsiTargetConfCmd;         // DELL_OEM_SET_ISCSI_BOOT_TARGET_CONFIG_CMD
1780 	DellGetFcoeTargetConfCmd_t         GetFcoeTargetConfCmd;          // DELL_OEM_GET_FCOE_BOOT_TARGET_CONFIG_CMD
1781 	DellSetFcoeTargetConfCmd_t         SetFcoeTargetConfCmd;          // DELL_OEM_SET_FCOE_BOOT_TARGET_CONFIG_CMD
1782 	DellCommitNvramCmd_t               CommitNvramCmd;                    // DELL_OEM_NVRAM_COMMIT_CMD
1783 	DellGetCommitNvramStatusCmd_t      GetCommitNvramStatusCmd;           // DELL_OEM_NVRAM_COMMIT_STATUS_CMD
1784 } DellOemCmdPayload_t;
1785 
1786 
1787 typedef struct BrcmOemVendorData
1788 {
1789 	BrcmOemCmdRspHeader_t   BrcmOemCmdRspHeader;
1790 	BrcmOemCmdPayload_t     OemPayload;
1791 
1792 } BrcmOemVendorData_t;
1793 
1794 typedef struct NcsiCmdOemCmdPayload
1795 {
1796 	u32_t            ManufacturerId;         /* ManufacturerId IANA */
1797 	BrcmOemVendorData_t     VendorData;
1798 
1799 } NcsiCmdOemCmdPayload_t;
1800 
1801 /*****************************************************************************
1802 
1803 NcsiCmdSelectPackageCmdPayload_t
1804 
1805     this structure definition is for the select package cmd Payload.
1806 
1807 *****************************************************************************/
1808 typedef struct NcsiCmdSelectPackageCmdPayload
1809 {
1810 	u32_t    DisableHwArbitration;
1811 #define    HW_ARBITRATION_MASK             0x1
1812 #define    HW_ARBITRATION_ENABLE               0x0
1813 #define    HW_ARBITRATION_DISABLE              0x1
1814 } NcsiCmdSelectPackageCmdPayload_t;
1815 
1816 /*****************************************************************************
1817 
1818 NcsiCmdEnableMulticastPacketFilteringCmdPayload_t
1819 
1820     this structure definition is for the  cmd Payload.
1821 
1822 *****************************************************************************/
1823 typedef struct NcsiCmdEnableMulticastPacketFilteringCmdPayload
1824 {
1825 	u32_t    Setting;
1826 #define NCSI_CMD_MULTICAST_PACKET_PASSTHRU_SETTING_MASK                 7
1827 #define NCSI_CMD_MULTICAST_PACKET_PASSTHRU_SETTING_IPV6_NEIGHBOR_ADV    1
1828 #define NCSI_CMD_MULTICAST_PACKET_PASSTHRU_SETTING_IPV6_ROUTER_ADV      2
1829 #define NCSI_CMD_MULTICAST_PACKET_PASSTHRU_SETTING_DHCPV6               4
1830 
1831 } NcsiCmdEnableMulticastPacketFilteringCmdPayload_t;
1832 
1833 /*****************************************************************************
1834 
1835 NcsiCmdSetNcsiFlowControlCmdPayload_t
1836 
1837     this structure definition is for the set ncsi flowcontrol cmd Payload.
1838 
1839 *****************************************************************************/
1840 typedef struct NcsiCmdSetNcsiFlowControlCmdPayload
1841 {
1842 	u32_t    Setting;
1843 #define NCSI_CMD_NCSI_FLOW_CONTROL_SETTING_ENABLE   3
1844 #define NCSI_CMD_NCSI_FLOW_CONTROL_SETTING_DISABLE  0
1845 
1846 } NcsiCmdSetNcsiFlowControlCmdPayload_t;
1847 
1848 /*****************************************************************************
1849 
1850 NcsiCmdEnableVlanCmdPayload_t
1851 
1852     this structure definition is for the set ncsi flowcontrol cmd Payload.
1853 
1854 *****************************************************************************/
1855 typedef struct NcsiCmdEnableVlanCmdPayload
1856 {
1857 	u32_t    Setting;
1858 #define NCSI_CMD_ENABLE_VLAN_SETTING_VLAN_TAG_MODE      1
1859 #define NCSI_CMD_ENABLE_VLAN_SETTING_MIXED_MODE         2
1860 #define NCSI_CMD_ENABLE_VLAN_SETTING_PROM_VLAN_MODE     3
1861 
1862 } NcsiCmdEnableVlanCmdPayload_t;
1863 
1864 
1865 /*****************************************************************************
1866 
1867 NcsiCmdSetVlanCmdPayload_t
1868 
1869     this structure definition is for the enable VLAN cmd Payload.
1870 
1871 *****************************************************************************/
1872 typedef struct NcsiCmdSetVlanCmdPayload
1873 #if defined (BIG_ENDIAN)
1874 {
1875 	u16_t   Reserved0;
1876 	u16_t   VlanTag;
1877 	u16_t   Reserved1;
1878 	u8_t    FilterSelector;
1879 	u8_t    Enable;
1880 
1881 } NcsiCmdSetVlanCmdPayload_t;
1882 #elif defined (LITTLE_ENDIAN)
1883 {
1884 	   u16_t   VlanTag;
1885 	   u16_t   Reserved0;
1886 	   u8_t    Enable;
1887 	   u8_t    FilterSelector;
1888 	   u16_t   Reserved1;
1889 
1890 }
1891    NcsiCmdSetVlanCmdPayload_t;
1892 #endif // ENDIAN
1893 
1894 /*****************************************************************************
1895 
1896 NcsiCmdEnableAenCmdPayload_t
1897 
1898     this structure definition is for the enable aen cmd Payload.
1899 
1900 *****************************************************************************/
1901 typedef struct NcsiCmdEnableAenCmdPayload
1902 #if defined (BIG_ENDIAN)
1903 {
1904 	u8_t     Reserved[3];
1905 	u8_t     AenMcId;
1906 	u32_t    AenControl;
1907 #define NCSI_CMD_ENABLE_AEN_CMD_PAYLOAD_ENABLE_LINK_CHANGED_AEN     0x1
1908 #define NCSI_CMD_ENABLE_AEN_CMD_PAYLOAD_ENABLE_RESET_OCCURRED_AEN   0x2
1909 #define NCSI_CMD_ENABLE_AEN_CMD_PAYLOAD_ENABLE_OS_CHANGED_AEN       0x4
1910 
1911 } NcsiCmdEnableAenCmdPayload_t;
1912 #elif defined (LITTLE_ENDIAN)
1913 {
1914 	   u8_t     AenMcId;
1915 	   u8_t     Reserved[3];
1916 	   u32_t    AenControl;
1917 #define NCSI_CMD_ENABLE_AEN_CMD_PAYLOAD_ENABLE_LINK_CHANGED_AEN     0x1
1918 #define NCSI_CMD_ENABLE_AEN_CMD_PAYLOAD_ENABLE_RESET_OCCURRED_AEN   0x2
1919 #define NCSI_CMD_ENABLE_AEN_CMD_PAYLOAD_ENABLE_OS_CHANGED_AEN       0x4
1920 
1921 }
1922    NcsiCmdEnableAenCmdPayload_t;
1923 #endif // ENDIAN
1924 
1925 /*****************************************************************************
1926 
1927 NcsiCmdSetMacAddrCmdPayload_t
1928 
1929     this structure definition is for the set MAC addr command Payload
1930 
1931 *****************************************************************************/
1932 typedef struct NcsiCmdSetMacAddrCmdPayload
1933 #if defined (BIG_ENDIAN)
1934 {
1935 
1936 	u16_t       MacAddrHigh;
1937 	u16_t       MacAddrLowHigh;
1938 	u16_t       MacAddrLowLow;
1939 	u8_t        MacAddrNum;
1940 	u8_t        AddrTypeEnable; //  bits 7..5=address type, bits 4..1=reserved, bit 0=address enable
1941 #define NCSI_CMD_SET_MAC_ADDR_CMD_ADDR_ENABLE           0x01
1942 #define NCSI_CMD_SET_MAC_ADDR_CMD_ADDR_TYPE_MASK        0xE0
1943 #define NCSI_CMD_SET_MAC_ADDR_CMD_ADDR_TYPE_UNICAST     0x00
1944 #define NCSI_CMD_SET_MAC_ADDR_CMD_ADDR_TYPE_MULTICAST   0x20
1945 } NcsiCmdSetMacAddrCmdPayload_t;
1946 #elif defined (LITTLE_ENDIAN)
1947 {
1948 
1949 	   u16_t       MacAddrLowHigh;
1950 	   u16_t       MacAddrHigh;
1951 	   u8_t        AddrTypeEnable; //  bits 7..5=address type, bits 4..1=reserved, bit 0=address enable
1952 	   u8_t        MacAddrNum;
1953 	   u16_t       MacAddrLowLow;
1954 #define NCSI_CMD_SET_MAC_ADDR_CMD_ADDR_ENABLE           0x01
1955 #define NCSI_CMD_SET_MAC_ADDR_CMD_ADDR_TYPE_MASK        0xE0
1956 #define NCSI_CMD_SET_MAC_ADDR_CMD_ADDR_TYPE_UNICAST     0x00
1957 #define NCSI_CMD_SET_MAC_ADDR_CMD_ADDR_TYPE_MULTICAST   0x20
1958 }
1959    NcsiCmdSetMacAddrCmdPayload_t;
1960 #endif // ENDIAN
1961 
1962 /*****************************************************************************
1963 
1964 NcsiCmdSetLinkCmdPayload_t
1965 
1966     this structure definition is for the set link command Payload
1967 
1968 *****************************************************************************/
1969 typedef struct NcsiCmdSetLinkCmdPayload
1970 {
1971 
1972 	u32_t   LinkSettings;
1973 	u32_t   OemLinkSettings;
1974 
1975 } NcsiCmdSetLinkCmdPayload_t;
1976 
1977 
1978 /*****************************************************************************
1979 
1980 NcsiCmdDisableResetChannelCmdPayload_t
1981 
1982     this structure definition is for the reset channel command Payload
1983 
1984 *****************************************************************************/
1985 typedef struct NcsiCmdDisableResetChannelCmdPayload
1986 {
1987 
1988 	u32_t   Reserved;
1989 
1990 } NcsiCmdDisableResetChannelCmdPayload_t;
1991 
1992 
1993 
1994 /*****************************************************************************
1995 
1996 NcsiCmdEnableBroadcastPacketFilteringCmdPayload_t
1997 
1998     this structure definition is for the set link command Payload
1999 
2000 *****************************************************************************/
2001 typedef struct NcsiCmdEnableBroadcastPacketFilteringCmdPayload
2002 {
2003 
2004 	u32_t   FilterSettings;
2005 #define     NCSI_CMD_ENABLE_BROADCAST_PKT_PASSTHROUGH_ARP              1
2006 #define     NCSI_CMD_ENABLE_BROADCAST_PKT_PASSTHROUGH_DHCP_CLIENT      2
2007 #define     NCSI_CMD_ENABLE_BROADCAST_PKT_PASSTHROUGH_DHCP_SERVER      4
2008 #define     NCSI_CMD_ENABLE_BROADCAST_PKT_PASSTHROUGH_NETBIOS          8
2009 
2010 } NcsiCmdEnableBroadcastPacketFilteringCmdPayload_t;
2011 
2012 typedef NcsiCmdEnableBroadcastPacketFilteringCmdPayload_t *pNcsiCmdEnableBroadcastPacketFilteringCmdPayload_t;
2013 
2014 
2015 /*****************************************************************************
2016 
2017 NcsiCmdPayload_t
2018 
2019     this union definition combines the various response Payload definitions
2020     into a single reference.
2021 
2022 *****************************************************************************/
2023 typedef union NcsiCmdPayload
2024 {
2025 	NcsiCmdDisableResetChannelCmdPayload_t              ResetChannelCmdPayload;
2026 	NcsiCmdDisableResetChannelCmdPayload_t              DisableChannelCmdPayload;
2027 	NcsiCmdSetMacAddrCmdPayload_t                       SetMacAddrPayload;
2028 	NcsiCmdSetVlanCmdPayload_t                          SetVlanPayload;
2029 	NcsiCmdSetLinkCmdPayload_t                          SetLinkPayload;
2030 	NcsiCmdEnableAenCmdPayload_t                        EnableAenPayload;
2031 	NcsiCmdEnableBroadcastPacketFilteringCmdPayload_t   EnableBroadcastFilterPayload;
2032 	NcsiCmdSelectPackageCmdPayload_t                    SelectPackagePayload;
2033 	NcsiCmdSetNcsiFlowControlCmdPayload_t               SetFlowControlPayload;
2034 	NcsiCmdEnableVlanCmdPayload_t                       EnableVlanPayload;
2035 	NcsiCmdEnableMulticastPacketFilteringCmdPayload_t   EnableMulticastFilterPayload;
2036 	NcsiCmdOemCmdPayload_t                              OemCmdPayload;
2037 	DellOemCmdPayload_t                                 DellOemCmdPayload;
2038 } NcsiCmdPayload_t;
2039 
2040 
2041 #define NCSI_CMD_DISABLE_RESET_CHANNEL_CMD_PAYLOAD_SIZE     (sizeof (NcsiCmdDisableResetChannelCmdPayload_t))
2042 #define UMPCMDPUB_SET_VLAN_CMD_PAYLOAD_SIZE                 (sizeof (NcsiCmdSetVlanCmdPayload_t))
2043 #define UMPCMDPUB_SET_MAC_CMD_PAYLOAD_SIZE                  (sizeof (NcsiCmdSetMacAddrCmdPayload_t))
2044 #define UMPCMDPUB_CLR_MAC_CMD_PAYLOAD_SIZE                  (sizeof (NcsiCmdClearMacAddrCmdPayload_t))
2045 #define UMPCMDPUB_SET_LINK_CMD_PAYLOAD_SIZE                 (sizeof (NcsiCmdSetLinkCmdPayload_t))
2046 #define UMPCMDPUB_CMD_PAYLOAD_SIZE                          (sizeof (NcsiCmdPayload_t))
2047 
2048 #define UC_32_BIT_ALIGN(X)              ((4 - (X & 3)) & 3)
2049 
2050 /*****************************************************************************
2051 
2052 NcsiRmiiCmdPkt_t
2053 
2054     this structure definition is for the the UMP command frame.
2055 
2056     IMD command frames are received from iLO over the UMP interface, and are
2057     either processed locally for configuration and control, or are forwarded
2058     for transmission at the primary ethernet port.
2059 
2060 *****************************************************************************/
2061 typedef struct NcsiCmdPkt
2062 {
2063 	NcsiRmiiControlPktHeader_t   Header;
2064 	NcsiCmdPayload_t         Payload;
2065 
2066 } NcsiRmiiCmdPkt_t;
2067 
2068 typedef NcsiRmiiCmdPkt_t *pNcsiRmiiCmdPkt_t;
2069 
2070 #define UC_MAX_CMD_FRAME_SIZE sizeof(NcsiRmiiCmdPkt_t)
2071 
2072 
2073 /*****************************************************************************
2074 
2075 OemDefaultReturnData_t
2076 
2077     Structure definition for data portion of most basic response Payload
2078 
2079 *****************************************************************************/
2080 typedef struct NcsiCmdRspStatus
2081 #if defined (BIG_ENDIAN)
2082 {
2083 	u16_t   ResponseCode;          /* ids outcome of cmd   */
2084 #define NCSI_CMD_RSP_CODE_CMD_COMPLETED_OK                        0
2085 #define NCSI_CMD_RSP_CODE_CMD_FAILED                              1
2086 #define NCSI_CMD_RSP_CODE_CMD_UNAVAILABLE                         2
2087 #define NCSI_CMD_RSP_CODE_CMD_UNSUPPORTED                         3
2088 	u16_t   ReasonCode;            /* ids reasons for rsp  */
2089 #define NCSI_CMD_RSN_CODE_NO_ERROR                                0
2090 #define NCSI_CMD_RSN_CODE_INTERFACE_INIT_REQUIRED                 1
2091 #define NCSI_CMD_RSN_CODE_PARAMETER_INVALID_OUT_OF_RANGE          2
2092 #define NCSI_CMD_RSN_CODE_CHANNEL_NOT_READY                       3
2093 #define NCSI_CMD_RSN_CODE_PACKAGE_NOT_READY                       4
2094 #define NCSI_CMD_RSN_CODE_INVALID_PAYLOAD_LENGTH                  5
2095 #define NCSI_CMD_RSN_CODE_VLAN_TAG_OF_0_IS_INVALID                ((NCSI_CMD_TYPE_SET_VLAN_FILTERS << 8) + 7)
2096 #define NCSI_CMD_RSN_CODE_MAC_ADDR_OF_0_IS_INVALID                ((NCSI_CMD_TYPE_SET_MAC_ADDRESS  << 8) + 8)
2097 #define NCSI_CMD_RSN_CODE_ASYNCH_FC_NOT_SUPPORTED                 ((NCSI_CMD_TYPE_SET_NCSI_FLOW_CONTROL << 8) + 9)
2098 #define NCSI_CMD_OEM_GENERIC_RSN_CODE_OS_CONFLICT                   0x80
2099 #define NCSI_CMD_OEM_GENERIC_RSN_CODE_OEM_PAYLOAD_VER_ERR           0x81
2100 	// 0x1 Set Link Host OS/ Driver Conflict Returned when the Set Link command is received
2101 	// when the Host NC driver is operational
2102 	// 0x2 Set Link Media Conflict Returned when Set Link command parameters conflict
2103 	// with the media type (for example, Fiber Media)
2104 	// 0x3 Set Link Parameter Conflict Returned when Set Link parameters conflict with each
2105 	// other (for example, 1000 Mbps HD with copper media)
2106 	// 0x4 Set Link Power Mode Conflict Returned when Set Link parameters conflict with
2107 	// current low-power levels by exceeding capability
2108 	// 0x5 Set Link Speed Conflict Returned when Set Link parameters attempt to force
2109 	// more than one speed at the same time
2110 	// 0x6 Link Command Failed-Hardware Access Error
2111 	// Returned when PHY R/W access fails to complete
2112 	// normally while executing the Set Link or Get Link Status command
2113 #define NCSI_CMD_RSN_CODE_SET_LINK_HOST_CONFLICT                           1
2114 #define NCSI_CMD_RSN_CODE_SET_LINK_MEDIA_CONFLICT                          2
2115 #define NCSI_CMD_RSN_CODE_SET_LINK_PARAMETER_CONFLICT                      3
2116 #define NCSI_CMD_RSN_CODE_SET_LINK_POWER_MODE_CONFLICT                     4
2117 #define NCSI_CMD_RSN_CODE_SET_LINK_SPEED_CONFLICT                          5
2118 #define NCSI_CMD_RSN_CODE_SET_LINK_HW_ACCESS_ERR                           6
2119 
2120 	// Dell OEM Set Mac Command-specific Reason Code
2121 	// 0x8000  NIC Partitioning not enabled    Returned when the NIC Partitioning feature is not enabled.
2122 	// 0x8001  Partition ID not enabled    Returned when the individual partition is not enabled.
2123 	// 0x8002  Partition ID not associated Returned when the Partition ID is not one of the partitions enumerated on the channel.
2124 	// 0x8003  System reboot required  Returned when the command can be executed only at system power up or when no operating system is present or driver is loaded.
2125 	// 0x8004  Invalid Length  The length of a Type-Length field in the Command is incorrect.
2126 	// 0x8005  Information not available   Returned when the controller is not able to provide the requested information.
2127 	// 0x8006  Unsupported Address type    Returned when the SetAddress command failed because the specified Address Type in the command is not supported.
2128 	// 0x8007  Unsupported Passthru type   Returned when the Set Passthru Control or Get Passthru Control command failed because the specified Passthru Type in the command is not supported.
2129 	// 0x8008  Reached maximum number of allowed ports Returned when OutOfBox WOL is already configured on the maximum number of ports per channel or Device (may be implementation dependent)
2130 	// 0x8009  System reboot required for the changes to be effective  Returned when the command was executed successfully (Response code = 0) but a driver unload or system reboot is required in order for the changes to become effective.
2131 #define NCSI_CMD_OEM_DELL_RSN_CODE_NP_NOT_ENABLED                   0x8000
2132 #define NCSI_CMD_OEM_DELL_RSN_CODE_PARTITION_ID_NOT_ENABLED         0x8001
2133 #define NCSI_CMD_OEM_DELL_RSN_CODE_PARTITION_ID_NOT_ASSOCIATED      0x8002
2134 #define NCSI_CMD_OEM_DELL_RSN_CODE_REBOOT_REQUIRED                  0x8003
2135 #define NCSI_CMD_OEM_DELL_RSN_CODE_INVALID_LENGTH                   0x8004
2136 #define NCSI_CMD_OEM_DELL_RSN_CODE_INFO_NOT_AVAILABLE               0x8005
2137 #define NCSI_CMD_OEM_DELL_RSN_CODE_UNSUPPORTED_ADDR_TYPE            0x8006
2138 #define NCSI_CMD_OEM_DELL_RSN_CODE_UNSUPPORTED_PASSTHRU_TYPE        0x8007
2139 #define NCSI_CMD_OEM_DELL_RSN_CODE_MAX_ALLOW_PORTS_REACHED          0x8008
2140 #define NCSI_CMD_OEM_DELL_RSN_CODE_SYS_REBOOT_REQUIRED              0x8009
2141 #define NCSI_CMD_OEM_DELL_UNSUPPORTED_PAYLOAD_VERSION               0x800a
2142 #define NCSI_CMD_OEM_DELL_HOST_DRIVER_NOT_LOADED                    0x800b
2143 #define NCSI_CMD_OEM_DELL_LINK_CMD_FAILED_HW_ACCESS_ERR             0x800c
2144 #define NCSI_CMD_OEM_DELL_INTERNAL_STORAGE_EXCEEDED                 0x800d
2145 #define NCSI_CMD_OEM_DELL_NVRAM_WRITE_FAILURE                       0x800e
2146 #define NCSI_CMD_OEM_DELL_NVRAM_WRITE_PENDING                       0x800f
2147 #define NCSI_CMD_RSN_CODE_UNK_CMD_TYPE                              0x7FFF
2148 
2149 #define NCSI_CMD_OEM_SPECIFIC_RSN_CODE_TYPE_MASK                          0xFF00
2150 #define NCSI_CMD_OEM_SPECIFIC_RSN_CODE_ERR_MASK                           0x00FF
2151 #define NCSI_CMD_OEM_SPECIFIC_RSN_CODE_MAC_ADDR_INIT_ERR           ((NCSI_CMD_TYPE_ENABLE_CHANNEL_EGRESS_TX << 8) + 0x80)
2152 #define NCSI_CMD_OEM_SPECIFIC_RSN_CODE_VLAN_TAG_INIT_ERR           ((NCSI_CMD_TYPE_ENABLE_VLAN << 8) + 0x81)
2153 } NcsiCmdRspStatus_t;
2154 #elif defined (LITTLE_ENDIAN)
2155 {
2156 	   u16_t   ReasonCode;            /* ids reasons for rsp  */
2157 	   u16_t   ResponseCode;          /* ids outcome of cmd   */
2158 #define NCSI_CMD_RSP_CODE_CMD_UNSUPPORTED                         3
2159 #define NCSI_CMD_RSP_CODE_CMD_UNAVAILABLE                         2
2160 #define NCSI_CMD_RSP_CODE_CMD_FAILED                              1
2161 #define NCSI_CMD_RSP_CODE_CMD_COMPLETED_OK                        0
2162 #define NCSI_CMD_RSN_CODE_NO_ERROR                                0
2163 #define NCSI_CMD_RSN_CODE_INTERFACE_INIT_REQUIRED                 1
2164 #define NCSI_CMD_RSN_CODE_PARAMETER_INVALID_OUT_OF_RANGE          2
2165 #define NCSI_CMD_RSN_CODE_CHANNEL_NOT_READY                       3
2166 #define NCSI_CMD_RSN_CODE_PACKAGE_NOT_READY                       4
2167 #define NCSI_CMD_RSN_CODE_INVALID_PAYLOAD_LENGTH                  5
2168 #define NCSI_CMD_RSN_CODE_VLAN_TAG_OF_0_IS_INVALID                ((NCSI_CMD_TYPE_SET_VLAN_FILTERS << 8) + 7)
2169 #define NCSI_CMD_RSN_CODE_MAC_ADDR_OF_0_IS_INVALID                ((NCSI_CMD_TYPE_SET_MAC_ADDRESS  << 8) + 8)
2170 #define NCSI_CMD_RSN_CODE_ASYNCH_FC_NOT_SUPPORTED                 ((NCSI_CMD_TYPE_SET_NCSI_FLOW_CONTROL << 8) + 9)
2171 #define NCSI_CMD_OEM_GENERIC_RSN_CODE_OS_CONFLICT                   0x80
2172 #define NCSI_CMD_OEM_GENERIC_RSN_CODE_OEM_PAYLOAD_VER_ERR           0x81
2173 
2174 	/* Dell OEM Set Mac Command-specific Reason Code
2175 	0x8000  NIC Partitioning not enabled    Returned when the NIC Partitioning feature is not enabled.
2176 	0x8001  Partition ID not enabled    Returned when the individual partition is not enabled.
2177 	0x8002  Partition ID not associated Returned when the Partition ID is not one of the partitions enumerated on the channel.
2178 	0x8003  System reboot required  Returned when the command can be executed only at system power up or when no operating system is present or driver is loaded.
2179 	0x8004  Invalid Length  The length of a Type-Length field in the Command is incorrect.
2180 	0x8005  Information not available   Returned when the controller is not able to provide the requested information.
2181 	0x8006  Unsupported Address type    Returned when the SetAddress command failed because the specified Address Type in the command is not supported.
2182 	0x8007  Unsupported Passthru type   Returned when the Set Passthru Control or Get Passthru Control command failed because the specified Passthru Type in the command is not supported.
2183 	0x8008  Reached maximum number of allowed ports Returned when OutOfBox WOL is already configured on the maximum number of ports per channel or Device (may be implementation dependent)
2184 	0x8009  System reboot required for the changes to be effective  Returned when the command was executed successfully (Response code = 0) but a driver unload or system reboot is required in order for the changes to become effective.
2185 	0x800A  Returned when the Ethernet or FC controller does not support the Payload Version specified in the incoming OEM command. Note: This Reason code does not apply to the Get Supported Payload Version command
2186 	0x800B  Returned when the command is unable to be successfully executed because there is no OS driver loaded
2187 	0x800D  Returned when there is insufficient storage to store parameters to be written to NVRAM
2188 	0x800E  Returned when there is a failure in the NVRAM write operation
2189 	0x800F  Returned when the NVRAM write operation is not complete
2190 	*/
2191 #define NCSI_CMD_OEM_DELL_RSN_CODE_NP_NOT_ENABLED                   0x8000
2192 #define NCSI_CMD_OEM_DELL_RSN_CODE_PARTITION_ID_NOT_ENABLED         0x8001
2193 #define NCSI_CMD_OEM_DELL_RSN_CODE_PARTITION_ID_NOT_ASSOCIATED      0x8002
2194 #define NCSI_CMD_OEM_DELL_RSN_CODE_REBOOT_REQUIRED                  0x8003
2195 #define NCSI_CMD_OEM_DELL_RSN_CODE_INVALID_LENGTH                   0x8004
2196 #define NCSI_CMD_OEM_DELL_RSN_CODE_INFO_NOT_AVAILABLE               0x8005
2197 #define NCSI_CMD_OEM_DELL_RSN_CODE_UNSUPPORTED_ADDR_TYPE            0x8006
2198 #define NCSI_CMD_OEM_DELL_RSN_CODE_UNSUPPORTED_PASSTHRU_TYPE        0x8007
2199 #define NCSI_CMD_OEM_DELL_RSN_CODE_MAX_ALLOW_PORTS_REACHED          0x8008
2200 #define NCSI_CMD_OEM_DELL_RSN_CODE_SYS_REBOOT_REQUIRED              0x8009
2201 #define NCSI_CMD_OEM_DELL_UNSUPPORTED_PAYLOAD_VERSION               0x800A
2202 #define NCSI_CMD_OEM_DELL_HOST_DRIVER_NOT_LOADED                    0x800B
2203 #define NCSI_CMD_OEM_DELL_INTERNAL_STORAGE_EXCEEDED                 0x800D
2204 #define NCSI_CMD_OEM_DELL_NVRAM_WRITE_FAILURE                       0x800E
2205 #define NCSI_CMD_OEM_DELL_NVRAM_WRITE_PENDING                       0x800F
2206 #define NCSI_CMD_RSN_CODE_UNK_CMD_TYPE                            0x7FFF
2207 
2208 #define NCSI_CMD_OEM_SPECIFIC_RSN_CODE_TYPE_MASK                          0xFF00
2209 #define NCSI_CMD_OEM_SPECIFIC_RSN_CODE_ERR_MASK                           0x00FF
2210 #define NCSI_CMD_OEM_SPECIFIC_RSN_CODE_MAC_ADDR_INIT_ERR           ((NCSI_CMD_TYPE_ENABLE_CHANNEL_EGRESS_TX << 8) + 0x80)
2211 #define NCSI_CMD_OEM_SPECIFIC_RSN_CODE_VLAN_TAG_INIT_ERR           ((NCSI_CMD_TYPE_ENABLE_VLAN << 8) + 0x81)
2212 }
2213    NcsiCmdRspStatus_t;
2214 #endif // ENDIAN
2215 
2216 
2217 typedef struct OemDefaultReturnData
2218 {
2219 	BrcmOemCmdRspHeader_t     BrcmOemCmdRspHeader;
2220 
2221 } OemDefaultReturnData_t;
2222 
2223 /*****************************************************************************
2224 
2225 NcsiDefaultOemCmdRspData_t
2226 
2227     this structure definition is for the data fields of the rsp frm Payload
2228     returned in response to the OEM cmd.
2229 
2230 *****************************************************************************/
2231 typedef struct NcsiDefaultOemCmdRspData
2232 #if defined (BIG_ENDIAN)
2233 {
2234 
2235 	u16_t                ResponseCode;          /* ids outcome of cmd   */
2236 	u16_t                ReasonCode;            /* ids reasons for rsp  */
2237 
2238 	u32_t                ManufacturerId;        /* ManufacturerId IANA */
2239 	OemDefaultReturnData_t  ReturnData;
2240 
2241 } NcsiDefaultOemCmdRspData_t;
2242 #elif defined (LITTLE_ENDIAN)
2243 {
2244 
2245 	   u16_t                ReasonCode;            /* ids reasons for rsp  */
2246 	   u16_t                ResponseCode;          /* ids outcome of cmd   */
2247 
2248 	   u32_t                ManufacturerId;        /* ManufacturerId IANA */
2249 	   OemDefaultReturnData_t  ReturnData;
2250 
2251 }
2252    NcsiDefaultOemCmdRspData_t;
2253 #endif // ENDIAN
2254 
2255 
2256 typedef struct OemTestReturnData
2257 {
2258 	BrcmOemCmdRspHeader_t      BrcmOemCmdRspHeader;
2259 
2260 	u32_t        OemPayload[33];
2261 
2262 } OemTestReturnData_t;
2263 
2264 /*****************************************************************************
2265 
2266 NcsiCmdNcsiTestReadCmdRspData_t
2267 
2268     this structure definition is for the data fields of the rsp frm Payload
2269     returned in response to the NCSI Test OEM cmd.
2270 
2271 *****************************************************************************/
2272 typedef struct NcsiCmdNcsiTestReadCmdRspData
2273 #if defined (BIG_ENDIAN)
2274 {
2275 
2276 	u16_t                ResponseCode;          /* ids outcome of cmd   */
2277 	u16_t                ReasonCode;            /* ids reasons for rsp  */
2278 	u32_t                ManufacturerId;        /* ManufacturerId IANA */
2279 	OemTestReturnData_t     ReturnData;
2280 
2281 } NcsiCmdNcsiTestReadCmdRspData_t;
2282 #elif defined (LITTLE_ENDIAN)
2283 {
2284 
2285 	   u16_t                ReasonCode;            /* ids reasons for rsp  */
2286 	   u16_t                ResponseCode;          /* ids outcome of cmd   */
2287 	   u32_t                ManufacturerId;         /* ManufacturerId IANA */
2288 	   OemTestReturnData_t     ReturnData;
2289 
2290 }
2291    NcsiCmdNcsiTestReadCmdRspData_t;
2292 #endif // ENDIAN
2293 
2294 typedef struct NcsiOemGetNcsiParametersPayload
2295 #if defined (BIG_ENDIAN)
2296 {
2297 	u32_t        NcsiFwVersionNumber;
2298 	u32_t        BootcodeVersionNumber;
2299 	u32_t        PxeBootVersionNumber;
2300 	u32_t        IScsiBootVersionNumber;
2301 	u32_t        OemLinkSettings;
2302 
2303 	u16_t        HostMacAddrHigh;
2304 	u16_t        HostMacAddrMiddle;
2305 	u16_t        HostMacAddrLow;
2306 
2307 	u16_t        HostVirtualL2MacAddrHigh;
2308 	u16_t        HostVirtualL2MacAddrMiddle;
2309 	u16_t        HostVirtualL2MacAddrLow;
2310 
2311 	u16_t        HostIscsiMacAddrHigh;
2312 	u16_t        HostIscsiMacAddrMiddle;
2313 	u16_t        HostIscsiMacAddrLow;
2314 
2315 	u16_t        HostVirtualIscsiMacAddrHigh;
2316 	u16_t        HostVirtualIscsiMacAddrMiddle;
2317 	u16_t        HostVirtualIscsiMacAddrLow;
2318 
2319 	// UmpMacAddr_t    HostMacAddr;
2320 	// UmpMacAddr_t    HostVirtualL2MacAddr;
2321 	// UmpMacAddr_t    HostIscsiMacAddr;
2322 	// UmpMacAddr_t    HostVirtualIscsiMacAddr;
2323 }NcsiOemGetNcsiParametersPayload_t;
2324 #elif defined (LITTLE_ENDIAN)
2325 {
2326 	   u32_t        NcsiFwVersionNumber;
2327 	   u32_t        BootcodeVersionNumber;
2328 	   u32_t        PxeBootVersionNumber;
2329 	   u32_t        IScsiBootVersionNumber;
2330 	   u32_t        OemLinkSettings;
2331 
2332 	   u16_t        HostMacAddrMiddle;
2333 	   u16_t        HostMacAddrHigh;
2334 
2335 	   u16_t        HostVirtualL2MacAddrHigh;
2336 	   u16_t        HostMacAddrLow;
2337 	   u16_t        HostVirtualL2MacAddrLow;
2338 	   u16_t        HostVirtualL2MacAddrMiddle;
2339 
2340 	   u16_t        HostIscsiMacAddrMiddle;
2341 	   u16_t        HostIscsiMacAddrHigh;
2342 
2343 	   u16_t        HostVirtualIscsiMacAddrHigh;
2344 	   u16_t        HostIscsiMacAddrLow;
2345 	   u16_t        HostVirtualIscsiMacAddrLow;
2346 	   u16_t        HostVirtualIscsiMacAddrMiddle;
2347 
2348 	// UmpMacAddr_t    HostMacAddr;
2349 	// UmpMacAddr_t    HostVirtualL2MacAddr;
2350 	// UmpMacAddr_t    HostIscsiMacAddr;
2351 	// UmpMacAddr_t    HostVirtualIscsiMacAddr;
2352 }
2353    NcsiOemGetNcsiParametersPayload_t;
2354 #endif // ENDIAN
2355 
2356 
2357 #define NCSI_CMD_GET_NCSI_PARAM_RSP_PAYLOAD_VERSION     0
2358 typedef struct NcsiOemGetNcsiParametersReturnData
2359 {
2360 	BrcmOemCmdRspHeader_t      BrcmOemCmdRspHeader;
2361 	NcsiOemGetNcsiParametersPayload_t  OemPayload;
2362 
2363 } NcsiOemGetNcsiParametersReturnData_t;
2364 
2365 #define NCSI_CMD_GET_PHY_PRIORITY_RSP_PAYLOAD_VERSION     0
2366 typedef struct NcsiOemGetDualMediaParametersReturnData
2367 {
2368 	BrcmOemCmdRspHeader_t      BrcmOemCmdRspHeader;
2369 	NcsiOemGetDualMediaParametersPayload_t  OemPayload;
2370 
2371 } NcsiOemGetDualMediaParametersReturnData_t;
2372 
2373 
2374 
2375 /*****************************************************************************
2376 
2377 NcsiOemGetNcsiParametersRspData_t
2378 
2379     this structure definition is for the data fields of the rsp frm Payload
2380     returned in response to the  OEM cmds.
2381 
2382 *****************************************************************************/
2383 typedef struct NcsiOemGetNcsiParametersRspData
2384 {
2385 #if defined (BIG_ENDIAN)
2386 	u16_t                            ResponseCode;          /* ids outcome of cmd   */
2387 	u16_t                            ReasonCode;            /* ids reasons for rsp  */
2388 #elif defined (LITTLE_ENDIAN)
2389 	u16_t                            ReasonCode;            /* ids reasons for rsp  */
2390 	u16_t                            ResponseCode;          /* ids outcome of cmd   */
2391 #endif // endian
2392 	u32_t                            ManufacturerId;         /* ManufacturerId IANA */
2393 	NcsiOemGetNcsiParametersReturnData_t    ReturnData;
2394 
2395 } NcsiOemGetNcsiParametersRspData_t;
2396 
2397 /*****************************************************************************
2398 
2399 NcsiOemGetDualMediaParametersRspData_t
2400 
2401     this structure definition is for the data fields of the rsp frm Payload
2402     returned in response to the  OEM cmds.
2403 
2404 *****************************************************************************/
2405 typedef struct NcsiOemGetDualMediaParametersRspData
2406 {
2407 #if defined (BIG_ENDIAN)
2408 	u16_t                            ResponseCode;          /* ids outcome of cmd   */
2409 	u16_t                            ReasonCode;            /* ids reasons for rsp  */
2410 #elif defined (LITTLE_ENDIAN)
2411 	u16_t                            ReasonCode;            /* ids reasons for rsp  */
2412 	u16_t                            ResponseCode;          /* ids outcome of cmd   */
2413 #endif // endian
2414 	u32_t                            ManufacturerId;        /* ManufacturerId IANA */
2415 	NcsiOemGetDualMediaParametersReturnData_t    ReturnData;
2416 
2417 } NcsiOemGetDualMediaParametersRspData_t;
2418 
2419 
2420 
2421 
2422 
2423 
2424 /*****************************************************************************
2425 
2426 NcsiCmdGetParametersRspData_t
2427 
2428     this structure definition is for the data fields of the rsp frm Payload
2429     returned in response to the get parameters ump cmd.
2430 
2431 *****************************************************************************/
2432 typedef struct NcsiCmdGetParametersRspData
2433 #if defined (BIG_ENDIAN)
2434 {
2435 
2436 	u16_t        ResponseCode;          /* ids outcome of cmd   */
2437 	u16_t        ReasonCode;            /* ids reasons for rsp  */
2438 	u8_t         MacAddrCount;
2439 	u8_t         Reserved0[2];
2440 	u8_t         MacAddrFlags;
2441 
2442 	u8_t         VlanTagCount;
2443 	u8_t         Reserved1;
2444 	u16_t        VlanTagFlags;
2445 
2446 	u32_t        LinkSettings;
2447 
2448 	u32_t        BroadcastFilterSettings;
2449 	u32_t        ConfigurationFlags;
2450 
2451 	u8_t         VlanMode;
2452 	u8_t         FcEnable;
2453 	u16_t        Reserved2;
2454 	u32_t        AenControl;
2455 
2456 	NcsiMacAddr_t   Mac[NCSI_MAC_ADDRESS_MAX];
2457 
2458 
2459 	u16_t        VlanTag[NCSI_VLAN_TAG_COUNT];
2460 
2461 
2462 }NcsiCmdGetParametersRspData_t;
2463 #elif defined (LITTLE_ENDIAN)
2464 {
2465 
2466 	   u16_t        ReasonCode;            /* ids reasons for rsp  */
2467 	   u16_t        ResponseCode;          /* ids outcome of cmd   */
2468 	   u8_t         MacAddrFlags;
2469 	   u8_t         Reserved0[2];
2470 	   u8_t         MacAddrCount;
2471 
2472 	   u16_t        VlanTagFlags;
2473 	   u8_t         Reserved1;
2474 	   u8_t         VlanTagCount;
2475 
2476 	   u32_t        LinkSettings;
2477 
2478 	   u32_t        BroadcastFilterSettings;
2479 	   u32_t        ConfigurationFlags;
2480 
2481 	   u16_t        Reserved2;
2482 	   u8_t         FcEnable;
2483 	   u8_t         VlanMode;
2484 	   u32_t        AenControl;
2485 
2486 	   NcsiMacAddr_t   Mac[NCSI_MAC_ADDRESS_MAX];
2487 
2488 
2489 
2490 
2491 	   u16_t        VlanTag[NCSI_VLAN_TAG_COUNT];
2492 }
2493    NcsiCmdGetParametersRspData_t;
2494 #endif // endian
2495 
2496 
2497 /*****************************************************************************
2498 
2499 
2500 *****************************************************************************/
2501 
2502 typedef struct NcsiCmdGetCapabilitiesRspData
2503 #if defined (BIG_ENDIAN)
2504 {
2505 
2506 	u16_t   ResponseCode;          /* ids outcome of cmd   */
2507 	u16_t   ReasonCode;         /* ids reasons for rsp  */
2508 
2509 	u32_t    Flags;
2510 #define NCSI_CMD_GET_CAPABILITY_RSP_PAYLOAD_CAPABILITY_FLAG_HW_ARBITRATION    0x01
2511 #define NCSI_CMD_GET_CAPABILITY_RSP_PAYLOAD_CAPABILITY_FLAG_OS_AWARENESS      0x02
2512 #define NCSI_CMD_GET_CAPABILITY_RSP_PAYLOAD_CAPABILITY_FLAG_TX_FLOWCONTROL    0x04
2513 #define NCSI_CMD_GET_CAPABILITY_RSP_PAYLOAD_CAPABILITY_FLAG_RX_FLOWCONTROL    0x08
2514 #define NCSI_CMD_GET_CAPABILITY_RSP_PAYLOAD_CAPABILITY_FLAG_MULTICAST_SUPPORT 0x10
2515 
2516 	u32_t    BroadcastFiltering;
2517 	u32_t    MulticastFiltering;
2518 	u32_t    IngressBuffering;
2519 	u32_t    AenControl;
2520 	u8_t     VlanFilterCount;
2521 	u8_t     MixedMacFilterCount;
2522 	u8_t     MulticastFilterCount;
2523 	u8_t     UnicastFilterCount;
2524 	u16_t    Reserved0;
2525 	u8_t     VlanModes;
2526 #define NCSI_CMD_GET_CAPABILITY_RSP_PAYLOAD_VLAN_MODE_VLAN_ONLY         0x01
2527 #define NCSI_CMD_GET_CAPABILITY_RSP_PAYLOAD_VLAN_MODE_VLAN_NON_VLAN     0x02
2528 #define NCSI_CMD_GET_CAPABILITY_RSP_PAYLOAD_VLAN_MODE_PROMISCUOUS_VLAN  0x04
2529 
2530 
2531 	u8_t     ChannelCount;
2532 
2533 } NcsiCmdGetCapabilitiesRspData_t;
2534 #elif defined (LITTLE_ENDIAN)
2535 {
2536 
2537 	   u16_t   ReasonCode;         /* ids reasons for rsp  */
2538 	   u16_t   ResponseCode;          /* ids outcome of cmd   */
2539 
2540 	   u32_t    Flags;
2541 #define NCSI_CMD_GET_CAPABILITY_RSP_PAYLOAD_CAPABILITY_FLAG_HW_ARBITRATION    0x01
2542 #define NCSI_CMD_GET_CAPABILITY_RSP_PAYLOAD_CAPABILITY_FLAG_OS_AWARENESS      0x02
2543 #define NCSI_CMD_GET_CAPABILITY_RSP_PAYLOAD_CAPABILITY_FLAG_TX_FLOWCONTROL    0x04
2544 #define NCSI_CMD_GET_CAPABILITY_RSP_PAYLOAD_CAPABILITY_FLAG_RX_FLOWCONTROL    0x08
2545 #define NCSI_CMD_GET_CAPABILITY_RSP_PAYLOAD_CAPABILITY_FLAG_MULTICAST_SUPPORT 0x10
2546 
2547 	   u32_t    BroadcastFiltering;
2548 	   u32_t    MulticastFiltering;
2549 	   u32_t    IngressBuffering;
2550 	   u32_t    AenControl;
2551 	   u8_t     UnicastFilterCount;
2552 	   u8_t     MulticastFilterCount;
2553 	   u8_t     MixedMacFilterCount;
2554 	   u8_t     VlanFilterCount;
2555 
2556 
2557 	   u8_t     ChannelCount;
2558 	   u8_t     VlanModes;
2559 #define NCSI_CMD_GET_CAPABILITY_RSP_PAYLOAD_VLAN_MODE_PROMISCUOUS_VLAN  0x04
2560 #define NCSI_CMD_GET_CAPABILITY_RSP_PAYLOAD_VLAN_MODE_VLAN_NON_VLAN     0x02
2561 #define NCSI_CMD_GET_CAPABILITY_RSP_PAYLOAD_VLAN_MODE_VLAN_ONLY         0x01
2562 	   u16_t    Reserved0;
2563 
2564 }
2565    NcsiCmdGetCapabilitiesRspData_t;
2566 #endif // endian
2567 
2568 /*****************************************************************************
2569 
2570 NcsiCmdGetLinkStatusRspData_t
2571 
2572     this structure definition is for the data field portion of the response
2573     Payload returned when processing the get link status ump cmd.
2574 
2575 *****************************************************************************/
2576 typedef struct NcsiCmdGetLinkStatusRspData
2577 {
2578 #if defined (BIG_ENDIAN)
2579 	u16_t                            ResponseCode;          /* ids outcome of cmd   */
2580 	u16_t                            ReasonCode;            /* ids reasons for rsp  */
2581 #elif defined (LITTLE_ENDIAN)
2582 	u16_t                            ReasonCode;            /* ids reasons for rsp  */
2583 	u16_t                            ResponseCode;          /* ids outcome of cmd   */
2584 #endif // endian
2585 	u32_t   LinkState;
2586 #define LINK_STATUS_LINK_MASK                                                    (1<<0)
2587 #define LINK_STATUS_LINK_ENABLED                                                 (1<<0)
2588 #define LINK_STATUS_LINK_SPEED_DUPLEX_NO_HCD                                     (0<<0)
2589 #define LINK_STATUS_LINK_SPEED_AND_DUPLEX_MASK                                   (0xF<<1)
2590 #define LINK_STATUS_LINK_SPEED_DUPLEX_10BASE_T_HD                                (1<<1)
2591 #define LINK_STATUS_LINK_SPEED_DUPLEX_10BASE_T_FD                                (2<<1)
2592 #define LINK_STATUS_LINK_SPEED_DUPLEX_100BASE_TX_HD                              (3<<1)
2593 #define LINK_STATUS_LINK_SPEED_DUPLEX_100BASE_TX_FD                              (5<<1)
2594 #define LINK_STATUS_LINK_SPEED_DUPLEX_1000BASE_T_FD                              (7<<1)
2595 #define LINK_STATUS_LINK_SPEED_DUPLEX_UMP_2_5GB_HD                               (8<<1)
2596 #define LINK_STATUS_LINK_SPEED_DUPLEX_UMP_2_5GB_FD                               (9<<1)
2597 #define LINK_STATUS_LINK_SPEED_DUPLEX_UMP_10GBASE_T                              (10<<1)
2598 #define LINK_STATUS_LINK_SPEED_DUPLEX_NCSI_10GBASE_T                             (8<<1)
2599 #define LINK_STATUS_AUTO_NEG_ENABLED                                             (1<<5)
2600 #define LINK_STATUS_AUTO_NEG_COMPLETE                                            (1<<6)
2601 #define LINK_STATUS_PARALLEL_DETECTION                                           (1<<7)
2602 #define LINK_STATUS_LINK_PARTNER_ADVERTIZED_PAUSE_FC_CAPABLE                     (1<<8)
2603 #define LINK_STATUS_LINK_PARTNER_ADVERTIZED_SPEED_DUPLEX_1000BASE_T_FD           (1<<9)
2604 #define LINK_STATUS_LINK_PARTNER_ADVERTIZED_SPEED_DUPLEX_1000BASE_T_HD           (1<<10)
2605 #define LINK_STATUS_LINK_PARTNER_ADVERTIZED_SPEED_DUPLEX_100BASE_TX_FD           (1<<12)
2606 #define LINK_STATUS_LINK_PARTNER_ADVERTIZED_SPEED_DUPLEX_100BASE_TX_HD           (1<<13)
2607 #define LINK_STATUS_LINK_PARTNER_ADVERTIZED_SPEED_DUPLEX_10BASE_T_FD             (1<<14)
2608 #define LINK_STATUS_LINK_PARTNER_ADVERTIZED_SPEED_DUPLEX_10BASE_T_HD             (1<<15)
2609 #define LINK_STATUS_TX_FC_ENABLED                                                (1<<16)
2610 #define LINK_STATUS_RX_FC_ENABLED                                                (1<<17)
2611 #define LINK_STATUS_LINK_PARTNER_ADVERTIZED_FC_1000X_MASK                    (3<<18)
2612 #define LINK_STATUS_LINK_PARTNER_ADVERTIZED_FC_1000X_NO_PAUSE                    (0<<18)
2613 #define LINK_STATUS_LINK_PARTNER_ADVERTIZED_FC_1000X_SYM_PAUSE                   (1<<18)
2614 #define LINK_STATUS_LINK_PARTNER_ADVERTIZED_FC_1000X_ASYM_PAUSE_TO_PARTNER       (2<<18)
2615 #define LINK_STATUS_LINK_PARTNER_ADVERTIZED_FC_1000X_SYM_ASYM_PAUSE_TO_PARTNER   (3<<18)
2616 
2617 #define LINK_STATUS_SERDES_FLAG                                                  (1<<20)
2618 #define LINK_STATUS_OEM_LINK_SPEED_VALID_FLAG                                    (1<<21)
2619 
2620 
2621 	u32_t   OtherIndications;
2622 	u32_t   OemLinkSpeed;
2623 #define LINK_STATUS_LINK_SPEED_DUPLEX_NCSI_2_5GB_HD                              (1<<0)
2624 #define LINK_STATUS_LINK_SPEED_DUPLEX_NCSI_2_5GB_FD                              (1<<1)
2625 
2626 } NcsiCmdGetLinkStatusRspData_t;
2627 
2628 /*****************************************************************************
2629 
2630 NcsiCmdGetNcsiStatisticsRspData_t
2631 
2632     this structure defines the data field portion of the response Payload
2633     returned when processing the get ncsi statistics cmd.
2634 
2635 *****************************************************************************/
2636 typedef struct NcsiCmdGetNcsiStatisticsRspData
2637 {
2638 #if defined (BIG_ENDIAN)
2639 	u16_t                            ResponseCode;          /* ids outcome of cmd   */
2640 	u16_t                            ReasonCode;            /* ids reasons for rsp  */
2641 #elif defined (LITTLE_ENDIAN)
2642 	u16_t                            ReasonCode;            /* ids reasons for rsp  */
2643 	u16_t                            ResponseCode;          /* ids outcome of cmd   */
2644 #endif // endian
2645 
2646 	u32_t   CommandPktsRx;               // ncsi cmds rx and processed
2647 	u32_t   TotalCommandPktsDropped;     // total ncsi cmds dropped
2648 	u32_t   CommandPktsDroppedTypeError; // ncsi cmds dropped for type error
2649 	u32_t   CommandPktsDroppedCsError;   // ncsi cmds dropped for checksum error
2650 	u32_t   TotalControlPktsRx;          // total ncsi cmds rx, processed + dropped
2651 	u32_t   TotalControlPktsTx;          // total ncsi pkts sent, AEN + rsp
2652 	u32_t   TotalAensSent;               //
2653 
2654 } NcsiCmdGetNcsiStatisticsRspData_t;
2655 
2656 typedef NcsiCmdGetNcsiStatisticsRspData_t *pNcsiCmdGetNcsiStatisticsRspData_t;
2657 
2658 
2659 /*****************************************************************************
2660 
2661 NcsiCmdGetNcsiPassThruStatisticsRspData_t
2662 
2663     this structure defines the data field portion of the response Payload
2664     returned when processing the get ncsi pass through statistics  cmd.
2665 
2666 *****************************************************************************/
2667 typedef struct NcsiCmdGetNcsiPassThruStatisticsRspData
2668 {
2669 #if defined (BIG_ENDIAN)
2670 	u16_t                            ResponseCode;          /* ids outcome of cmd   */
2671 	u16_t                            ReasonCode;            /* ids reasons for rsp  */
2672 #elif defined (LITTLE_ENDIAN)
2673 	u16_t                            ReasonCode;            /* ids reasons for rsp  */
2674 	u16_t                            ResponseCode;          /* ids outcome of cmd   */
2675 #endif // endian
2676 
2677 	u32_t   TotalEgressPktsHigh;
2678 	u32_t   TotalEgressPktsLow;
2679 	u32_t   TotalEgressPktsDropped;
2680 	u32_t   EgressPktsDroppedChannelStateError;
2681 	u32_t   EgressPktsDroppedUndersizedError;
2682 	u32_t   EgressPktsDroppedOversizedError;
2683 	u32_t   TotalIngressPkts;
2684 	u32_t   TotalIngressPktsDropped;
2685 	u32_t   IngressPktsDroppedChannelStateError;
2686 	u32_t   IngressPktsDroppedUndersizedError;
2687 	u32_t   IngressPktsDroppedOversizedError;
2688 
2689 } NcsiCmdGetNcsiPassThruStatisticsRspData_t;
2690 
2691 typedef NcsiCmdGetNcsiPassThruStatisticsRspData_t *pNcsiCmdGetNcsiPassThruStatisticsRspData_t;
2692 
2693 
2694 typedef struct NcsiNicEmacStats
2695 {
2696 
2697 	u32_t   TotalBytesRx_High;
2698 	u32_t   TotalBytesRx_Low;
2699 	u32_t   TotalBytesTx_High;
2700 	u32_t   TotalBytesTx_Low;
2701 	u32_t   TotalUnicastPktsRx_High;
2702 	u32_t   TotalUnicastPktsRx_Low;
2703 	u32_t   TotalMulticastPktsRx_High;
2704 	u32_t   TotalMulticastPktsRx_Low;
2705 	u32_t   TotalBroadcastPktsRx_High;
2706 	u32_t   TotalBroadcastPktsRx_Low;
2707 	u32_t   TotalUnicastPktsTx_High;
2708 	u32_t   TotalUnicastPktsTx_Low;
2709 	u32_t   TotalMulticastPktsTx_High;
2710 	u32_t   TotalMulticastPktsTx_Low;
2711 	u32_t   TotalBroadcastPktsTx_High;
2712 	u32_t   TotalBroadcastPktsTx_Low;
2713 	u32_t   CrcRxErrors;
2714 	u32_t   AlignmentErrors;
2715 	u32_t   FalseCarrierDetects;
2716 	u32_t   RuntPktsRx;
2717 	u32_t   JabberPktsRx;
2718 	u32_t   PauseXonFramesRx;
2719 	u32_t   PauseXoffFramesRx;
2720 	u32_t   PauseXonFramesTx;
2721 	u32_t   PauseXoffFramesTx;
2722 	u32_t   SingleCollisionTxFrames;
2723 	u32_t   MultipleCollisionTxFrames;
2724 	u32_t   LateCollisionFrames;
2725 	u32_t   ExcessiveCollisionFrames;
2726 	u32_t   ControlFramesRx;
2727 	u32_t   FramesRx64Byte;
2728 	u32_t   FramesRx65_127Bytes;
2729 	u32_t   FramesRx128_255Bytes;
2730 	u32_t   FramesRx256_511Bytes;
2731 	u32_t   FramesRx512_1023Bytes;
2732 	u32_t   FramesRx1024_1522Bytes;
2733 	u32_t   FramesRx1523_9022Bytes;
2734 	u32_t   FramesTx64Byte;
2735 	u32_t   FramesTx65_127Bytes;
2736 	u32_t   FramesTx128_255Bytes;
2737 	u32_t   FramesTx256_511Bytes;
2738 	u32_t   FramesTx512_1023Bytes;
2739 	u32_t   FramesTx1024_1522Bytes;
2740 	u32_t   FramesTx1523_9022Bytes;
2741 	u32_t   ValidBytesRx_High;
2742 	u32_t   ValidBytesRx_Low;
2743 	u32_t   ErrorRuntPktsRx;
2744 	u32_t   ErrorJabberPktsRx;
2745 
2746 } NcsiNicEmacStats_t;
2747 
2748 typedef NcsiNicEmacStats_t *pNcsiNicEmacStats_t;
2749 
2750 
2751 /*****************************************************************************
2752 
2753 NcsiCmdGetPortStatisticsRspData_t
2754 
2755     this structure defines the data field portion of the response Payload
2756     returned when processing the get ump i/f statistics ump cmd.
2757 
2758 *****************************************************************************/
2759 typedef struct NcsiCmdGetPortStatisticsRspData
2760 {
2761 #if defined (BIG_ENDIAN)
2762 	u16_t                            ResponseCode;          /* ids outcome of cmd   */
2763 	u16_t                            ReasonCode;            /* ids reasons for rsp  */
2764 #elif defined (LITTLE_ENDIAN)
2765 	u16_t                            ReasonCode;            /* ids reasons for rsp  */
2766 	u16_t                            ResponseCode;          /* ids outcome of cmd   */
2767 #endif // endian
2768 
2769 	u32_t   CountersClearedHigh;
2770 	u32_t   CountersClearedLow;
2771 
2772 	NcsiNicEmacStats_t  Stats;
2773 
2774 } NcsiCmdGetPortStatisticsRspData_t;
2775 
2776 typedef NcsiCmdGetPortStatisticsRspData_t *pNcsiCmdGetPortStatisticsRspData_t;
2777 
2778 
2779 /*****************************************************************************
2780 
2781 NcsiCmdGetControllerVerIdRspData_t
2782 
2783     this structure definition is for the data fields of the response Payload
2784     returned used processing the get bcm version ID ump cmd.
2785 
2786 *****************************************************************************/
2787 #define GET_NIC_VER_ID_SIZE_OF_FW_NAME 12
2788 typedef struct NcsiCmdGetControllerVerIdRspData
2789 #if defined (BIG_ENDIAN)
2790 {
2791 
2792 	u16_t   ResponseCode;         /* ids outcome of cmd   */
2793 	u16_t   ReasonCode;         /* ids reasons for rsp  */
2794 
2795 	NcsiVersion_t   NcsiVersion;
2796 	u8_t    FirmwareName[GET_NIC_VER_ID_SIZE_OF_FW_NAME];
2797 	u32_t   FirmwareRev;
2798 
2799 	u16_t   PciDeviceId;
2800 	u16_t   PciVendorId;
2801 	u16_t   PciSubsystemId;
2802 	u16_t   PciSubsystemVendorId;
2803 
2804 	u32_t   ManufacturerId;      /* ManufacturerId IANA */
2805 
2806 } NcsiCmdGetControllerVerIdRspData_t;
2807 #elif defined (LITTLE_ENDIAN)
2808 {
2809 
2810 	   u16_t   ReasonCode;         /* ids reasons for rsp  */
2811 	   u16_t   ResponseCode;         /* ids outcome of cmd   */
2812 
2813 	   NcsiVersion_t   NcsiVersion;
2814 /*    u8_t    Major;
2815     u8_t    Reserved0;
2816     u8_t    Alpha1;
2817     u8_t    Update;
2818     u8_t    Minor;
2819 */
2820 	   u8_t    FirmwareName[12];
2821 	   u8_t    Alpha2;
2822 	   u8_t    Reserved2;
2823 	   u8_t    Reserved1;
2824 	   u32_t   FirmwareRev;
2825 
2826 	   u16_t   PciVendorId;
2827 	   u16_t   PciDeviceId;
2828 	   u16_t   PciSubsystemVendorId;
2829 	   u16_t   PciSubsystemId;
2830 
2831 	   u32_t   ManufacturerId;    /* ManufacturerId IANA */
2832 
2833 }
2834    NcsiCmdGetControllerVerIdRspData_t;
2835 #endif // endian
2836 
2837 #define NCSI_CMD_SIZEOF_DEFAULT_RSP_DATA                            (sizeof (NcsiCmdRspStatus_t))
2838 #define NCSI_CMD_SIZEOF_GET_PARAMS_RSP_DATA                         (sizeof (NcsiCmdGetParametersRspData_t))
2839 #define NCSI_CMD_SIZEOF_GET_LINK_STATUS_RSP_DATA                    (sizeof (NcsiCmdGetLinkStatusRspData_t))
2840 #define NCSI_CMD_SIZEOF_GET_STATS_RSP_DATA                          (sizeof (NcsiCmdGetPortStatisticsRspData_t))
2841 #define NCSI_CMD_SIZEOF_GET_CNTLR_VER_ID_RSP_DATA                     (sizeof (NcsiCmdGetControllerVerIdRspData_t))
2842 #define NCSI_CMD_SIZEOF_GET_NCSI_STATS_RSP_DATA                     (sizeof (NcsiCmdGetNcsiStatisticsRspData_t))
2843 #define NCSI_CMD_SIZEOF_GET_CAPABILITY_RSP_DATA                     (sizeof (NcsiCmdGetCapabilitiesRspData_t))
2844 #define NCSI_CMD_SIZEOF_GET_NCSI_PASSTHRU_STATS_RSP_DATA            (sizeof (NcsiCmdGetNcsiPassThruStatisticsRspData_t))
2845 #define NCSI_CMD_SIZEOF_DEFAULT_OEM_CMD_RSP_DATA                    (sizeof (NcsiDefaultOemCmdRspData_t))
2846 #define NCSI_CMD_SIZEOF_DEFAULT_DELL_OEM_CMD_RSP_DATA               (sizeof(DellDfltCmdRspData_t))   // response/reason code, Manufacture ID, payload ver, Cmd ID, .. )
2847 #define NCSI_CMD_SIZEOF_GET_NCSI_PARAMETERS_RSP_DATA                (sizeof (NcsiOemGetNcsiParametersRspData_t))
2848 #define NCSI_CMD_SIZEOF_NCSI_TEST_READ_CMD_RSP_DATA                 (sizeof (NcsiCmdNcsiTestReadCmdRspData_t))
2849 #define NCSI_CMD_SIZEOF_GET_PHY_PRIORITY_CMD_RSP_DATA               (sizeof (NcsiOemGetDualMediaParametersRspData_t))
2850 
2851 
2852 
2853 /*****************************************************************************
2854 
2855 NcsiCmdDefaultRspPayload_t
2856 
2857     Structure definition for most basic UMP response Payload
2858 
2859 *****************************************************************************/
2860 typedef struct NcsiCmdDefaultRspPayload
2861 {
2862 	NcsiCmdRspStatus_t     Data;
2863 	u32_t               ChecksumCompensation;
2864 
2865 } NcsiCmdDefaultRspPayload_t;
2866 typedef NcsiCmdDefaultRspPayload_t *pNcsiCmdDefaultRspPayload_t;
2867 
2868 
2869 
2870 
2871 
2872 /*****************************************************************************
2873 
2874 NcsiDefaultOemCmdRspPayload_t
2875 
2876     this structure defines the response Payload returned after processing
2877     the Oem cmd.
2878 
2879 *****************************************************************************/
2880 typedef struct NcsiDefaultOemCmdRspPayload
2881 {
2882 	NcsiDefaultOemCmdRspData_t   Data;
2883 	u32_t                        ChecksumCompensation;
2884 
2885 } NcsiDefaultOemCmdRspPayload_t;
2886 typedef NcsiDefaultOemCmdRspPayload_t *pNcsiDefaultOemCmdRspPayload_t;
2887 
2888 
2889 /*****************************************************************************
2890 
2891 NcsiOemGetNcsiParametersRspPayload_t
2892 
2893     this structure defines the response Payload returned after processing
2894     the Oem cmd.
2895 
2896 *****************************************************************************/
2897 typedef struct NcsiOemGetNcsiParametersRspPayload
2898 {
2899 	NcsiOemGetNcsiParametersRspData_t  Data;
2900 	u32_t                            ChecksumCompensation;
2901 
2902 } NcsiOemGetNcsiParametersRspPayload_t;
2903 typedef NcsiOemGetNcsiParametersRspPayload_t *pNcsiOemGetNcsiParametersRspPayload_t;
2904 
2905 
2906 
2907 /*****************************************************************************
2908 
2909 NcsiOemGetDualMediaParametersRspPayload_t
2910 
2911     this structure defines the response Payload returned after processing
2912     the Oem cmd.
2913 
2914 *****************************************************************************/
2915 typedef struct NcsiOemGetDualMediaParametersRspPayload
2916 {
2917 	NcsiOemGetDualMediaParametersRspData_t  Data;
2918 	u32_t                           ChecksumCompensation;
2919 
2920 } NcsiOemGetDualMediaParametersRspPayload_t;
2921 typedef NcsiOemGetDualMediaParametersRspPayload_t *pNcsiOemGetDualMediaParametersRspPayload_t;
2922 
2923 
2924 typedef struct {
2925 	u16_t     ResponseCode;
2926 	u16_t     ReasonCode;
2927 	u32_t     ManufacturerId;         /* ManufacturerId IANA */
2928 	u8_t      PayloadVersion;
2929 	u8_t      CommandType;            /* OEM command ID */
2930 	u16_t     SupportedVersons;
2931 	u32_t     Reserved;
2932 } DellRspsGetSupportedVer_t;
2933 
2934 typedef struct {
2935 
2936 	u16_t   	ResponseCode;
2937 	u16_t   	ReasonCode;
2938 	u32_t	ManufacturerId;         /* ManufacturerId IANA */
2939 	u8_t        PayloadVersion;
2940 	u8_t        CommandType;
2941 	u8_t        PartitionId;
2942 	u8_t        NumOfTLVs;
2943 	u8_t        buf[MAX_TLV_COMMAND_SIZE]; /*This is a place holder for the Maximum size in bytesof this command with all TLV's present*/
2944 } DellRspsPartitionTLV_t;
2945 #define DELLOEMRSP_PARTITION_TLV_BASE_SIZE	12	//exclude pad & chksum
2946 
2947 // TLV type definition for Get OS Driver Version Command
2948 #define OSVER_TYPE_LAN		0
2949 #define OSVER_TYPE_ISCSI	1
2950 #define OSVER_TYPE_FCOE		2
2951 #define OSVER_TYPE_RDMA		3
2952 #define OSVER_TYPE_FC		4
2953 
2954 // TLV type definition for Set/Get iSCSI Boot Initiator Config Command
2955 //v4 v6	size
2956 #define ISCSI_INITIATOR_TYPE_ADDR		0
2957 #define ISCSI_INITIATOR_TYPE_ADDR_V4		1
2958 #define ISCSI_INITIATOR_TYPE_ADDR_V6		2
2959 #define ISCSI_INITIATOR_TYPE_SUBNET		3
2960 #define ISCSI_INITIATOR_TYPE_SUBNET_PREFIX	4
2961 #define ISCSI_INITIATOR_TYPE_GATEWAY		5
2962 #define ISCSI_INITIATOR_TYPE_GATEWAY_V4		6
2963 #define ISCSI_INITIATOR_TYPE_GATEWAY_V6		7
2964 #define ISCSI_INITIATOR_TYPE_PRIMARY_DNS	8
2965 #define ISCSI_INITIATOR_TYPE_PRIMARY_DNS_V4	9
2966 #define ISCSI_INITIATOR_TYPE_PRIMARY_DNS_V6	0xa
2967 #define ISCSI_INITIATOR_TYPE_SECOND_DNS		0xb
2968 #define ISCSI_INITIATOR_TYPE_SECOND_DNS_V4	0xc
2969 #define ISCSI_INITIATOR_TYPE_SECOND_DNS_V6	0xd
2970 #define ISCSI_INITIATOR_TYPE_NAME		0xe
2971 #define ISCSI_INITIATOR_TYPE_CHAP_ID		0xf
2972 #define ISCSI_INITIATOR_TYPE_CHAP_PSWD		0x10
2973 #define ISCSI_INITIATOR_TYPE_IP_VER		0x11
2974 #define ISCSI_INITIATOR_TYPE_MAX		ISCSI_INITIATOR_TYPE_IP_VER
2975 
2976 #define ISCSI_INITIATOR_TYPE_SUPPORTED_V4_MASK	((1<<ISCSI_INITIATOR_TYPE_ADDR)|(1<<ISCSI_INITIATOR_TYPE_ADDR_V4)| \
2977 						(1<<ISCSI_INITIATOR_TYPE_SUBNET)|(1<<ISCSI_INITIATOR_TYPE_GATEWAY)| \
2978 						(1<<ISCSI_INITIATOR_TYPE_GATEWAY_V4)| \
2979 						(1<<ISCSI_INITIATOR_TYPE_PRIMARY_DNS)| \
2980 						(1<<ISCSI_INITIATOR_TYPE_PRIMARY_DNS_V4)| \
2981 						(1<<ISCSI_INITIATOR_TYPE_SECOND_DNS)| \
2982 						(1<<ISCSI_INITIATOR_TYPE_SECOND_DNS_V4)| \
2983 						(1<<ISCSI_INITIATOR_TYPE_NAME)|(1<<ISCSI_INITIATOR_TYPE_CHAP_ID)| \
2984 						(1<<ISCSI_INITIATOR_TYPE_CHAP_PSWD)|(1<<ISCSI_INITIATOR_TYPE_IP_VER))
2985 #define ISCSI_INITIATOR_TYPE_SUPPORTED_V6_MASK	((1<<ISCSI_INITIATOR_TYPE_ADDR)|(1<<ISCSI_INITIATOR_TYPE_ADDR_V6)| \
2986 						(1<<ISCSI_INITIATOR_TYPE_SUBNET_PREFIX)| \
2987 						(1<<ISCSI_INITIATOR_TYPE_GATEWAY)| \
2988 						(1<<ISCSI_INITIATOR_TYPE_GATEWAY_V6)| \
2989 						(1<<ISCSI_INITIATOR_TYPE_PRIMARY_DNS)| \
2990 						(1<<ISCSI_INITIATOR_TYPE_PRIMARY_DNS_V6)| \
2991 						(1<<ISCSI_INITIATOR_TYPE_SECOND_DNS)| \
2992 						(1<<ISCSI_INITIATOR_TYPE_SECOND_DNS_V6)| \
2993 						(1<<ISCSI_INITIATOR_TYPE_NAME)|(1<<ISCSI_INITIATOR_TYPE_CHAP_ID)| \
2994 						(1<<ISCSI_INITIATOR_TYPE_CHAP_PSWD)|(1<<ISCSI_INITIATOR_TYPE_IP_VER))
2995 
2996 // TLV type definition for Set/Get iSCSI Boot Target Config Command
2997 #define ISCSI_TARGET_TYPE_CONNECT		0x0
2998 #define ISCSI_TARGET_TYPE_IP_ADDR		0x1
2999 #define ISCSI_TARGET_TYPE_TCP_PORT		0x2
3000 #define ISCSI_TARGET_TYPE_BOOT_LUN		0x3
3001 #define ISCSI_TARGET_TYPE_NAME			0x4
3002 #define ISCSI_TARGET_TYPE_CHAP_ID		0x5
3003 #define ISCSI_TARGET_TYPE_CHAP_PSWD		0x6
3004 #define ISCSI_TARGET_TYPE_IP_VER		0x7
3005 #define ISCSI_TARGET2_TYPE_CONNECT		0x8
3006 #define ISCSI_TARGET2_TYPE_IP_ADDR		0x9
3007 #define ISCSI_TARGET2_TYPE_TCP_PORT		0xa
3008 #define ISCSI_TARGET2_TYPE_BOOT_LUN		0xb
3009 #define ISCSI_TARGET2_TYPE_NAME			0xc
3010 #define ISCSI_TARGET2_TYPE_CHAP_ID		0xd
3011 #define ISCSI_TARGET2_TYPE_CHAP_PSWD		0xe
3012 #define ISCSI_TARGET2_TYPE_IP_VER		0xf
3013 #define ISCSI_TARGET2_BASE			ISCSI_TARGET2_TYPE_CONNECT
3014 #define ISCSI_TARGET_TYPE_MAX			ISCSI_TARGET2_TYPE_IP_VER
3015 
3016 #define FCOE_BOOT_SCAN_SELECTION                           0x0
3017 #define FCOE_FIRST_WWPN_TARGET                             0x1
3018 #define FCOE_FIRST_BOOT_TARGET_LUN                         0x2
3019 #define FCOE_FIRST_FCF_VLAN_ID                             0x3
3020 #define FCOE_TGT_BOOT                                      0x4
3021 #define FCOE_TARGET_TYPE_MAX			           FCOE_TGT_BOOT
3022 
3023 typedef DellRspsPartitionTLV_t DellRspsGetOsDriverVer_t;
3024 typedef DellRspsPartitionTLV_t DellRspsGetiScsiInitiatorConf_t;
3025 typedef DellRspsPartition_t    DellRspsSetiScsiInitiatorConf_t;
3026 typedef DellRspsPartitionTLV_t DellRspsGetiScsiTargetConf_t;
3027 typedef DellRspsPartition_t    DellRspsSetiScsiTargetConf_t;
3028 typedef DellRspsPartitionTLV_t DellRspsGetFcoeTargetConf_t;
3029 typedef DellRspsPartition_t    DellRspsSetFcoeTargetConf_t;
3030 typedef DellRspsDefault_t      DellRspsCommitNvram_t;
3031 typedef DellRspsDefault_t      DellRspsGetCommitNvramStatus_t;
3032 
3033 /*****************************************************************************
3034 
3035 NcsiDellOemCmdRspPayload_t
3036 
3037     this structure defines the response Payload returned after processing
3038     the Oem cmd.
3039 
3040 *****************************************************************************/
3041 typedef struct NcsiDellOemCmdRspPayload
3042 {
3043 	union
3044 	{
3045 		// Dell OEM commands Response Payload
3046 		DellGetInventoryCmdRspData_t                GetInventory;             // 0x00 DELL_OEM_GET_INVENTORY_CMD
3047 		DellGetExtendedCapabilitiesCmdRspData_t     GetExtendedCapabilities;  // 0x01 DELL_OEM_GET_EXTENDED_CAPABILITIES_CMD
3048 		DellGetPartitionInfoCmdRspData_t            GetPartitionInfo;         // 0x02 DELL_OEM_GET_PARTITION_INFORMATION_CMD
3049 		DellGetFcoeCapabilitiesCmdRspData_t         GetFcoeCapabilities;      // 0x03 DELL_OEM_GET_FCOE_CAPABILITIES_CMD
3050 		DellGetVirtualLinkCmdRspData_t              GetVirtualLink;           // 0x04 DELL_OEM_GET_VIRTUAL_LINK_CMD
3051 		DellGetLanStatisticsCmdRspData_t            GetLanStatistics;         // 0x05 DELL_OEM_GET_LAN_STATISTICS_CMD
3052 		DellGetFcoeStatisticsCmdRspData_t           GetFcoeStatistics;        // 0x06 DELL_OEM_GET_FCOE_STATISTICS_CMD
3053 		DellSetAddrCmdRspData_t                     SetAddr;                  // 0x07 DELL_OEM_SET_ADDR_CMD
3054 		DellGetAddrCmdRspData_t                     GetAddr;                  // 0x08 DELL_OEM_GET_ADDR_CMD
3055 		DellSetLicenseCmdRspData_t                  SetLicense;               // 0x09 DELL_OEM_SET_LICENSE_CMD
3056 		DellGetLicenseCmdRspData_t                  GetLicense;               // 0x0A DELL_OEM_GET_LICENSE_CMD
3057 		DellSetPassthruCtrlCmdRspData_t             SetPassthruCtrl;          // 0x0B DELL_OEM_SET_PASSTHRU_CONTROL_CMD
3058 		DellGetPassthruCtrlCmdRspData_t             GetPassthruCtrl;          // 0x0C DELL_OEM_GET_PASSTHRU_CONTROL_CMD
3059 		DellSetPartitionTxBandwidthCmdRspData_t     SetPartitionTxBandwidth;  // 0x0D DELL_OEM_SET_PARTITIONCmd_tX_BANDWIDTH_CMD
3060 		DellGetPartitionTxBandwidthCmdRspData_t     GetPartitionTxBandwidth;  // 0x0E DELL_OEM_GET_PARTITIONCmd_tX_BANDWIDTH_CMD
3061 		DellSetMcIpAddrCmdRspData_t                 SetMcIpAddr;              // 0x0F DELL_OEM_SET_MC_IP_ADDRESS_CMD
3062 		DellGetTeamingInfoCmdRspData_t              GetTeamingInfo;           // 0x10 DELL_OEM_GETCmd_tEAMING_INFORMATION_CMD
3063 		DellEnablePortsCmdRspData_t                 EnablePorts;              // 0x11 DELL_OEM_ENABLE_PORTS_CMD
3064 		DellDisablePortsCmdRspData_t                DisablePorts;             // 0x12 DELL_OEM_DISABLE_PORTS_CMD
3065 		DellGetTempCmdRspData_t                     GetTemp;                  // 0x13 DELL_OEM_GET_TEMPERATURE_CMD
3066 		DellSetLinkTuningCmdRspData_t               SetLinkTuning;            // 0x14 DELL_OEM_SET_LINKTUNING_CMD
3067 		DellEnableDisableOutOfBoxWolCmdRspData_t    EnableDisableOutOfBoxWol; // 0x15 DELL_OEM_ENABLE_OUTOFBOX_WOL_CMD and 0x16 DELL_OEM_DISABLE_OUTOFBOX_WOL_CMD
3068 		DellRspsGetSupportedVer_t                   GetSupportedVer;          // 0x1A DELL_OEM_GET_SUPP_PAYLOAD_VERSION_CMD
3069 		DellRspsGetOsDriverVer_t                    GetOsDriverVer;           // 0x1C DELL_OEM_GET_OS_DRIVER_VERSION_CMD
3070 		DellRspsGetiScsiInitiatorConf_t             GetiScsiInitiatorConf;    // 0x1D DELL_OEM_GET_ISCSI_BOOT_INITIATOR_CONFIG_CMD
3071 		DellRspsSetiScsiInitiatorConf_t             SetiScsiInitiatorConf;    // 0x1E DELL_OEM_SET_ISCSI_BOOT_INITIATOR_CONFIG_CMD
3072 		DellRspsGetiScsiTargetConf_t                GetiScsiTargetConf;       // 0x1F DELL_OEM_GET_ISCSI_BOOT_TARGET_CONFIG_CMD
3073 		DellRspsSetiScsiTargetConf_t                SetiScsiTargetConf;       // 0x20 DELL_OEM_SET_ISCSI_BOOT_TARGET_CONFIG_CMD
3074 		DellRspsGetFcoeTargetConf_t                 GetFcoeTargetConf;        // 0x21 DELL_OEM_GET_FCOE_BOOT_TARGET_CONFIG_CMD
3075 		DellRspsSetFcoeTargetConf_t                 SetFcoeTargetConf;        // 0x22 DELL_OEM_SET_FCOE_BOOT_TARGET_CONFIG_CMD
3076 		DellRspsCommitNvram_t                       CommitNvram;              // 0x23 DELL_OEM_NVRAM_COMMIT_CMD
3077 		DellRspsGetCommitNvramStatus_t              GetCommitNvramStatus;     // 0x24 DELL_OEM_NVRAM_COMMIT_STATUS_CMD
3078 	};
3079 	u32_t                        ChecksumCompensation;
3080 } NcsiDellOemCmdRspPayload_t;
3081 
3082 typedef NcsiDellOemCmdRspPayload_t *pNcsiDellOemCmdRspPayload_t;
3083 
3084 
3085 /*****************************************************************************
3086 
3087 NcsiCmdGetParametersRspPayload_t
3088 
3089     this structure defines the response frame Payload returned in response to
3090     the get parameters ump cmd.
3091 
3092 *****************************************************************************/
3093 typedef struct NcsiCmdGetParametersRspPayload
3094 {
3095 	NcsiCmdGetParametersRspData_t    Data;
3096 	u32_t                         ChecksumCompensation;
3097 }NcsiCmdGetParametersRspPayload_t;
3098 
3099 
3100 
3101 
3102 
3103 /*****************************************************************************
3104 
3105 NcsiCmdNcsiTestReadRspPayload_t
3106 
3107     this structure defines the response frame Payload returned in response to
3108     the NCSI Test read cmd.
3109 
3110 *****************************************************************************/
3111 typedef struct NcsiCmdNcsiTestReadRspPayload
3112 {
3113 	NcsiCmdNcsiTestReadCmdRspData_t    Data;
3114 	u32_t                         ChecksumCompensation;
3115 
3116 } NcsiCmdNcsiTestReadRspPayload_t;
3117 
3118 
3119 /*****************************************************************************
3120 
3121 NcsiCmdGetLinkStatusRspPayload_t
3122 
3123     this structure defines the response Payload returned after processing
3124     the get link status ump cmd.
3125 
3126 *****************************************************************************/
3127 typedef struct NcsiCmdGetLinkStatusRspPayload
3128 {
3129 	NcsiCmdGetLinkStatusRspData_t   Data;
3130 	u32_t                        ChecksumCompensation;
3131 
3132 } NcsiCmdGetLinkStatusRspPayload_t;
3133 
3134 typedef NcsiCmdGetLinkStatusRspPayload_t *pNcsiCmdGetLinkStatusRspPayload_t;
3135 
3136 
3137 /*****************************************************************************
3138 
3139 NcsiCmdGetCapabilitiesRspPayload_t
3140 
3141     this structure defines the response Payload returned after processing
3142     the get link status ump cmd.
3143 
3144 *****************************************************************************/
3145 typedef struct NcsiCmdGetCapabilitiesRspPayload
3146 {
3147 	NcsiCmdGetCapabilitiesRspData_t     Data;
3148 	u32_t                            ChecksumCompensation;
3149 
3150 } NcsiCmdGetCapabilitiesRspPayload_t;
3151 
3152 typedef NcsiCmdGetCapabilitiesRspPayload_t *pNcsiCmdGetCapabilitiesRspPayload_t;
3153 
3154 
3155 
3156 
3157 /*****************************************************************************
3158 
3159 NcsiCmdGetPortStatisticsRspPayload_t
3160 
3161     this structure definition is for the response Payload used when processing
3162     the get i/f statistics ump cmd.
3163 
3164 *****************************************************************************/
3165 typedef struct NcsiCmdGetPortStatisticsRspPayload
3166 {
3167 	NcsiCmdGetPortStatisticsRspData_t    Data;
3168 	u32_t                               ChecksumCompensation;
3169 
3170 } NcsiCmdGetPortStatisticsRspPayload_t;
3171 typedef NcsiCmdGetPortStatisticsRspPayload_t *pNcsiCmdGetPortStatisticsRspPayload_t;
3172 
3173 /*****************************************************************************
3174 
3175 NcsiCmdGetNcsiStatisticsRspPayload_t
3176 
3177     this structure definition is for the response Payload used when processing
3178     the get ump i/f statistics ump cmd.
3179 
3180 *****************************************************************************/
3181 typedef struct NcsiCmdGetNcsiStatisticsRspPayload
3182 {
3183 	NcsiCmdGetNcsiStatisticsRspData_t    Data;
3184 	u32_t                             ChecksumCompensation;
3185 
3186 } NcsiCmdGetNcsiStatisticsRspPayload_t;
3187 typedef NcsiCmdGetNcsiStatisticsRspPayload_t *pNcsiCmdGetNcsiStatisticsRspPayload_t;
3188 
3189 
3190 
3191 /*****************************************************************************
3192 
3193 NcsiCmdGetNcsiPassThruStatisticsRspPayload_t
3194 
3195     this structure definition is for the response Payload used when processing
3196     the get .
3197 
3198 *****************************************************************************/
3199 typedef struct NcsiCmdGetNcsiPassThruStatisticsRspPayload
3200 {
3201 	NcsiCmdGetNcsiPassThruStatisticsRspData_t    Data;
3202 	u32_t                                     ChecksumCompensation;
3203 
3204 } NcsiCmdGetNcsiPassThruStatisticsRspPayload_t;
3205 typedef NcsiCmdGetNcsiPassThruStatisticsRspPayload_t *pNcsiCmdGetNcsiPassThruStatisticsRspPayload_t;
3206 
3207 
3208 /*****************************************************************************
3209 
3210 NcsiCmdGetControllerVerIdRspPayload_t
3211 
3212     this structure definition is for the response Payload used when processing
3213     the get bcm version ID ump cmd.
3214 
3215 *****************************************************************************/
3216 typedef struct  NcsiCmdGetControllerVerIdRspPayload
3217 {
3218 	NcsiCmdGetControllerVerIdRspData_t  Data;
3219 	u32_t                            ChecksumCompensation;
3220 
3221 } NcsiCmdGetControllerVerIdRspPayload_t;
3222 
3223 /*****************************************************************************
3224 
3225 NcsiCmdRspPayload_t
3226 
3227     this union definition combines the various response Payload definitions
3228     into a single reference.
3229 
3230 *****************************************************************************/
3231 typedef union NcsiCmdRspPayload
3232 {
3233 
3234 	NcsiCmdDefaultRspPayload_t                      DefaultPayload;
3235 	NcsiDefaultOemCmdRspPayload_t                   DefaultOemCmdPayload;
3236 	NcsiOemGetNcsiParametersRspPayload_t            GetNcsiParametersPayload;
3237 	NcsiOemGetDualMediaParametersRspPayload_t       GetDualMediaParametersPayload;
3238 	NcsiCmdGetParametersRspPayload_t                GetParametersPayload;
3239 	NcsiCmdGetLinkStatusRspPayload_t                GetLinkStatusPayload;
3240 	NcsiCmdGetPortStatisticsRspPayload_t            GetStatisticsPayload;
3241 	NcsiCmdGetControllerVerIdRspPayload_t           GetCntlrVerIdPayload;
3242 	NcsiCmdGetNcsiStatisticsRspPayload_t            GetNcsiStatsPayload;
3243 	NcsiCmdGetNcsiPassThruStatisticsRspPayload_t    GetNcsiPassThruStatsPayload;
3244 	NcsiCmdGetCapabilitiesRspPayload_t              GetCapabilitiesPayload;
3245 	NcsiCmdNcsiTestReadRspPayload_t                 NcsiTestReadPayload;
3246 	// Dell OEM commands Response Payload
3247 	NcsiDellOemCmdRspPayload_t                      DellOemCmdRspPayload;
3248 
3249 } NcsiCmdRspPayload_t;
3250 
3251 #define NCSI_CMD_CHKSUM_SIZE        SIZEOF(NcsiCmdDefaultRspPayload_t, ChecksumCompensation)
3252 
3253 
3254 /*****************************************************************************
3255 
3256 NcsiRmiiCmdRspPkt_t
3257 
3258     this structure definition is for the command response frame that is sent
3259     back to the IMD for each processed UMP command.
3260 
3261     IMD command frames are acknowledged by copying the command frame header
3262     into received from iLO over the UMP interface, and are
3263     either processed locally for configuration and control, or are forwarded
3264     for transmission at the primary ethernet port.
3265 
3266 *****************************************************************************/
3267 typedef struct NcsiRmiiCmdRspPkt
3268 {
3269 	NcsiRmiiControlPktHeader_t   Header;
3270 	NcsiCmdRspPayload_t    Payload;
3271 
3272 } NcsiRmiiCmdRspPkt_t;
3273 
3274 typedef NcsiRmiiCmdRspPkt_t *pNcsiRmiiCmdRspPkt_t;
3275 
3276 
3277 /*****************************************************************************
3278 
3279 NcsiCmdDefaultAenData_t
3280 
3281     Structure definition for most basic Aen data
3282 
3283 *****************************************************************************/
3284 typedef struct NcsiCmdDefaultAenData
3285 {
3286 	u32_t    AenType;
3287 #define NCSI_CMD_AEN_TYPE_LINK_CHANGED                                (0)
3288 #define NCSI_CMD_AEN_TYPE_SOFT_RESET                                  (1)
3289 #define NCSI_CMD_AEN_TYPE_OS_CHANGED                                  (2)
3290 
3291 } NcsiCmdDefaultAenData_t;
3292 
3293 /*****************************************************************************
3294 
3295 NcsiCmdLinkChangedAenData_t
3296 
3297     Structure definition for link changed Aen data
3298 
3299 *****************************************************************************/
3300 typedef struct NcsiCmdLinkChangedAenData
3301 {
3302 	u32_t   AenType;
3303 	u32_t   LinkState;
3304 	u32_t   OemLinkSpeed;
3305 
3306 } NcsiCmdLinkChangedAenData_t;
3307 
3308 /*****************************************************************************
3309 
3310 NcsiCmdOsChangedAenData_t
3311 
3312     Structure definition for os changed Aen data
3313 
3314 *****************************************************************************/
3315 typedef struct NcsiCmdOsChangedAenData
3316 {
3317 	u32_t    AenType;
3318 	u32_t    OsState;
3319 #define UMPCMDPUB_OS_STATE_CHANGED_AEN_OS_PRESENT   1
3320 #define UMPCMDPUB_OS_STATE_CHANGED_AEN_OS_ABSENT    0
3321 
3322 } NcsiCmdOsChangedAenData_t;
3323 
3324 
3325 
3326 #define NCSI_CMD_SIZEOF_DEFAULT_AEN_DATA        (sizeof (NcsiCmdDefaultAenData_t))
3327 #define NCSI_CMD_SIZEOF_LINK_CHANGED_AEN_DATA   (sizeof (NcsiCmdLinkChangedAenData_t))
3328 #define NCSI_CMD_SIZEOF_OS_CHANGED_AEN_DATA     (sizeof (NcsiCmdOsChangedAenData_t))
3329 
3330 
3331 /*****************************************************************************
3332 
3333 NcsiCmdDefaultAenPayload_t
3334 
3335     Structure definition for most basic Aen Payload
3336 
3337 *****************************************************************************/
3338 typedef struct NcsiCmdDefaultAenPayload
3339 {
3340 	NcsiCmdDefaultAenData_t Data;
3341 	u32_t                ChecksumCompensation;
3342 
3343 } NcsiCmdDefaultAenPayload_t;
3344 
3345 /*****************************************************************************
3346 
3347 NcsiCmdLinkChangedAenPayload_t
3348 
3349     Structure definition for Link changed Aen Payload
3350 
3351 *****************************************************************************/
3352 typedef struct NcsiCmdLinkChangedAenPayload
3353 {
3354 	NcsiCmdLinkChangedAenData_t     Data;
3355 	u32_t                        ChecksumCompensation;
3356 
3357 } NcsiCmdLinkChangedAenPayload_t;
3358 
3359 /*****************************************************************************
3360 
3361 NcsiCmdOsChangedAenPayload_t
3362 
3363     Structure definition for os chagned Aen Payload
3364 
3365 *****************************************************************************/
3366 typedef struct NcsiCmdOsChangedAenPayload
3367 {
3368 	NcsiCmdOsChangedAenData_t   Data;
3369 	u32_t                    ChecksumCompensation;
3370 
3371 } NcsiCmdOsChangedAenPayload_t;
3372 
3373 
3374 /*****************************************************************************
3375 
3376 NcsiCmdAenPayload_t
3377 
3378     this union definition combines the various Aen Payload definitions
3379     into a single reference.
3380 
3381 *****************************************************************************/
3382 typedef union NcsiCmdAenPayload
3383 {
3384 
3385 	NcsiCmdDefaultAenPayload_t       DefaultPayload;
3386 	NcsiCmdLinkChangedAenPayload_t   LinkChangedPayload;
3387 	NcsiCmdOsChangedAenPayload_t     OsChangedPayload;
3388 
3389 } NcsiCmdAenPayload_t;
3390 
3391 
3392 #define NCSI_CMD_SIZEOF_DEFAULT_AEN_PAYLOAD          (sizeof (NcsiCmdDefaultAenPayload_t))
3393 #define NCSI_CMD_SIZEOF_LINK_CHANGED_AEN_PAYLOAD     (sizeof (NcsiCmdLinkChangedAenPayload_t))
3394 #define NCSI_CMD_SIZEOF_OS_CHANGED_AEN_PAYLOAD       (sizeof (NcsiCmdOsChangedAenPayload_t))
3395 
3396 
3397 /*****************************************************************************
3398 
3399 NcsiCmdAenPacket_t
3400 
3401     this structure definition is for the UMP AEN frame that is sent to the BMC
3402     for to report asynchronous events.
3403 
3404 *****************************************************************************/
3405 typedef struct NcsiCmdAenPacket
3406 {
3407 	NcsiRmiiControlPktHeader_t  Header;
3408 	NcsiCmdAenPayload_t     Payload;
3409 } NcsiCmdAenPacket_t;
3410 
3411 typedef NcsiCmdAenPacket_t *pNcsiCmdAenPacket_t;
3412 
3413 
3414 #endif
3415 
3416 
3417 
3418 
3419 
3420 
3421 
3422