OSDN Git Service

net: hns3: Fix ping exited problem when doing lp selftest
authorYunsheng Lin <linyunsheng@huawei.com>
Mon, 3 Sep 2018 10:21:51 +0000 (11:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:08:29 +0000 (11:08 -0800)
commit0e80397c864a4744e0513551c06089a16c0b0019
tree58a365f0b530e3b83fbf7de7f3090e075710bd58
parent35aafd40b173d7feeee812f49c89614a2011bdc5
net: hns3: Fix ping exited problem when doing lp selftest

[ Upstream commit 3f8601f0f5716c4e63a9f215bbc581df42859d61 ]

When ping is runnig and user executes the loopback selftest, the
ping cmd will stop and exit.

This patch fixes it by using the hns3_nic_net_open/stop to offline
the netdev when doing loopback selftest.

Fixes: c39c4d98dc65 ("net: hns3: Add mac loopback selftest support in hns3 driver")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c