[openib-general] [PATCH] mthca: fix registration for giant MRs

Grant Grundler iod00d at hp.com
Wed Jun 1 18:05:20 PDT 2005


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



More information about the general mailing list