Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=77319254f109963213f33cbb15e0103f2e81a64a Commit: 77319254f109963213f33cbb15e0103f2e81a64a Parent: 6984ee797a8798128e94ab2447c8ed91f0156eb5 Author: Linas Vepstas <[EMAIL PROTECTED]> AuthorDate: Wed Jan 10 19:16:29 2007 -0600 Committer: Paul Mackerras <[EMAIL PROTECTED]> CommitDate: Mon Jan 22 21:27:35 2007 +1100
[POWERPC] Fix broken DMA on non-LPAR pSeries It appears that the iommu table address is never stored, and thus never found, on non-lpar systems. Thus, for example, during boot: <7>[ 93.067916] PCI: Scanning bus 0001:41 <7>[ 93.068542] PCI: Found 0001:41:01.0 [8086/100f] 000200 00 <7>[ 93.068550] PCI: Calling quirk c0000000007822e0 for 0001:41:01.0 <7>[ 93.069815] PCI: Fixups for bus 0001:41 <4>[ 93.070167] iommu: Device 0001:41:01.0 has no iommu table <7>[ 93.070251] PCI: Bus scan for 0001:41 returning with max=41 No iommu table? How can that be? Well, circa line 471 of arch/powerpc/platforms/pseries/iommu.c we see the code: while (dn && PCI_DN(dn) && PCI_DN(dn)->iommu_table == NULL) dn = dn->parent; and a few lines later is the surprising print statement about the missing table. Seems that this loop ran unto the end, never once finding a non-null PCI_DN(dn)->iommu_table. The problem can be found a few lines earlier: it sems that the value of PCI_DN(dn)->iommu_table is never ever set. Thus, the patch sets it. The patch was tested on a Power4 system running in full system partition mode, which is where I saw the problem. It works; I've not done any wider testing. Had a brief discussion on this on irc. Signed-off-by: Linas Vepstas <[EMAIL PROTECTED]> Acked-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]> Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]> --- arch/powerpc/platforms/pseries/iommu.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 3c95392..e6653a8 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c @@ -459,7 +459,8 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev) tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL, phb->node); iommu_table_setparms(phb, dn, tbl); - dev->dev.archdata.dma_data = iommu_init_table(tbl, phb->node); + PCI_DN(dn)->iommu_table = iommu_init_table(tbl, phb->node); + dev->dev.archdata.dma_data = PCI_DN(dn)->iommu_table; return; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html