diff options
| author | Hongjian Dai <daihongjian@kylinsec.com.cn> | 2026-10-17 15:55:45 +0800 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-11-02 00:07:37 +0000 |
| commit | 2066970324a1439e5a2e08c4599098367f8f82cc (patch) | |
| tree | 61531aeb101c9af612e43533c37501fcd2ab14ea /scripts/dummy-tools/python3 | |
| parent | daa9bdb942a6d90f6560f94f4a4804c66430b1dc (diff) | |
spi: pic32-sqi: fail transfer when the BD ring is exhausted
pic32_sqi_one_transfer() silently stopped programming buffer descriptors
when ring_desc_get() returned NULL and still returned success. The caller
then marked the last programmed descriptor as the end of the list and
started the DMA engine, so the hardware transferred only a prefix of the
requested data while the message completed with status 0.
The ring holds PESQI_BD_COUNT (256) descriptors of at most
PESQI_BD_BUF_LEN_MAX (256) bytes each, so messages larger than 64 KiB (or
with enough SG entries) can exhaust it. Since the driver sets no
max_message_size/max_transfer_size, the SPI core does not prevent this.
Return -ENOMEM instead, and set msg->status so the failure reaches the
caller rather than being silently truncated.
Fixes: 3270ac230f66 ("spi: pic32-sqi: add SPI driver for PIC32 SQI controller.")
Signed-off-by: Hongjian Dai <daihongjian@kylinsec.com.cn>
Link: https://patch.msgid.link/F5276982A630220B+20261017075545.95854-1-daihongjian@kylinsec.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/dummy-tools/python3')
0 files changed, 0 insertions, 0 deletions
