Re: [PATCH] spi: rzv2h-rspi: Fix DMA transfer error handling for signal interruption
From: Wolfram Sang
Date: Fri Jun 26 2026 - 12:47:31 EST
On Sat, Jun 27, 2026 at 12:02:29AM +0800, Felix Gu wrote:
> wait_event_interruptible_timeout() can return a negative error code when
> interrupted by a signal. The original code treated all non-zero return
> values as success, which would incorrectly synchronize DMA channels and
> return 0 instead of propagating the interruption error.
>
> Fixes: fa08b566860b ("spi: rzv2h-rspi: add support for DMA mode")
> Signed-off-by: Felix Gu <ustc.gu@xxxxxxxxx>
Patch looks correct. But it makes me wonder if interrupting the transfer
has actually been tested? Cosmin, can you recall such tests? From my I2C
experience, I know it can be hard to get the state maching back to a
consistent state. Sometimes, it was preferred to simply use
wait_event_timeout() instead and drop interruptible support.
Attachment:
signature.asc
Description: PGP signature