]> asedeno.scripts.mit.edu Git - linux.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)
commit0f29fc23b21d3cbd966537bfabba07c00466b787
tree96cd2bdeed4557b67e43a7d1c2661b3bfffba50e
parentce2c1d2ea67adf2742d4d3ef58f8d668b3a6b85f
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: 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>
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c