64 bit DMA?
Hello,
I'm using a 64 bit system, and lots of RAM - 64 GB.
To determine whether 64 bit DMA is supported, I used the following code in the driver's init function:
if (!pci_set_dma_mask(dev, DMA_BIT_MASK(64)) &&
!pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(64))) {
printk("Supports 64 bit DMA\n");
} else if (!pci_set_dma_mask(dev, DMA_BIT_MASK(32)) &&
!pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(32))) {
printk("Supports 32 bit DMA\n");
} else {
printk("Failed to set DMA mask.\n");
}
I then use pci_alloc_consistent() to figure out the DMA address (of type dma_addr_t).
In /var/log/kern.log, I see "Supports 64 bit DMA".
Does this guarantee that my device can use a 64 bit bus address? i.e. something like mrd64?
Thanks.
|