mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
regcache: Mark cache dirty if selector register rewrite fails
After a successful cache synchronization, regcache_sync() clears cache_dirty. If rewriting a selector register later fails, the cache and hardware become inconsistent while the cache still appears clean. Update cache_dirty to reflect the cache and hardware state when selector register rewriting fails. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260713050312.38729-3-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
85da24aac1
commit
a7d168db6b
|
|
@ -465,6 +465,7 @@ int regcache_sync(struct regmap *map)
|
|||
|
||||
selector_ret = _regmap_write(map, this->selector_reg, i);
|
||||
if (selector_ret != 0) {
|
||||
map->cache_dirty = true;
|
||||
dev_err(map->dev, "Failed to write %x = %x: %d\n",
|
||||
this->selector_reg, i, selector_ret);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user