Re: Proper way to set a DMA_MASK on a USB device

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

 



On Fri, Dec 25, 2020 at 08:18:14AM +0000, Noam Liron wrote:
> 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?

Your USB host controller device sets that up properly, no need to do it
for any individual USB device.  I think the resources that the
controller gets assigned for this should handle it for you.

greg k-h

> 
> 



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

  Powered by Linux