Fix interrupts delivery on ThunderX for VF IDs beyond 8

SR-IOV devices usually use Alternative Routing ID (ARI).
In that case slot/device is always assumed to be 0 and
function/identifier is extended to 8 bits.

Fix interrupts delivery to VF IDs beyond 8 by using a correct
DevID if ARI is enabled.

Reviewed by:   jhb, wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5855
This commit is contained in:
zbb 2016-04-07 10:36:50 +00:00
parent d7c17f7512
commit fa19c68f9f

View File

@ -1579,9 +1579,7 @@ its_get_devid_thunder(device_t pci_dev)
uint32_t bus;
bus = pci_get_bus(pci_dev);
bsf = PCI_RID(pci_get_bus(pci_dev), pci_get_slot(pci_dev),
pci_get_function(pci_dev));
bsf = pci_get_rid(pci_dev);
/* Check if accessing internal PCIe (low bus numbers) */
if (bus < GIC_V3_ITS_QUIRK_THUNDERX_PEM_BUS_OFFSET) {