summaryrefslogtreecommitdiffstats
path: root/sys/x86
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-03-01 10:29:48 +0000
committerkib <kib@FreeBSD.org>2015-03-01 10:29:48 +0000
commit28c8a09abb9139876eddfc8356ff95d11a76c524 (patch)
treef58794a4535914f6cc20f3320b8577a83b092791 /sys/x86
parent8882db8870fcd94fca831da0651e180ccdc148e3 (diff)
downloadFreeBSD-src-28c8a09abb9139876eddfc8356ff95d11a76c524.zip
FreeBSD-src-28c8a09abb9139876eddfc8356ff95d11a76c524.tar.gz
MFC r276867:
Fix DMAR context allocations for the devices behind PCIe->PCI bridges after dmar driver was converted to use rids. The bus component to calculate context page must be taken from the requestor rid, which is a bridge, and not from the device bus number.
Diffstat (limited to 'sys/x86')
-rw-r--r--sys/x86/iommu/intel_ctx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/x86/iommu/intel_ctx.c b/sys/x86/iommu/intel_ctx.c
index d6123be..7062de5 100644
--- a/sys/x86/iommu/intel_ctx.c
+++ b/sys/x86/iommu/intel_ctx.c
@@ -290,7 +290,7 @@ dmar_get_ctx(struct dmar_unit *dmar, device_t dev, uint16_t rid, bool id_mapped,
* higher chance to succeed if the sleep is allowed.
*/
DMAR_UNLOCK(dmar);
- dmar_ensure_ctx_page(dmar, bus);
+ dmar_ensure_ctx_page(dmar, PCI_RID2BUS(rid));
ctx1 = dmar_get_ctx_alloc(dmar, rid);
if (id_mapped) {
OpenPOWER on IntegriCloud