Commit 9b1a12d2 authored by Baoquan He's avatar Baoquan He Committed by Joerg Roedel

iommu/amd: Correct the wrong setting of alias DTE in do_attach

In below commit alias DTE is set when its peripheral is
setting DTE. However there's a code bug here to wrongly
set the alias DTE, correct it in this patch.

commit e25bfb56
Author: Joerg Roedel <jroedel@suse.de>
Date:   Tue Oct 20 17:33:38 2015 +0200

    iommu/amd: Set alias DTE in do_attach/do_detach
Signed-off-by: default avatarBaoquan He <bhe@redhat.com>
Tested-by: default avatarMark Hounschell <markh@compro.net>
Cc: stable@vger.kernel.org # v4.4
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent da972fb1
...@@ -2049,7 +2049,7 @@ static void do_attach(struct iommu_dev_data *dev_data, ...@@ -2049,7 +2049,7 @@ static void do_attach(struct iommu_dev_data *dev_data,
/* Update device table */ /* Update device table */
set_dte_entry(dev_data->devid, domain, ats); set_dte_entry(dev_data->devid, domain, ats);
if (alias != dev_data->devid) if (alias != dev_data->devid)
set_dte_entry(dev_data->devid, domain, ats); set_dte_entry(alias, domain, ats);
device_flush_dte(dev_data); device_flush_dte(dev_data);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment