RT-AC56 3.0.0.4.374.37 core
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / drivers / scsi / bfa / include / defs / bfa_defs_status.h
blob6eb4e62096fce1334883745a85c82ea71891a0db
1 /*
2 * Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
3 * All rights reserved
4 * www.brocade.com
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 __BFA_DEFS_STATUS_H__
18 #define __BFA_DEFS_STATUS_H__
20 /**
21 * API status return values
23 * NOTE: The error msgs are auto generated from the comments. Only singe line
24 * comments are supported
26 enum bfa_status {
27 BFA_STATUS_OK = 0, /* Success */
28 BFA_STATUS_FAILED = 1, /* Operation failed */
29 BFA_STATUS_EINVAL = 2, /* Invalid params Check input
30 * parameters */
31 BFA_STATUS_ENOMEM = 3, /* Out of resources */
32 BFA_STATUS_ENOSYS = 4, /* Function not implemented */
33 BFA_STATUS_ETIMER = 5, /* Timer expired - Retry, if
34 * persists, contact support */
35 BFA_STATUS_EPROTOCOL = 6, /* Protocol error */
36 BFA_STATUS_ENOFCPORTS = 7, /* No FC ports resources */
37 BFA_STATUS_NOFLASH = 8, /* Flash not present */
38 BFA_STATUS_BADFLASH = 9, /* Flash is corrupted or bad */
39 BFA_STATUS_SFP_UNSUPP = 10, /* Unsupported SFP - Replace SFP */
40 BFA_STATUS_UNKNOWN_VFID = 11, /* VF_ID not found */
41 BFA_STATUS_DATACORRUPTED = 12, /* Diag returned data corrupted
42 * contact support */
43 BFA_STATUS_DEVBUSY = 13, /* Device busy - Retry operation */
44 BFA_STATUS_ABORTED = 14, /* Operation aborted */
45 BFA_STATUS_NODEV = 15, /* Dev is not present */
46 BFA_STATUS_HDMA_FAILED = 16, /* Host dma failed contact support */
47 BFA_STATUS_FLASH_BAD_LEN = 17, /* Flash bad length */
48 BFA_STATUS_UNKNOWN_LWWN = 18, /* LPORT PWWN not found */
49 BFA_STATUS_UNKNOWN_RWWN = 19, /* RPORT PWWN not found */
50 BFA_STATUS_FCPT_LS_RJT = 20, /* Got LS_RJT for FC Pass
51 * through Req */
52 BFA_STATUS_VPORT_EXISTS = 21, /* VPORT already exists */
53 BFA_STATUS_VPORT_MAX = 22, /* Reached max VPORT supported
54 * limit */
55 BFA_STATUS_UNSUPP_SPEED = 23, /* Invalid Speed Check speed
56 * setting */
57 BFA_STATUS_INVLD_DFSZ = 24, /* Invalid Max data field size */
58 BFA_STATUS_CNFG_FAILED = 25, /* Setting can not be persisted */
59 BFA_STATUS_CMD_NOTSUPP = 26, /* Command/API not supported */
60 BFA_STATUS_NO_ADAPTER = 27, /* No Brocade Adapter Found */
61 BFA_STATUS_LINKDOWN = 28, /* Link is down - Check or replace
62 * SFP/cable */
63 BFA_STATUS_FABRIC_RJT = 29, /* Reject from attached fabric */
64 BFA_STATUS_UNKNOWN_VWWN = 30, /* VPORT PWWN not found */
65 BFA_STATUS_NSLOGIN_FAILED = 31, /* Nameserver login failed */
66 BFA_STATUS_NO_RPORTS = 32, /* No remote ports found */
67 BFA_STATUS_NSQUERY_FAILED = 33, /* Nameserver query failed */
68 BFA_STATUS_PORT_OFFLINE = 34, /* Port is not online */
69 BFA_STATUS_RPORT_OFFLINE = 35, /* RPORT is not online */
70 BFA_STATUS_TGTOPEN_FAILED = 36, /* Remote SCSI target open failed */
71 BFA_STATUS_BAD_LUNS = 37, /* No valid LUNs found */
72 BFA_STATUS_IO_FAILURE = 38, /* SCSI target IO failure */
73 BFA_STATUS_NO_FABRIC = 39, /* No switched fabric present */
74 BFA_STATUS_EBADF = 40, /* Bad file descriptor */
75 BFA_STATUS_EINTR = 41, /* A signal was caught during ioctl */
76 BFA_STATUS_EIO = 42, /* I/O error */
77 BFA_STATUS_ENOTTY = 43, /* Inappropriate I/O control
78 * operation */
79 BFA_STATUS_ENXIO = 44, /* No such device or address */
80 BFA_STATUS_EFOPEN = 45, /* Failed to open file */
81 BFA_STATUS_VPORT_WWN_BP = 46, /* WWN is same as base port's WWN */
82 BFA_STATUS_PORT_NOT_DISABLED = 47, /* Port not disabled disable port
83 * first */
84 BFA_STATUS_BADFRMHDR = 48, /* Bad frame header */
85 BFA_STATUS_BADFRMSZ = 49, /* Bad frame size check and replace
86 * SFP/cable */
87 BFA_STATUS_MISSINGFRM = 50, /* Missing frame check and replace
88 * SFP/cable or for Mezz card check and
89 * replace pass through module */
90 BFA_STATUS_LINKTIMEOUT = 51, /* Link timeout check and replace
91 * SFP/cable */
92 BFA_STATUS_NO_FCPIM_NEXUS = 52, /* No FCP Nexus exists with the
93 * rport */
94 BFA_STATUS_CHECKSUM_FAIL = 53, /* checksum failure */
95 BFA_STATUS_GZME_FAILED = 54, /* Get zone member query failed */
96 BFA_STATUS_SCSISTART_REQD = 55, /* SCSI disk require START command */
97 BFA_STATUS_IOC_FAILURE = 56, /* IOC failure - Retry, if persists
98 * contact support */
99 BFA_STATUS_INVALID_WWN = 57, /* Invalid WWN */
100 BFA_STATUS_MISMATCH = 58, /* Version mismatch */
101 BFA_STATUS_IOC_ENABLED = 59, /* IOC is already enabled */
102 BFA_STATUS_ADAPTER_ENABLED = 60, /* Adapter is not disabled disable
103 * adapter first */
104 BFA_STATUS_IOC_NON_OP = 61, /* IOC is not operational. Enable IOC
105 * and if it still fails,
106 * contact support */
107 BFA_STATUS_ADDR_MAP_FAILURE = 62, /* PCI base address not mapped
108 * in OS */
109 BFA_STATUS_SAME_NAME = 63, /* Name exists! use a different
110 * name */
111 BFA_STATUS_PENDING = 64, /* API completes asynchronously */
112 BFA_STATUS_8G_SPD = 65, /* Speed setting not valid for
113 * 8G HBA */
114 BFA_STATUS_4G_SPD = 66, /* Speed setting not valid for
115 * 4G HBA */
116 BFA_STATUS_AD_IS_ENABLE = 67, /* Adapter is already enabled */
117 BFA_STATUS_EINVAL_TOV = 68, /* Invalid path failover TOV */
118 BFA_STATUS_EINVAL_QDEPTH = 69, /* Invalid queue depth value */
119 BFA_STATUS_VERSION_FAIL = 70, /* Application/Driver version
120 * mismatch */
121 BFA_STATUS_DIAG_BUSY = 71, /* diag busy */
122 BFA_STATUS_BEACON_ON = 72, /* Port Beacon already on */
123 BFA_STATUS_BEACON_OFF = 73, /* Port Beacon already off */
124 BFA_STATUS_LBEACON_ON = 74, /* Link End-to-End Beacon already
125 * on */
126 BFA_STATUS_LBEACON_OFF = 75, /* Link End-to-End Beacon already
127 * off */
128 BFA_STATUS_PORT_NOT_INITED = 76, /* Port not initialized */
129 BFA_STATUS_RPSC_ENABLED = 77, /* Target has a valid speed */
130 BFA_STATUS_ENOFSAVE = 78, /* No saved firmware trace */
131 BFA_STATUS_BAD_FILE = 79, /* Not a valid Brocade Boot Code
132 * file */
133 BFA_STATUS_RLIM_EN = 80, /* Target rate limiting is already
134 * enabled */
135 BFA_STATUS_RLIM_DIS = 81, /* Target rate limiting is already
136 * disabled */
137 BFA_STATUS_IOC_DISABLED = 82, /* IOC is already disabled */
138 BFA_STATUS_ADAPTER_DISABLED = 83, /* Adapter is already disabled */
139 BFA_STATUS_BIOS_DISABLED = 84, /* Bios is already disabled */
140 BFA_STATUS_AUTH_ENABLED = 85, /* Authentication is already
141 * enabled */
142 BFA_STATUS_AUTH_DISABLED = 86, /* Authentication is already
143 * disabled */
144 BFA_STATUS_ERROR_TRL_ENABLED = 87, /* Target rate limiting is
145 * enabled */
146 BFA_STATUS_ERROR_QOS_ENABLED = 88, /* QoS is enabled */
147 BFA_STATUS_NO_SFP_DEV = 89, /* No SFP device check or replace SFP */
148 BFA_STATUS_MEMTEST_FAILED = 90, /* Memory test failed contact
149 * support */
150 BFA_STATUS_INVALID_DEVID = 91, /* Invalid device id provided */
151 BFA_STATUS_QOS_ENABLED = 92, /* QOS is already enabled */
152 BFA_STATUS_QOS_DISABLED = 93, /* QOS is already disabled */
153 BFA_STATUS_INCORRECT_DRV_CONFIG = 94, /* Check configuration
154 * key/value pair */
155 BFA_STATUS_REG_FAIL = 95, /* Can't read windows registry */
156 BFA_STATUS_IM_INV_CODE = 96, /* Invalid IOCTL code */
157 BFA_STATUS_IM_INV_VLAN = 97, /* Invalid VLAN ID */
158 BFA_STATUS_IM_INV_ADAPT_NAME = 98, /* Invalid adapter name */
159 BFA_STATUS_IM_LOW_RESOURCES = 99, /* Memory allocation failure in
160 * driver */
161 BFA_STATUS_IM_VLANID_IS_PVID = 100, /* Given VLAN id same as PVID */
162 BFA_STATUS_IM_VLANID_EXISTS = 101, /* Given VLAN id already exists */
163 BFA_STATUS_IM_FW_UPDATE_FAIL = 102, /* Updating firmware with new
164 * VLAN ID failed */
165 BFA_STATUS_PORTLOG_ENABLED = 103, /* Port Log is already enabled */
166 BFA_STATUS_PORTLOG_DISABLED = 104, /* Port Log is already disabled */
167 BFA_STATUS_FILE_NOT_FOUND = 105, /* Specified file could not be
168 * found */
169 BFA_STATUS_QOS_FC_ONLY = 106, /* QOS can be enabled for FC mode
170 * only */
171 BFA_STATUS_RLIM_FC_ONLY = 107, /* RATELIM can be enabled for FC mode
172 * only */
173 BFA_STATUS_CT_SPD = 108, /* Invalid speed selection for Catapult. */
174 BFA_STATUS_LEDTEST_OP = 109, /* LED test is operating */
175 BFA_STATUS_CEE_NOT_DN = 110, /* eth port is not at down state, please
176 * bring down first */
177 BFA_STATUS_10G_SPD = 111, /* Speed setting not valid for 10G CNA */
178 BFA_STATUS_IM_INV_TEAM_NAME = 112, /* Invalid team name */
179 BFA_STATUS_IM_DUP_TEAM_NAME = 113, /* Given team name already
180 * exists */
181 BFA_STATUS_IM_ADAPT_ALREADY_IN_TEAM = 114, /* Given adapter is part
182 * of another team */
183 BFA_STATUS_IM_ADAPT_HAS_VLANS = 115, /* Adapter has VLANs configured.
184 * Delete all VLANs to become
185 * part of the team */
186 BFA_STATUS_IM_PVID_MISMATCH = 116, /* Mismatching PVIDs configured
187 * for adapters */
188 BFA_STATUS_IM_LINK_SPEED_MISMATCH = 117, /* Mismatching link speeds
189 * configured for adapters */
190 BFA_STATUS_IM_MTU_MISMATCH = 118, /* Mismatching MTUs configured for
191 * adapters */
192 BFA_STATUS_IM_RSS_MISMATCH = 119, /* Mismatching RSS parameters
193 * configured for adapters */
194 BFA_STATUS_IM_HDS_MISMATCH = 120, /* Mismatching HDS parameters
195 * configured for adapters */
196 BFA_STATUS_IM_OFFLOAD_MISMATCH = 121, /* Mismatching offload
197 * parameters configured for
198 * adapters */
199 BFA_STATUS_IM_PORT_PARAMS = 122, /* Error setting port parameters */
200 BFA_STATUS_IM_PORT_NOT_IN_TEAM = 123, /* Port is not part of team */
201 BFA_STATUS_IM_CANNOT_REM_PRI = 124, /* Primary adapter cannot be
202 * removed. Change primary before
203 * removing */
204 BFA_STATUS_IM_MAX_PORTS_REACHED = 125, /* Exceeding maximum ports
205 * per team */
206 BFA_STATUS_IM_LAST_PORT_DELETE = 126, /* Last port in team being
207 * deleted */
208 BFA_STATUS_IM_NO_DRIVER = 127, /* IM driver is not installed */
209 BFA_STATUS_IM_MAX_VLANS_REACHED = 128, /* Exceeding maximum VLANs
210 * per port */
211 BFA_STATUS_TOMCAT_SPD_NOT_ALLOWED = 129, /* Bios speed config not
212 * allowed for CNA */
213 BFA_STATUS_NO_MINPORT_DRIVER = 130, /* Miniport driver is not
214 * loaded */
215 BFA_STATUS_CARD_TYPE_MISMATCH = 131, /* Card type mismatch */
216 BFA_STATUS_BAD_ASICBLK = 132, /* Bad ASIC block */
217 BFA_STATUS_NO_DRIVER = 133, /* Brocade adapter/driver not installed
218 * or loaded */
219 BFA_STATUS_INVALID_MAC = 134, /* Invalid MAC address */
220 BFA_STATUS_IM_NO_VLAN = 135, /* No VLANs configured on the adapter */
221 BFA_STATUS_IM_ETH_LB_FAILED = 136, /* Ethernet loopback test failed */
222 BFA_STATUS_IM_PVID_REMOVE = 137, /* Cannot remove port VLAN (PVID) */
223 BFA_STATUS_IM_PVID_EDIT = 138, /* Cannot edit port VLAN (PVID) */
224 BFA_STATUS_CNA_NO_BOOT = 139, /* Boot upload not allowed for CNA */
225 BFA_STATUS_IM_PVID_NON_ZERO = 140, /* Port VLAN ID (PVID) is Set to
226 * Non-Zero Value */
227 BFA_STATUS_IM_INETCFG_LOCK_FAILED = 141, /* Acquiring Network
228 * Subsystem Lock Failed.Please
229 * try after some time */
230 BFA_STATUS_IM_GET_INETCFG_FAILED = 142, /* Acquiring Network Subsystem
231 * handle Failed. Please try
232 * after some time */
233 BFA_STATUS_IM_NOT_BOUND = 143, /* IM driver is not active */
234 BFA_STATUS_INSUFFICIENT_PERMS = 144, /* User doesn't have sufficient
235 * permissions to execute the BCU
236 * application */
237 BFA_STATUS_IM_INV_VLAN_NAME = 145, /* Invalid/Reserved VLAN name
238 * string. The name is not allowed
239 * for the normal VLAN */
240 BFA_STATUS_CMD_NOTSUPP_CNA = 146, /* Command not supported for CNA */
241 BFA_STATUS_IM_PASSTHRU_EDIT = 147, /* Can not edit passthrough VLAN
242 * id */
243 BFA_STATUS_IM_BIND_FAILED = 148, /* IM Driver bind operation
244 * failed */
245 BFA_STATUS_IM_UNBIND_FAILED = 149, /* IM Driver unbind operation
246 * failed */
247 BFA_STATUS_IM_PORT_IN_TEAM = 150, /* Port is already part of the
248 * team */
249 BFA_STATUS_IM_VLAN_NOT_FOUND = 151, /* VLAN ID doesn't exists */
250 BFA_STATUS_IM_TEAM_NOT_FOUND = 152, /* Teaming configuration doesn't
251 * exists */
252 BFA_STATUS_IM_TEAM_CFG_NOT_ALLOWED = 153, /* Given settings are not
253 * allowed for the current
254 * Teaming mode */
255 BFA_STATUS_PBC = 154, /* Operation not allowed for pre-boot
256 * configuration */
257 BFA_STATUS_DEVID_MISSING = 155, /* Boot image is not for the adapter(s)
258 * installed */
259 BFA_STATUS_BAD_FWCFG = 156, /* Bad firmware configuration */
260 BFA_STATUS_CREATE_FILE = 157, /* Failed to create temporary file */
261 BFA_STATUS_INVALID_VENDOR = 158, /* Invalid switch vendor */
262 BFA_STATUS_SFP_NOT_READY = 159, /* SFP info is not ready. Retry */
263 BFA_STATUS_NO_TOPOLOGY_FOR_CNA = 160, /* Topology command not
264 * applicable to CNA */
265 BFA_STATUS_BOOT_CODE_UPDATED = 161, /* reboot -- -r is needed after
266 * boot code updated */
267 BFA_STATUS_BOOT_VERSION = 162, /* Boot code version not compatible with
268 * the driver installed */
269 BFA_STATUS_CARDTYPE_MISSING = 163, /* Boot image is not for the
270 * adapter(s) installed */
271 BFA_STATUS_INVALID_CARDTYPE = 164, /* Invalid card type provided */
272 BFA_STATUS_MAX_VAL /* Unknown error code */
274 #define bfa_status_t enum bfa_status
276 enum bfa_eproto_status {
277 BFA_EPROTO_BAD_ACCEPT = 0,
278 BFA_EPROTO_UNKNOWN_RSP = 1
280 #define bfa_eproto_status_t enum bfa_eproto_status
282 #endif /* __BFA_DEFS_STATUS_H__ */