upload tizen1.0 source
[kernel/linux-2.6.36.git] / drivers / scsi / bfa / include / defs / bfa_defs_vport.h
1 /*
2  * Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
3  * All rights reserved
4  * www.brocade.com
5  *
6  * Linux driver for Brocade Fibre Channel Host Bus Adapter.
7  *
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
11  *
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.
16  */
17
18 #ifndef __BFA_DEFS_VPORT_H__
19 #define __BFA_DEFS_VPORT_H__
20
21 #include <bfa_os_inc.h>
22 #include <defs/bfa_defs_port.h>
23 #include <protocol/types.h>
24
25 /**
26  * VPORT states
27  */
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,
42 };
43
44 /**
45  * vport statistics
46  */
47 struct bfa_vport_stats_s {
48         struct bfa_port_stats_s port_stats;     /*  base class (port) stats */
49         /*
50          * TODO - remove
51          */
52
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;
61         /*
62          *!< fdisc rsp unknown error
63          */
64         u32        fdisc_alloc_wait;/*  fdisc req (fcxp)alloc wait */
65
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 */
71         u32        logo_unknown_rsp;
72                         /*  logo rsp unknown errors */
73
74         u32        fab_no_npiv; /*  fabric does not support npiv */
75
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 */
79         u32        rsvd;
80 };
81
82 /**
83  * BFA vport attribute returned in queries
84  */
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 */
88         u32          rsvd;
89 };
90
91 #endif /* __BFA_DEFS_VPORT_H__ */