[ofa-general] mlx4: device driver tries to sync DMA memory it has not allocated
Eli Cohen
eli at dev.mellanox.co.il
Tue Aug 11 23:17:49 PDT 2009
On Mon, Aug 10, 2009 at 01:30:44PM -0700, Roland Dreier wrote:
>
> > Looking at mlx4_write_mtt_chunk() I see that it calls
> > mlx4_table_find() with a pointer to single dma_addr_t - dma_handle -
> > while the dma addresses for the ICM memory is actually a list of
> > different addresses covering possibly different sizes. I think
> > mlx4_table_find() should be changed to support that, and then we can
> > use calls to dma_sync_single_for_cpu()/dma_sync_single_for_device()
> > with the correct dma addresses.
>
> No, I think we're careful that we write MTT ranges that don't cross a
> page so there shouldn't be any problem.
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.
More information about the general
mailing list