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),
38 BFI_PPORT_I2H_ENABLE_RSP
= BFA_I2HM(1),
39 BFI_PPORT_I2H_DISABLE_RSP
= BFA_I2HM(2),
40 BFI_PPORT_I2H_GET_STATS_RSP
= BFA_I2HM(3),
41 BFI_PPORT_I2H_CLEAR_STATS_RSP
= BFA_I2HM(4),
42 BFI_PPORT_I2H_SET_SVC_PARAMS_RSP
= BFA_I2HM(5),
43 BFI_PPORT_I2H_ENABLE_RX_VF_TAG_RSP
= BFA_I2HM(6),
44 BFI_PPORT_I2H_ENABLE_TX_VF_TAG_RSP
= BFA_I2HM(7),
45 BFI_PPORT_I2H_EVENT
= BFA_I2HM(8),
46 BFI_PPORT_I2H_GET_QOS_STATS_RSP
= BFA_I2HM(9),
47 BFI_PPORT_I2H_CLEAR_QOS_STATS_RSP
= BFA_I2HM(10),
53 struct bfi_pport_generic_req_s
{
54 struct bfi_mhdr_s mh
; /* msg header */
55 u32 msgtag
; /* msgtag for reply */
61 struct bfi_pport_generic_rsp_s
{
62 struct bfi_mhdr_s mh
; /* common msg header */
63 u8 status
; /* port enable status */
65 u32 msgtag
; /* msgtag for reply */
69 * BFI_PPORT_H2I_ENABLE_REQ
71 struct bfi_pport_enable_req_s
{
72 struct bfi_mhdr_s mh
; /* msg header */
74 wwn_t nwwn
; /* node wwn of physical port */
75 wwn_t pwwn
; /* port wwn of physical port */
76 struct bfa_pport_cfg_s port_cfg
; /* port configuration */
77 union bfi_addr_u stats_dma_addr
; /* DMA address for stats */
78 u32 msgtag
; /* msgtag for reply */
83 * BFI_PPORT_I2H_ENABLE_RSP
85 #define bfi_pport_enable_rsp_t struct bfi_pport_generic_rsp_s
88 * BFI_PPORT_H2I_DISABLE_REQ
90 #define bfi_pport_disable_req_t struct bfi_pport_generic_req_s
93 * BFI_PPORT_I2H_DISABLE_RSP
95 #define bfi_pport_disable_rsp_t struct bfi_pport_generic_rsp_s
98 * BFI_PPORT_H2I_GET_STATS_REQ
100 #define bfi_pport_get_stats_req_t struct bfi_pport_generic_req_s
103 * BFI_PPORT_I2H_GET_STATS_RSP
105 #define bfi_pport_get_stats_rsp_t struct bfi_pport_generic_rsp_s
108 * BFI_PPORT_H2I_CLEAR_STATS_REQ
110 #define bfi_pport_clear_stats_req_t struct bfi_pport_generic_req_s
113 * BFI_PPORT_I2H_CLEAR_STATS_RSP
115 #define bfi_pport_clear_stats_rsp_t struct bfi_pport_generic_rsp_s
118 * BFI_PPORT_H2I_GET_QOS_STATS_REQ
120 #define bfi_pport_get_qos_stats_req_t struct bfi_pport_generic_req_s
123 * BFI_PPORT_H2I_GET_QOS_STATS_RSP
125 #define bfi_pport_get_qos_stats_rsp_t struct bfi_pport_generic_rsp_s
128 * BFI_PPORT_H2I_CLEAR_QOS_STATS_REQ
130 #define bfi_pport_clear_qos_stats_req_t struct bfi_pport_generic_req_s
133 * BFI_PPORT_H2I_CLEAR_QOS_STATS_RSP
135 #define bfi_pport_clear_qos_stats_rsp_t struct bfi_pport_generic_rsp_s
138 * BFI_PPORT_H2I_SET_SVC_PARAMS_REQ
140 struct bfi_pport_set_svc_params_req_s
{
141 struct bfi_mhdr_s mh
; /* msg header */
142 u16 tx_bbcredit
; /* Tx credits */
147 * BFI_PPORT_I2H_SET_SVC_PARAMS_RSP
151 * BFI_PPORT_I2H_EVENT
153 struct bfi_pport_event_s
{
154 struct bfi_mhdr_s mh
; /* common msg header */
155 struct bfa_pport_link_s link_state
;
158 union bfi_pport_h2i_msg_u
{
159 struct bfi_mhdr_s
*mhdr
;
160 struct bfi_pport_enable_req_s
*penable
;
161 struct bfi_pport_generic_req_s
*pdisable
;
162 struct bfi_pport_generic_req_s
*pgetstats
;
163 struct bfi_pport_generic_req_s
*pclearstats
;
164 struct bfi_pport_set_svc_params_req_s
*psetsvcparams
;
165 struct bfi_pport_get_qos_stats_req_s
*pgetqosstats
;
166 struct bfi_pport_generic_req_s
*pclearqosstats
;
169 union bfi_pport_i2h_msg_u
{
170 struct bfi_msg_s
*msg
;
171 struct bfi_pport_generic_rsp_s
*enable_rsp
;
172 struct bfi_pport_disable_rsp_s
*disable_rsp
;
173 struct bfi_pport_generic_rsp_s
*getstats_rsp
;
174 struct bfi_pport_clear_stats_rsp_s
*clearstats_rsp
;
175 struct bfi_pport_set_svc_params_rsp_s
*setsvcparasm_rsp
;
176 struct bfi_pport_get_qos_stats_rsp_s
*getqosstats_rsp
;
177 struct bfi_pport_clear_qos_stats_rsp_s
*clearqosstats_rsp
;
178 struct bfi_pport_event_s
*event
;
183 #endif /* __BFI_PPORT_H__ */