iommu/vt-d: Only remove domain when device is removed
authorJoerg Roedel <jroedel@suse.de>
Tue, 30 Sep 2014 11:02:03 +0000 (13:02 +0200)
committerJoerg Roedel <jroedel@suse.de>
Thu, 2 Oct 2014 09:18:58 +0000 (11:18 +0200)
This makes sure any RMRR mappings stay in place when the
driver is unbound from the device.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Tested-by: Jerry Hoemann <jerry.hoemann@hp.com>
drivers/iommu/intel-iommu.c

index d1f5caad04f99a8ed2e3781d5bcedce7c324564e..eaf825ac7d28fb0c3feb95c932e459a47be315c0 100644 (file)
@@ -3865,8 +3865,7 @@ static int device_notifier(struct notifier_block *nb,
        if (iommu_dummy(dev))
                return 0;
 
-       if (action != BUS_NOTIFY_UNBOUND_DRIVER &&
-           action != BUS_NOTIFY_DEL_DEVICE)
+       if (action != BUS_NOTIFY_REMOVED_DEVICE)
                return 0;
 
        domain = find_domain(dev);