2 * Linux network driver for Brocade Converged Network Adapter.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License (GPL) Version 2 as
6 * published by the Free Software Foundation
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
14 * Copyright (c) 2005-2010 Brocade Communications Systems, Inc.
22 #include "bfa_defs_cna.h"
27 BFI_PORT_H2I_ENABLE_REQ
= (1),
28 BFI_PORT_H2I_DISABLE_REQ
= (2),
29 BFI_PORT_H2I_GET_STATS_REQ
= (3),
30 BFI_PORT_H2I_CLEAR_STATS_REQ
= (4),
34 BFI_PORT_I2H_ENABLE_RSP
= BFA_I2HM(1),
35 BFI_PORT_I2H_DISABLE_RSP
= BFA_I2HM(2),
36 BFI_PORT_I2H_GET_STATS_RSP
= BFA_I2HM(3),
37 BFI_PORT_I2H_CLEAR_STATS_RSP
= BFA_I2HM(4),
43 struct bfi_port_generic_req
{
44 struct bfi_mhdr mh
; /*!< msg header */
45 u32 msgtag
; /*!< msgtag for reply */
52 struct bfi_port_generic_rsp
{
53 struct bfi_mhdr mh
; /*!< common msg header */
54 u8 status
; /*!< port enable status */
56 u32 msgtag
; /*!< msgtag for reply */
61 * BFI_PORT_H2I_ENABLE_REQ
66 * BFI_PORT_I2H_ENABLE_RSP
70 * BFI_PORT_H2I_DISABLE_REQ
74 * BFI_PORT_I2H_DISABLE_RSP
78 * BFI_PORT_H2I_GET_STATS_REQ
80 struct bfi_port_get_stats_req
{
81 struct bfi_mhdr mh
; /*!< common msg header */
82 union bfi_addr_u dma_addr
;
86 * BFI_PORT_I2H_GET_STATS_RSP
90 * BFI_PORT_H2I_CLEAR_STATS_REQ
94 * BFI_PORT_I2H_CLEAR_STATS_RSP
97 union bfi_port_h2i_msg_u
{
99 struct bfi_port_generic_req enable_req
;
100 struct bfi_port_generic_req disable_req
;
101 struct bfi_port_get_stats_req getstats_req
;
102 struct bfi_port_generic_req clearstats_req
;
105 union bfi_port_i2h_msg_u
{
107 struct bfi_port_generic_rsp enable_rsp
;
108 struct bfi_port_generic_rsp disable_rsp
;
109 struct bfi_port_generic_rsp getstats_rsp
;
110 struct bfi_port_generic_rsp clearstats_rsp
;
113 /* @brief Mailbox commands from host to (DCBX/LLDP) firmware */
114 enum bfi_cee_h2i_msgs
{
115 BFI_CEE_H2I_GET_CFG_REQ
= 1,
116 BFI_CEE_H2I_RESET_STATS
= 2,
117 BFI_CEE_H2I_GET_STATS_REQ
= 3,
120 /* @brief Mailbox reply and AEN messages from DCBX/LLDP firmware to host */
121 enum bfi_cee_i2h_msgs
{
122 BFI_CEE_I2H_GET_CFG_RSP
= BFA_I2HM(1),
123 BFI_CEE_I2H_RESET_STATS_RSP
= BFA_I2HM(2),
124 BFI_CEE_I2H_GET_STATS_RSP
= BFA_I2HM(3),
127 /* Data structures */
130 * @brief H2I command structure for resetting the stats.
131 * BFI_CEE_H2I_RESET_STATS
133 struct bfi_lldp_reset_stats
{
138 * @brief H2I command structure for resetting the stats.
139 * BFI_CEE_H2I_RESET_STATS
141 struct bfi_cee_reset_stats
{
146 * @brief get configuration command from host
147 * BFI_CEE_H2I_GET_CFG_REQ
149 struct bfi_cee_get_req
{
151 union bfi_addr_u dma_addr
;
155 * @brief reply message from firmware
156 * BFI_CEE_I2H_GET_CFG_RSP
158 struct bfi_cee_get_rsp
{
165 * @brief get configuration command from host
166 * BFI_CEE_H2I_GET_STATS_REQ
168 struct bfi_cee_stats_req
{
170 union bfi_addr_u dma_addr
;
174 * @brief reply message from firmware
175 * BFI_CEE_I2H_GET_STATS_RSP
177 struct bfi_cee_stats_rsp
{
183 /* @brief mailbox command structures from host to firmware */
184 union bfi_cee_h2i_msg_u
{
186 struct bfi_cee_get_req get_req
;
187 struct bfi_cee_stats_req stats_req
;
190 /* @brief mailbox message structures from firmware to host */
191 union bfi_cee_i2h_msg_u
{
193 struct bfi_cee_get_rsp get_rsp
;
194 struct bfi_cee_stats_rsp stats_rsp
;
199 #endif /* __BFI_CNA_H__ */