# Question on DMA mask

- From: Noam Liron \<hidden\>
- Date: 2021-02-15 16:30:21 
- List: dmaengine
- Page: https://ratatoskr.run/dmaengine/2021/02/11791765
- Thread: https://ratatoskr.run/dmaengine/2021/02/11791765/t.md

```text
Hi everyone,

I am working on a SOC which it's RAM starts at 0x200M.
For some reason I need to limit the DMA allocations up to 0x220M, so I called  - dma_set_mask_and_coherent(mmc_dev(mmc), 0x21FFFFFFF).
I noticed that dev->dma_mask  was not set, while dev->coherent_dma_mask was set.
Still, calling dma_alloc_coherent returns buffers above the requested limit.
How can I limit the buffer address?
```
