2 * Copyright (c) 2005-2010 Brocade Communications Systems, Inc.
6 * Linux driver for Brocade Fibre Channel Host Bus Adapter.
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License (GPL) Version 2 as
10 * published by the Free Software Foundation
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
21 #include "bfa_defs_fcs.h"
23 /* Definitions of vendor unique structures and command codes passed in
24 * using FC_BSG_HST_VENDOR message code.
27 IOCMD_IOC_ENABLE
= 0x1,
32 IOCMD_IOC_GET_FWSTATS
,
40 IOCMD_LPORT_GET_RPORTS
,
41 IOCMD_LPORT_GET_STATS
,
42 IOCMD_LPORT_GET_IOSTATS
,
45 IOCMD_RPORT_GET_STATS
,
46 IOCMD_FABRIC_GET_LPORTS
,
48 IOCMD_FCPIM_DEL_ITN_STATS
,
50 IOCMD_ITNIM_GET_IOSTATS
,
51 IOCMD_ITNIM_GET_ITNSTATS
,
58 IOCMD_ADAPTER_CFG_MODE
,
60 IOCMD_FLASH_ENABLE_OPTROM
,
61 IOCMD_FLASH_DISABLE_OPTROM
,
67 IOCMD_CEE_RESET_STATS
,
72 struct bfa_bsg_gen_s
{
78 struct bfa_bsg_ioc_info_s
{
83 char hwpath
[BFA_STRING_32
];
84 char adapter_hwpath
[BFA_STRING_32
];
85 char guid
[BFA_ADAPTER_SYM_NAME_LEN
*2];
86 char name
[BFA_ADAPTER_SYM_NAME_LEN
];
87 char port_name
[BFA_ADAPTER_SYM_NAME_LEN
];
88 char eth_name
[BFA_ADAPTER_SYM_NAME_LEN
];
94 mac_t factory_mac
; /* Factory mac address */
95 mac_t current_mac
; /* Currently assigned mac address */
96 enum bfa_ioc_type_e ioc_type
;
97 u16 pvid
; /* Port vlan id */
100 u32 bandwidth
; /* For PF support */
104 struct bfa_bsg_ioc_attr_s
{
108 struct bfa_ioc_attr_s ioc_attr
;
111 struct bfa_bsg_ioc_stats_s
{
115 struct bfa_ioc_stats_s ioc_stats
;
118 struct bfa_bsg_ioc_fwstats_s
{
127 struct bfa_bsg_iocfc_attr_s
{
131 struct bfa_iocfc_attr_s iocfc_attr
;
134 struct bfa_bsg_iocfc_intr_s
{
138 struct bfa_iocfc_intr_attr_s attr
;
141 struct bfa_bsg_port_attr_s
{
145 struct bfa_port_attr_s attr
;
148 struct bfa_bsg_port_stats_s
{
157 struct bfa_bsg_lport_attr_s
{
162 struct bfa_lport_attr_s port_attr
;
165 struct bfa_bsg_lport_stats_s
{
170 struct bfa_lport_stats_s port_stats
;
173 struct bfa_bsg_lport_iostats_s
{
178 struct bfa_itnim_iostats_s iostats
;
181 struct bfa_bsg_lport_get_rports_s
{
191 struct bfa_bsg_rport_attr_s
{
197 struct bfa_rport_attr_s attr
;
200 struct bfa_bsg_rport_stats_s
{
206 struct bfa_rport_stats_s stats
;
209 struct bfa_bsg_rport_scsi_addr_s
{
221 struct bfa_bsg_fabric_get_lports_s
{
230 struct bfa_bsg_fcpim_modstats_s
{
233 struct bfa_itnim_iostats_s modstats
;
236 struct bfa_bsg_fcpim_del_itn_stats_s
{
239 struct bfa_fcpim_del_itn_stats_s modstats
;
242 struct bfa_bsg_itnim_attr_s
{
248 struct bfa_itnim_attr_s attr
;
251 struct bfa_bsg_itnim_iostats_s
{
257 struct bfa_itnim_iostats_s iostats
;
260 struct bfa_bsg_itnim_itnstats_s
{
266 struct bfa_itnim_stats_s itnstats
;
269 struct bfa_bsg_pcifn_cfg_s
{
273 struct bfa_ablk_cfg_s pcifn_cfg
;
276 struct bfa_bsg_pcifn_s
{
282 enum bfi_pcifn_class pcifn_class
;
286 struct bfa_bsg_adapter_cfg_mode_s
{
290 struct bfa_adapter_cfg_mode_s cfg
;
293 struct bfa_bsg_port_cfg_mode_s
{
297 struct bfa_port_cfg_mode_s cfg
;
300 struct bfa_bsg_faa_attr_s
{
304 struct bfa_faa_attr_s faa_attr
;
307 struct bfa_bsg_cee_attr_s
{
316 struct bfa_bsg_cee_stats_s
{
325 struct bfa_bsg_sfp_media_s
{
329 enum bfa_defs_sfp_media_e media
;
332 struct bfa_bsg_sfp_speed_s
{
336 enum bfa_port_speed speed
;
339 struct bfa_bsg_fcpt_s
{
349 #define bfa_bsg_fcpt_t struct bfa_bsg_fcpt_s
351 struct bfa_bsg_data
{
356 #define bfad_chk_iocmd_sz(__payload_len, __hdrsz, __bufsz) \
357 (((__payload_len) != ((__hdrsz) + (__bufsz))) ? \
358 BFA_STATUS_FAILED : BFA_STATUS_OK)
360 #endif /* BFAD_BSG_H */