hinic: fix sending pkts from core while self testing
authorLuo bin <luobin9@huawei.com>
Fri, 18 Sep 2020 04:09:38 +0000 (12:09 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Sep 2020 21:11:01 +0000 (14:11 -0700)
commitfc25fa97976b1c2fd226ae2b43e1f5abb61b77c9
treef4a2c4e4b482128c39b293f00b38f5aa39ebbae3
parent2b33b202dc3e30a15d7c0147f26fc6bb23f85493
hinic: fix sending pkts from core while self testing

Call netif_tx_disable firstly before starting doing self-test to
avoid sending packet from networking core and self-test packet
simultaneously which may cause self-test failure or hw abnormal.

Fixes: 4aa218a4fe77 ("hinic: add self test support")
Signed-off-by: Luo bin <luobin9@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/huawei/hinic/hinic_ethtool.c
drivers/net/ethernet/huawei/hinic/hinic_tx.c