1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Linux network driver for QLogic BR-series Converged Network Adapter.
6 * Copyright (c) 2005-2014 Brocade Communications Systems, Inc.
7 * Copyright (c) 2014-2015 QLogic Corporation
15 #include "bfa_defs_cna.h"
18 BFI_PORT_H2I_ENABLE_REQ = (1),
19 BFI_PORT_H2I_DISABLE_REQ = (2),
20 BFI_PORT_H2I_GET_STATS_REQ = (3),
21 BFI_PORT_H2I_CLEAR_STATS_REQ = (4),
25 BFI_PORT_I2H_ENABLE_RSP = BFA_I2HM(1),
26 BFI_PORT_I2H_DISABLE_RSP = BFA_I2HM(2),
27 BFI_PORT_I2H_GET_STATS_RSP = BFA_I2HM(3),
28 BFI_PORT_I2H_CLEAR_STATS_RSP = BFA_I2HM(4),
31 /* Generic REQ type */
32 struct bfi_port_generic_req {
33 struct bfi_mhdr mh; /*!< msg header */
34 u32 msgtag; /*!< msgtag for reply */
38 /* Generic RSP type */
39 struct bfi_port_generic_rsp {
40 struct bfi_mhdr mh; /*!< common msg header */
41 u8 status; /*!< port enable status */
43 u32 msgtag; /*!< msgtag for reply */
46 /* BFI_PORT_H2I_GET_STATS_REQ */
47 struct bfi_port_get_stats_req {
48 struct bfi_mhdr mh; /*!< common msg header */
49 union bfi_addr_u dma_addr;
52 union bfi_port_h2i_msg_u {
54 struct bfi_port_generic_req enable_req;
55 struct bfi_port_generic_req disable_req;
56 struct bfi_port_get_stats_req getstats_req;
57 struct bfi_port_generic_req clearstats_req;
60 union bfi_port_i2h_msg_u {
62 struct bfi_port_generic_rsp enable_rsp;
63 struct bfi_port_generic_rsp disable_rsp;
64 struct bfi_port_generic_rsp getstats_rsp;
65 struct bfi_port_generic_rsp clearstats_rsp;
68 /* @brief Mailbox commands from host to (DCBX/LLDP) firmware */
69 enum bfi_cee_h2i_msgs {
70 BFI_CEE_H2I_GET_CFG_REQ = 1,
71 BFI_CEE_H2I_RESET_STATS = 2,
72 BFI_CEE_H2I_GET_STATS_REQ = 3,
75 /* @brief Mailbox reply and AEN messages from DCBX/LLDP firmware to host */
76 enum bfi_cee_i2h_msgs {
77 BFI_CEE_I2H_GET_CFG_RSP = BFA_I2HM(1),
78 BFI_CEE_I2H_RESET_STATS_RSP = BFA_I2HM(2),
79 BFI_CEE_I2H_GET_STATS_RSP = BFA_I2HM(3),
85 * @brief H2I command structure for resetting the stats.
86 * BFI_CEE_H2I_RESET_STATS
88 struct bfi_lldp_reset_stats {
93 * @brief H2I command structure for resetting the stats.
94 * BFI_CEE_H2I_RESET_STATS
96 struct bfi_cee_reset_stats {
101 * @brief get configuration command from host
102 * BFI_CEE_H2I_GET_CFG_REQ
104 struct bfi_cee_get_req {
106 union bfi_addr_u dma_addr;
110 * @brief reply message from firmware
111 * BFI_CEE_I2H_GET_CFG_RSP
113 struct bfi_cee_get_rsp {
120 * @brief get configuration command from host
121 * BFI_CEE_H2I_GET_STATS_REQ
123 struct bfi_cee_stats_req {
125 union bfi_addr_u dma_addr;
129 * @brief reply message from firmware
130 * BFI_CEE_I2H_GET_STATS_RSP
132 struct bfi_cee_stats_rsp {
138 /* @brief mailbox command structures from host to firmware */
139 union bfi_cee_h2i_msg_u {
141 struct bfi_cee_get_req get_req;
142 struct bfi_cee_stats_req stats_req;
145 /* @brief mailbox message structures from firmware to host */
146 union bfi_cee_i2h_msg_u {
148 struct bfi_cee_get_rsp get_rsp;
149 struct bfi_cee_stats_rsp stats_rsp;
152 #endif /* __BFI_CNA_H__ */