K 10 svn:author V 3 jhb K 8 svn:date V 27 2019-06-05T19:30:32.259173Z K 7 svn:log V 663 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. Reported by: gallatin Tested by: gallatin Reviewed by: rgrimes, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D20525 END