Rui Sousa wrote:
>
> On Wed, 27 Feb 2002, Alan Cox wrote:
>
> It's true dma_addr_t does change from u32 to u64 and we do thinks like:
>
> (32 bit pci register) = cpu_to_le32(dma_handle)
>
> What is the correct way of doing this?
>
> (32 bit pci register) = cpu_to_le32((u32)dma_handle)
If you only have 32 bits, then I presume 64-bit DMA isn't supported.
So, (1) never pass more than 0xffffffff to pci_set_dma_mask, and (2)
just truncate dma_addr_t (addr & 0xffffffff) so that you only read the
low 32-bits, always.
Jeff
-- Jeff Garzik | "UNIX enhancements aren't." Building 1024 | -- says /usr/games/fortune MandrakeSoft | - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Thu Feb 28 2002 - 21:00:46 EST