提交 9644cdcd 编写于 作者: A Alexander Gordeev 提交者: David S. Miller

vxge: Use pci_enable_msix_range() instead of pci_enable_msix()

As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Signed-off-by: NAlexander Gordeev <agordeev@redhat.com>
Cc: Jon Mason <jdmason@kudzu.us>
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 37a15ed3
......@@ -2349,12 +2349,18 @@ static int vxge_alloc_msix(struct vxgedev *vdev)
vdev->vxge_entries[j].entry = VXGE_ALARM_MSIX_ID;
vdev->vxge_entries[j].in_use = 0;
ret = pci_enable_msix(vdev->pdev, vdev->entries, vdev->intr_cnt);
if (ret > 0) {
ret = pci_enable_msix_range(vdev->pdev,
vdev->entries, 3, vdev->intr_cnt);
if (ret < 0) {
ret = -ENODEV;
goto enable_msix_failed;
} else if (ret < vdev->intr_cnt) {
pci_disable_msix(vdev->pdev);
vxge_debug_init(VXGE_ERR,
"%s: MSI-X enable failed for %d vectors, ret: %d",
VXGE_DRIVER_NAME, vdev->intr_cnt, ret);
if ((max_config_vpath != VXGE_USE_DEFAULT) || (ret < 3)) {
if (max_config_vpath != VXGE_USE_DEFAULT) {
ret = -ENODEV;
goto enable_msix_failed;
}
......@@ -2368,9 +2374,6 @@ static int vxge_alloc_msix(struct vxgedev *vdev)
vxge_close_vpaths(vdev, temp);
vdev->no_of_vpath = temp;
goto start;
} else if (ret < 0) {
ret = -ENODEV;
goto enable_msix_failed;
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册