On Wed, Jun 01, 2005 at 04:39:56PM -0700, Roland Dreier wrote: > Grant> Yes. "0" is a valid DMA address. no portable PCI driver > Grant> should be expecting 0 for a failure. ppc64 can return > Grant> anything it likes. Many arches (including parisc, alpha, > Grant> sparc) would just panic when the DMA pool was exhausted. > > But dma_map_sg() isn't returning a DMA address -- it's returning the > number of entries in the sg list it used to do the mapping. So 0 > indicates an error, and there's no need to scan through the whole > returned list for a bad address.
Of course - you're right. My brain was fixated on dma_map_single(). Documentation/DMA-API.txt does a better job of calling out zero is a failure. I don't know if ia64 DMA support correctly handles this but will find out. I don't recall this being part of the original interface but glad to see it is. thanks, grant _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
