net: hibmcge: fix the np_link_fail error reporting issue
authorJijie Shao <shaojijie@huawei.com>
Wed, 6 Aug 2025 10:27:58 +0000 (18:27 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 8 Aug 2025 18:48:49 +0000 (11:48 -0700)
commit62c50180ffda01468e640ac14925503796f255e2
tree35f5e619d75f1169ccae776453811eed6ed90597
parent7004b26f0b64331143eb0b312e77a357a11427ce
net: hibmcge: fix the np_link_fail error reporting issue

Currently, after modifying device port mode, the np_link_ok state
is immediately checked. At this point, the device may not yet ready,
leading to the querying of an intermediate state.

This patch will poll to check if np_link is ok after
modifying device port mode, and only report np_link_fail upon timeout.

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>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/hisilicon/hibmcge/hbg_hw.c