Commit 72559bcb authored by Jim Wylder's avatar Jim Wylder Committed by sanglipeng
Browse files

regmap: Account for register length when chunking

stable inclusion
from stable-v5.10.183
commit 608c1f20830c3a07c0a16886e465deba7280364d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8IRR2

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=608c1f20830c3a07c0a16886e465deba7280364d



--------------------------------

commit 39815141 upstream.

Currently, when regmap_raw_write() splits the data, it uses the
max_raw_write value defined for the bus.  For any bus that includes
the target register address in the max_raw_write value, the chunked
transmission will always exceed the maximum transmission length.
To avoid this problem, subtract the length of the register and the
padding from the maximum transmission.

Signed-off-by: default avatarJim Wylder <jwylder@google.com>
Link: https://lore.kernel.org/r/20230517152444.3690870-2-jwylder@google.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent f960c077
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment