Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[linux-2.6] / drivers / infiniband / hw / amso1100 / c2_status.h
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 /*
37  * Verbs Status Codes
38  */
39 enum c2_status {
40         C2_OK = 0,              /* This must be zero */
41         CCERR_INSUFFICIENT_RESOURCES = 1,
42         CCERR_INVALID_MODIFIER = 2,
43         CCERR_INVALID_MODE = 3,
44         CCERR_IN_USE = 4,
45         CCERR_INVALID_RNIC = 5,
46         CCERR_INTERRUPTED_OPERATION = 6,
47         CCERR_INVALID_EH = 7,
48         CCERR_INVALID_CQ = 8,
49         CCERR_CQ_EMPTY = 9,
50         CCERR_NOT_IMPLEMENTED = 10,
51         CCERR_CQ_DEPTH_TOO_SMALL = 11,
52         CCERR_PD_IN_USE = 12,
53         CCERR_INVALID_PD = 13,
54         CCERR_INVALID_SRQ = 14,
55         CCERR_INVALID_ADDRESS = 15,
56         CCERR_INVALID_NETMASK = 16,
57         CCERR_INVALID_QP = 17,
58         CCERR_INVALID_QP_STATE = 18,
59         CCERR_TOO_MANY_WRS_POSTED = 19,
60         CCERR_INVALID_WR_TYPE = 20,
61         CCERR_INVALID_SGL_LENGTH = 21,
62         CCERR_INVALID_SQ_DEPTH = 22,
63         CCERR_INVALID_RQ_DEPTH = 23,
64         CCERR_INVALID_ORD = 24,
65         CCERR_INVALID_IRD = 25,
66         CCERR_QP_ATTR_CANNOT_CHANGE = 26,
67         CCERR_INVALID_STAG = 27,
68         CCERR_QP_IN_USE = 28,
69         CCERR_OUTSTANDING_WRS = 29,
70         CCERR_STAG_IN_USE = 30,
71         CCERR_INVALID_STAG_INDEX = 31,
72         CCERR_INVALID_SGL_FORMAT = 32,
73         CCERR_ADAPTER_TIMEOUT = 33,
74         CCERR_INVALID_CQ_DEPTH = 34,
75         CCERR_INVALID_PRIVATE_DATA_LENGTH = 35,
76         CCERR_INVALID_EP = 36,
77         CCERR_MR_IN_USE = CCERR_STAG_IN_USE,
78         CCERR_FLUSHED = 38,
79         CCERR_INVALID_WQE = 39,
80         CCERR_LOCAL_QP_CATASTROPHIC_ERROR = 40,
81         CCERR_REMOTE_TERMINATION_ERROR = 41,
82         CCERR_BASE_AND_BOUNDS_VIOLATION = 42,
83         CCERR_ACCESS_VIOLATION = 43,
84         CCERR_INVALID_PD_ID = 44,
85         CCERR_WRAP_ERROR = 45,
86         CCERR_INV_STAG_ACCESS_ERROR = 46,
87         CCERR_ZERO_RDMA_READ_RESOURCES = 47,
88         CCERR_QP_NOT_PRIVILEGED = 48,
89         CCERR_STAG_STATE_NOT_INVALID = 49,
90         CCERR_INVALID_PAGE_SIZE = 50,
91         CCERR_INVALID_BUFFER_SIZE = 51,
92         CCERR_INVALID_PBE = 52,
93         CCERR_INVALID_FBO = 53,
94         CCERR_INVALID_LENGTH = 54,
95         CCERR_INVALID_ACCESS_RIGHTS = 55,
96         CCERR_PBL_TOO_BIG = 56,
97         CCERR_INVALID_VA = 57,
98         CCERR_INVALID_REGION = 58,
99         CCERR_INVALID_WINDOW = 59,
100         CCERR_TOTAL_LENGTH_TOO_BIG = 60,
101         CCERR_INVALID_QP_ID = 61,
102         CCERR_ADDR_IN_USE = 62,
103         CCERR_ADDR_NOT_AVAIL = 63,
104         CCERR_NET_DOWN = 64,
105         CCERR_NET_UNREACHABLE = 65,
106         CCERR_CONN_ABORTED = 66,
107         CCERR_CONN_RESET = 67,
108         CCERR_NO_BUFS = 68,
109         CCERR_CONN_TIMEDOUT = 69,
110         CCERR_CONN_REFUSED = 70,
111         CCERR_HOST_UNREACHABLE = 71,
112         CCERR_INVALID_SEND_SGL_DEPTH = 72,
113         CCERR_INVALID_RECV_SGL_DEPTH = 73,
114         CCERR_INVALID_RDMA_WRITE_SGL_DEPTH = 74,
115         CCERR_INSUFFICIENT_PRIVILEGES = 75,
116         CCERR_STACK_ERROR = 76,
117         CCERR_INVALID_VERSION = 77,
118         CCERR_INVALID_MTU = 78,
119         CCERR_INVALID_IMAGE = 79,
120         CCERR_PENDING = 98,     /* not an error; user internally by adapter */
121         CCERR_DEFER = 99,       /* not an error; used internally by adapter */
122         CCERR_FAILED_WRITE = 100,
123         CCERR_FAILED_ERASE = 101,
124         CCERR_FAILED_VERIFICATION = 102,
125         CCERR_NOT_FOUND = 103,
126
127 };
128
129 /*
130  * CCAE_ACTIVE_CONNECT_RESULTS status result codes.
131  */
132 enum c2_connect_status {
133         C2_CONN_STATUS_SUCCESS = C2_OK,
134         C2_CONN_STATUS_NO_MEM = CCERR_INSUFFICIENT_RESOURCES,
135         C2_CONN_STATUS_TIMEDOUT = CCERR_CONN_TIMEDOUT,
136         C2_CONN_STATUS_REFUSED = CCERR_CONN_REFUSED,
137         C2_CONN_STATUS_NETUNREACH = CCERR_NET_UNREACHABLE,
138         C2_CONN_STATUS_HOSTUNREACH = CCERR_HOST_UNREACHABLE,
139         C2_CONN_STATUS_INVALID_RNIC = CCERR_INVALID_RNIC,
140         C2_CONN_STATUS_INVALID_QP = CCERR_INVALID_QP,
141         C2_CONN_STATUS_INVALID_QP_STATE = CCERR_INVALID_QP_STATE,
142         C2_CONN_STATUS_REJECTED = CCERR_CONN_RESET,
143         C2_CONN_STATUS_ADDR_NOT_AVAIL = CCERR_ADDR_NOT_AVAIL,
144 };
145
146 /*
147  * Flash programming status codes.
148  */
149 enum c2_flash_status {
150         C2_FLASH_STATUS_SUCCESS = 0x0000,
151         C2_FLASH_STATUS_VERIFY_ERR = 0x0002,
152         C2_FLASH_STATUS_IMAGE_ERR = 0x0004,
153         C2_FLASH_STATUS_ECLBS = 0x0400,
154         C2_FLASH_STATUS_PSLBS = 0x0800,
155         C2_FLASH_STATUS_VPENS = 0x1000,
156 };
157
158 #endif                          /* _C2_STATUS_H_ */