lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aVe3VgrKi7WsqrYA@hovoldconsulting.com>
Date: Fri, 2 Jan 2026 13:17:26 +0100
From: Johan Hovold <johan@...nel.org>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: Srinivas Kandagatla <srini@...nel.org>, Mark Brown <broonie@...nel.org>,
	Liam Girdwood <lgirdwood@...il.com>, linux-sound@...r.kernel.org,
	linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
	stable@...r.kernel.org
Subject: Re: [PATCH 3/4] ASoC: codecs: wsa884x: fix codec initialisation

On Fri, Jan 02, 2026 at 12:50:45PM +0100, Krzysztof Kozlowski wrote:
> On 02/01/2026 12:43, Johan Hovold wrote:
> > On Fri, Jan 02, 2026 at 12:31:21PM +0100, Krzysztof Kozlowski wrote:
> >> On 02/01/2026 12:14, Johan Hovold wrote:
> >>> The soundwire update_status() callback may be called multiple times with
> >>> the same ATTACHED status but initialisation should only be done when
> >>> transitioning from UNATTACHED to ATTACHED.
> >>>
> >>> Fix the inverted hw_init flag which was set to false instead of true
> >>> after initialisation which defeats its purpose and may result in
> >>> repeated unnecessary initialisation.

> > No, update_status() has:
> > 
> > 	if (wsa884x->hw_init || status != SDW_SLAVE_ATTACHED)
> > 		return 0;
> > 
> > 	...
> > 
> > 	wsa884x_init(wsa884x);
> > 
> > so if you set hw_init to true then init is never called when status is
> > changed to ATTACHED.
> 
> Uh, indeed, so this was supposed to be !wsa884x->hw_init... or indeed
> your meaning. This also means that this was never passing above if() and
> the init() was never called.
> 
> regcache was probably synced via runtime PM, so at least that part worked.
> 
> Did you test this driver on actual device how it affects the behavior?

No, I don't have a device that uses this codec anymore.

If you could give it a spin that would be great. It seems we have been
depending on reset values or an UNATTACHED => ATTACHED transition so
far.

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ