summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/sched-migration.py
diff options
context:
space:
mode:
authorLukasz Kucharczyk <lukasz.kucharczyk@leica-geosystems.com>2025-05-20 14:22:52 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-07-06 11:04:11 +0200
commitf0eac19f7ff9ae92baddceeb60567b8b3d1f8c71 (patch)
tree8ad3d19136c6d3be428c02f2c5b7737ec2ae391a /tools/perf/scripts/python/sched-migration.py
parenta95f514225faf64339f768a8664047ec71d7eb14 (diff)
i2c: imx: fix emulated smbus block read
commit a5d0b9e32745277644cda8d7d334e7080bd339bf upstream. Acknowledge the byte count submitted by the target. When I2C_SMBUS_BLOCK_DATA read operation is executed by i2c_smbus_xfer_emulated(), the length of the second (read) message is set to 1. Length of the block is supposed to be obtained from the target by the underlying bus driver. The i2c_imx_isr_read() function should emit the acknowledge on i2c bus after reading the first byte (i.e., byte count) while processing such message (as defined in Section 6.5.7 of System Management Bus Specification [1]). Without this acknowledge, the target does not submit subsequent bytes and the controller only reads 0xff's. In addition, store the length of block data obtained from the target in the buffer provided by i2c_smbus_xfer_emulated() - otherwise the first byte of actual data is erroneously interpreted as length of the data block. [1] https://smbus.org/specs/SMBus_3_3_20240512.pdf Fixes: 5f5c2d4579ca ("i2c: imx: prevent rescheduling in non dma mode") Signed-off-by: Lukasz Kucharczyk <lukasz.kucharczyk@leica-geosystems.com> Cc: <stable@vger.kernel.org> # v6.13+ Acked-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Stefan Eichenberger <eichest@gmail.com> Reviewed-by: Carlos Song <carlos.song@nxp.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Link: https://lore.kernel.org/r/20250520122252.1475403-1-lukasz.kucharczyk@leica-geosystems.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/sched-migration.py')
0 files changed, 0 insertions, 0 deletions