Commit dc185ae6 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'hns3-debugfs'



Huazhong Tan says:

====================
net: hns3: refactor some debugfs commands

This series refactors the debugfs command to the new
process and removes the useless debugfs file node cmd
for the HNS3 ethernet driver.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 2682ea32 b4689aaf
Loading
Loading
Loading
Loading
+24 −1
Original line number Diff line number Diff line
@@ -254,6 +254,13 @@ enum hnae3_dbg_cmd {
	HNAE3_DBG_CMD_TM_NODES,
	HNAE3_DBG_CMD_TM_PRI,
	HNAE3_DBG_CMD_TM_QSET,
	HNAE3_DBG_CMD_TM_MAP,
	HNAE3_DBG_CMD_TM_PG,
	HNAE3_DBG_CMD_TM_PORT,
	HNAE3_DBG_CMD_TC_SCH_INFO,
	HNAE3_DBG_CMD_QOS_PAUSE_CFG,
	HNAE3_DBG_CMD_QOS_PRI_MAP,
	HNAE3_DBG_CMD_QOS_BUF_CFG,
	HNAE3_DBG_CMD_DEV_INFO,
	HNAE3_DBG_CMD_TX_BD,
	HNAE3_DBG_CMD_RX_BD,
@@ -265,6 +272,23 @@ enum hnae3_dbg_cmd {
	HNAE3_DBG_CMD_RESET_INFO,
	HNAE3_DBG_CMD_IMP_INFO,
	HNAE3_DBG_CMD_NCL_CONFIG,
	HNAE3_DBG_CMD_REG_BIOS_COMMON,
	HNAE3_DBG_CMD_REG_SSU,
	HNAE3_DBG_CMD_REG_IGU_EGU,
	HNAE3_DBG_CMD_REG_RPU,
	HNAE3_DBG_CMD_REG_NCSI,
	HNAE3_DBG_CMD_REG_RTC,
	HNAE3_DBG_CMD_REG_PPP,
	HNAE3_DBG_CMD_REG_RCB,
	HNAE3_DBG_CMD_REG_TQP,
	HNAE3_DBG_CMD_REG_MAC,
	HNAE3_DBG_CMD_REG_DCB,
	HNAE3_DBG_CMD_QUEUE_MAP,
	HNAE3_DBG_CMD_RX_QUEUE_INFO,
	HNAE3_DBG_CMD_TX_QUEUE_INFO,
	HNAE3_DBG_CMD_FD_TCAM,
	HNAE3_DBG_CMD_MAC_TNL_STATUS,
	HNAE3_DBG_CMD_SERV_INFO,
	HNAE3_DBG_CMD_UNKNOWN,
};

@@ -644,7 +668,6 @@ struct hnae3_ae_ops {
	void (*enable_fd)(struct hnae3_handle *handle, bool enable);
	int (*add_arfs_entry)(struct hnae3_handle *handle, u16 queue_id,
			      u16 flow_id, struct flow_keys *fkeys);
	int (*dbg_run_cmd)(struct hnae3_handle *handle, const char *cmd_buf);
	int (*dbg_read_cmd)(struct hnae3_handle *handle, enum hnae3_dbg_cmd cmd,
			    char *buf, int len);
	pci_ers_result_t (*handle_hw_ras_error)(struct hnae3_ae_dev *ae_dev);
+389 −257

File changed.

Preview size limit exceeded, changes collapsed.

+4 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@

#define HNS3_DBG_READ_LEN	65536
#define HNS3_DBG_READ_LEN_128KB	0x20000
#define HNS3_DBG_READ_LEN_1MB	0x100000
#define HNS3_DBG_READ_LEN_4MB	0x400000
#define HNS3_DBG_WRITE_LEN	1024

@@ -29,6 +30,9 @@ enum hns3_dbg_dentry_type {
	HNS3_DBG_DENTRY_TX_BD,
	HNS3_DBG_DENTRY_RX_BD,
	HNS3_DBG_DENTRY_MAC,
	HNS3_DBG_DENTRY_REG,
	HNS3_DBG_DENTRY_QUEUE,
	HNS3_DBG_DENTRY_FD,
	HNS3_DBG_DENTRY_COMMON,
};

+926 −772

File changed.

Preview size limit exceeded, changes collapsed.

+12 −1
Original line number Diff line number Diff line
@@ -69,6 +69,11 @@ struct hclge_dbg_reg_common_msg {
	enum hclge_opcode_type cmd;
};

struct hclge_dbg_tcam_msg {
	u8 stage;
	u32 loc;
};

#define	HCLGE_DBG_MAX_DFX_MSG_LEN	60
struct hclge_dbg_dfx_message {
	int flag;
@@ -77,7 +82,7 @@ struct hclge_dbg_dfx_message {

#define HCLGE_DBG_MAC_REG_TYPE_LEN	32
struct hclge_dbg_reg_type_info {
	const char *reg_type;
	enum hnae3_dbg_cmd cmd;
	const struct hclge_dbg_dfx_message *dfx_msg;
	struct hclge_dbg_reg_common_msg reg_msg;
};
@@ -85,6 +90,8 @@ struct hclge_dbg_reg_type_info {
struct hclge_dbg_func {
	enum hnae3_dbg_cmd cmd;
	int (*dbg_dump)(struct hclge_dev *hdev, char *buf, int len);
	int (*dbg_dump_reg)(struct hclge_dev *hdev, enum hnae3_dbg_cmd cmd,
			    char *buf, int len);
};

static const struct hclge_dbg_dfx_message hclge_dbg_bios_common_reg[] = {
@@ -731,6 +738,10 @@ static const struct hclge_dbg_dfx_message hclge_dbg_tqp_reg[] = {
#define HCLGE_DBG_ID_LEN			16
#define HCLGE_DBG_ITEM_NAME_LEN			32
#define HCLGE_DBG_DATA_STR_LEN			32
#define HCLGE_DBG_TM_INFO_LEN			256

#define HCLGE_BILLION_NANO_SECONDS	1000000000

struct hclge_dbg_item {
	char name[HCLGE_DBG_ITEM_NAME_LEN];
	u16 interval; /* blank numbers after the item */
Loading