]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: hns3: fix a phy loopback fail issue
authorYonglong Liu <liuyonglong@huawei.com>
Tue, 5 Jan 2021 03:37:26 +0000 (11:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Jan 2021 13:05:31 +0000 (14:05 +0100)
commitfa020a28896c310359d0fcddedc865ba375b592a
tree8efa02c5946016a324e02ea65949057a9bdb9af4
parentbddaf51d116cc0242c7c88a30066255861457641
net: hns3: fix a phy loopback fail issue

[ Upstream commit f04bbcbf1e38d192e94bbfa126731a52332c40b1 ]

When phy driver does not implement the set_loopback interface,
phy loopback test will return -EOPNOTSUPP, and the loopback test
will fail. So when phy driver does not implement the set_loopback
interface, don't do phy loopback test.

Fixes: c9765a89d142 ("net: hns3: add phy selftest function")
Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c