0001
0002
0003
0004
0005
0006 #ifndef __CXGB4_CUDBG_H__
0007 #define __CXGB4_CUDBG_H__
0008
0009 #include "cudbg_if.h"
0010 #include "cudbg_lib_common.h"
0011 #include "cudbg_entity.h"
0012 #include "cudbg_lib.h"
0013
0014 #define CUDBG_DUMP_BUFF_SIZE (32 * 1024 * 1024)
0015 #define CUDBG_COMPRESS_BUFF_SIZE (4 * 1024 * 1024)
0016
0017 typedef int (*cudbg_collect_callback_t)(struct cudbg_init *pdbg_init,
0018 struct cudbg_buffer *dbg_buff,
0019 struct cudbg_error *cudbg_err);
0020
0021 struct cxgb4_collect_entity {
0022 enum cudbg_dbg_entity_type entity;
0023 cudbg_collect_callback_t collect_cb;
0024 };
0025
0026 enum CXGB4_ETHTOOL_DUMP_FLAGS {
0027 CXGB4_ETH_DUMP_NONE = ETH_FW_DUMP_DISABLE,
0028 CXGB4_ETH_DUMP_MEM = (1 << 0),
0029 CXGB4_ETH_DUMP_HW = (1 << 1),
0030 CXGB4_ETH_DUMP_FLASH = (1 << 2),
0031 };
0032
0033 #define CXGB4_ETH_DUMP_ALL (CXGB4_ETH_DUMP_MEM | CXGB4_ETH_DUMP_HW)
0034
0035 u32 cxgb4_get_dump_length(struct adapter *adap, u32 flag);
0036 int cxgb4_cudbg_collect(struct adapter *adap, void *buf, u32 *buf_size,
0037 u32 flag);
0038 void cxgb4_init_ethtool_dump(struct adapter *adapter);
0039 int cxgb4_cudbg_vmcore_add_dump(struct adapter *adap);
0040 #endif