From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Cc: vkoul@kernel.org, yung-chuan.liao@linux.intel.com,
peter.ujfalusi@linux.intel.com, linux-sound@vger.kernel.org,
patches@opensource.cirrus.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] soundwire: intel_auxdevice: Don't disable IRQs before removing children
Date: Tue, 29 Sep 2026 13:40:31 +0100 [thread overview]
Message-ID: <aruxv3Gy0yj5YzV1@opensource.cirrus.com> (raw)
In-Reply-To: <db7d1d3a-1be3-466d-9f95-2dabe918e57e@linux.dev>
On Tue, Sep 29, 2026 at 10:34:16AM +0200, Pierre-Louis Bossart wrote:
> On 9/28/26 10:39, Charles Keepax wrote:
> > On Sat, Sep 26, 2026 at 05:55:06PM +0200, Pierre-Louis Bossart wrote:
> >> void sdw_bus_master_delete(struct sdw_bus *bus)
> >> {
> >> - device_for_each_child(bus->dev, NULL, sdw_delete_slave);
> >> + sdw_bus_slaves_delete(bus); <<< this would be the second call?
> >> + sdw_bus_slaves_put(bus);
> >
> > Yeah seemed the simplest way to not have to change any existing
> > drivers, the second call is a complete no-op if the first was
> > done.
>
> humm, that seems to work but I get this layering violation after-taste,
> and I wonder if this works for AMD?
Nothing should have changed from AMD's perspective. I do think
perhaps a slightly better fix could be done moving significant
amounts of the IRQ handling over to the IRQ framework,
however that is a much bigger piece of work and more scary
from a regressions point of view due to it being a much bigger
refactoring.
> AMD use a platform device instead of an auxiliary one, but overall this
> looks like the same problem of disabling interrupts before the
> peripheral driver is removed, no?
>
> static void amd_sdw_manager_remove(struct platform_device *pdev)
> {
> struct amd_sdw_manager *amd_manager = dev_get_drvdata(&pdev->dev);
> int ret;
>
> pm_runtime_disable(&pdev->dev);
> cancel_work_sync(&amd_manager->amd_sdw_work);
> amd_disable_sdw_interrupts(amd_manager); <<< SAME PROBLEM ??
> sdw_bus_master_delete(&amd_manager->bus);
>
> If this is indeed the same problem then the AMD driver should use the
> same solution...
I am not super familiar with the AMD stuff, so take this with a
massive pinch of salt but it depends on if that IRQ is actually
involved in SoundWire command transfers.
A quick look through amd_sdw_irq_thread() and amd_sdw_xfer_msg()
looks to me like the IRQ is not involved there. So I believe
the AMD host doesn't have the same problem as the Intel one.
Although there is perhaps debate if SoundWire alerts should
still function during remove, which would be broken on AMD,
but I am not aware of any devices that need that right now.
Thanks,
Charles
next prev parent reply other threads:[~2026-09-29 12:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 15:42 [PATCH v2 0/3] Allow SoundWire devices to communicate during remove Charles Keepax
2026-09-25 15:42 ` [PATCH v2 1/3] soundwire: bus: Don't unassign dev_num before unregistering device Charles Keepax
2026-09-25 15:42 ` [PATCH v2 2/3] soundwire: bus: Expose a helper to remove devices from the bus Charles Keepax
2026-09-25 15:42 ` [PATCH v2 3/3] soundwire: intel_auxdevice: Don't disable IRQs before removing children Charles Keepax
2026-09-26 15:55 ` Pierre-Louis Bossart
2026-09-28 8:39 ` Charles Keepax
2026-09-29 8:34 ` Pierre-Louis Bossart
2026-09-29 12:40 ` Charles Keepax [this message]
2026-09-29 18:31 ` Pierre-Louis Bossart
2026-09-29 18:34 ` [PATCH v2 0/3] Allow SoundWire devices to communicate during remove Pierre-Louis Bossart
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=aruxv3Gy0yj5YzV1@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=peter.ujfalusi@linux.intel.com \
--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®