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)
commit283c3cc03d95dba8641fecbff3b9dcaab5e9a6ff
tree2b5de293d1cffb3770c0ff6b4e3fd85fdab715af
parent6093fa79b0e69c219d4e13fc2732917d9e7c7cbb
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: efa29b6d502b ("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