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.
17 #ifndef __BFA_DEFS_ITNIM_H__
18 #define __BFA_DEFS_ITNIM_H__
20 #include <bfa_os_inc.h>
21 #include <protocol/types.h>
26 enum bfa_itnim_state
{
27 BFA_ITNIM_OFFLINE
= 0, /* offline */
28 BFA_ITNIM_PRLI_SEND
= 1, /* prli send */
29 BFA_ITNIM_PRLI_SENT
= 2, /* prli sent */
30 BFA_ITNIM_PRLI_RETRY
= 3, /* prli retry */
31 BFA_ITNIM_HCB_ONLINE
= 4, /* online callback */
32 BFA_ITNIM_ONLINE
= 5, /* online */
33 BFA_ITNIM_HCB_OFFLINE
= 6, /* offline callback */
34 BFA_ITNIM_INITIATIOR
= 7, /* initiator */
37 struct bfa_itnim_hal_stats_s
{
38 u32 onlines
; /* ITN nexus onlines (PRLI done) */
39 u32 offlines
; /* ITN Nexus offlines */
40 u32 creates
; /* ITN create requests */
41 u32 deletes
; /* ITN delete requests */
42 u32 create_comps
; /* ITN create completions */
43 u32 delete_comps
; /* ITN delete completions */
44 u32 sler_events
; /* SLER (sequence level error
46 u32 ioc_disabled
; /* Num IOC disables */
47 u32 cleanup_comps
; /* ITN cleanup completions */
48 u32 tm_cmnds
; /* task management(TM) cmnds sent */
49 u32 tm_fw_rsps
; /* TM cmds firmware responses */
50 u32 tm_success
; /* TM successes */
51 u32 tm_failures
; /* TM failures */
52 u32 tm_io_comps
; /* TM IO completions */
53 u32 tm_qresumes
; /* TM queue resumes (after waiting
56 u32 tm_iocdowns
; /* TM cmnds affected by IOC down */
57 u32 tm_cleanups
; /* TM cleanups */
59 /* TM cleanup completions */
60 u32 ios
; /* IO requests */
61 u32 io_comps
; /* IO completions */
62 u64 input_reqs
; /* INPUT requests */
63 u64 output_reqs
; /* OUTPUT requests */
67 * FCS remote port statistics
69 struct bfa_itnim_stats_s
{
70 u32 onlines
; /* num rport online */
71 u32 offlines
; /* num rport offline */
72 u32 prli_sent
; /* num prli sent out */
73 u32 fcxp_alloc_wait
;/* num fcxp alloc waits */
74 u32 prli_rsp_err
; /* num prli rsp errors */
75 u32 prli_rsp_acc
; /* num prli rsp accepts */
76 u32 initiator
; /* rport is an initiator */
77 u32 prli_rsp_parse_err
; /* prli rsp parsing errors */
78 u32 prli_rsp_rjt
; /* num prli rsp rejects */
79 u32 timeout
; /* num timeouts detected */
80 u32 sler
; /* num sler notification from BFA */
82 struct bfa_itnim_hal_stats_s hal_stats
;
86 * FCS itnim attributes returned in queries
88 struct bfa_itnim_attr_s
{
89 enum bfa_itnim_state state
; /* FCS itnim state */
90 u8 retry
; /* data retransmision support */
91 u8 task_retry_id
; /* task retry ident support */
92 u8 rec_support
; /* REC supported */
93 u8 conf_comp
; /* confirmed completion supp */
98 * Arguments below are in BFAL context from Mgmt
99 * BFA_ITNIM_AEN_NEW: [in]: None [out]: vf_id, lpwwn
100 * BFA_ITNIM_AEN_DELETE: [in]: vf_id, lpwwn, rpwwn (0 = all fcp4 targets),
101 * [out]: vf_id, ppwwn, lpwwn, rpwwn
102 * BFA_ITNIM_AEN_ONLINE: [in]: vf_id, lpwwn, rpwwn (0 = all fcp4 targets),
103 * [out]: vf_id, ppwwn, lpwwn, rpwwn
104 * BFA_ITNIM_AEN_OFFLINE: [in]: vf_id, lpwwn, rpwwn (0 = all fcp4 targets),
105 * [out]: vf_id, ppwwn, lpwwn, rpwwn
106 * BFA_ITNIM_AEN_DISCONNECT:[in]: vf_id, lpwwn, rpwwn (0 = all fcp4 targets),
107 * [out]: vf_id, ppwwn, lpwwn, rpwwn
109 enum bfa_itnim_aen_event
{
110 BFA_ITNIM_AEN_ONLINE
= 1, /* Target online */
111 BFA_ITNIM_AEN_OFFLINE
= 2, /* Target offline */
112 BFA_ITNIM_AEN_DISCONNECT
= 3, /* Target disconnected */
116 * BFA ITNIM event data structure.
118 struct bfa_itnim_aen_data_s
{
119 u16 vf_id
; /* vf_id of the IT nexus */
121 wwn_t ppwwn
; /* WWN of its physical port */
122 wwn_t lpwwn
; /* WWN of logical port */
123 wwn_t rpwwn
; /* WWN of remote(target) port */
126 #endif /* __BFA_DEFS_ITNIM_H__ */