Commit 9644cdcd authored by Alexander Gordeev's avatar Alexander Gordeev Committed by 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: default avatarAlexander Gordeev <agordeev@redhat.com>
Cc: Jon Mason <jdmason@kudzu.us>
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 37a15ed3
...@@ -2349,12 +2349,18 @@ static int vxge_alloc_msix(struct vxgedev *vdev) ...@@ -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].entry = VXGE_ALARM_MSIX_ID;
vdev->vxge_entries[j].in_use = 0; vdev->vxge_entries[j].in_use = 0;
ret = pci_enable_msix(vdev->pdev, vdev->entries, vdev->intr_cnt); ret = pci_enable_msix_range(vdev->pdev,
if (ret > 0) { 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, vxge_debug_init(VXGE_ERR,
"%s: MSI-X enable failed for %d vectors, ret: %d", "%s: MSI-X enable failed for %d vectors, ret: %d",
VXGE_DRIVER_NAME, vdev->intr_cnt, ret); 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; ret = -ENODEV;
goto enable_msix_failed; goto enable_msix_failed;
} }
...@@ -2368,9 +2374,6 @@ static int vxge_alloc_msix(struct vxgedev *vdev) ...@@ -2368,9 +2374,6 @@ static int vxge_alloc_msix(struct vxgedev *vdev)
vxge_close_vpaths(vdev, temp); vxge_close_vpaths(vdev, temp);
vdev->no_of_vpath = temp; vdev->no_of_vpath = temp;
goto start; goto start;
} else if (ret < 0) {
ret = -ENODEV;
goto enable_msix_failed;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment