2 * Copyright (c) 2005-2009 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 <cs/bfa_debug.h>
22 #include <defs/bfa_defs_status.h>
23 #include <defs/bfa_defs_version.h>
25 #include <fcs/bfa_fcs_fabric.h>
27 #define BFA_FCS_OS_STR_LEN 64
29 struct bfa_fcs_stats_s
{
31 u32 untagged
; /* untagged receive frames */
32 u32 tagged
; /* tagged receive frames */
33 u32 vfid_unknown
; /* VF id is unknown */
37 struct bfa_fcs_driver_info_s
{
38 u8 version
[BFA_VERSION_LEN
]; /* Driver Version */
39 u8 host_machine_name
[BFA_FCS_OS_STR_LEN
];
40 u8 host_os_name
[BFA_FCS_OS_STR_LEN
]; /* OS name and version */
41 u8 host_os_patch
[BFA_FCS_OS_STR_LEN
];/* patch or service pack */
42 u8 os_device_name
[BFA_FCS_OS_STR_LEN
]; /* Driver Device Name */
46 struct bfa_s
*bfa
; /* corresponding BFA bfa instance */
47 struct bfad_s
*bfad
; /* corresponding BDA driver instance */
48 struct bfa_log_mod_s
*logm
; /* driver logging module instance */
49 struct bfa_trc_mod_s
*trcmod
; /* tracing module */
50 struct bfa_aen_s
*aen
; /* aen component */
51 bfa_boolean_t vf_enabled
; /* VF mode is enabled */
52 bfa_boolean_t fdmi_enabled
; /*!< FDMI is enabled */
53 bfa_boolean_t min_cfg
; /* min cfg enabled/disabled */
54 u16 port_vfid
; /* port default VF ID */
55 struct bfa_fcs_driver_info_s driver_info
;
56 struct bfa_fcs_fabric_s fabric
; /* base fabric state machine */
57 struct bfa_fcs_stats_s stats
; /* FCS statistics */
58 struct bfa_wc_s wc
; /* waiting counter */
62 * bfa fcs API functions
64 void bfa_fcs_attach(struct bfa_fcs_s
*fcs
, struct bfa_s
*bfa
, struct bfad_s
*bfad
,
65 bfa_boolean_t min_cfg
);
66 void bfa_fcs_init(struct bfa_fcs_s
*fcs
);
67 void bfa_fcs_driver_info_init(struct bfa_fcs_s
*fcs
,
68 struct bfa_fcs_driver_info_s
*driver_info
);
69 void bfa_fcs_set_fdmi_param(struct bfa_fcs_s
*fcs
, bfa_boolean_t fdmi_enable
);
70 void bfa_fcs_exit(struct bfa_fcs_s
*fcs
);
71 void bfa_fcs_trc_init(struct bfa_fcs_s
*fcs
, struct bfa_trc_mod_s
*trcmod
);
72 void bfa_fcs_log_init(struct bfa_fcs_s
*fcs
, struct bfa_log_mod_s
*logmod
);
73 void bfa_fcs_aen_init(struct bfa_fcs_s
*fcs
, struct bfa_aen_s
*aen
);
74 void bfa_fcs_start(struct bfa_fcs_s
*fcs
);
76 #endif /* __BFA_FCS_H__ */