From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Cc: broonie@kernel.org, vkoul@kernel.org, lee@kernel.org,
lgirdwood@gmail.com, yung-chuan.liao@linux.intel.com,
peter.ujfalusi@linux.intel.com, oder_chiou@realtek.com,
jack.yu@realtek.com, shumingf@realtek.com, srini@kernel.org,
linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, patches@opensource.cirrus.com
Subject: Re: [PATCH v3 00/10] Expand SoundWire enumeration helper coverage
Date: Fri, 19 Jun 2026 17:07:13 +0100 [thread overview]
Message-ID: <ajVpMYzqnSc0x/YB@opensource.cirrus.com> (raw)
In-Reply-To: <7466d545-85e0-4dab-aa3d-79c8e3a9cbda@linux.dev>
On Fri, Jun 19, 2026 at 03:41:44PM +0200, Pierre-Louis Bossart wrote:
>
> > The patch series in [1] added a new helper to remove common boiler plate
> > waiting for a device to enumerate on SoundWire, however, many devices
> > also wait for enumeration during probe. This series updates things to be
> > suitable such that we can call the same helper at probe time when the
> > unattach_request is not valid.
>
> So if we are no longer testing for unattach_request, should this be definition and its use be removed?
> Looks like there were multiple evolutions since the initial patch
> "soundwire: sdw_slave: track unattach_request to handle all init sequences",
> is an additional cleanup needed?
There are still a couple of end drivers that use unattach_request
to attempt to track if the device was reset. I suspect that is
likely better done other ways but its very hard stuff to change
without detailed knowledge of the specific devices.
I think our only part still using this is cs42l42 which I think
someone has the power to test internally, so we could look at
that at some point in the future. But I am not comfortable
changing the realtek or ess parts using this myself.
> > There is one final step outstanding which is to add a core helper
> > that waits for a device to drop off the bus. This is not include
> > in this series and should be the last step of this process.
>
> Humm, I am not following why the core needs to wait for a device
> to drop off. If there's a bus reset or device reset, it's almost
> immediate. It the devices loses sync then the core wouldn't
> wait either since it's not expecting the device to drop-off.
The problem is mostly from the device side. This usually comes up
from a device reset. So the driver does a reset, device drops off
the bus, the device driver doesn't want to carry on until it
knows the device is back on the bus. So naively one calls
sdw_slave_wait_for_init() but there is nothing the ensures the
core saw the bus disconnection before that call so it might
immediately succeed, causing the driver to attempt to access a
missing device.
Yeah the fall of the bus is fast but so are processors, you need
to actually ensure you can't shortcut the wait. Although typing
this it occurs to me it probably doesn't have to be a wait one
can probably just manually reinit the initalization_complete
completion. But hopefully I will get this series ready soon and
we can discuss on there.
Thanks,
Charles
prev parent reply other threads:[~2026-06-19 16:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 10:27 [PATCH v3 00/10] Expand SoundWire enumeration helper coverage Charles Keepax
2026-06-08 10:27 ` [PATCH v3 01/10] soundwire: Always wait for initialisation of unattached devices Charles Keepax
2026-06-08 10:27 ` [PATCH v3 02/10] ASoC: wsa881x: Use new SoundWire enumeration helper Charles Keepax
2026-06-08 10:27 ` [PATCH v3 03/10] mfd: cs42l43: " Charles Keepax
2026-06-18 12:04 ` (subset) " Lee Jones
2026-06-08 10:27 ` [PATCH v3 04/10] ASoC: rt5682: " Charles Keepax
2026-06-08 10:27 ` [PATCH v3 05/10] ASoC: pm4125: " Charles Keepax
2026-06-08 10:27 ` [PATCH v3 06/10] ASoC: wcd937x: " Charles Keepax
2026-06-08 10:27 ` [PATCH v3 07/10] ASoC: wcd938x: " Charles Keepax
2026-06-08 10:27 ` [PATCH v3 08/10] ASoC: wcd939x: " Charles Keepax
2026-06-08 10:27 ` [PATCH v3 09/10] ASoC: SDCA: " Charles Keepax
2026-06-08 10:27 ` [PATCH v3 10/10] ASoC: cs35l56: Remove unnecessary conditionals waiting for enumeration Charles Keepax
2026-06-11 19:47 ` (subset) [PATCH v3 00/10] Expand SoundWire enumeration helper coverage Mark Brown
2026-06-19 13:41 ` Pierre-Louis Bossart
2026-06-19 16:07 ` Charles Keepax [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=ajVpMYzqnSc0x/YB@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=broonie@kernel.org \
--cc=jack.yu@realtek.com \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=oder_chiou@realtek.com \
--cc=patches@opensource.cirrus.com \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=shumingf@realtek.com \
--cc=srini@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.