net: hns3: add support for dump ncl config by debugfs
authorWeihang Li <liweihang@hisilicon.com>
Fri, 19 Apr 2019 03:05:44 +0000 (11:05 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 20 Apr 2019 01:43:16 +0000 (18:43 -0700)
commitffd140e2ea980ea0ded8631f8bc1f43bca8a509e
tree8cdbabf04c37a9a09488e500039e3e0430fe7058
parentbb87be87b1658f7ee95c0b7625553a6e7f8fea1c
net: hns3: add support for dump ncl config by debugfs

This patch allow users to dump content of NCL_CONFIG by using debugfs
command.
Command format:
echo dump ncl_config <offset> <length> > cmd
It will print as follows:
hns3 0000:7d:00.0: offset |    data
hns3 0000:7d:00.0: 0x0000 | 0x00000020
hns3 0000:7d:00.0: 0x0004 | 0x00000400
hns3 0000:7d:00.0: 0x0008 | 0x08020401

Signed-off-by: Weihang Li <liweihang@hisilicon.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c