2 * Copyright (C) 2017 Chelsio Communications. All rights reserved.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * The full GNU General Public License is included in this distribution in
14 * the file called "COPYING".
18 #ifndef __CUDBG_IF_H__
19 #define __CUDBG_IF_H__
22 #define CUDBG_STATUS_NO_MEM -19
23 #define CUDBG_STATUS_ENTITY_NOT_FOUND -24
24 #define CUDBG_SYSTEM_ERROR -29
25 #define CUDBG_STATUS_CCLK_NOT_DEFINED -32
27 #define CUDBG_MAJOR_VERSION 1
28 #define CUDBG_MINOR_VERSION 14
30 enum cudbg_dbg_entity_type {
36 CUDBG_CIM_IBQ_TP0 = 6,
37 CUDBG_CIM_IBQ_TP1 = 7,
38 CUDBG_CIM_IBQ_ULP = 8,
39 CUDBG_CIM_IBQ_SGE0 = 9,
40 CUDBG_CIM_IBQ_SGE1 = 10,
41 CUDBG_CIM_IBQ_NCSI = 11,
42 CUDBG_CIM_OBQ_ULP0 = 12,
43 CUDBG_CIM_OBQ_ULP1 = 13,
44 CUDBG_CIM_OBQ_ULP2 = 14,
45 CUDBG_CIM_OBQ_ULP3 = 15,
46 CUDBG_CIM_OBQ_SGE = 16,
47 CUDBG_CIM_OBQ_NCSI = 17,
51 CUDBG_RSS_VF_CONF = 25,
55 CUDBG_TP_INDIRECT = 36,
56 CUDBG_SGE_INDIRECT = 37,
59 CUDBG_CIM_PIF_LA = 45,
61 CUDBG_CIM_OBQ_RXQ0 = 47,
62 CUDBG_CIM_OBQ_RXQ1 = 48,
63 CUDBG_PCIE_INDIRECT = 50,
64 CUDBG_PM_INDIRECT = 51,
66 CUDBG_DUMP_CONTEXT = 56,
71 CUDBG_MA_INDIRECT = 61,
73 CUDBG_UP_CIM_INDIRECT = 64,
76 CUDBG_HMA_INDIRECT = 67,
77 CUDBG_MAX_ENTITY = 70,
81 struct adapter *adap; /* Pointer to adapter structure */
82 void *outbuf; /* Output buffer */
83 u32 outbuf_size; /* Output buffer size */
86 static inline unsigned int cudbg_mbytes_to_bytes(unsigned int size)
88 return size * 1024 * 1024;
90 #endif /* __CUDBG_IF_H__ */