WSL2-Linux-Kernel/drivers/i2c
Andrew Lunn 2d16161a2c i2c: imx: Only DMA messages with I2C_M_DMA_SAFE flag set
[ Upstream commit d36678f790 ]

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: 4544b9f25e ("dma-mapping: Add vmap checks to dma_map_single()")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:28:45 +01:00
..
algos
busses i2c: imx: Only DMA messages with I2C_M_DMA_SAFE flag set 2022-12-08 11:28:45 +01:00
muxes i2c: mux-gpmux: Add of_node_put() when breaking out of loop 2022-08-17 14:23:34 +02:00
Kconfig
Makefile
i2c-boardinfo.c
i2c-core-acpi.c
i2c-core-base.c i2c: Fix a potential use after free 2022-08-17 14:23:20 +02:00
i2c-core-of.c
i2c-core-slave.c
i2c-core-smbus.c
i2c-core.h
i2c-dev.c
i2c-mux.c
i2c-slave-eeprom.c
i2c-slave-testunit.c
i2c-smbus.c
i2c-stub.c