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 __BFI_PPORT_H__
18 #define __BFI_PPORT_H__
21 #include <defs/bfa_defs_pport.h>
26 BFI_PPORT_H2I_ENABLE_REQ = (1),
27 BFI_PPORT_H2I_DISABLE_REQ = (2),
28 BFI_PPORT_H2I_GET_STATS_REQ = (3),
29 BFI_PPORT_H2I_CLEAR_STATS_REQ = (4),
30 BFI_PPORT_H2I_SET_SVC_PARAMS_REQ = (5),
31 BFI_PPORT_H2I_ENABLE_RX_VF_TAG_REQ = (6),
32 BFI_PPORT_H2I_ENABLE_TX_VF_TAG_REQ = (7),
33 BFI_PPORT_H2I_GET_QOS_STATS_REQ = (8),
34 BFI_PPORT_H2I_CLEAR_QOS_STATS_REQ = (9),
35 BFI_FCPORT_H2I_GET_STATS_REQ = (10),
36 BFI_FCPORT_H2I_CLEAR_STATS_REQ = (11),
40 BFI_PPORT_I2H_ENABLE_RSP = BFA_I2HM(1),
41 BFI_PPORT_I2H_DISABLE_RSP = BFA_I2HM(2),
42 BFI_PPORT_I2H_GET_STATS_RSP = BFA_I2HM(3),
43 BFI_PPORT_I2H_CLEAR_STATS_RSP = BFA_I2HM(4),
44 BFI_PPORT_I2H_SET_SVC_PARAMS_RSP = BFA_I2HM(5),
45 BFI_PPORT_I2H_ENABLE_RX_VF_TAG_RSP = BFA_I2HM(6),
46 BFI_PPORT_I2H_ENABLE_TX_VF_TAG_RSP = BFA_I2HM(7),
47 BFI_PPORT_I2H_EVENT = BFA_I2HM(8),
48 BFI_PPORT_I2H_GET_QOS_STATS_RSP = BFA_I2HM(9),
49 BFI_PPORT_I2H_CLEAR_QOS_STATS_RSP = BFA_I2HM(10),
50 BFI_FCPORT_I2H_GET_STATS_RSP = BFA_I2HM(11),
51 BFI_FCPORT_I2H_CLEAR_STATS_RSP = BFA_I2HM(12),
57 struct bfi_pport_generic_req_s {
58 struct bfi_mhdr_s mh; /* msg header */
59 u32 msgtag; /* msgtag for reply */
65 struct bfi_pport_generic_rsp_s {
66 struct bfi_mhdr_s mh; /* common msg header */
67 u8 status; /* port enable status */
69 u32 msgtag; /* msgtag for reply */
73 * BFI_PPORT_H2I_ENABLE_REQ
75 struct bfi_pport_enable_req_s {
76 struct bfi_mhdr_s mh; /* msg header */
78 wwn_t nwwn; /* node wwn of physical port */
79 wwn_t pwwn; /* port wwn of physical port */
80 struct bfa_pport_cfg_s port_cfg; /* port configuration */
81 union bfi_addr_u stats_dma_addr; /* DMA address for stats */
82 union bfi_addr_u fcport_stats_dma_addr;/*!< DMA address for stats */
83 u32 msgtag; /* msgtag for reply */
88 * BFI_PPORT_I2H_ENABLE_RSP
90 #define bfi_pport_enable_rsp_t struct bfi_pport_generic_rsp_s
93 * BFI_PPORT_H2I_DISABLE_REQ
95 #define bfi_pport_disable_req_t struct bfi_pport_generic_req_s
98 * BFI_PPORT_I2H_DISABLE_RSP
100 #define bfi_pport_disable_rsp_t struct bfi_pport_generic_rsp_s
103 * BFI_PPORT_H2I_GET_STATS_REQ
105 #define bfi_pport_get_stats_req_t struct bfi_pport_generic_req_s
108 * BFI_PPORT_I2H_GET_STATS_RSP
110 #define bfi_pport_get_stats_rsp_t struct bfi_pport_generic_rsp_s
113 * BFI_PPORT_H2I_CLEAR_STATS_REQ
115 #define bfi_pport_clear_stats_req_t struct bfi_pport_generic_req_s
118 * BFI_PPORT_I2H_CLEAR_STATS_RSP
120 #define bfi_pport_clear_stats_rsp_t struct bfi_pport_generic_rsp_s
123 * BFI_PPORT_H2I_GET_QOS_STATS_REQ
125 #define bfi_pport_get_qos_stats_req_t struct bfi_pport_generic_req_s
128 * BFI_PPORT_H2I_GET_QOS_STATS_RSP
130 #define bfi_pport_get_qos_stats_rsp_t struct bfi_pport_generic_rsp_s
133 * BFI_PPORT_H2I_CLEAR_QOS_STATS_REQ
135 #define bfi_pport_clear_qos_stats_req_t struct bfi_pport_generic_req_s
138 * BFI_PPORT_H2I_CLEAR_QOS_STATS_RSP
140 #define bfi_pport_clear_qos_stats_rsp_t struct bfi_pport_generic_rsp_s
143 * BFI_PPORT_H2I_SET_SVC_PARAMS_REQ
145 struct bfi_pport_set_svc_params_req_s {
146 struct bfi_mhdr_s mh; /* msg header */
147 u16 tx_bbcredit; /* Tx credits */
152 * BFI_PPORT_I2H_SET_SVC_PARAMS_RSP
156 * BFI_PPORT_I2H_EVENT
158 struct bfi_pport_event_s {
159 struct bfi_mhdr_s mh; /* common msg header */
160 struct bfa_pport_link_s link_state;
163 union bfi_pport_h2i_msg_u {
164 struct bfi_mhdr_s *mhdr;
165 struct bfi_pport_enable_req_s *penable;
166 struct bfi_pport_generic_req_s *pdisable;
167 struct bfi_pport_generic_req_s *pgetstats;
168 struct bfi_pport_generic_req_s *pclearstats;
169 struct bfi_pport_set_svc_params_req_s *psetsvcparams;
170 struct bfi_pport_get_qos_stats_req_s *pgetqosstats;
171 struct bfi_pport_generic_req_s *pclearqosstats;
174 union bfi_pport_i2h_msg_u {
175 struct bfi_msg_s *msg;
176 struct bfi_pport_generic_rsp_s *enable_rsp;
177 struct bfi_pport_disable_rsp_s *disable_rsp;
178 struct bfi_pport_generic_rsp_s *getstats_rsp;
179 struct bfi_pport_clear_stats_rsp_s *clearstats_rsp;
180 struct bfi_pport_set_svc_params_rsp_s *setsvcparasm_rsp;
181 struct bfi_pport_get_qos_stats_rsp_s *getqosstats_rsp;
182 struct bfi_pport_clear_qos_stats_rsp_s *clearqosstats_rsp;
183 struct bfi_pport_event_s *event;
188 #endif /* __BFI_PPORT_H__ */