[ofa-general] mlx4: device driver tries to sync DMA memory it has not allocated

Roland Dreier rdreier at cisco.com
Tue Aug 11 23:23:48 PDT 2009


 > But a contiguous ICM memory does not map, in general, to a contiguous
 > DMA memory, so if dma_sync_single_for_*() does not harm anything
 > than it does not do anything useful either.

Maybe I'm missing your point, but mlx4_table_find() does go to some
trouble to find the right DMA address for the object being looked up.
Of course it could be buggy but I still don't see why we would need a
list of DMA addresses when we know we are only going to sync part of one
page?

I think the right thing to do to fix this is to switch to using
map_single instead of map_sg, and then use dma_sync_single_range_for_xxx
to sync the subset we care about.

 - R.



More information about the general mailing list