Switchtec Userspace  PROJECT_NUMBER = PROJECT_NUMBER=PROJECT_NUMBER = 2.2
errors.h
1 /*
2  * Microsemi Switchtec(tm) PCIe Management Library
3  * Copyright (c) 2017, Microsemi Corporation
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included
13  * in all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
19  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21  * OTHER DEALINGS IN THE SOFTWARE.
22  *
23  */
24 
25 #ifndef LIBSWITCHTEC_ERRORS_H
26 #define LIBSWITCHTEC_ERRORS_H
27 
28 extern int mrpc_error_cmd;
29 
30 #define SWITCHTEC_ERRNO_MRPC_FLAG_BIT (1 << 30)
31 #define ERRNO_MRPC(x) (x & (~SWITCHTEC_ERRNO_MRPC_FLAG_BIT))
32 
33 enum {
34  ERR_PHYC_PORT_ARDY_BIND = 0x00000001,
35  ERR_LOGC_PORT_ARDY_BIND = 0x00000002,
36  ERR_BIND_PRTT_NOT_EXIST = 0x00000003,
37  ERR_PHYC_PORT_NOT_EXIST = 0x00000004,
38  ERR_PHYC_PORT_DIS = 0x00000005,
39  ERR_NO_LOGC_PORT = 0x00000006,
40  ERR_BIND_IN_PROGRESS = 0x00000007,
41  ERR_BIND_TGT_IS_USP = 0x00000008,
42  ERR_BIND_SUBCMD_INVALID = 0x00000009,
43  ERR_PHYC_PORT_LINK_ACT = 0x0000000a,
44  ERR_LOGC_PORT_NOT_BIND_PHYC_PORT = 0x0000000b,
45  ERR_UNBIND_OPT_INVALID = 0x0000000c,
46  ERR_BIND_CHECK_FAIL = 0x0000000d,
47  ERR_MPRC_UNSUPPORTED = 0x0000004a,
48 
49  ERR_NO_AVAIL_MRPC_THREAD = 0x64001,
50  ERR_HANDLER_THREAD_NOT_IDLE = 0x64002,
51  ERR_NO_BG_THREAD = 0x64003,
52  ERR_SUBCMD_INVALID = 0x64004,
53  ERR_CMD_INVALID = 0x64005,
54  ERR_PARAM_INVALID = 0x64006,
55  ERR_BAD_FW_STATE = 0x64007,
56  ERR_MRPC_DENIED = 0x64010,
57 
58  ERR_STACK_INVALID = 0x100001,
59  ERR_PORT_INVALID = 0x100002,
60  ERR_EVENT_INVALID = 0x100003,
61  ERR_RST_RULE_FAILED = 0x100005,
62  ERR_UART_NOT_SUPPORTED = 0x100072f1,
63  ERR_ACCESS_REFUSED = 0xFFFF0001,
64 };
65 
66 #endif
int mrpc_error_cmd
The MRPC command ID when errno is set.
Definition: switchtec.c:497