]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
net: hns3: Fix for VF mailbox cannot receiving PF response
authorXi Wang <wangxi11@huawei.com>
Wed, 6 Jun 2018 13:07:51 +0000 (14:07 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 5 Sep 2018 12:18:36 +0000 (14:18 +0200)
commit3efc51e29757e41a87ec99c1af255d88411b28a7
tree14b34da8b9a4a8bc1f0e91b1c5ccc14df41e4bcd
parentd3737fe1ffb460c59ca45c2e2baf3e5500fe2363
net: hns3: Fix for VF mailbox cannot receiving PF response

BugLink: https://bugs.launchpad.net/bugs/1787477
When the VF frequently switches the CMDQ interrupt, if the CMDQ_SRC is not
cleared, the VF will not receive the new PF response after the interrupt
is re-enabled, the corresponding log is as follows:

[  317.482222] hns3 0000:00:03.0: VF could not get mbx resp(=0) from PF
in 500 tries
[  317.483137] hns3 0000:00:03.0: VF request to get tqp info from PF
failed -5

This patch fixes this problem by clearing CMDQ_SRC before enabling
interrupt and syncing pending IRQ handlers after disabling interrupt.

Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support")
Signed-off-by: Xi Wang <wangxi11@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>
(cherry picked from commit 1819e40908ee76c7219287224c22c772556c927e)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c