From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: David Carlier <devnexen@gmail.com>
Cc: zhoubinbin@loongson.cn, andi.shyti@kernel.org,
chenhuacai@kernel.org, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] i2c: ls2x-v2: return IRQ_HANDLED after servicing an error
Date: Wed, 6 May 2026 18:48:42 +0300 [thread overview]
Message-ID: <afti2mWZ5_qoTqZX@ashevche-desk.local> (raw)
In-Reply-To: <20260506154015.94815-1-devnexen@gmail.com>
On Wed, May 06, 2026 at 04:40:15PM +0100, David Carlier wrote:
> The event ISR reads SR1 and, when an error flag (ARLO/AF/BERR) is set,
> calls loongson2_i2c_isr_error() which clears the offending flag, issues
> STOP for the AF case, records msg->result, masks every CR2 interrupt
> enable and completes the waiter. The handler then returns IRQ_NONE,
> declaring to the IRQ core that the device did not interrupt.
>
> That report is wrong. The device did interrupt and the handler fully
> serviced it. Because the IRQ is requested with IRQF_SHARED, the genirq
> spurious-IRQ tracker counts each error as unhandled. A bus that emits
> sporadic NACKs, arbitration losses or bus errors will therefore march
> toward the spurious-IRQ threshold and the line can end up disabled,
> wedging the controller.
>
> Return IRQ_HANDLED on this path. The other IRQ_NONE site, taken when
> neither an event nor an error bit is set, remains correct.
From the analysis and code sounds legit,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
but my tag applies only after Loongson people confirm this is correct change.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-05-06 15:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 4:48 [PATCH] i2c: ls2x-v2: return IRQ_HANDLED after servicing an error David Carlier
2026-05-06 9:11 ` Andy Shevchenko
2026-05-06 9:59 ` Binbin Zhou
[not found] ` <CA+XhMqw=WCkAn66X=P29ojx=wOVezfjnwvDbxYnZ1FOK=4Z8ng@mail.gmail.com>
2026-05-06 10:36 ` Andy Shevchenko
2026-05-06 15:40 ` [PATCH v2] " David Carlier
2026-05-06 15:48 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=afti2mWZ5_qoTqZX@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=andi.shyti@kernel.org \
--cc=chenhuacai@kernel.org \
--cc=devnexen@gmail.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zhoubinbin@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox