]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitcc309f182686b7371510531ccc32bad23e1a5bd3
tree2b5de293d1cffb3770c0ff6b4e3fd85fdab715af
parenta8f7a869cd12fc728ca18ba4da57500e2df14c9f
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: 8d24118d4958 ("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