c2_status.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. /*
  2. * Copyright (c) 2005 Ammasso, Inc. All rights reserved.
  3. * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved.
  4. *
  5. * This software is available to you under a choice of one of two
  6. * licenses. You may choose to be licensed under the terms of the GNU
  7. * General Public License (GPL) Version 2, available from the file
  8. * COPYING in the main directory of this source tree, or the
  9. * OpenIB.org BSD license below:
  10. *
  11. * Redistribution and use in source and binary forms, with or
  12. * without modification, are permitted provided that the following
  13. * conditions are met:
  14. *
  15. * - Redistributions of source code must retain the above
  16. * copyright notice, this list of conditions and the following
  17. * disclaimer.
  18. *
  19. * - Redistributions in binary form must reproduce the above
  20. * copyright notice, this list of conditions and the following
  21. * disclaimer in the documentation and/or other materials
  22. * provided with the distribution.
  23. *
  24. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  25. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  26. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  27. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  28. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  29. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  30. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  31. * SOFTWARE.
  32. */
  33. #ifndef _C2_STATUS_H_
  34. #define _C2_STATUS_H_
  35. /*
  36. * Verbs Status Codes
  37. */
  38. enum c2_status {
  39. C2_OK = 0, /* This must be zero */
  40. CCERR_INSUFFICIENT_RESOURCES = 1,
  41. CCERR_INVALID_MODIFIER = 2,
  42. CCERR_INVALID_MODE = 3,
  43. CCERR_IN_USE = 4,
  44. CCERR_INVALID_RNIC = 5,
  45. CCERR_INTERRUPTED_OPERATION = 6,
  46. CCERR_INVALID_EH = 7,
  47. CCERR_INVALID_CQ = 8,
  48. CCERR_CQ_EMPTY = 9,
  49. CCERR_NOT_IMPLEMENTED = 10,
  50. CCERR_CQ_DEPTH_TOO_SMALL = 11,
  51. CCERR_PD_IN_USE = 12,
  52. CCERR_INVALID_PD = 13,
  53. CCERR_INVALID_SRQ = 14,
  54. CCERR_INVALID_ADDRESS = 15,
  55. CCERR_INVALID_NETMASK = 16,
  56. CCERR_INVALID_QP = 17,
  57. CCERR_INVALID_QP_STATE = 18,
  58. CCERR_TOO_MANY_WRS_POSTED = 19,
  59. CCERR_INVALID_WR_TYPE = 20,
  60. CCERR_INVALID_SGL_LENGTH = 21,
  61. CCERR_INVALID_SQ_DEPTH = 22,
  62. CCERR_INVALID_RQ_DEPTH = 23,
  63. CCERR_INVALID_ORD = 24,
  64. CCERR_INVALID_IRD = 25,
  65. CCERR_QP_ATTR_CANNOT_CHANGE = 26,
  66. CCERR_INVALID_STAG = 27,
  67. CCERR_QP_IN_USE = 28,
  68. CCERR_OUTSTANDING_WRS = 29,
  69. CCERR_STAG_IN_USE = 30,
  70. CCERR_INVALID_STAG_INDEX = 31,
  71. CCERR_INVALID_SGL_FORMAT = 32,
  72. CCERR_ADAPTER_TIMEOUT = 33,
  73. CCERR_INVALID_CQ_DEPTH = 34,
  74. CCERR_INVALID_PRIVATE_DATA_LENGTH = 35,
  75. CCERR_INVALID_EP = 36,
  76. CCERR_MR_IN_USE = CCERR_STAG_IN_USE,
  77. CCERR_FLUSHED = 38,
  78. CCERR_INVALID_WQE = 39,
  79. CCERR_LOCAL_QP_CATASTROPHIC_ERROR = 40,
  80. CCERR_REMOTE_TERMINATION_ERROR = 41,
  81. CCERR_BASE_AND_BOUNDS_VIOLATION = 42,
  82. CCERR_ACCESS_VIOLATION = 43,
  83. CCERR_INVALID_PD_ID = 44,
  84. CCERR_WRAP_ERROR = 45,
  85. CCERR_INV_STAG_ACCESS_ERROR = 46,
  86. CCERR_ZERO_RDMA_READ_RESOURCES = 47,
  87. CCERR_QP_NOT_PRIVILEGED = 48,
  88. CCERR_STAG_STATE_NOT_INVALID = 49,
  89. CCERR_INVALID_PAGE_SIZE = 50,
  90. CCERR_INVALID_BUFFER_SIZE = 51,
  91. CCERR_INVALID_PBE = 52,
  92. CCERR_INVALID_FBO = 53,
  93. CCERR_INVALID_LENGTH = 54,
  94. CCERR_INVALID_ACCESS_RIGHTS = 55,
  95. CCERR_PBL_TOO_BIG = 56,
  96. CCERR_INVALID_VA = 57,
  97. CCERR_INVALID_REGION = 58,
  98. CCERR_INVALID_WINDOW = 59,
  99. CCERR_TOTAL_LENGTH_TOO_BIG = 60,
  100. CCERR_INVALID_QP_ID = 61,
  101. CCERR_ADDR_IN_USE = 62,
  102. CCERR_ADDR_NOT_AVAIL = 63,
  103. CCERR_NET_DOWN = 64,
  104. CCERR_NET_UNREACHABLE = 65,
  105. CCERR_CONN_ABORTED = 66,
  106. CCERR_CONN_RESET = 67,
  107. CCERR_NO_BUFS = 68,
  108. CCERR_CONN_TIMEDOUT = 69,
  109. CCERR_CONN_REFUSED = 70,
  110. CCERR_HOST_UNREACHABLE = 71,
  111. CCERR_INVALID_SEND_SGL_DEPTH = 72,
  112. CCERR_INVALID_RECV_SGL_DEPTH = 73,
  113. CCERR_INVALID_RDMA_WRITE_SGL_DEPTH = 74,
  114. CCERR_INSUFFICIENT_PRIVILEGES = 75,
  115. CCERR_STACK_ERROR = 76,
  116. CCERR_INVALID_VERSION = 77,
  117. CCERR_INVALID_MTU = 78,
  118. CCERR_INVALID_IMAGE = 79,
  119. CCERR_PENDING = 98, /* not an error; user internally by adapter */
  120. CCERR_DEFER = 99, /* not an error; used internally by adapter */
  121. CCERR_FAILED_WRITE = 100,
  122. CCERR_FAILED_ERASE = 101,
  123. CCERR_FAILED_VERIFICATION = 102,
  124. CCERR_NOT_FOUND = 103,
  125. };
  126. /*
  127. * CCAE_ACTIVE_CONNECT_RESULTS status result codes.
  128. */
  129. enum c2_connect_status {
  130. C2_CONN_STATUS_SUCCESS = C2_OK,
  131. C2_CONN_STATUS_NO_MEM = CCERR_INSUFFICIENT_RESOURCES,
  132. C2_CONN_STATUS_TIMEDOUT = CCERR_CONN_TIMEDOUT,
  133. C2_CONN_STATUS_REFUSED = CCERR_CONN_REFUSED,
  134. C2_CONN_STATUS_NETUNREACH = CCERR_NET_UNREACHABLE,
  135. C2_CONN_STATUS_HOSTUNREACH = CCERR_HOST_UNREACHABLE,
  136. C2_CONN_STATUS_INVALID_RNIC = CCERR_INVALID_RNIC,
  137. C2_CONN_STATUS_INVALID_QP = CCERR_INVALID_QP,
  138. C2_CONN_STATUS_INVALID_QP_STATE = CCERR_INVALID_QP_STATE,
  139. C2_CONN_STATUS_REJECTED = CCERR_CONN_RESET,
  140. C2_CONN_STATUS_ADDR_NOT_AVAIL = CCERR_ADDR_NOT_AVAIL,
  141. };
  142. /*
  143. * Flash programming status codes.
  144. */
  145. enum c2_flash_status {
  146. C2_FLASH_STATUS_SUCCESS = 0x0000,
  147. C2_FLASH_STATUS_VERIFY_ERR = 0x0002,
  148. C2_FLASH_STATUS_IMAGE_ERR = 0x0004,
  149. C2_FLASH_STATUS_ECLBS = 0x0400,
  150. C2_FLASH_STATUS_PSLBS = 0x0800,
  151. C2_FLASH_STATUS_VPENS = 0x1000,
  152. };
  153. #endif /* _C2_STATUS_H_ */