[PATCH] arm64: do not set dma masks that device connection can't handle
From: nikita.yoush@cogentembedded.com (Nikita Yushchenko)
Date: 2017-01-09 06:56:43
Also in:
linux-renesas-soc, lkml
From: nikita.yoush@cogentembedded.com (Nikita Yushchenko)
Date: 2017-01-09 06:56:43
Also in:
linux-renesas-soc, lkml
quoted
+ if (mask > dev->archdata.parent_dma_mask) + mask = dev->archdata.parent_dma_mask; + +One empty line is enough...
Ok
quoted
+ /* + * 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