Re: [PATCH] move dma_consistent_dma_mask to the generic device

From: Jes Sorensen
Date: Wed Mar 03 2004 - 10:37:38 EST


>>>>> "James" == James Bottomley <James.Bottomley@xxxxxxxxxxxx> 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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/