linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Proper way to set a DMA_MASK on a USB device
@ 2020-12-25  8:18 Noam Liron
  2020-12-25 11:56 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Noam Liron @ 2020-12-25  8:18 UTC (permalink / raw)
  To: linux-usb@vger.kernel.org

Hi All,

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 below 0x220000000. 
I planned to do it by setting dma_mask to 0x21FFFFFFF.

But in drivers/usb/core/usb.c:590 I see the following:
Note: calling dma_set_mask() on a USB device would set the
           mask for the entire HCD, so don't do that.

I also found  related message:
https://marc.info/?l=linux-usb&m=160023769800697&w=2 : "... as the dma_mask is set by default for most busses".

So how can I set properly the dma_mask?



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

end of thread, other threads:[~2020-12-25 12:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-25  8:18 Proper way to set a DMA_MASK on a USB device Noam Liron
2020-12-25 11:56 ` Greg KH

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).