xref: /freebsd/sys/dev/iavf/iavf_status.h (revision b2bf0c7e5f4037d63458def91a026592468afd2f)
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /*  Copyright (c) 2021, Intel Corporation
3  *  All rights reserved.
4  *
5  *  Redistribution and use in source and binary forms, with or without
6  *  modification, are permitted provided that the following conditions are met:
7  *
8  *   1. Redistributions of source code must retain the above copyright notice,
9  *      this list of conditions and the following disclaimer.
10  *
11  *   2. Redistributions in binary form must reproduce the above copyright
12  *      notice, this list of conditions and the following disclaimer in the
13  *      documentation and/or other materials provided with the distribution.
14  *
15  *   3. Neither the name of the Intel Corporation nor the names of its
16  *      contributors may be used to endorse or promote products derived from
17  *      this software without specific prior written permission.
18  *
19  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23  *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  *  POSSIBILITY OF SUCH DAMAGE.
30  */
31 /*$FreeBSD$*/
32 
33 #ifndef _IAVF_STATUS_H_
34 #define _IAVF_STATUS_H_
35 
36 /* Error Codes */
37 enum iavf_status {
38 	IAVF_SUCCESS				= 0,
39 	IAVF_ERR_NVM				= -1,
40 	IAVF_ERR_NVM_CHECKSUM			= -2,
41 	IAVF_ERR_PHY				= -3,
42 	IAVF_ERR_CONFIG				= -4,
43 	IAVF_ERR_PARAM				= -5,
44 	IAVF_ERR_MAC_TYPE			= -6,
45 	IAVF_ERR_UNKNOWN_PHY			= -7,
46 	IAVF_ERR_LINK_SETUP			= -8,
47 	IAVF_ERR_ADAPTER_STOPPED		= -9,
48 	IAVF_ERR_INVALID_MAC_ADDR		= -10,
49 	IAVF_ERR_DEVICE_NOT_SUPPORTED		= -11,
50 	IAVF_ERR_MASTER_REQUESTS_PENDING	= -12,
51 	IAVF_ERR_INVALID_LINK_SETTINGS		= -13,
52 	IAVF_ERR_AUTONEG_NOT_COMPLETE		= -14,
53 	IAVF_ERR_RESET_FAILED			= -15,
54 	IAVF_ERR_SWFW_SYNC			= -16,
55 	IAVF_ERR_NO_AVAILABLE_VSI		= -17,
56 	IAVF_ERR_NO_MEMORY			= -18,
57 	IAVF_ERR_BAD_PTR			= -19,
58 	IAVF_ERR_RING_FULL			= -20,
59 	IAVF_ERR_INVALID_PD_ID			= -21,
60 	IAVF_ERR_INVALID_QP_ID			= -22,
61 	IAVF_ERR_INVALID_CQ_ID			= -23,
62 	IAVF_ERR_INVALID_CEQ_ID			= -24,
63 	IAVF_ERR_INVALID_AEQ_ID			= -25,
64 	IAVF_ERR_INVALID_SIZE			= -26,
65 	IAVF_ERR_INVALID_ARP_INDEX		= -27,
66 	IAVF_ERR_INVALID_FPM_FUNC_ID		= -28,
67 	IAVF_ERR_QP_INVALID_MSG_SIZE		= -29,
68 	IAVF_ERR_QP_TOOMANY_WRS_POSTED		= -30,
69 	IAVF_ERR_INVALID_FRAG_COUNT		= -31,
70 	IAVF_ERR_QUEUE_EMPTY			= -32,
71 	IAVF_ERR_INVALID_ALIGNMENT		= -33,
72 	IAVF_ERR_FLUSHED_QUEUE			= -34,
73 	IAVF_ERR_INVALID_PUSH_PAGE_INDEX	= -35,
74 	IAVF_ERR_INVALID_IMM_DATA_SIZE		= -36,
75 	IAVF_ERR_TIMEOUT			= -37,
76 	IAVF_ERR_OPCODE_MISMATCH		= -38,
77 	IAVF_ERR_CQP_COMPL_ERROR		= -39,
78 	IAVF_ERR_INVALID_VF_ID			= -40,
79 	IAVF_ERR_INVALID_HMCFN_ID		= -41,
80 	IAVF_ERR_BACKING_PAGE_ERROR		= -42,
81 	IAVF_ERR_NO_PBLCHUNKS_AVAILABLE		= -43,
82 	IAVF_ERR_INVALID_PBLE_INDEX		= -44,
83 	IAVF_ERR_INVALID_SD_INDEX		= -45,
84 	IAVF_ERR_INVALID_PAGE_DESC_INDEX	= -46,
85 	IAVF_ERR_INVALID_SD_TYPE		= -47,
86 	IAVF_ERR_MEMCPY_FAILED			= -48,
87 	IAVF_ERR_INVALID_HMC_OBJ_INDEX		= -49,
88 	IAVF_ERR_INVALID_HMC_OBJ_COUNT		= -50,
89 	IAVF_ERR_INVALID_SRQ_ARM_LIMIT		= -51,
90 	IAVF_ERR_SRQ_ENABLED			= -52,
91 	IAVF_ERR_ADMIN_QUEUE_ERROR		= -53,
92 	IAVF_ERR_ADMIN_QUEUE_TIMEOUT		= -54,
93 	IAVF_ERR_BUF_TOO_SHORT			= -55,
94 	IAVF_ERR_ADMIN_QUEUE_FULL		= -56,
95 	IAVF_ERR_ADMIN_QUEUE_NO_WORK		= -57,
96 	IAVF_ERR_BAD_IWARP_CQE			= -58,
97 	IAVF_ERR_NVM_BLANK_MODE			= -59,
98 	IAVF_ERR_NOT_IMPLEMENTED		= -60,
99 	IAVF_ERR_PE_DOORBELL_NOT_ENABLED	= -61,
100 	IAVF_ERR_DIAG_TEST_FAILED		= -62,
101 	IAVF_ERR_NOT_READY			= -63,
102 	IAVF_NOT_SUPPORTED			= -64,
103 	IAVF_ERR_FIRMWARE_API_VERSION		= -65,
104 	IAVF_ERR_ADMIN_QUEUE_CRITICAL_ERROR	= -66,
105 };
106 
107 #endif /* _IAVF_STATUS_H_ */
108