cxgb4: collect hardware module dumps
[linux-2.6-block.git] / drivers / net / ethernet / chelsio / cxgb4 / cudbg_if.h
CommitLineData
ad75b7d3
RL
1/*
2 * Copyright (C) 2017 Chelsio Communications. All rights reserved.
3 *
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.
7 *
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
11 * more details.
12 *
13 * The full GNU General Public License is included in this distribution in
14 * the file called "COPYING".
15 *
16 */
17
18#ifndef __CUDBG_IF_H__
19#define __CUDBG_IF_H__
20
a7975a2f
RL
21/* Error codes */
22#define CUDBG_STATUS_NO_MEM -19
b33af022 23#define CUDBG_STATUS_ENTITY_NOT_FOUND -24
a7975a2f
RL
24#define CUDBG_SYSTEM_ERROR -29
25
ad75b7d3
RL
26#define CUDBG_MAJOR_VERSION 1
27#define CUDBG_MINOR_VERSION 14
28
29enum cudbg_dbg_entity_type {
a7975a2f 30 CUDBG_REG_DUMP = 1,
844d1b6f 31 CUDBG_DEV_LOG = 2,
b33af022
RL
32 CUDBG_EDC0 = 18,
33 CUDBG_EDC1 = 19,
4359cf33 34 CUDBG_TP_INDIRECT = 36,
270d39bf
RL
35 CUDBG_SGE_INDIRECT = 37,
36 CUDBG_PCIE_INDIRECT = 50,
37 CUDBG_PM_INDIRECT = 51,
38 CUDBG_MA_INDIRECT = 61,
39 CUDBG_UP_CIM_INDIRECT = 64,
844d1b6f 40 CUDBG_MBOX_LOG = 66,
270d39bf 41 CUDBG_HMA_INDIRECT = 67,
ad75b7d3
RL
42 CUDBG_MAX_ENTITY = 70,
43};
44
45struct cudbg_init {
46 struct adapter *adap; /* Pointer to adapter structure */
47 void *outbuf; /* Output buffer */
48 u32 outbuf_size; /* Output buffer size */
49};
b33af022
RL
50
51static inline unsigned int cudbg_mbytes_to_bytes(unsigned int size)
52{
53 return size * 1024 * 1024;
54}
ad75b7d3 55#endif /* __CUDBG_IF_H__ */