]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: hns: fix fake link up on xge port
authorYonglong Liu <liuyonglong@huawei.com>
Mon, 4 Dec 2023 14:32:32 +0000 (22:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Dec 2023 17:36:36 +0000 (18:36 +0100)
commit4fe599a7cd7b6bbe5c5da6f4ebccf99ec49e50d3
treee246a4a6e65eaf67d7c68590251bf40959d0d9f0
parenta5c2f9f7f8824e3e480781cf58017b07e4ed22b6
net: hns: fix fake link up on xge port

[ Upstream commit f708aba40f9c1eeb9c7e93ed4863b5f85b09b288 ]

If a xge port just connect with an optical module and no fiber,
it may have a fake link up because there may be interference on
the hardware. This patch adds an anti-shake to avoid the problem.
And the time of anti-shake is base on tests.

Fixes: b917078c1c10 ("net: hns: Add ACPI support to check SFP present")
Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c