Re: [PATCH 1/4] i2c: riic: Abort the transfer on completion timeout

From: Claudiu Beznea

Date: Thu May 28 2026 - 13:06:06 EST


Hi, Wolfram,

On 5/28/26 16:57, Wolfram Sang wrote:
On Wed, May 20, 2026 at 04:12:03PM +0300, Claudiu Beznea wrote:
From: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>

riic_xfer() configures a transfer and waits for the interrupt handler to
signal its completion. If the completion times out, the device may be
powered off through runtime PM. However, the transfer interrupt may still
fire after the timeout.

To avoid cases where riic_xfer() powers off the device (via runtime PM)
while the interrupt handler is still running, disable and synchronize the
interrupts after the completion times out.

Fixes: 310c18a41450 ("i2c: riic: add driver")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>

How did you test this?

I haven't managed to reproduce it on i2c. I reproduced a similar behavior while working on renesas-i3c driver and decided to implement this on this i2c driver as well.

--
Thank you,
Claudiu