net: hibmcge: fix the incorrect np_link fail state issue.
authorJijie Shao <shaojijie@huawei.com>
Thu, 10 Apr 2025 02:13:25 +0000 (10:13 +0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 12 Apr 2025 03:17:36 +0000 (20:17 -0700)
commit1d6c3e06232e5f53458842915bbff28e8fc29244
treee2ff2731ad346b148cc762d8b94e5198be472b82
parent4e4ac53335de54bcb9d26842df0998cfd8fcaf90
net: hibmcge: fix the incorrect np_link fail state issue.

In the debugfs file, the driver displays the np_link fail state
based on the HBG_NIC_STATE_NP_LINK_FAIL.

However, HBG_NIC_STATE_NP_LINK_FAIL is cleared in hbg_service_task()
So, this value of np_link fail is always false.

This patch directly reads the related register to display the real state.

Fixes: e0306637e85d ("net: hibmcge: Add support for mac link exception handling feature")
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250410021327.590362-6-shaojijie@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/hisilicon/hibmcge/hbg_debugfs.c