1 /* QLogic qed NIC Driver
2  * Copyright (c) 2015 QLogic Corporation
3  *
4  * This software is available under the terms of the GNU General Public License
5  * (GPL) Version 2, available from the file COPYING in the main directory of
6  * this source tree.
7  */
8 
9 #ifndef _QED_DEBUGFS_H
10 #define _QED_DEBUGFS_H
11 
12 enum qed_dbg_features {
13 	DBG_FEATURE_GRC,
14 	DBG_FEATURE_IDLE_CHK,
15 	DBG_FEATURE_MCP_TRACE,
16 	DBG_FEATURE_REG_FIFO,
17 	DBG_FEATURE_IGU_FIFO,
18 	DBG_FEATURE_PROTECTION_OVERRIDE,
19 	DBG_FEATURE_FW_ASSERTS,
20 	DBG_FEATURE_NUM
21 };
22 
23 /* Forward Declaration */
24 struct qed_dev;
25 
26 int qed_dbg_grc(struct qed_dev *cdev, void *buffer, u32 *num_dumped_bytes);
27 int qed_dbg_grc_size(struct qed_dev *cdev);
28 int qed_dbg_idle_chk(struct qed_dev *cdev, void *buffer,
29 		     u32 *num_dumped_bytes);
30 int qed_dbg_idle_chk_size(struct qed_dev *cdev);
31 int qed_dbg_reg_fifo(struct qed_dev *cdev, void *buffer,
32 		     u32 *num_dumped_bytes);
33 int qed_dbg_reg_fifo_size(struct qed_dev *cdev);
34 int qed_dbg_igu_fifo(struct qed_dev *cdev, void *buffer,
35 		     u32 *num_dumped_bytes);
36 int qed_dbg_igu_fifo_size(struct qed_dev *cdev);
37 int qed_dbg_protection_override(struct qed_dev *cdev, void *buffer,
38 				u32 *num_dumped_bytes);
39 int qed_dbg_protection_override_size(struct qed_dev *cdev);
40 int qed_dbg_fw_asserts(struct qed_dev *cdev, void *buffer,
41 		       u32 *num_dumped_bytes);
42 int qed_dbg_fw_asserts_size(struct qed_dev *cdev);
43 int qed_dbg_mcp_trace(struct qed_dev *cdev, void *buffer,
44 		      u32 *num_dumped_bytes);
45 int qed_dbg_mcp_trace_size(struct qed_dev *cdev);
46 int qed_dbg_all_data(struct qed_dev *cdev, void *buffer);
47 int qed_dbg_all_data_size(struct qed_dev *cdev);
48 u8 qed_get_debug_engine(struct qed_dev *cdev);
49 void qed_set_debug_engine(struct qed_dev *cdev, int engine_number);
50 int qed_dbg_feature(struct qed_dev *cdev, void *buffer,
51 		    enum qed_dbg_features feature, u32 *num_dumped_bytes);
52 int qed_dbg_feature_size(struct qed_dev *cdev, enum qed_dbg_features feature);
53 
54 void qed_dbg_pf_init(struct qed_dev *cdev);
55 void qed_dbg_pf_exit(struct qed_dev *cdev);
56 
57 #endif
58