2 * Linux network driver for QLogic BR-series 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-2014 Brocade Communications Systems, Inc.
15 * Copyright (c) 2014-2015 QLogic Corporation
23 #include "bfa_defs_cna.h"
28 BFI_PORT_H2I_ENABLE_REQ = (1),
29 BFI_PORT_H2I_DISABLE_REQ = (2),
30 BFI_PORT_H2I_GET_STATS_REQ = (3),
31 BFI_PORT_H2I_CLEAR_STATS_REQ = (4),
35 BFI_PORT_I2H_ENABLE_RSP = BFA_I2HM(1),
36 BFI_PORT_I2H_DISABLE_RSP = BFA_I2HM(2),
37 BFI_PORT_I2H_GET_STATS_RSP = BFA_I2HM(3),
38 BFI_PORT_I2H_CLEAR_STATS_RSP = BFA_I2HM(4),
41 /* Generic REQ type */
42 struct bfi_port_generic_req {
43 struct bfi_mhdr mh; /*!< msg header */
44 u32 msgtag; /*!< msgtag for reply */
48 /* Generic RSP type */
49 struct bfi_port_generic_rsp {
50 struct bfi_mhdr mh; /*!< common msg header */
51 u8 status; /*!< port enable status */
53 u32 msgtag; /*!< msgtag for reply */
56 /* BFI_PORT_H2I_GET_STATS_REQ */
57 struct bfi_port_get_stats_req {
58 struct bfi_mhdr mh; /*!< common msg header */
59 union bfi_addr_u dma_addr;
62 union bfi_port_h2i_msg_u {
64 struct bfi_port_generic_req enable_req;
65 struct bfi_port_generic_req disable_req;
66 struct bfi_port_get_stats_req getstats_req;
67 struct bfi_port_generic_req clearstats_req;
70 union bfi_port_i2h_msg_u {
72 struct bfi_port_generic_rsp enable_rsp;
73 struct bfi_port_generic_rsp disable_rsp;
74 struct bfi_port_generic_rsp getstats_rsp;
75 struct bfi_port_generic_rsp clearstats_rsp;
78 /* @brief Mailbox commands from host to (DCBX/LLDP) firmware */
79 enum bfi_cee_h2i_msgs {
80 BFI_CEE_H2I_GET_CFG_REQ = 1,
81 BFI_CEE_H2I_RESET_STATS = 2,
82 BFI_CEE_H2I_GET_STATS_REQ = 3,
85 /* @brief Mailbox reply and AEN messages from DCBX/LLDP firmware to host */
86 enum bfi_cee_i2h_msgs {
87 BFI_CEE_I2H_GET_CFG_RSP = BFA_I2HM(1),
88 BFI_CEE_I2H_RESET_STATS_RSP = BFA_I2HM(2),
89 BFI_CEE_I2H_GET_STATS_RSP = BFA_I2HM(3),
95 * @brief H2I command structure for resetting the stats.
96 * BFI_CEE_H2I_RESET_STATS
98 struct bfi_lldp_reset_stats {
103 * @brief H2I command structure for resetting the stats.
104 * BFI_CEE_H2I_RESET_STATS
106 struct bfi_cee_reset_stats {
111 * @brief get configuration command from host
112 * BFI_CEE_H2I_GET_CFG_REQ
114 struct bfi_cee_get_req {
116 union bfi_addr_u dma_addr;
120 * @brief reply message from firmware
121 * BFI_CEE_I2H_GET_CFG_RSP
123 struct bfi_cee_get_rsp {
130 * @brief get configuration command from host
131 * BFI_CEE_H2I_GET_STATS_REQ
133 struct bfi_cee_stats_req {
135 union bfi_addr_u dma_addr;
139 * @brief reply message from firmware
140 * BFI_CEE_I2H_GET_STATS_RSP
142 struct bfi_cee_stats_rsp {
148 /* @brief mailbox command structures from host to firmware */
149 union bfi_cee_h2i_msg_u {
151 struct bfi_cee_get_req get_req;
152 struct bfi_cee_stats_req stats_req;
155 /* @brief mailbox message structures from firmware to host */
156 union bfi_cee_i2h_msg_u {
158 struct bfi_cee_get_rsp get_rsp;
159 struct bfi_cee_stats_rsp stats_rsp;
164 #endif /* __BFI_CNA_H__ */