[tip:core/iommu] x86/amd-iommu: Don't detach device from pt domain on driver unbind

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  a1ca331c8aa75cd58fdf685e2e8745e1d3ec5c8f
Gitweb:     http://git.kernel.org/tip/a1ca331c8aa75cd58fdf685e2e8745e1d3ec5c8f
Author:     Joerg Roedel <joerg.roedel@xxxxxxx>
AuthorDate: Tue, 1 Sep 2009 12:22:22 +0200
Committer:  Joerg Roedel <joerg.roedel@xxxxxxx>
CommitDate: Thu, 3 Sep 2009 16:15:46 +0200

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@xxxxxxx>


---
 arch/x86/kernel/amd_iommu.c |    2 ++
 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:
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux