xref: /illumos-gate/usr/src/uts/common/io/ntxn/nx_errorcode.h (revision b885580b43755ee4ea1e280b85428893d2ba9291)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2008 NetXen, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 /*
27  * Error codes for HAL - NIC interface.
28  *
29  */
30 
31 #ifndef _NX_ERRORCODE_H_
32 #define	_NX_ERRORCODE_H_
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 /*
39  *        Common Error Codes
40  */
41 
42 #define	NX_RCODE_SUCCESS			0
43 /* Insuff. mem resource on host */
44 #define	NX_RCODE_NO_HOST_MEM		1
45 /* Insuff. misc. resources on host */
46 #define	NX_RCODE_NO_HOST_RESOURCE	2
47 /* Insuff. crb resources on card */
48 #define	NX_RCODE_NO_CARD_CRB		3
49 /* Insuff. mem resources on card */
50 #define	NX_RCODE_NO_CARD_MEM		4
51 /* Insuff. misc. resources on card */
52 #define	NX_RCODE_NO_CARD_RESOURCE	5
53 /* One or more args to routine were out-of-range */
54 #define	NX_RCODE_INVALID_ARGS		6
55 /* Requested action is invalid / in error */
56 #define	NX_RCODE_INVALID_ACTION		7
57 /* Requested RX/TX has invalid state */
58 #define	NX_RCODE_INVALID_STATE		8
59 /* Requested action is not supported */
60 #define	NX_RCODE_NOT_SUPPORTED		9
61 /* Requested action is not allowed */
62 #define	NX_RCODE_NOT_PERMITTED		10
63 /* System not ready for action */
64 #define	NX_RCODE_NOT_READY			11
65 /* Target of requested action does not exist */
66 #define	NX_RCODE_DOES_NOT_EXIST		2
67 /* Requested action already performed/complete */
68 #define	NX_RCODE_ALREADY_EXISTSi	13
69 /* Invalid signature provided */
70 #define	NX_RCODE_BAD_SIGNATURE		14
71 /* Valid command, not implemented */
72 #define	NX_RCODE_CMD_NOT_IMPLi		15
73 /* Invalid/Unknown command */
74 #define	NX_RCODE_CMD_INVALID		16
75 /* Timeout on polling rsp status  */
76 #define	NX_RCODE_TIMEOUT			17
77 #define	NX_RCODE_CMD_FAILED			18
78 #define	NX_RCODE_MAX_EXCEEDED		19
79 #define	NX_RCODE_MAX				20
80 
81 /*
82  *       Macros
83  */
84 #define	NX_IS_RCODE_VALID(ERR)		(ERR >= NX_RCODE_MAX)
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #endif /* _NX_ERRORCODE_H_ */
91