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.
18 #ifndef __BFA_DEFS_VPORT_H__
19 #define __BFA_DEFS_VPORT_H__
21 #include <bfa_os_inc.h>
22 #include <defs/bfa_defs_port.h>
23 #include <protocol/types.h>
28 enum bfa_vport_state
{
29 BFA_FCS_VPORT_UNINIT
= 0,
30 BFA_FCS_VPORT_CREATED
= 1,
31 BFA_FCS_VPORT_OFFLINE
= 1,
32 BFA_FCS_VPORT_FDISC_SEND
= 2,
33 BFA_FCS_VPORT_FDISC
= 3,
34 BFA_FCS_VPORT_FDISC_RETRY
= 4,
35 BFA_FCS_VPORT_ONLINE
= 5,
36 BFA_FCS_VPORT_DELETING
= 6,
37 BFA_FCS_VPORT_CLEANUP
= 6,
38 BFA_FCS_VPORT_LOGO_SEND
= 7,
39 BFA_FCS_VPORT_LOGO
= 8,
40 BFA_FCS_VPORT_ERROR
= 9,
41 BFA_FCS_VPORT_MAX_STATE
,
47 struct bfa_vport_stats_s
{
48 struct bfa_port_stats_s port_stats
; /* base class (port) stats */
53 u32 fdisc_sent
; /* num fdisc sent */
54 u32 fdisc_accepts
; /* fdisc accepts */
55 u32 fdisc_retries
; /* fdisc retries */
56 u32 fdisc_timeouts
; /* fdisc timeouts */
57 u32 fdisc_rsp_err
; /* fdisc response error */
58 u32 fdisc_acc_bad
; /* bad fdisc accepts */
59 u32 fdisc_rejects
; /* fdisc rejects */
60 u32 fdisc_unknown_rsp
;
62 *!< fdisc rsp unknown error
64 u32 fdisc_alloc_wait
;/* fdisc req (fcxp)alloc wait */
66 u32 logo_alloc_wait
;/* logo req (fcxp) alloc wait */
67 u32 logo_sent
; /* logo sent */
68 u32 logo_accepts
; /* logo accepts */
69 u32 logo_rejects
; /* logo rejects */
70 u32 logo_rsp_err
; /* logo rsp errors */
72 /* logo rsp unknown errors */
74 u32 fab_no_npiv
; /* fabric does not support npiv */
76 u32 fab_offline
; /* offline events from fab SM */
77 u32 fab_online
; /* online events from fab SM */
78 u32 fab_cleanup
; /* cleanup request from fab SM */
83 * BFA vport attribute returned in queries
85 struct bfa_vport_attr_s
{
86 struct bfa_port_attr_s port_attr
; /* base class (port) attributes */
87 enum bfa_vport_state vport_state
; /* vport state */
91 #endif /* __BFA_DEFS_VPORT_H__ */