2004-03-03 15:33:28

by Jes Sorensen

[permalink] [raw]
Subject: Re: [PATCH] move dma_consistent_dma_mask to the generic device

>>>>> "James" == James Bottomley <[email protected]> writes:

James> pci_dev.consistent_dma_mask was introduced to get around
James> problems in the IA64 Altix machine.

James> Now, we have a use for it in x86: the aacraid needs coherent
James> memory in a 31 bit address range (2GB). Unfortunately, x86 is
James> converted to the dma model, so it can't see the pci_dev by the
James> time coherent memory is allocated.

James,

Could you add this one to your patchset, it fixes the sn2 code to work
with the new location of the mask.

Thanks,
Jes

--- arch/ia64/sn/io/machvec/pci_dma.c~ Wed Mar 3 06:47:36 2004
+++ arch/ia64/sn/io/machvec/pci_dma.c Wed Mar 3 07:23:34 2004
@@ -152,7 +152,7 @@
* pcibr_dmatrans_addr ignores a missing PCIIO_DMA_A64 flag on
* PCI-X buses.
*/
- if (hwdev->consistent_dma_mask == ~0UL)
+ if (hwdev->dev.coherent_dma_mask == ~0UL)
*dma_handle = pcibr_dmatrans_addr(vhdl, NULL, phys_addr, size,
PCIIO_DMA_CMD | PCIIO_DMA_A64);
else {
@@ -169,7 +169,7 @@
}
}

- if (!*dma_handle || *dma_handle > hwdev->consistent_dma_mask) {
+ if (!*dma_handle || *dma_handle > hwdev->dev.coherent_dma_mask) {
if (dma_map) {
pcibr_dmamap_done(dma_map);
pcibr_dmamap_free(dma_map);