]> err.no Git - linux-2.6/commitdiff
POWERPC: Set dma_data correctly for direct_ops on pasemi
authorOlof Johansson <olof@lixom.net>
Thu, 31 Jan 2008 06:41:30 +0000 (00:41 -0600)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 31 Jan 2008 08:59:44 +0000 (19:59 +1100)
More late-caught fallout from the mainline merge.  Commit
35e4a6e26d0c6bc7f32087db61f0fb3666531183 ("[POWERPC] Use
archdata.dma_data in dma_direct_ops and add the offset") claimed

  "Now that all platforms using dma_direct_offset setup the
   archdata.dma_data correctly, ..."

..but nope -- the pasemi iommu setup code that disables translation on
the DMA pci device didn't set dma_data correctly.

This fixes it.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/powerpc/platforms/pasemi/iommu.c

index 9916a0f3e431955ba78117207e96038841b22ce6..c5cfd4b04a830d81ef1ca59ced3db5a35a6590bb 100644 (file)
@@ -182,8 +182,10 @@ static void pci_dma_dev_setup_pasemi(struct pci_dev *dev)
         * CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE at build time.
         */
        if (dev->vendor == 0x1959 && dev->device == 0xa007 &&
-           !firmware_has_feature(FW_FEATURE_LPAR))
+           !firmware_has_feature(FW_FEATURE_LPAR)) {
                dev->dev.archdata.dma_ops = &dma_direct_ops;
+               dev->dev.archdata.dma_data = 0;
+       }
 #endif
 
        dev->dev.archdata.dma_data = &iommu_table_iobmap;