i2c: imx: Only DMA messages with I2C_M_DMA_SAFE flag set
Recent changes to the DMA code has resulting in the IMX driver failing I2C transfers when the buffer has been vmalloc. Only perform DMA transfers if the message has the I2C_M_DMA_SAFE flag set, indicating the client is providing a buffer which is DMA safe. This is a minimal fix for stable. The I2C core provides helpers to allocate a bounce buffer. For a fuller fix the master should make use of these helpers. Fixes: 4544b9f2 ("dma-mapping: Add vmap checks to dma_map_single()") Signed-off-by: NAndrew Lunn <andrew@lunn.ch> Acked-by: NOleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@kernel.org>
Showing
想要评论请 注册 或 登录