]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
net: hns3: fix speed unknown issue in bond 4
authorYonglong Liu <liuyonglong@huawei.com>
Thu, 26 Aug 2021 11:21:57 +0000 (19:21 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 24 Sep 2021 09:58:57 +0000 (11:58 +0200)
commit4982310f0f6c61e4427d62f5df552619ae686fff
tree02241afda97e5b06a1e439c8d6d19dc37a01039e
parentc0d13c37fb5107adf863430f5b7f63f71f2819bb
net: hns3: fix speed unknown issue in bond 4

BugLink: https://bugs.launchpad.net/bugs/1944610
[ Upstream commit b15c072a9f4a404c09ad589477f4389034742a8b ]

In bond 4, when the link goes down and up repeatedly, the bond may get an
unknown speed, and then this port can not work.

The driver notify netif_carrier_on() before update the link state, when the
bond receive carrier on, will query the speed of the port, if the query
operation happens before updating the link state, will get an unknown
speed. So need to notify netif_carrier_on() after update the link state.

Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support")
Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
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/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c