diff options
| author | Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com> | 2026-01-20 20:30:04 +0800 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-01-27 12:46:22 +0000 |
| commit | 53f826ff5e0e3ecb279862ca7cce1491b94bb017 (patch) | |
| tree | 98c7eb2450d9160ad57e71015bceb779c49b0d46 /kernel/panic.c | |
| parent | 63804fed149a6750ffd28610c5c1c98cce6bd377 (diff) | |
spi: spi-mem: Protect dirmap_create() with spi_mem_access_start/end
spi_mem_dirmap_create() may reconfigure controller-wide settings,
which can interfere with concurrent transfers to other devices
sharing the same SPI controller but using different chip selects.
Wrap the ->dirmap_create() callback with spi_mem_access_start() and
spi_mem_access_end() to serialize access and prevent cross-CS
interference during dirmap creation.
This patch has been verified on a setup where a SPI TPM is connected
to CS0 of a SPI controller, while a SPI NOR flash is connected to CS1
of the same controller. Without this patch, spi_mem_dirmap_create()
for the SPI NOR flash interferes with ongoing SPI TPM data transfers,
resulting in failure to create the TPM device. This was tested on an
ASPEED AST2700 EVB.
Signed-off-by: Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Link: https://patch.msgid.link/20260120123005.1392071-2-chin-ting_kuo@aspeedtech.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'kernel/panic.c')
0 files changed, 0 insertions, 0 deletions
