Commit 9cf31ca8 authored by Jiaran Zhang's avatar Jiaran Zhang Committed by Yang Yingliang
Browse files

net: hns3: refactor dump ncl config of debugfs

mainline inclusion
from mainline-v5.14-rc1
commit e76e6886
category: feature
bugzilla: NA
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e76e6886646b



----------------------------------------------------------------------

Currently, the debugfs command for ncl config is implemented by
"echo xxxx > cmd", and record the information in dmesg. It's
unnecessary and heavy. To improve it, create a single file
"ncl_config" for it, and query it by command "cat ncl_config",
return the result to userspace, rather than record in dmesg.

The display style is below:
$cat ncl_config
offset | data
0x0000 | 0x00000028
0x0004 | 0x00000400
0x0008 | 0x08040201
0x000c | 0x00000000
0x0010 | 0x00040004
0x0014 | 0x00040004
0x0018 | 0x00000000
0x001c | 0x00000000
0x0020 | 0x00040004

Signed-off-by: default avatarJiaran Zhang <zhangjiaran@huawei.com>
Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarYonglong Liu <liuyonglong@huawei.com>
Reviewed-by: default avatarJunxin Chen <chenjunxin1@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent dd162e72
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment