[ofa-general] Re: mthca use of dma_sync_single is bogus
Roland Dreier
rdreier at cisco.com
Mon Jul 9 14:31:32 PDT 2007
> One thought is that if you *do* move to dma_sync_single_range() then
> lib/swiotlb.c still needs fixing. It's buggy in that
> swiotlb_sync_single_range(dma_addr, offset) calls
> swiotlb_sync_single(dma_addr+offset), and this will fail if the offset is
> large enough that it ends up dereferencing a different slot index in
> io_tlb_orig_addr.
Yes, I realized the same thing (our emails crossed).
> So, I should be able to get my swiotlb workaround fixes accepted upstream as
> a genuine bug fix. :-)
Yeah, seems so.
> dma_sync_single_range() looks to me to be the right thing for you to be
> using. But I'm not a DMA-API expert.
yes, I'll try to get confirmation from James Bottomley and/or Dave Miller
that it is the right thing to do (and also fix the documentation to
match what the kernel actually implements).
- R.
More information about the general
mailing list