From 807e84a310ca78c836d0c6930c52b3aa3bca09cc Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sat, 4 Apr 2009 00:39:25 +0100 Subject: [PATCH] --- yaml --- r: 142255 b: refs/heads/master c: 924b6231edfaf1e764ffb4f97ea382bf4facff58 h: refs/heads/master i: 142253: 6092c7573b8e083ce2123f9f741018a7eff4e11e 142251: afe64a36df688151e38263ad9842c53f1f8de894 142247: a0cad2a88d75ef3c8731768ad40b23bb9a73eb26 142239: 9e1f02868a08bf7a00893fff1d18f7047474d489 v: v3 --- [refs] | 2 +- trunk/drivers/pci/intel-iommu.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index e58f72c53a73..7a47eba3f257 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d0b03bd1c6725a3463290d7f9626e4b583518a5a +refs/heads/master: 924b6231edfaf1e764ffb4f97ea382bf4facff58 diff --git a/trunk/drivers/pci/intel-iommu.c b/trunk/drivers/pci/intel-iommu.c index f3eebd2b2d72..6262c198e56e 100644 --- a/trunk/drivers/pci/intel-iommu.c +++ b/trunk/drivers/pci/intel-iommu.c @@ -477,11 +477,16 @@ static struct intel_iommu *device_to_iommu(u8 bus, u8 devfn) if (drhd->ignored) continue; - for (i = 0; i < drhd->devices_cnt; i++) + for (i = 0; i < drhd->devices_cnt; i++) { if (drhd->devices[i] && drhd->devices[i]->bus->number == bus && drhd->devices[i]->devfn == devfn) return drhd->iommu; + if (drhd->devices[i]->subordinate && + drhd->devices[i]->subordinate->number <= bus && + drhd->devices[i]->subordinate->subordinate >= bus) + return drhd->iommu; + } if (drhd->include_all) return drhd->iommu;