cudbg_if.h 2.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
/*
 *  Copyright (C) 2017 Chelsio Communications.  All rights reserved.
 *
 *  This program is free software; you can redistribute it and/or modify it
 *  under the terms and conditions of the GNU General Public License,
 *  version 2, as published by the Free Software Foundation.
 *
 *  This program is distributed in the hope it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 *  more details.
 *
 *  The full GNU General Public License is included in this distribution in
 *  the file called "COPYING".
 *
 */

#ifndef __CUDBG_IF_H__
#define __CUDBG_IF_H__

R
Rahul Lakkireddy 已提交
21 22
/* Error codes */
#define CUDBG_STATUS_NO_MEM -19
23
#define CUDBG_STATUS_ENTITY_NOT_FOUND -24
R
Rahul Lakkireddy 已提交
24 25
#define CUDBG_SYSTEM_ERROR -29

26 27 28 29
#define CUDBG_MAJOR_VERSION 1
#define CUDBG_MINOR_VERSION 14

enum cudbg_dbg_entity_type {
R
Rahul Lakkireddy 已提交
30
	CUDBG_REG_DUMP = 1,
31
	CUDBG_DEV_LOG = 2,
32 33
	CUDBG_CIM_LA = 3,
	CUDBG_CIM_MA_LA = 4,
34
	CUDBG_CIM_QCFG = 5,
35 36 37 38 39 40 41 42 43 44 45 46
	CUDBG_CIM_IBQ_TP0 = 6,
	CUDBG_CIM_IBQ_TP1 = 7,
	CUDBG_CIM_IBQ_ULP = 8,
	CUDBG_CIM_IBQ_SGE0 = 9,
	CUDBG_CIM_IBQ_SGE1 = 10,
	CUDBG_CIM_IBQ_NCSI = 11,
	CUDBG_CIM_OBQ_ULP0 = 12,
	CUDBG_CIM_OBQ_ULP1 = 13,
	CUDBG_CIM_OBQ_ULP2 = 14,
	CUDBG_CIM_OBQ_ULP3 = 15,
	CUDBG_CIM_OBQ_SGE = 16,
	CUDBG_CIM_OBQ_NCSI = 17,
47 48
	CUDBG_EDC0 = 18,
	CUDBG_EDC1 = 19,
R
Rahul Lakkireddy 已提交
49 50
	CUDBG_RSS = 22,
	CUDBG_RSS_VF_CONF = 25,
R
Rahul Lakkireddy 已提交
51
	CUDBG_TP_INDIRECT = 36,
52
	CUDBG_SGE_INDIRECT = 37,
53 54 55
	CUDBG_ULPRX_LA = 41,
	CUDBG_TP_LA = 43,
	CUDBG_CIM_PIF_LA = 45,
56 57
	CUDBG_CIM_OBQ_RXQ0 = 47,
	CUDBG_CIM_OBQ_RXQ1 = 48,
58 59
	CUDBG_PCIE_INDIRECT = 50,
	CUDBG_PM_INDIRECT = 51,
R
Rahul Lakkireddy 已提交
60
	CUDBG_TID_INFO = 54,
R
Rahul Lakkireddy 已提交
61
	CUDBG_MPS_TCAM = 57,
62
	CUDBG_MA_INDIRECT = 61,
63
	CUDBG_ULPTX_LA = 62,
64
	CUDBG_UP_CIM_INDIRECT = 64,
R
Rahul Lakkireddy 已提交
65
	CUDBG_PBT_TABLE = 65,
66
	CUDBG_MBOX_LOG = 66,
67
	CUDBG_HMA_INDIRECT = 67,
68 69 70 71 72 73 74 75
	CUDBG_MAX_ENTITY = 70,
};

struct cudbg_init {
	struct adapter *adap; /* Pointer to adapter structure */
	void *outbuf; /* Output buffer */
	u32 outbuf_size;  /* Output buffer size */
};
76 77 78 79 80

static inline unsigned int cudbg_mbytes_to_bytes(unsigned int size)
{
	return size * 1024 * 1024;
}
81
#endif /* __CUDBG_IF_H__ */