net: hns3: Fix MSIX allocation issue for VF
authorJian Shen <shenjian15@huawei.com>
Fri, 3 Aug 2018 09:56:30 +0000 (10:56 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Aug 2018 16:53:24 +0000 (09:53 -0700)
commit07acf909ee33983fe22334446dd5c2adf0fdca26
tree2b5de293d1cffb3770c0ff6b4e3fd85fdab715af
parent54424d3891967b83d707c9300a3509c2ae8f42ee
net: hns3: Fix MSIX allocation issue for VF

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>
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