HomeFreeBSD

MFC 348695: Support MSI-X for passthrough devices with a separate PBA BAR.

Description

MFC 348695: Support MSI-X for passthrough devices with a separate PBA BAR.

pci_alloc_msix() requires both the table and PBA BARs to be allocated
by the driver. ppt was only allocating the table BAR so would fail
for devices with the PBA in a separate BAR. Fix this by allocating
the PBA BAR before pci_alloc_msix() if it is stored in a separate BAR.

While here, release BARs after calling pci_release_msi() instead of
before. Also, don't call bus_teardown_intr() in error handling code
if bus_setup_intr() has just failed.

Details

Committed
jhbAug 14 2019, 11:31 PM
Parents
rS351059: MFC 348694: Don't simulate PBA access if the PBA is in a separate BAR.
Branches
Unknown
Tags
Unknown