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. Reported and tested by: Bradley W. Dutton (brad-fbsd-stable@duttonbros.com) MFC after: 3 days Sponsored by: Intel
This commit is contained in:
parent
c16120409b
commit
854c31980e
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user