4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, v.1, (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://opensource.org/licenses/CDDL-1.0.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
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]
23 * Copyright 2014-2017 Cavium, Inc.
24 * The contents of this file are subject to the terms of the Common Development
25 * and Distribution License, v.1, (the "License").
27 * You may not use this file except in compliance with the License.
29 * You can obtain a copy of the License at available
30 * at http://opensource.org/licenses/CDDL-1.0
32 * See the License for the specific language governing permissions and
33 * limitations under the License.
36 /****************************************************************************
37 * Copyright(c) 2009-2015 Broadcom Corporation, all rights reserved
38 * Proprietary and Confidential Information.
40 * This source file is the property of Broadcom Corporation, and
41 * may not be copied or distributed in any isomorphic form without
42 * the prior written consent of Broadcom Corporation.
46 * Description: BDN definitions
48 * Author: Yaniv Rosner
50 ****************************************************************************/
57 #define BDN_CFG_SIZE_MASK 0x0000ffff
58 #define BDN_CFG_SIZE_OFFSET 0
59 #define BDN_CFG_STATE_MASK 0x00ff0000
60 #define BDN_CFG_STATE_OFFSET 16
61 #define BDN_CFG_STATE_ACTIVE 0x00010000
62 #define BDN_CFG_STATE_PENDING 0x00020000
63 #define BDN_CFG_STATE_DEFAULT 0x00040000
65 #define SERVER_DESCRIPTION_MAX_LENGTH 64
66 struct server_descrip
{
68 u8 str
[SERVER_DESCRIPTION_MAX_LENGTH
];
71 #define SERVER_UUID_LENGTH 36
74 u8 str
[SERVER_UUID_LENGTH
];
77 #define GENERALIZED_TIME_MAX_SIZE 16 /* YYYYMMDDhhmmss.s */
78 struct generalized_time
{
80 u8 time_str
[GENERALIZED_TIME_MAX_SIZE
];
82 #define CONNECTION_ID_LENGTH 16
84 #define SLOT_TYPE_NUM_MAX_LENGTH 32
85 struct slot_type_num
{
87 u8 str
[SLOT_TYPE_NUM_MAX_LENGTH
];
90 #define ILO_MGMT_MAX_NUM_OF_ADDR 3
91 #define ILO_MGMT_ADDR_MAX_LENGTH 16
92 struct iLO_mgmt_addr
{
94 u8 len_of_add
[ILO_MGMT_MAX_NUM_OF_ADDR
];
95 u8 str
[ILO_MGMT_MAX_NUM_OF_ADDR
][ILO_MGMT_ADDR_MAX_LENGTH
];
98 #define ENCLOSURE_ID_LENGTH 36
101 u8 str
[ENCLOSURE_ID_LENGTH
];
105 struct base_dev_next_os
{
110 struct base_dev_now
{
116 struct base_dev_now now
;
117 struct base_dev_next_os next_os
;
122 #define SERVER_INFO_ILO_MGMT_VLAN_PRESENT (1<<0)
123 #define SERVER_INFO_DATA_TIMESTAMP_PRESENT (1<<1)
124 #define SERVER_INFO_ENCLOSURE_ID_PRESENT (1<<2)
125 struct server_descrip server_descrip
;
126 struct server_uuid server_uuid
;
127 struct slot_type_num slot_type_num
;
128 struct iLO_mgmt_addr iLO_mgmt_addr
;
130 struct generalized_time data_timestamp
;
134 u32 version
; /* Version of Codec */
136 enum codec_location
{
140 } loc
; /* DEFAULT e-None */
141 u16 total_size
; /* total size of Codec in bytes.Max size 32K (64K?)*/
142 u16 num_msg_segments
; /* number of segments = total size / max message payload size */
145 #define MAX_CODEC_SIZE 0x8000
146 #define CODEC_SEGMENT_SIZE 0x400
147 #define NUMBER_OF_SEGMENTS (MAX_CODEC_SIZE/CODEC_SEGMENT_SIZE)
149 u8 data
[NUMBER_OF_SEGMENTS
][CODEC_SEGMENT_SIZE
];
152 struct bdn_netport_now
{
158 u8 min_bw
[MCP_GLOB_FUNC_MAX
];
159 u8 max_bw
[MCP_GLOB_FUNC_MAX
];
162 struct bdn_netport_on_port_reset
{
165 /* Same definitions as in PORT_HW_CFG_SPEED_CAPABILITY_D3_MASK */
166 #define BDN_LINK_CONFIG_ADVERTISED_SPEED_MASK 0x0000ffff
167 #define BDN_LINK_CONFIG_ADVERTISED_SPEED_SHIFT 0
168 /* Same definitions as PORT_FEATURE_FLOW_CONTROL_MASK */
169 #define BDN_LINK_CONFIG_FLOW_CONTROL_MASK 0x00070000
170 #define BDN_LINK_CONFIG_FLOW_CONTROL_SHIFT 16
172 #define BDN_LINK_CONFIG_PFC_ENABLED_MASK 0x00080000
173 #define BDN_LINK_CONFIG_PFC_ENABLED_SHIFT 19
175 #define BDN_LINK_CONFIG_EEE_ENABLED_MASK 0x00100000
176 #define BDN_LINK_CONFIG_EEE_ENABLED_SHIFT 20
179 struct bdn_netport_next_os_boot
{
182 u8 num_vf_per_pf
[MCP_GLOB_FUNC_MAX
];
185 struct bdn_netport_diag_ctrl
{
194 struct bdn_netport_now now
;
195 struct bdn_netport_on_port_reset on_port_reset
; /* On Port Reset */
196 struct bdn_netport_next_os_boot next_os_boot
; /* Next OS Boot */
197 struct bdn_netport_diag_ctrl diag_ctrl
;
200 #define CONNECTION_ID_LEN 16
201 struct bdn_flexfunc_now
{
203 u8 connection_id
[CONNECTION_ID_LEN
];
208 struct bdn_flexfunc_next_os_boot
{
211 #define FLEXFUNC_CFG_NEXT_OS_C2S_PCP_MAP_PRESENT (1<<0)
212 #define FLEXFUNC_CFG_NEXT_OS_PORT_ASSIGNMENT_PRESENT (1<<1)
213 #define FLEXFUNC_CFG_NEXT_OS_EMB_LAG_PRESENT (1<<2)
217 u8 c_2_s_pcp_map
[9]; /* Maps O/S C-VLAN PCP value to S-VLAN PCP value for TX
218 * -- items 1-8 correspond to the O/S C-VLAN PCP values 0-7
219 * -- item 9 is the default if no C-VLAN present
220 * -- Values in these 9 bytes are the expected S-PCP values.
221 * -- If NetDev-Device-Module: EVB-Support.c-2-s-pcp-map = FALSE, then
222 * -- all values must be identical
223 * -- else, it supports C-PCP -> S-PCP mapping
229 struct bdn_flex_func_diag_ctrl
{
235 struct bdn_flex_func
{
236 struct bdn_flexfunc_now now
;
237 struct bdn_flexfunc_next_os_boot next_os_boot
; /* Next OS Boot */
238 struct bdn_flex_func_diag_ctrl diag_ctrl
;
241 #define FC_NPIV_WWPN_SIZE 8
242 #define FC_NPIV_WWNN_SIZE 8
243 struct bdn_npiv_settings
{
244 u8 npiv_wwpn
[FC_NPIV_WWPN_SIZE
];
245 u8 npiv_wwnn
[FC_NPIV_WWNN_SIZE
];
248 struct bdn_fc_npiv_cfg
{
249 /* hdr used internally by the MFW */
254 #define MAX_NUMBER_NPIV 64
255 struct bdn_fc_npiv_tbl
{
256 struct bdn_fc_npiv_cfg fc_npiv_cfg
;
257 struct bdn_npiv_settings settings
[MAX_NUMBER_NPIV
];
262 struct bdn_fc_npiv_tbl now
; /* Next device level reset */
265 struct bdn_iscsi_initiator_cfg
{
267 #define ISCSI_INITIATOR_ROUTE_PRESENT (1<<0)
268 #define ISCSI_INITIATOR_PRIMARY_DNS_PRESENT (1<<1)
269 #define ISCSI_INITIATOR_SECONDARY_DNS_PRESENT (1<<2)
275 u8 secondary_dns
[16];
278 struct bdn_iscsi_target_params
{
280 #define ISCSI_TARGET_LLMNR_ENABLE_PRESENT (1<<0)
281 #define ISCSI_TARGET_ROUTE_ADV_ENABLE_PRESENT (1<<1)
282 #define ISCSI_TARGET_IPV2_PRESENT (1<<2)
293 struct bdn_iscsi_authentication
{
295 #define ISCSI_AUTH_CHAP_USERNAME_PRESENT (1<<0)
296 #define ISCSI_AUTH_CHAP_SECRET_PRESENT (1<<1)
297 #define ISCSI_AUTH_MUTUAL_USERNAME_PRESENT (1<<2)
298 #define ISCSI_AUTH_MUTUAL_SECRET_PRESENT (1<<3)
303 u8 mutual_username
[232];
304 u8 mutual_secret
[16];
305 u32 mutual_secret_len
;
308 struct bdn_iscsi_boot_cfg
{
310 #define ISCSI_CFG_CVID_PRESENT (1<<0)
311 #define ISCSI_CFG_DNS_VIA_DHCP_PRESENT (1<<1)
312 #define ISCSI_CFG_TARGET_INFO_DHCP_PRESENT (1<<2)
313 #define ISCSI_CFG_INITIATOR_PRESENT (1<<3)
314 #define ISCSI_CFG_TARGET_PRESENT (1<<4)
315 #define ISCSI_CFG_DHCP_VENDOR_ID_PRESENT (1<<5)
316 #define ISCSI_CFG_AUTH_PRESENT (1<<6)
317 #define ISCSI_AUTH_HEADER_DIGEST_FLAG_PRESENT (1<<7)
318 #define ISCSI_AUTH_DATA_DIGEST_FLAG_PRESENT (1<<8)
324 u8 dhcp_vendor_id
[32];
325 u32 head_digest_flag_en
;
326 u32 data_digest_flag_en
;
329 struct bdn_iscsi_boot_next_dlr
{
330 struct bdn_iscsi_boot_cfg cfg
; /* Next device level reset */
331 struct bdn_iscsi_initiator_cfg initiator_cfg
;
332 struct bdn_iscsi_target_params target_params
;
333 struct bdn_iscsi_authentication authentication
;
336 struct bdn_iscsi_boot
{
337 struct bdn_iscsi_boot_next_dlr next_dlr
; /* Next device level reset */
340 #define FCOE_TARGETS_WWPN_SIZE 8
341 #define FCOE_TARGETS_LUN_SIZE 8
343 struct bdn_fcoe_targets
{
344 u8 wwpn
[FCOE_TARGETS_WWPN_SIZE
];
345 u8 lun_id
[FCOE_TARGETS_LUN_SIZE
];
348 struct bdn_fcoe_boot_cfg
{
350 #define FCOE_CFG_CVID_PRESENT (1<<0)
351 #define FCOE_BASE_WWNN_PRESENT (1<<1)
352 #define FCOE_WWPN_PRESENT (1<<2)
355 u8 base_wwnn
[FCOE_TARGETS_WWPN_SIZE
]; /* Host World wide name*/
356 u8 wwpn
[FCOE_TARGETS_WWPN_SIZE
]; /* base wwpn */
357 u32 num_of_fcoe_targets
;
360 struct bdn_fcoe_boot_next_dlr
{
361 struct bdn_fcoe_boot_cfg cfg
; /* Next device level reset */
362 struct bdn_fcoe_targets fcoe_targets
[8];
365 struct bdn_fcoe_boot
{
366 struct bdn_fcoe_boot_next_dlr next_dlr
; /* Next device level reset */
371 struct bdn_ncsi_next_dlr
{
377 struct bdn_ncsi_next_dlr bdn_ncsi_next_dlr
;
380 // Rapid-Response-Poll-Module definition
381 #define MAX_CCT_SIZE 64
382 #define VALID_RPP_SIGNATURE 0x69616853
394 struct bdn_rapid_respon_stc
{
396 struct rpp_sum_stc rpp_sum
;
399 struct digest_stc cct
[MAX_CCT_SIZE
];
400 #ifdef CONFIG_SUPPORT_SCI
401 struct digest_stc sci
[MAX_CCT_SIZE
];
407 struct base_dev base_dev
;
408 struct server_info server_info
;
409 struct bdn_netport netport
[MCP_GLOB_PORT_MAX
* MCP_GLOB_PATH_MAX
];
410 struct bdn_flex_func flexfunc
[PF_NUM_MAX
];
411 struct bdn_fc_npiv fc_npiv
[MCP_GLOB_PORT_MAX
* MCP_GLOB_PATH_MAX
];
412 struct bdn_iscsi_boot iscsi_boot
[MCP_GLOB_PORT_MAX
* MCP_GLOB_PATH_MAX
];
413 struct bdn_fcoe_boot fcoe_boot
[MCP_GLOB_PORT_MAX
* MCP_GLOB_PATH_MAX
];
414 struct bdn_ncsi ncsi
;
415 struct bdn_rapid_respon_stc rpp_stc
;
416 struct enclosure_id serv_info_enc_id
;
425 /* Expected BDN size is basically the offset of rsrv within the bdn structure */
426 #define BDN_SIZE (sizeof(struct bdn))
427 #define BDN_SERVER_INFO() (ASN1_P->bdn_addr + OFFSETOF(struct bdn, server_info))
428 #define BDN_BASE_DEV_NEXT_OS() (ASN1_P->bdn_addr + OFFSETOF(struct bdn, base_dev.next_os))
429 #define BDN_BASE_DEV_NOW() (ASN1_P->bdn_addr + OFFSETOF(struct bdn, base_dev.now))
430 /* #define BDN_CODEC_INFO() (ASN1_P->bdn_addr + OFFSETOF(struct bdn, codec_info)) */
431 /* #define BDN_CODEC_DATA() (ASN1_P->bdn_addr + OFFSETOF(struct bdn, codec)) */
432 #define BDN_NETPORT_NOW(papo) (ASN1_P->bdn_addr + OFFSETOF(struct bdn, netport[(papo.path << 1) + papo.port].now))
433 #define BDN_NETPORT_ON_PORT_RESET(papo) (ASN1_P->bdn_addr + OFFSETOF(struct bdn, netport[(papo.path << 1) + papo.port].on_port_reset))
434 #define BDN_NETPORT_NEXT_OS_BOOT(papo) (ASN1_P->bdn_addr + OFFSETOF(struct bdn, netport[(papo.path << 1) + papo.port].next_os_boot))
435 #define BDN_NETPORT_DIAG_CTRL(papo) (ASN1_P->bdn_addr + OFFSETOF(struct bdn, netport[(papo.path << 1) + papo.port].diag_ctrl))
436 #define BDN_FLEXFUNC_NOW(pf_num) (ASN1_P->bdn_addr + OFFSETOF(struct bdn, flexfunc[pf_num].now))
437 #define BDN_FLEXFUNC_NEXT_OS_BOOT(pf_num) (ASN1_P->bdn_addr + OFFSETOF(struct bdn, flexfunc[pf_num].next_os_boot))
438 #define BDN_FLEXFUNC_DIAG_CTRL(pf_num) (ASN1_P->bdn_addr + OFFSETOF(struct bdn, flexfunc[pf_num].diag_ctrl))
439 #define BDN_FC_NPIV_NOW(papo) (ASN1_P->bdn_addr + OFFSETOF(struct bdn, fc_npiv[(papo.path << 1) + papo.port].now))
440 #define BDN_FC_NPIV_NOW_CFG(papo) (ASN1_P->bdn_addr + OFFSETOF(struct bdn, fc_npiv[(papo.path << 1) + papo.port].now.fc_npiv_cfg))
441 #define BDN_FC_NPIV_NOW_SETTINGS(papo, idx) (ASN1_P->bdn_addr + OFFSETOF(struct bdn, fc_npiv[(papo.path << 1) + papo.port].now.settings[idx]))
442 #define BDN_ISCSI_BOOT_NEXT_DLR_CFG(papo) (ASN1_P->bdn_addr + OFFSETOF(struct bdn, iscsi_boot[(papo.path << 1) + papo.port].next_dlr.cfg))
443 #define BDN_ISCSI_BOOT_NEXT_DLR_INITIATOR(papo) (ASN1_P->bdn_addr + OFFSETOF(struct bdn, iscsi_boot[(papo.path << 1) + papo.port].next_dlr.initiator_cfg))
444 #define BDN_ISCSI_BOOT_NEXT_DLR_TARGET(papo) (ASN1_P->bdn_addr + OFFSETOF(struct bdn, iscsi_boot[(papo.path << 1) + papo.port].next_dlr.target_params))
445 #define BDN_ISCSI_BOOT_NEXT_DLR_AUTHENTICATION(papo) (ASN1_P->bdn_addr + OFFSETOF(struct bdn, iscsi_boot[(papo.path << 1) + papo.port].next_dlr.authentication))
446 #define BDN_FCOE_BOOT_NEXT_DLR_CFG(papo) (ASN1_P->bdn_addr + OFFSETOF(struct bdn, fcoe_boot[(papo.path << 1) + papo.port].next_dlr.cfg))
447 #define BDN_FCOE_BOOT_NEXT_DLR_TARGET(papo, idx) (ASN1_P->bdn_addr + OFFSETOF(struct bdn, fcoe_boot[(papo.path << 1) + papo.port].next_dlr.fcoe_targets[idx]))
448 #define BDN_NCSI_NEXT_DLR() (ASN1_P->bdn_addr + OFFSETOF(struct bdn, ncsi.bdn_ncsi_next_dlr))
449 #define BDN_RAPID_RESPONSE (ASN1_P->bdn_addr + OFFSETOF(struct bdn, rpp_stc))
450 #define BDN_SERV_INFO_ENC_ID() (ASN1_P->bdn_addr + OFFSETOF(struct bdn, serv_info_enc_id))
451 #define BDN_CRC() (ASN1_P->bdn_addr + sizeof(union bdn_image))
454 #define BDN_SIZE_IMAGE_MAX (0x9000)
456 #define BDN_SIZE_OF_MAC (6)
457 #define BDN_SIZE_OF_WWN (8)
458 #define BDN_SIZE_OF_IPV4 (4)
459 #define BDN_SIZE_OF_IPV6 (16)
460 #define BDN_DIR_MAX (8)
461 #define BDN_SIZE_OF_PF_PER_PORT (16)
462 #define BDN_SIZE_OF_CONNECTION_ID (16)
463 #define BDN_SIZE_OF_C2SPCP_MAP (9)
464 #define BDN_SIZE_OF_ISCSI_NAME (236)
465 #define BDN_SIZE_OF_ISCSI_SEC (16)
466 #define BDN_SIZE_OF_FCOE_TARGETS (8)
467 #define BDN_SIZE_OF_FCOE_LUN_ID (8)
468 #define BDN_SIZE_OF_DHCP_VENDOR_ID (32)
469 #define BDN_SIZE_OF_SERV_DESC (64)
470 #define BDN_SIZE_OF_SERV_UUID (36)
471 #define BDN_SIZE_OF_SERV_SLOT (32)
472 #define BDN_NUM_OF_ILO_ADDR (3)
473 #define BDN_SIZE_OF_ILO_ADDR (16)
474 #define BDN_SIZE_OF_SERV_TIME (20)
475 #define BDN_SIZE_OF_ENCLOSURE_ID (36)
476 #define BDN_CCT_MAX_SIZE (64)
477 #define BDN_SCI_MAX_SIZE (64)
484 #define BDN_DIR_CFG_NOW (0)
485 #define BDN_DIR_CFG_NEXT_FLR (1)
486 #define BDN_DIR_CFG_PORT_RESET (2)
487 #define BDN_DIR_CFG_NEXT_DLR (3)
488 #define BDN_DIR_CFG_NEXT_OS_BOOT (4)
489 #define BDN_DIR_CFG_NEXT_PWR_CYC (5)
490 #define BDN_DIR_CFG_DIAG_CTRL (6)
492 typedef u32 bdn_cfg_state
;
493 #define BDN_CFG_STATE_MASK 0x000000ff
494 #define BDN_CFG_STATE_OFFSET 0
495 #define BDN_CFG_STATE_NA 0x00000000
496 #define BDN_CFG_STATE_ACTIVE 0x00000001
497 #define BDN_CFG_STATE_PENDING 0x00000002
498 #define BDN_CFG_STATE_DEFAULT 0x00000004
500 #define BDN_CFG_STATE_IS(x, y) ((((x)->state & BDN_CFG_STATE_MASK) >> BDN_CFG_STATE_OFFSET) == BDN_CFG_STATE_##y)
501 #define BDN_OPTIONAL_SET(x, y) (x)->optional |= (1 << (y))
502 #define BDN_OPTIONAL_CHECK(x, y) ((x)->optional & (1 << (y)))
504 /*.************************* Base-Device-Module************************* */
505 struct bdn_base_now
{
515 struct bdn_base_osb
{
526 struct bdn_dir dir
[BDN_DIR_MAX
];
528 struct bdn_base_now now
;
529 struct bdn_base_osb osb
; /* Next os reboot */
532 /*.************************* Network-Device-Module********************** */
533 struct bdn_nport_now
{
536 #define BDN_NETPORT_NOW_OPT_MIN_BW (0)
537 #define BDN_NETPORT_NOW_OPT_MAX_BW (1)
545 u8 min_bw
[BDN_SIZE_OF_PF_PER_PORT
];
546 u8 max_bw
[BDN_SIZE_OF_PF_PER_PORT
];
551 struct bdn_nport_plr
{
554 #define BDN_NETPORT_RESET_OPT_ADV_SPEED (0)
555 #define BDN_NETPORT_RESET_OPT_FLOW_CTRL (1)
556 #define BDN_NETPORT_RESET_OPT_EEE_ENABLE (2)
566 struct bdn_nport_osb
{
569 #define BDN_NETPORT_BOOT_OPT_NUM_VF (0)
570 #define BDN_NETPORT_BOOT_OPT_NPIV_ENABLE (1)
575 u8 num_vfs
[BDN_SIZE_OF_PF_PER_PORT
];
580 struct bdn_nport_dgn
{
593 struct bdn_dir dir
[BDN_DIR_MAX
];
595 struct bdn_nport_now now
;
596 struct bdn_nport_plr plr
; /* Next device level reset */
597 struct bdn_nport_osb osb
; /* Next os reboot */
598 struct bdn_nport_dgn dgn
;
601 /* ************************* FlexFunc-Module************************* */
602 struct bdn_flex_now
{
606 u8 connection_id
[BDN_SIZE_OF_CONNECTION_ID
];
613 struct bdn_flex_dlr
{
616 #define BDN_FLEXFUNC_DLR_OPT_FC_WWNN (0)
617 #define BDN_FLEXFUNC_DLR_OPT_FC_WWPN (1)
619 u8 fc_wwnn
[BDN_SIZE_OF_WWN
];
620 u8 fc_wwpn
[BDN_SIZE_OF_WWN
];
625 struct bdn_flex_osb
{
628 #define BDN_FLEXFUNC_BOOT_OPT_C2SPCP_MAP (0)
629 #define BDN_FLEXFUNC_BOOT_OPT_PORT_ASSIGNMENT (1)
630 #define BDN_FLEXFUNC_BOOT_OPT_EMB_LAG (2)
631 #define BDN_FLEXFUNC_BOOT_OPT_MTU_SIZE (3)
632 #define BDN_FLEXFUNC_BOOT_OPT_OVER_MTU (4)
634 u8 mac_addr
[BDN_SIZE_OF_MAC
];
635 u8 c_2_s_pcp_map
[BDN_SIZE_OF_C2SPCP_MAP
];
636 /* Maps O/S C-VLAN PCP value to S-VLAN PCP value for TX
637 * -- items 1-8 correspond to the O/S C-VLAN PCP values 0-7
638 * -- item 9 is the default if no C-VLAN present
639 * -- Values in these 9 bytes are the expected S-PCP values.
640 * -- If NetDev-Device-Module: EVB-Support.c-2-s-pcp-map = FALSE, then
641 * -- all values must be identical
642 * -- else, it supports C-PCP -> S-PCP mapping
656 struct bdn_flex_dgn
{
667 struct bdn_dir dir
[BDN_DIR_MAX
];
669 struct bdn_flex_now now
;
670 struct bdn_flex_dlr dlr
; /* Next device level reset */
671 struct bdn_flex_osb osb
; /* Next os reboot */
672 struct bdn_flex_dgn dgn
;
675 /* ************************* FC-NPIV-Module************************* */
676 struct bdn_npiv_dlr
{
680 struct dci_fc_npiv_tbl npiv_tbl
;
684 struct bdn_dir dir
[BDN_DIR_MAX
];
686 struct bdn_npiv_dlr dlr
; /* Next device level reset */
689 /* ************************* iSCSI-Boot-Module************************* */
690 struct bdn_iscsi_init
{
697 u8 ip_add
[BDN_SIZE_OF_IPV6
];
698 u8 netmask
[BDN_SIZE_OF_IPV6
];
699 u8 route
[BDN_SIZE_OF_IPV6
];
700 u8 primary_dns
[BDN_SIZE_OF_IPV6
];
701 u8 secondary_dns
[BDN_SIZE_OF_IPV6
];
702 u8 name
[BDN_SIZE_OF_ISCSI_NAME
];
705 struct bdn_iscsi_trgt
{
707 #define BDN_ISCSI_TARGET_OPT_LLMNR_ENABLE (0)
708 #define BDN_ISCSI_TARGET_OPT_ROUTE_ADV_ENABLE (1)
720 u8 ip
[BDN_SIZE_OF_IPV6
];
721 u8 ip2
[BDN_SIZE_OF_IPV6
];
722 u8 name
[BDN_SIZE_OF_ISCSI_NAME
];
727 struct bdn_iscsi_auth
{
735 u8 chap_username
[BDN_SIZE_OF_ISCSI_NAME
];
736 u8 chap_secret
[BDN_SIZE_OF_ISCSI_SEC
];
737 u8 mutual_username
[BDN_SIZE_OF_ISCSI_NAME
];
738 u8 mutual_secret
[BDN_SIZE_OF_ISCSI_SEC
];
743 struct bdn_iboot_dlr
{
746 #define BDN_ISCSI_BOOT_OPT_CVID (0)
747 #define BDN_ISCSI_BOOT_OPT_INITIATOR (1)
748 #define BDN_ISCSI_BOOT_OPT_TARGET (2)
749 #define BDN_ISCSI_BOOT_OPT_AUTH (3)
750 #define BDN_ISCSI_BOOT_OPT_HEAD_DIGEST_EN (4)
751 #define BDN_ISCSI_BOOT_OPT_DATA_DIGEST_EN (5)
758 dhcp_vendor_id_size
:8,
762 u8 dhcp_vendor_id
[BDN_SIZE_OF_DHCP_VENDOR_ID
];
766 struct bdn_iscsi_init init
;
767 struct bdn_iscsi_trgt trgt
;
768 struct bdn_iscsi_auth auth
;
772 struct bdn_dir dir
[BDN_DIR_MAX
];
774 struct bdn_iboot_dlr dlr
; /* Next device level reset */
777 /* ************************* FCoE-Boot-Module************************* */
778 struct bdn_fcoe_trgt
{
779 u8 wwpn
[BDN_SIZE_OF_WWN
];
780 u8 lunid
[BDN_SIZE_OF_FCOE_LUN_ID
];
783 struct bdn_fboot_dlr
{
790 struct bdn_fcoe_trgt trgt
[BDN_SIZE_OF_FCOE_TARGETS
];
796 struct bdn_dir dir
[BDN_DIR_MAX
];
798 struct bdn_fboot_dlr dlr
; /* Next device level reset */
801 /* ************************* NCSI-Module ************************* */
802 struct bdn_ncsi_dlr
{
812 struct bdn_dir dir
[BDN_DIR_MAX
];
814 struct bdn_ncsi_dlr dlr
;
817 /* ************************* Server-Info-Module************************* */
821 #define BDN_SERV_INFO_OPT_ILO_VLAN (0)
822 #define BDN_SERV_INFO_OPT_TIMESTAMP (1)
823 #define BDN_SERV_INFO_OPT_ENCLOSURE (2)
832 u8 ilo_addr_size
[BDN_NUM_OF_ILO_ADDR
];
833 u8 crc8
; /* the crc8 from last put command */
835 u8 serv_desc
[BDN_SIZE_OF_SERV_DESC
];
836 u8 serv_uuid
[BDN_SIZE_OF_SERV_UUID
];
837 u8 slot_info
[BDN_SIZE_OF_SERV_SLOT
];
838 u8 ilo_addr
[BDN_NUM_OF_ILO_ADDR
][BDN_SIZE_OF_ILO_ADDR
];
839 u8 timestamp
[BDN_SIZE_OF_SERV_TIME
];
840 u8 enclosure
[BDN_SIZE_OF_ENCLOSURE_ID
];
843 /* ********************* Rapid-Response-Poll-Module ******************** */
844 struct bdn_rrp_digest
{
846 u8 index
; /* the index from zero */
853 #define BDN_RRP_OPT_CCT (0)
854 #define BDN_RRP_OPT_SCI (1)
861 struct bdn_rrp_digest cct
[BDN_CCT_MAX_SIZE
];
862 struct bdn_rrp_digest sci
[BDN_SCI_MAX_SIZE
];
868 #define BDN_HEAD_SIGN_SHIFT (8)
869 #define BDN_HEAD_SIGN_MASK (0xffffff << BDN_HEAD_SIGN_SHIFT)
870 #define BDN_HEAD_SIGN_VALID (((u32)'B' << 16) | ((u32)'D' << 8) | 'N')
871 #define BDN_HEAD_SIGN_VER_SHIFT (0)
872 #define BDN_HEAD_SIGN_VER_MASK (0xff << BDN_HEAD_SIGN_VER_SHIFT)
873 #define BDN_HEAD_SIGN_VER_CURRENT (1)
874 #define BDN_HEAD_SIGN_CURRENT ((BDN_HEAD_SIGN_VALID << BDN_HEAD_SIGN_SHIFT) | (BDN_HEAD_SIGN_VER_CURRENT << BDN_HEAD_SIGN_VER_SHIFT))
888 #define BDN_DIR_GLOB_SERV_INFO 0
889 #define BDN_DIR_GLOB_BASE_DEV 1
890 #define BDN_DIR_GLOB_NCSI 2
891 #define BDN_DIR_GLOB_RRP 3
892 struct bdn_dir dir
[BDN_DIR_MAX
];
894 struct bdn_serv serv
;
895 struct bdn_base base
;
896 struct bdn_ncsi ncsi
;
903 #define BDN_DIR_PORT_NETPORT 0
904 #define BDN_DIR_PORT_FC_NPIV 1
905 #define BDN_DIR_PORT_ISCSI_BOOT 2
906 #define BDN_DIR_PORT_FCOE_BOOT 3
907 struct bdn_dir dir
[BDN_DIR_MAX
];
909 struct bdn_nport port
;
910 struct bdn_npiv npiv
;
911 struct bdn_iboot iboot
;
912 struct bdn_fboot fboot
;
917 #define BDN_DIR_FUNC_FLEX_FUNC 0
918 struct bdn_dir dir
[BDN_DIR_MAX
];
920 struct bdn_flex flex
;
926 struct bdn_head head
;
927 struct bdn_glob glob
;
928 struct bdn_port port
[MCP_GLOB_PORT_MAX
];
929 struct bdn_func func
[MCP_GLOB_FUNC_MAX
];
932 #define BDN_OFFSET_GLOB(x) (OFFSETOF(struct bdn, glob.x) & 0xffff)
933 #define BDN_OFFSET_BASE(x) (OFFSETOF(struct bdn, glob.base.x) & 0xffff)
934 #define BDN_OFFSET_NCSI(x) (OFFSETOF(struct bdn, glob.ncsi.x) & 0xffff)
935 #define BDN_OFFSET_PORT(x, y) (OFFSETOF(struct bdn, port[(x)].y) & 0xffff)
936 #define BDN_OFFSET_NPORT(x, y) (OFFSETOF(struct bdn, port[(x)].port.y) & 0xffff)
937 #define BDN_OFFSET_NPIV(x, y) (OFFSETOF(struct bdn, port[(x)].npiv.y) & 0xffff)
938 #define BDN_OFFSET_IBOOT(x, y) (OFFSETOF(struct bdn, port[(x)].iboot.y) & 0xffff)
939 #define BDN_OFFSET_FBOOT(x, y) (OFFSETOF(struct bdn, port[(x)].fboot.y) & 0xffff)
940 #define BDN_OFFSET_FUNC(x, y) (OFFSETOF(struct bdn, func[(x)].y) & 0xffff)
941 #define BDN_OFFSET_FLEX(x, y) (OFFSETOF(struct bdn, func[(x)].flex.y) & 0xffff)
942 #define BDN_OFFSET_CRC (BDN_SIZE_IMAGE_MAX - 4)
946 u8_t rsrv
[BDN_SIZE_IMAGE_MAX
];