From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Cc: Jiawen Liu <1298662399@qq.com>, Vinod Koul <vkoul@kernel.org>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Jizhou Tong <fqwqf@fqwqf.xyz>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soundwire: fail slave probe if IRQ cleanup cannot be registered
Date: Mon, 30 Nov 2026 15:50:54 +0000 [thread overview]
Message-ID: <aw2bXjNfmCtis7FC@opensource.cirrus.com> (raw)
In-Reply-To: <fdf0167e-4068-49c4-afbf-2130267ec61d@linux.dev>
On Mon, Nov 30, 2026 at 11:18:42AM +0100, Pierre-Louis Bossart wrote:
> On 11/29/26 13:48, Jiawen Liu wrote:
> > sdw_irq_create_mapping() publishes the new virtual IRQ in slave->irq
> > before registering its devres cleanup action. If action registration
> > fails, the reset helper disposes the mapping but the cached IRQ remains
> > nonzero, so the peripheral driver probe receives an invalid IRQ number.
> >
> > Keep the mapping local until cleanup registration succeeds, clear the
> > cached IRQ when the mapping is disposed, and return registration failures
> > to the bus probe path before invoking the peripheral driver.
> >
> > Fixes: a5fef9baa87f ("soundwire: bus: Move irq mapping cleanup into devres")
> > Signed-off-by: Jiawen Liu <1298662399@qq.com>
>
> The changes look ok to me, so here's a
>
> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
>
> The only problem is that there was already a similar submission in "[RFC
> PATCH] soundwire: protect the slave IRQ mapping during alert dispatch",
> with additional locking suggested but no answer provided to my feedback.
> Adding the initial contributor and Charles in the To: list, not sure all
> the interrupt handling problems are solved.
Yeah not really convinced the locking was necessary in the RFC
one, was waiting on the response to your questions too.
> > + ret = devm_add_action(&slave->dev, sdw_irq_dispose_mapping, slave);
> > + if (ret) {
> > + irq_dispose_mapping(irq);
You don't need to free here, add_action calls the dispose if it
fails. But apart from that I think this looks ok.
Thanks,
Charles
next prev parent reply other threads:[~2026-11-30 15:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 12:48 Jiawen Liu
2026-11-30 10:18 ` Pierre-Louis Bossart
2026-11-30 15:50 ` Charles Keepax [this message]
2026-11-30 19:54 ` Jiawen Liu
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=aw2bXjNfmCtis7FC@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=1298662399@qq.com \
--cc=fqwqf@fqwqf.xyz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=pierre-louis.bossart@linux.dev \
--cc=vkoul@kernel.org \
--cc=yung-chuan.liao@linux.intel.com \
/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
all inboxes | Powered by JetHome®