From fa19c68f9fc264035f6529ad9e6c229e27bdb83a Mon Sep 17 00:00:00 2001 From: zbb Date: Thu, 7 Apr 2016 10:36:50 +0000 Subject: [PATCH] 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 --- sys/arm64/arm64/gic_v3_its.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/arm64/arm64/gic_v3_its.c b/sys/arm64/arm64/gic_v3_its.c index c847f958493c..aef6346e6e9b 100644 --- a/sys/arm64/arm64/gic_v3_its.c +++ b/sys/arm64/arm64/gic_v3_its.c @@ -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) {