diff options
Diffstat (limited to 'drivers/ntb')
-rw-r--r-- | drivers/ntb/ntb_hw.c | 20 |
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 | ||
1142 | retry: | 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]; |