iommu/amd: Initialize dma_ops for hotplug and sriov devices
authorJoerg Roedel <joerg.roedel@amd.com>
Thu, 21 Jun 2012 12:52:40 +0000 (14:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Jul 2012 16:03:51 +0000 (09:03 -0700)
commitb9e619e35c808f11f2da804c2fac1f2031e1cafd
treefe49224bc616a10011a3f5a795d3c0c7a247ba80
parent7b9f477f5188e237f52c8a1243fd55615c63064f
iommu/amd: Initialize dma_ops for hotplug and sriov devices

commit ac1534a55d1e87d59a21c09c570605933b551480 upstream.

When a device is added to the system at runtime the AMD
IOMMU driver initializes the necessary data structures to
handle translation for it. But it forgets to change the
per-device dma_ops to point to the AMD IOMMU driver. So
mapping actually never happens and all DMA accesses end in
an IO_PAGE_FAULT. Fix this.

Reported-by: Stefan Assmann <sassmann@redhat.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/amd_iommu.c