]> git.proxmox.com Git - mirror_ubuntu-hirsute-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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 7 May 2021 07:53:41 +0000 (09:53 +0200)
commit3e0ae4d97683b430de39d407909b71772a99c382
tree0a22435907173c2ab376132cdb15983fe5c30ed3
parent3eba4e047e9475e651a2f4f43ea186563a15d9fd
net: hns3: clear VF down state bit before request link status

BugLink: https://bugs.launchpad.net/bugs/1926368
[ Upstream commit ed7bedd2c3ca040f1e8ea02c6590a93116b1ec78 ]

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: e2cb1dec9779 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c