blob: f5e892a6077ee78c33ae18e6fa3a7b08959c643f [file] [log] [blame]
Shad Ansari2f7f9be2017-06-07 13:34:53 -07001/*
2<:copyright-BRCM:2016:DUAL/GPL:standard
3
4 Broadcom Proprietary and Confidential.(c) 2016 Broadcom
5 All Rights Reserved
6
7Unless you and Broadcom execute a separate written software license
8agreement governing use of this software, this software is licensed
9to you under the terms of the GNU General Public License version 2
10(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
11with the following added to such license:
12
13 As a special exception, the copyright holders of this software give
14 you permission to link this software with independent modules, and
15 to copy and distribute the resulting executable under terms of your
16 choice, provided that you also meet, for each linked independent
17 module, the terms and conditions of the license of that module.
18 An independent module is a module which is not derived from this
19 software. The special exception does not apply to any modifications
20 of the software.
21
22Not withstanding the above, under no circumstances may you combine
23this software in any way with any other Broadcom software provided
24under a license other than the GPL, without Broadcom's express prior
25written consent.
26
27:>
28 */
29
30#ifndef BCMOS_ERRNO_H_
31#define BCMOS_ERRNO_H_
32
33/** \defgroup system_errno Error Codes
34 * @{
35 */
36
37/** Error codes */
38typedef enum
39{
40 BCM_ERR_OK = 0, /**< OK */
41 BCM_ERR_IN_PROGRESS = -1, /**< Operation is in progress */
42 BCM_ERR_PARM = -2, /**< Error in parameters */
43 BCM_ERR_NOMEM = -3, /**< No memory */
44 BCM_ERR_NORES = -4, /**< No resources */
45 BCM_ERR_INTERNAL = -5, /**< Internal error */
46 BCM_ERR_NOENT = -6, /**< Entry doesn't exist */
47 BCM_ERR_NODEV = -7, /**< Device doesn't exist */
48 BCM_ERR_ALREADY = -8, /**< Entry already exists */
49 BCM_ERR_RANGE = -9, /**< Out of range */
50 BCM_ERR_PERM = -10, /**< No permission to perform an operation */
51 BCM_ERR_NOT_SUPPORTED = -11, /**< Operation is not supported */
52 BCM_ERR_PARSE = -12, /**< Parsing error */
53 BCM_ERR_INVALID_OP = -13, /**< Invalid operation */
54 BCM_ERR_IO = -14, /**< I/O error */
55 BCM_ERR_STATE = -15, /**< Object is in bad state */
56 BCM_ERR_DELETED = -16, /**< Object is deleted */
57 BCM_ERR_TOO_MANY = -17, /**< Too many objects */
58 BCM_ERR_NO_MORE = -18, /**< No more entries */
59 BCM_ERR_OVERFLOW = -19, /**< Buffer overflow */
60 BCM_ERR_COMM_FAIL = -20, /**< Communication failure */
61 BCM_ERR_NOT_CONNECTED = -21, /**< No connection with the target system */
62 BCM_ERR_SYSCALL_ERR = -22, /**< System call returned error */
63 BCM_ERR_MSG_ERROR = -23, /**< Received message is insane */
64 BCM_ERR_TOO_MANY_REQS = -24, /**< Too many outstanding requests */
65 BCM_ERR_TIMEOUT = -25, /**< Operation timed out */
66 BCM_ERR_TOO_MANY_FRAGS = -26, /**< Too many fragments */
67 BCM_ERR_NULL = -27, /**< Got NULL pointer */
68 BCM_ERR_READ_ONLY = -28, /**< Attempt to set read-only parameter */
69 BCM_ERR_ONU_ERR_RESP = -29, /**< ONU returned an error response */
70 BCM_ERR_MANDATORY_PARM_IS_MISSING = -30, /**< Mandatory parameter is missing */
71 BCM_ERR_KEY_RANGE = -31, /**< Key field was out of range */
72 BCM_ERR_QUEUE_EMPTY = -32, /**< Rx PCIe queue empty */
73 BCM_ERR_QUEUE_FULL = -33, /**< Tx PCIe queue full */
74 BCM_ERR_TOO_LONG = -34, /**< Processing is taking too long, but will finish eventually */
75 BCM_ERR_INSUFFICIENT_LIST_MEM = -35, /**< Not enough memory was provided for variable-length lists */
76
77 BCM_ERR_OUT_OF_SYNC = -36, /**< Sequence number or operation step was out of sync. */
78 BCM_ERR_CHECKSUM = -37, /**< Checksum error */
79 BCM_ERR_IMAGE_TYPE = -38, /**< Unsupported file/image type */
80 BCM_ERR_INCOMPLETE_TERMINATION = -39, /**< Incomplete premature termination */
81} bcmos_errno;
82
83/** Map error code to error string
84 * \param[in] err Error code
85 * \returns Error string
86 */
87const char *bcmos_strerror(bcmos_errno err);
88
89/** @} system_errno */
90
91#endif /* BCMOS_ERRNO_H_ */