Re: [PATCH] arm64: do not set dma masks that device connection can't handle
From: Nikita Yushchenko
Date: Mon Jan 09 2017 - 01:56:50 EST
>> + if (mask > dev->archdata.parent_dma_mask)
>> + mask = dev->archdata.parent_dma_mask;
>> +
>> +
>
> One empty line is enough...
Ok
>> + /*
>> + * Whatever the parent bus can set. A device must not set
>> + * a DMA mask larger than this.
>> + */
>> + dev->archdata.parent_dma_mask = size;
>
> Not 'size - 1'?
Good question.
Indeed of_dma_configure() calls arch_setup_dma_ops() with size, not
mask. Which implies '-1' is needed here. Although better fix may be to
change caller side - to make DMA_BIT_MASK(64) case cleaner.
Will repost path.
Nikita