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

Roland Dreier roland at topspin.com
Wed Jun 1 16:39:56 PDT 2005


    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.

 - R.



More information about the general mailing list