]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: clear VF down state bit before request link status
authorGuangbin Huang <huangguangbin2@huawei.com>
Tue, 6 Apr 2021 13:10:43 +0000 (21:10 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Apr 2021 23:40:06 +0000 (16:40 -0700)
commit3ea1edf91cd75775016dc6d7ef757461df12d97e
tree21377a5ae46baccd00a5fd554d4b81d16ed02017
parent0256f01ce638a5d8d229605e31e7271b189d27cb
net: hns3: clear VF down state bit before request link status

Currently, the VF down state bit is cleared after VF sending
link status request command. There is problem that when VF gets
link status replied from PF, the down state bit may still set
as 1. In this case, the link status replied from PF will be
ignored and always set VF link status to down.

To fix this problem, clear VF down state bit before VF requests
link status.

Fixes: efa29b6d502b ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support")
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c