Re: [PATCH] [POWERPC] Set dma_data correctly for direct_ops on pasemi
On Thu, 2008-01-31 at 00:41 -0600, Olof Johansson wrote: More late-caught fallout from the mainline merge. The patch: [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 didn't set dma_data correctly. The below patch is needed, please merge as soon as practical. Thanks! Sorry about that. I'm confused though, didn't your device come from alloc_pci_dev() which kzalloc()s the pci_dev which contains the archdata which contains the dma_data, ie. dma_data will already be 0? cheers -- Michael Ellerman OzLabs, IBM Australia Development Lab wwweb: http://michael.ellerman.id.au phone: +61 2 6212 1183 (tie line 70 21183) We do not inherit the earth from our ancestors, we borrow it from our children. - S.M.A.R.T Person signature.asc Description: This is a digitally signed message part ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] [POWERPC] Set dma_data correctly for direct_ops on pasemi
On Thu, Jan 31, 2008 at 11:38:16PM +1100, Michael Ellerman wrote: On Thu, 2008-01-31 at 00:41 -0600, Olof Johansson wrote: More late-caught fallout from the mainline merge. The patch: [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 didn't set dma_data correctly. The below patch is needed, please merge as soon as practical. Thanks! Sorry about that. I'm confused though, didn't your device come from alloc_pci_dev() which kzalloc()s the pci_dev which contains the archdata which contains the dma_data, ie. dma_data will already be 0? Yeah, I don't see how my patch could work (but it did), since the code falls through and overwrites dma_data with the pointer to the table, just as before. Weird, I did test it last night. See new patch. -Olof ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] [POWERPC] Set dma_data correctly for direct_ops on pasemi
More late-caught fallout from the mainline merge. The patch: [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 didn't set dma_data correctly. The below patch is needed, please merge as soon as practical. Thanks! Signed-off-by: Olof Johansson [EMAIL PROTECTED] diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c index 9916a0f..c5cfd4b 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; + dev-dev.archdata.dma_data = 0; + } #endif dev-dev.archdata.dma_data = iommu_table_iobmap; ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev