aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ntb
diff options
context:
space:
mode:
authorAlexander Gordeev <agordeev@redhat.com>2014-03-11 12:00:35 -0400
committerJon Mason <jon.mason@intel.com>2014-04-07 13:59:20 -0400
commitf220baad08963a75c78c80cdc1c9e9492ca0eb2a (patch)
tree914fa5001e629ec93ef026d5b4d4c0f584aed06a /drivers/ntb
parent53a788a765b5336bd5ac5935e6d962bcdd281802 (diff)
ntb: 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() or pci_enable_msi_exact() and pci_enable_msix_range() or pci_enable_msix_exact() interfaces. Signed-off-by: Alexander Gordeev <agordeev@redhat.com> Signed-off-by: Jon Mason <jon.mason@intel.com>
Diffstat (limited to 'drivers/ntb')
-rw-r--r--drivers/ntb/ntb_hw.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/ntb/ntb_hw.c b/drivers/ntb/ntb_hw.c
index 22a7eb415d76..372e08c4ffef 100644
--- a/drivers/ntb/ntb_hw.c
+++ b/drivers/ntb/ntb_hw.c
@@ -1089,11 +1089,9 @@ static int ntb_setup_snb_msix(struct ntb_device *ndev, int msix_entries)
1089 if (msix_entries < ndev->limits.msix_cnt) 1089 if (msix_entries < ndev->limits.msix_cnt)
1090 return -ENOSPC; 1090 return -ENOSPC;
1091 1091
1092 rc = pci_enable_msix(pdev, ndev->msix_entries, msix_entries); 1092 rc = pci_enable_msix_exact(pdev, ndev->msix_entries, msix_entries);
1093 if (rc < 0) 1093 if (rc < 0)
1094 return rc; 1094 return rc;
1095 else if (rc > 0)
1096 return -ENOSPC;
1097 1095
1098 for (i = 0; i < msix_entries; i++) { 1096 for (i = 0; i < msix_entries; i++) {
1099 msix = &ndev->msix_entries[i]; 1097 msix = &ndev->msix_entries[i];
@@ -1139,18 +1137,10 @@ static int ntb_setup_bwd_msix(struct ntb_device *ndev, int msix_entries)
1139 struct msix_entry *msix; 1137 struct msix_entry *msix;
1140 int rc, i; 1138 int rc, i;
1141 1139
1142retry: 1140 msix_entries = pci_enable_msix_range(pdev, ndev->msix_entries,
1143 rc = pci_enable_msix(pdev, ndev->msix_entries, msix_entries); 1141 1, msix_entries);
1144 if (rc < 0) 1142 if (msix_entries < 0)
1145 return rc; 1143 return msix_entries;
1146 else if (rc > 0) {
1147 dev_warn(&pdev->dev,
1148 "Only %d MSI-X vectors. "
1149 "Limiting the number of queues to that number.\n",
1150 rc);
1151 msix_entries = rc;
1152 goto retry;
1153 }
1154 1144
1155 for (i = 0; i < msix_entries; i++) { 1145 for (i = 0; i < msix_entries; i++) {
1156 msix = &ndev->msix_entries[i]; 1146 msix = &ndev->msix_entries[i];