linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Enforce USB DMA allocations to specific range
@ 2020-12-28 13:54 Noam Liron
  2020-12-28 14:18 ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Noam Liron @ 2020-12-28 13:54 UTC (permalink / raw)
  To: linux-usb, Greg KH; +Cc: Yuval Shaia

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?


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-11 16:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-28 13:54 Enforce USB DMA allocations to specific range Noam Liron
2020-12-28 14:18 ` Greg KH
2020-12-28 15:18   ` [EXT] " Noam Liron
2021-02-11  8:38   ` Noam Liron
2021-02-11  9:02     ` Greg Kroah-Hartman
2021-02-11 16:00     ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).