Enforce USB DMA allocations to specific range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Greg and thanks for your reply for my previous q. (Proper way to set a DMA_MASK on a USB device).

I am rephrasing my questions:

I am working on LK 4.14.76, on a SOC in which RAM starts at 0x200000000, and need to limit DMA buffer allocations to be at the range 0x200000000 -  0x220000000.
This is a SoC constraint.
Setting the controller dma_mask to 0x21FFFFFFF, didn't solve the problem, as I noticed that URB streaming DMA are first allocated by kmalloc and alike, which are not affected by the dma_mask.

I plan to do the following:
Alloc coherent memory for the HCD using 'dma_declare_coherent_memory', and use the HCD_LOCAL_MEM so the usb core is told that it must copy data into local memory if the buffers happen to be placed in regular memory.

Is that the right way to deal with this case?





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux