bfa_defs_status.h 12 KB

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