[PATCH v2] i2c: spacemit: fix spurious IRQ handling returning IRQ_HANDLED

Troy Mitchell troy.mitchell at linux.spacemit.com
Mon Jul 13 02:01:27 PDT 2026


On Fri Jul 10, 2026 at 2:18 AM PDT, Pei Xiao wrote:
>
>
> 在 2026/7/10 15:46, Troy Mitchell 写道:
>> On Fri Jul 10, 2026 at 12:21 AM PDT, Pei Xiao wrote:
>>> When the interrupt status register reads zero, the handler should
>>> return IRQ_NONE instead of IRQ_HANDLED. What the return value
>>> actually feeds into is the spurious interrupt accounting in
>>> note_interrupt(): falsely claiming IRQ_HANDLED defeats the "irq XX:
>>> nobody cared" detection, so a stuck interrupt source would never be
>>> caught.
>>>
>>> Fixes: 5ea558473fa3 ("i2c: spacemit: add support for SpacemiT K1 SoC")
>>> Signed-off-by: Pei Xiao <xiaopei01 at kylinos.cn>
>> The commit message now describes the actual mechanism correctly,
>> thanks for reworking it:
>>
>> Reviewed-by: Troy Mitchell <troy.mitchell at linux.spacemit.com>
>>
>> One process note, though: please don't repost new versions this
>> quickly. v2 followed the review comments almost immediately, which
>> means other reviewers who were still looking at v1 never got a
>> chance to chime in before the thread moved on, and the discussion
>> gets fragmented across versions.
> Because I noticed a simple mistake right after sending v1
> —I forgot to include the version number and changelog for v2—
> so I thought that by fixing it without waiting for reviewers to point it
> out, 
> I could save reviewers' time and get the patch merged more quickly.
>  I may have been wrong about that. Sorry.
>
I'm not referring to this thread. You posted an earlier version [1],
and then sent the patches in this thread just one day later (I know that
one was sent by mistake, without a changelog).

Link: https://lore.kernel.org/all/aaba8ba228a99f580050004c5b7e262d855de44c.1783590752.git.xiaopei01@kylinos.cn/ [1]

                                          - Troy



More information about the linux-riscv mailing list