Commit d36678f
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: 4544b9f ("dma-mapping: Add vmap checks to dma_map_single()")
Signed-off-by: Andrew Lunn <[email protected]>
Acked-by: Oleksij Rempel <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>1 parent 7d8ccf4 commit d36678f
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1132 | 1132 | | |
1133 | 1133 | | |
1134 | 1134 | | |
1135 | | - | |
| 1135 | + | |
| 1136 | + | |
1136 | 1137 | | |
1137 | 1138 | | |
1138 | 1139 | | |
| |||
1298 | 1299 | | |
1299 | 1300 | | |
1300 | 1301 | | |
1301 | | - | |
| 1302 | + | |
| 1303 | + | |
1302 | 1304 | | |
1303 | 1305 | | |
1304 | 1306 | | |
| |||
0 commit comments