From: Matthias Reichl <hias@horus.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
torvalds@linux-foundation.org, stable@vger.kernel.org,
jslaby@suse.cz
Subject: Re: Linux 6.6.3
Date: Fri, 1 Dec 2023 20:49:58 +0100 [thread overview]
Message-ID: <ZWo45hiK-n8W_yWJ@camel3.lan> (raw)
In-Reply-To: <2023112811-ecosphere-defender-a75a@gregkh>
On Tue, Nov 28, 2023 at 06:27:10PM +0000, Greg Kroah-Hartman wrote:
> Mark Brown (1):
> regmap: Ensure range selector registers are updated after cache sync
This commit caused a regression, accessing a pcm512x based soundcard now
fails with EINVAL and dmesg shows sync cache and pm_runtime_get errors:
# speaker-test -D hw:CARD=PCM5122,DEV=0 -c 2 -t sine
speaker-test 1.1.8
Playback device is hw:CARD=PCM5122,DEV=0
Stream parameters are 48000Hz, S16_LE, 2 channels
Sine wave rate is 440.0000Hz
Playback open error: -22,Invalid argument
# dmesg | grep pcm512x
[ 228.794676] pcm512x 1-004c: Failed to sync cache: -22
[ 228.794740] pcm512x 1-004c: ASoC: error at snd_soc_pcm_component_pm_runtime_get on pcm512x.1-004c: -22
We initially noticed that on the downstream RPi kernels 6.6.3 and
6.1.64 https://github.com/raspberrypi/linux/issues/5763 and
I now reproduced that with vanilla 6.6.3 running on a RPi2
(multi_v7_defconfig plus CONFIG_SND_SOC_PCM512x_I2C and a pcm5122
soundcard with simple-audio-card driver).
Reverting the commit fixes the issue.
I'm not familiar with the regcache code but it looks a bit like the
return value from the regcache_read check is leaking out - not
assigning the value to ret seems to resolve the issue, too
(no idea though if that would be the correct fix):
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index 92592f944a3df..ac63a73ccdaaa 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -410,8 +410,7 @@ int regcache_sync(struct regmap *map)
rb_entry(node, struct regmap_range_node, node);
/* If there's nothing in the cache there's nothing to sync */
- ret = regcache_read(map, this->selector_reg, &i);
- if (ret != 0)
+ if (regcache_read(map, this->selector_reg, &i) != 0)
continue;
ret = _regmap_write(map, this->selector_reg, i);
so long,
Hias
next prev parent reply other threads:[~2023-12-01 19:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-28 18:27 Greg Kroah-Hartman
2023-11-28 18:27 ` Greg Kroah-Hartman
2023-12-01 19:49 ` Matthias Reichl [this message]
2023-12-01 20:01 ` Mark Brown
2023-12-03 22:30 ` Matthias Reichl
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=ZWo45hiK-n8W_yWJ@camel3.lan \
--to=hias@horus.com \
--cc=akpm@linux-foundation.org \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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®