diff options
author | jimharris <jimharris@FreeBSD.org> | 2015-09-11 17:06:57 +0000 |
---|---|---|
committer | jimharris <jimharris@FreeBSD.org> | 2015-09-11 17:06:57 +0000 |
commit | d9358932b481e4018c620075026307729a678352 (patch) | |
tree | ef52ef07e27a6ac76ee9a224bb76ae94ce71668d | |
parent | c658400dc578ca1a6752829d9752a67b2644ac19 (diff) | |
download | FreeBSD-src-d9358932b481e4018c620075026307729a678352.zip FreeBSD-src-d9358932b481e4018c620075026307729a678352.tar.gz |
MFC r287564:
isci: check return value of pci_alloc_msix()
Certain VM guest types (VMware, Xen) do not support MSI, so pci_alloc_msix()
always fails. isci(4) was not properly detecting the allocation failure,
and would try to proceed with MSIx resource initialization rather than
reverting to INTx.
Sponsored by: Intel
-rw-r--r-- | sys/dev/isci/isci_interrupt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/isci/isci_interrupt.c b/sys/dev/isci/isci_interrupt.c index 52c64f7..b56fd3a 100644 --- a/sys/dev/isci/isci_interrupt.c +++ b/sys/dev/isci/isci_interrupt.c @@ -136,8 +136,8 @@ isci_interrupt_setup(struct isci_softc *isci) pci_msix_count(isci->device) >= max_msix_messages) { isci->num_interrupts = max_msix_messages; - pci_alloc_msix(isci->device, &isci->num_interrupts); - if (isci->num_interrupts == max_msix_messages) + if (pci_alloc_msix(isci->device, &isci->num_interrupts) == 0 && + isci->num_interrupts == max_msix_messages) use_msix = TRUE; } |