diff options
| author | Scott Long <scottl@FreeBSD.org> | 2018-11-13 18:49:43 +0000 |
|---|---|---|
| committer | Scott Long <scottl@FreeBSD.org> | 2018-11-13 18:49:43 +0000 |
| commit | b639b5bc3953f66c5bd2f5c894c61d686ab049cd (patch) | |
| tree | cdf06d7d6bdd3ece8b22f127797b993d333002ee /sys/dev/mps | |
| parent | bad9e92bb0a8ad61c0e8eef20cc2ed94f94169cd (diff) | |
Notes
Diffstat (limited to 'sys/dev/mps')
| -rw-r--r-- | sys/dev/mps/mps_pci.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/dev/mps/mps_pci.c b/sys/dev/mps/mps_pci.c index bfa71cc6c95a..134993f9142e 100644 --- a/sys/dev/mps/mps_pci.c +++ b/sys/dev/mps/mps_pci.c @@ -247,12 +247,16 @@ mps_pci_alloc_interrupts(struct mps_softc *sc) error = 0; msgs = 0; - if ((sc->disable_msix == 0) && - ((msgs = pci_msix_count(dev)) >= MPS_MSI_COUNT)) - error = mps_alloc_msix(sc, MPS_MSI_COUNT); - if ((error != 0) && (sc->disable_msi == 0) && - ((msgs = pci_msi_count(dev)) >= MPS_MSI_COUNT)) - error = mps_alloc_msi(sc, MPS_MSI_COUNT); + if (sc->disable_msix == 0) { + msgs = pci_msix_count(dev); + if (msgs >= MPS_MSI_COUNT) + error = mps_alloc_msix(sc, MPS_MSI_COUNT); + } + if (((error != 0) || (msgs == 0)) && (sc->disable_msi == 0)) { + msgs = pci_msi_count(dev); + if (msgs >= MPS_MSI_COUNT) + error = mps_alloc_msi(sc, MPS_MSI_COUNT); + } if (error != 0) msgs = 0; |
