diff options
Diffstat (limited to 'drivers/scsi/bfa/bfad.c')
-rw-r--r-- | drivers/scsi/bfa/bfad.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c index c18279fbb8b3..e90a3742f09d 100644 --- a/drivers/scsi/bfa/bfad.c +++ b/drivers/scsi/bfa/bfad.c | |||
@@ -1234,29 +1234,21 @@ bfad_setup_intr(struct bfad_s *bfad) | |||
1234 | if ((bfa_asic_id_ctc(pdev->device) && !msix_disable_ct) || | 1234 | if ((bfa_asic_id_ctc(pdev->device) && !msix_disable_ct) || |
1235 | (bfa_asic_id_cb(pdev->device) && !msix_disable_cb)) { | 1235 | (bfa_asic_id_cb(pdev->device) && !msix_disable_cb)) { |
1236 | 1236 | ||
1237 | error = pci_enable_msix(bfad->pcidev, msix_entries, bfad->nvec); | 1237 | error = pci_enable_msix_exact(bfad->pcidev, |
1238 | msix_entries, bfad->nvec); | ||
1238 | /* In CT1 & CT2, try to allocate just one vector */ | 1239 | /* In CT1 & CT2, try to allocate just one vector */ |
1239 | if (error > 0 && bfa_asic_id_ctc(pdev->device)) { | 1240 | if (error == -ENOSPC && bfa_asic_id_ctc(pdev->device)) { |
1240 | printk(KERN_WARNING "bfa %s: trying one msix " | 1241 | printk(KERN_WARNING "bfa %s: trying one msix " |
1241 | "vector failed to allocate %d[%d]\n", | 1242 | "vector failed to allocate %d[%d]\n", |
1242 | bfad->pci_name, bfad->nvec, error); | 1243 | bfad->pci_name, bfad->nvec, error); |
1243 | bfad->nvec = 1; | 1244 | bfad->nvec = 1; |
1244 | error = pci_enable_msix(bfad->pcidev, | 1245 | error = pci_enable_msix_exact(bfad->pcidev, |
1245 | msix_entries, bfad->nvec); | 1246 | msix_entries, 1); |
1246 | } | 1247 | } |
1247 | 1248 | ||
1248 | /* | ||
1249 | * Only error number of vector is available. | ||
1250 | * We don't have a mechanism to map multiple | ||
1251 | * interrupts into one vector, so even if we | ||
1252 | * can try to request less vectors, we don't | ||
1253 | * know how to associate interrupt events to | ||
1254 | * vectors. Linux doesn't duplicate vectors | ||
1255 | * in the MSIX table for this case. | ||
1256 | */ | ||
1257 | if (error) { | 1249 | if (error) { |
1258 | printk(KERN_WARNING "bfad%d: " | 1250 | printk(KERN_WARNING "bfad%d: " |
1259 | "pci_enable_msix failed (%d), " | 1251 | "pci_enable_msix_exact failed (%d), " |
1260 | "use line based.\n", | 1252 | "use line based.\n", |
1261 | bfad->inst_no, error); | 1253 | bfad->inst_no, error); |
1262 | goto line_based; | 1254 | goto line_based; |