]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Fix for loopback selftest failed problem
authorYunsheng Lin <linyunsheng@huawei.com>
Mon, 3 Sep 2018 10:21:50 +0000 (11:21 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Sep 2018 05:04:45 +0000 (22:04 -0700)
commita76a51ed884ed34183e61f36877e8e2778f1eeb9
tree96cd2bdeed4557b67e43a7d1c2661b3bfffba50e
parent6b699b341182655a3a5d07b6559dbf137b2feee9
net: hns3: Fix for loopback selftest failed problem

Tqp and mac need to be enabled when doing loopback selftest,
ae_algo->ops->start/stop is used to do the job, there is a
time window between ae_algo->ops->start/stop and loopback setup,
which will cause selftest failed problem when there is frame
coming in during that time window.

This patch fixes it by enabling the tqp and mac during loopback
setup process.

Fixes: a744bc32b931 ("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>
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c