summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/amd_iommu.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2009-09-01 10:22:22 (GMT)
committerJoerg Roedel <joerg.roedel@amd.com>2009-09-03 14:15:46 (GMT)
commita1ca331c8aa75cd58fdf685e2e8745e1d3ec5c8f (patch)
treea9945bafe6ea38a537e182670daaf6a44284448e /arch/x86/kernel/amd_iommu.c
parent21129f786f231f7a9dce5b504617b893f50a435f (diff)
downloadlinux-fsl-qoriq-a1ca331c8aa75cd58fdf685e2e8745e1d3ec5c8f.tar.xz
x86/amd-iommu: Don't detach device from pt domain on driver unbind
This patch makes sure a device is not detached from the passthrough domain when the device driver is unloaded or does otherwise release the device. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/kernel/amd_iommu.c')
-rw-r--r--arch/x86/kernel/amd_iommu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index a8e74c3..12a541d 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -1195,6 +1195,8 @@ static int device_change_notifier(struct notifier_block *nb,
case BUS_NOTIFY_UNBOUND_DRIVER:
if (!domain)
goto out;
+ if (iommu_pass_through)
+ break;
detach_device(domain, devid);
break;
case BUS_NOTIFY_ADD_DEVICE: