diff options
author | Russ Weight <russell.h.weight@intel.com> | 2023-06-20 23:28:24 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-06-20 23:31:08 +0300 |
commit | c8e796895e2310b6130e7577248da1d771431a77 (patch) | |
tree | 8c220eba02d44c4f4d26290200dd09c868ec6b74 /scripts/gdb/linux/vmalloc.py | |
parent | 44e46572f0bae431a6092e3cfd2f47bff8b8d18c (diff) | |
download | linux-c8e796895e2310b6130e7577248da1d771431a77.tar.xz |
regmap: spi-avmm: Fix regmap_bus max_raw_write
The max_raw_write member of the regmap_spi_avmm_bus structure is defined
as:
.max_raw_write = SPI_AVMM_VAL_SIZE * MAX_WRITE_CNT
SPI_AVMM_VAL_SIZE == 4 and MAX_WRITE_CNT == 1 so this results in a
maximum write transfer size of 4 bytes which provides only enough space to
transfer the address of the target register. It provides no space for the
value to be transferred. This bug became an issue (divide-by-zero in
_regmap_raw_write()) after the following was accepted into mainline:
commit 3981514180c9 ("regmap: Account for register length when chunking")
Change max_raw_write to include space (4 additional bytes) for both the
register address and value:
.max_raw_write = SPI_AVMM_REG_SIZE + SPI_AVMM_VAL_SIZE * MAX_WRITE_CNT
Fixes: 7f9fb67358a2 ("regmap: add Intel SPI Slave to AVMM Bus Bridge support")
Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
Link: https://lore.kernel.org/r/20230620202824.380313-1-russell.h.weight@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/vmalloc.py')
0 files changed, 0 insertions, 0 deletions