[PATCH v2] [POWERPC] Set dma_data correctly for direct_ops on pasemi

Olof Johansson olof at lixom.net
Fri Feb 1 03:25:39 EST 2008


More fallout from the merge:

[POWERPC] Use archdata.dma_data in dma_direct_ops and add the offset

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

Nope -- the pasemi iommu setup code that disables translation on the DMA
pci device still set dma_data to point at the table. The below patch is
needed, please merge asap.


Signed-off-by: Olof Johansson <olof at lixom.net>

diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c
index 9916a0f..5803f11 100644
--- a/arch/powerpc/platforms/pasemi/iommu.c
+++ b/arch/powerpc/platforms/pasemi/iommu.c
@@ -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;
+		return;
+	}
 #endif
 
 	dev->dev.archdata.dma_data = &iommu_table_iobmap;



More information about the Linuxppc-dev mailing list