Skip to content

Commit

Permalink
iommu/vt-d: Only remove domain when device is removed
Browse files Browse the repository at this point in the history
This makes sure any RMRR mappings stay in place when the
driver is unbound from the device.

Signed-off-by: Joerg Roedel <[email protected]>
Tested-by: Jerry Hoemann <[email protected]>
  • Loading branch information
joergroedel committed Oct 2, 2014
1 parent 599bad3 commit 1196c2f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1196c2f

Please sign in to comment.