PM / sleep: Asynchronous threads for suspend_noirq
[linux/fpc-iii.git] / drivers / net / ethernet / brocade / bna / bfi_cna.h
blob6704a4392973b2721adcc771c004de46826c12c5
1 /*
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.
15 * All rights reserved
16 * www.brocade.com
18 #ifndef __BFI_CNA_H__
19 #define __BFI_CNA_H__
21 #include "bfi.h"
22 #include "bfa_defs_cna.h"
24 #pragma pack(1)
26 enum bfi_port_h2i {
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),
33 enum bfi_port_i2h {
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),
40 /* Generic REQ type */
41 struct bfi_port_generic_req {
42 struct bfi_mhdr mh; /*!< msg header */
43 u32 msgtag; /*!< msgtag for reply */
44 u32 rsvd;
47 /* Generic RSP type */
48 struct bfi_port_generic_rsp {
49 struct bfi_mhdr mh; /*!< common msg header */
50 u8 status; /*!< port enable status */
51 u8 rsvd[3];
52 u32 msgtag; /*!< msgtag for reply */
55 /* BFI_PORT_H2I_GET_STATS_REQ */
56 struct bfi_port_get_stats_req {
57 struct bfi_mhdr mh; /*!< common msg header */
58 union bfi_addr_u dma_addr;
61 union bfi_port_h2i_msg_u {
62 struct bfi_mhdr mh;
63 struct bfi_port_generic_req enable_req;
64 struct bfi_port_generic_req disable_req;
65 struct bfi_port_get_stats_req getstats_req;
66 struct bfi_port_generic_req clearstats_req;
69 union bfi_port_i2h_msg_u {
70 struct bfi_mhdr mh;
71 struct bfi_port_generic_rsp enable_rsp;
72 struct bfi_port_generic_rsp disable_rsp;
73 struct bfi_port_generic_rsp getstats_rsp;
74 struct bfi_port_generic_rsp clearstats_rsp;
77 /* @brief Mailbox commands from host to (DCBX/LLDP) firmware */
78 enum bfi_cee_h2i_msgs {
79 BFI_CEE_H2I_GET_CFG_REQ = 1,
80 BFI_CEE_H2I_RESET_STATS = 2,
81 BFI_CEE_H2I_GET_STATS_REQ = 3,
84 /* @brief Mailbox reply and AEN messages from DCBX/LLDP firmware to host */
85 enum bfi_cee_i2h_msgs {
86 BFI_CEE_I2H_GET_CFG_RSP = BFA_I2HM(1),
87 BFI_CEE_I2H_RESET_STATS_RSP = BFA_I2HM(2),
88 BFI_CEE_I2H_GET_STATS_RSP = BFA_I2HM(3),
91 /* Data structures */
94 * @brief H2I command structure for resetting the stats.
95 * BFI_CEE_H2I_RESET_STATS
97 struct bfi_lldp_reset_stats {
98 struct bfi_mhdr mh;
102 * @brief H2I command structure for resetting the stats.
103 * BFI_CEE_H2I_RESET_STATS
105 struct bfi_cee_reset_stats {
106 struct bfi_mhdr mh;
110 * @brief get configuration command from host
111 * BFI_CEE_H2I_GET_CFG_REQ
113 struct bfi_cee_get_req {
114 struct bfi_mhdr mh;
115 union bfi_addr_u dma_addr;
119 * @brief reply message from firmware
120 * BFI_CEE_I2H_GET_CFG_RSP
122 struct bfi_cee_get_rsp {
123 struct bfi_mhdr mh;
124 u8 cmd_status;
125 u8 rsvd[3];
129 * @brief get configuration command from host
130 * BFI_CEE_H2I_GET_STATS_REQ
132 struct bfi_cee_stats_req {
133 struct bfi_mhdr mh;
134 union bfi_addr_u dma_addr;
138 * @brief reply message from firmware
139 * BFI_CEE_I2H_GET_STATS_RSP
141 struct bfi_cee_stats_rsp {
142 struct bfi_mhdr mh;
143 u8 cmd_status;
144 u8 rsvd[3];
147 /* @brief mailbox command structures from host to firmware */
148 union bfi_cee_h2i_msg_u {
149 struct bfi_mhdr mh;
150 struct bfi_cee_get_req get_req;
151 struct bfi_cee_stats_req stats_req;
154 /* @brief mailbox message structures from firmware to host */
155 union bfi_cee_i2h_msg_u {
156 struct bfi_mhdr mh;
157 struct bfi_cee_get_rsp get_rsp;
158 struct bfi_cee_stats_rsp stats_rsp;
161 #pragma pack()
163 #endif /* __BFI_CNA_H__ */