]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net: hns3: Fix MSIX allocation issue for VF
authorJian Shen <shenjian15@huawei.com>
Wed, 19 Sep 2018 18:23:00 +0000 (20:23 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 1 Oct 2018 14:51:52 +0000 (16:51 +0200)
commitf4e4e86c1ff0422e88f4c3f0a36765f11fae7f99
tree9951d5a35c879e9eb490586b570218d6d8997738
parent53a9be0a003b8b3e708b42a893bdf695c1c7a2d1
net: hns3: Fix MSIX allocation issue for VF

BugLink: https://bugs.launchpad.net/bugs/1793221
The msix number for vf is different, depends on the max vf number.
Futherly if the vf supports roce, the offset of msix is not fixed.
It's incorrect to fix the msix number to 33. This patch fixes it by
querying the msix number from firmware, and adjusting it with roce
support.

Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support")
Signed-off-by: Jian Shen <shenjian15@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 07acf909ee33983fe22334446dd5c2adf0fdca26)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.h
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h