Re: Allocate consistent memory in the 32-bit address range, with DMA_64BIT_MASK?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 14, 2010 at 01:47:21PM +0200, Rolf Eike Beer wrote:
...
> The trick is like this:
> 
> pci_set_dma_mask(pdev, DMA_BIT_MASK(32))
> pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))

I think this is reversed. The original problem was:
     "my PCIe device supports 64-bit DMA for data, but only 32-bit
      addresses for fetching descriptors from host memory."

So you want:
    pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))
    pci_set_dma_mask(pdev, DMA_BIT_MASK(64))

Quite a few older "64-bit" PCI and PCI-X devices have this same limitation.

However, ISTR that PCI-E spec *requires* 64-bit addressing support for
all DMA accesses. If I've got that correct, this device can not be
considered PCI-E compliant even if it works fine with linux.

hth,
grant

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux