regmap: Account for register length when chunking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Requesting that this regmap fix be cherry picked into the active
stable releases 5.15 and later (5.15 being the earliest I was able
to test).

Commit 3981514180c987a79ea98f0ae06a7cbf58a9ac0f fixes a error in
_regmap_raw_write() when chunking a transmission larger than the
maximum write size for the bus and when bus writes the address
and any padding along with the data.

Jim

The original commit message is:

------
commit 3981514180c987a79ea98f0ae06a7cbf58a9ac0f
Author: Jim Wylder <jwylder@xxxxxxxxxx>
Date:   Wed May 17 10:20:11 2023 -0500

    regmap: Account for register length when chunking

    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: Jim Wylder <jwylder@xxxxxxxxxx
    Link: https://lore.kernel.org/r/20230517152444.3690870-2-jwylder@xxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx
------



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux