aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorMarc Kleine-Budde <[email protected]>2022-11-16 17:49:30 +0100
committerMark Brown <[email protected]>2022-11-18 11:39:50 +0000
commite85e9e0d8cb759013d6474011c227f92e442d746 (patch)
treeba72501b5822dd99567637659576bf633341f907 /tools/perf/util/scripting-engines/trace-event-python.c
parent2197aa6b0aa236b9896a09b9d08d6924d18b84f6 (diff)
spi: spi-imx: spi_imx_transfer_one(): check for DMA transfer first
The SPI framework checks for each transfer (with the struct spi_controller::can_dma callback) whether the driver wants to use DMA for the transfer. If the driver returns true, the SPI framework will map the transfer's data to the device, start the actual transfer and map the data back. In commit 07e759387788 ("spi: spi-imx: add PIO polling support") the spi-imx driver's spi_imx_transfer_one() function was extended. If the estimated duration of a transfer does not exceed a configurable duration, a polling transfer function is used. This check happens before checking if the driver decided earlier for a DMA transfer. If spi_imx_can_dma() decided to use a DMA transfer, and the user configured a big maximum polling duration, a polling transfer will be used. The DMA unmap after the transfer destroys the transferred data. To fix this problem check in spi_imx_transfer_one() if the driver decided for DMA transfer first, then check the limits for a polling transfer. Fixes: 07e759387788 ("spi: spi-imx: add PIO polling support") Link: https://lore.kernel.org/all/[email protected] Reported-by: Frieder Schrempf <[email protected]> Reported-by: Fabio Estevam <[email protected]> Tested-by: Fabio Estevam <[email protected]> Cc: David Jander <[email protected]> Cc: [email protected] Signed-off-by: Marc Kleine-Budde <[email protected]> Tested-by: Frieder Schrempf <[email protected]> Reviewed-by: Frieder Schrempf <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions