mmc-utils: Fix scaling of cache size
PATCH 1/1 mmc-utils: Fix scaling of cache size
From: Patrick Oppenlander <[email protected]>
JESD84-B51 7.4.30 CACHE_SIZE [252:249] states that "the size is indicated as multiple of kilobits". This is also supported by Table 39, "e.MMC internal sizes and related Units / Granularities" which lists "32Kb (=4KB)" as the cache size granularity for 4KiB native devices.
--- mmc_cmds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
mmc_cmds.c +2 -2
@@ -1419,8 +1419,8 @@ int do_read_extcsd(int nargs, char **argv)printf ("Power off notification [POWER_OFF_LONG_TIME: 0x%02x]\n" , ext_csd[247 ]);printf ("Cache Size [CACHE_SIZE] is %d KiB\n" , - ext_csd[249 ] <<0 | (ext_csd[250 ] <<8 ) | - (ext_csd[251 ] <<16 ) | (ext_csd[252 ] <<24 )); + (ext_csd[249 ] <<0 | (ext_csd[250 ] <<8 ) | + (ext_csd[251 ] <<16 ) | (ext_csd[252 ] <<24 )) /8 ); }/* A441: Reserved [501:247]
Signature · 1 line
2.25.0
Quoted 8 lines
From: Patrick Oppenlander <[email protected]>
JESD84-B51 7.4.30
CACHE_SIZE[252:249] states that "the size is indicated as multiple of kilobits". This is also supported by Table 39, "e.MMC internal sizes and related Units / Granularities" which lists "32Kb (=4KB)" as the cache size granularity for 4KiB native devices.Signed-off-by Patrick Oppenlander <[email protected]>
Quoted 21 lines
--- mmc_cmds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)mmc_cmds.c +2
-3@@ -1419,8 +1419,8 @@ int do_read_extcsd(int nargs, char **argv)printf ("Power off notification [POWER_OFF_LONG_TIME: 0x%02x]\n" , ext_csd[247 ]);printf ("Cache Size [CACHE_SIZE] is %d KiB\n" , - ext_csd[249 ] <<0 | (ext_csd[250 ] <<8 ) | - (ext_csd[251 ] <<16 ) | (ext_csd[252 ] <<24 )); + (ext_csd[249 ] <<0 | (ext_csd[250 ] <<8 ) | + (ext_csd[251 ] <<16 ) | (ext_csd[252 ] <<24 )) /8 ); }/* A441: Reserved [501:247] -- 2.25.0
Quoted 11 lines · Avri Altman
Quoted 9 lines
From: Patrick Oppenlander <[email protected]>
JESD84-B51 7.4.30
CACHE_SIZE[252:249] states that "the size is indicated as multiple of kilobits". This is also supported by Table 39, "e.MMC internal sizes and related Units / Granularities" which lists "32Kb (=4KB)" as the cache size granularity for 4KiB native devices.Signed-off-by Patrick Oppenlander <[email protected]>Reviewed-by Avri Altman <[email protected]>
Does anything else need to happen to get this applied?
Thanks,
Patrick
+ Chris
Quoted 10 lines · Patrick Oppenlander
Quoted 8 lines · Avri Altman
Quoted 8 lines
From: Patrick Oppenlander <[email protected]>
JESD84-B51 7.4.30
CACHE_SIZE[252:249] states that "the size is indicated as multiple of kilobits". This is also supported by Table 39, "e.MMC internal sizes and related Units / Granularities" which lists "32Kb (=4KB)" as the cache size granularity for 4KiB native devices.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Patrick Oppenlander <[email protected]>Reviewed-by Avri Altman <[email protected]>Does anything else need to happen to get this applied?
Chris Ball maintains mmc-utils. I have added him to the loop, but perhaps you should resend this to make sure he gets the patch.
Kind regards
Uffe
PATCH 1/1 mmc-utils: Fix scaling of cache size
From: Patrick Oppenlander <[email protected]>
Resend requested by Uffe.
===8<===
JESD84-B51 7.4.30 CACHE_SIZE [252:249] states that "the size is indicated as multiple of kilobits". This is also supported by Table 39, "e.MMC internal sizes and related Units / Granularities" which lists "32Kb (=4KB)" as the cache size granularity for 4KiB native devices.
--- mmc_cmds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
mmc_cmds.c +2 -2
@@ -1419,8 +1419,8 @@ int do_read_extcsd(int nargs, char **argv)printf ("Power off notification [POWER_OFF_LONG_TIME: 0x%02x]\n" , ext_csd[247 ]);printf ("Cache Size [CACHE_SIZE] is %d KiB\n" , - ext_csd[249 ] <<0 | (ext_csd[250 ] <<8 ) | - (ext_csd[251 ] <<16 ) | (ext_csd[252 ] <<24 )); + (ext_csd[249 ] <<0 | (ext_csd[250 ] <<8 ) | + (ext_csd[251 ] <<16 ) | (ext_csd[252 ] <<24 )) /8 ); }/* A441: Reserved [501:247]
Signature · 1 line
2.26.0
Ping?
Kind regards,
Patrick
Ulf Hansson
AppliedQuoted 7 lines · On Thu, 2 Apr 2020 at 00:15, <[email protected]> wrote:
From: Patrick Oppenlander <[email protected]>
Resend requested by Uffe.
===8<===
Quoted 7 lines
JESD84-B51 7.4.30
CACHE_SIZE[252:249] states that "the size is indicated as multiple of kilobits". This is also supported by Table 39, "e.MMC internal sizes and related Units / Granularities" which lists "32Kb (=4KB)" as the cache size granularity for 4KiB native devices.Signed-off-by Patrick Oppenlander <[email protected]>Reviewed-by Avri Altman <[email protected]>
Applied to git.kernel.org/pub/scm/utils/mmc/mmc-utils.git master, thanks!
Kind regards
Uffe
Quoted 22 lines
--- mmc_cmds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)mmc_cmds.c +2
-3@@ -1419,8 +1419,8 @@ int do_read_extcsd(int nargs, char **argv)printf ("Power off notification [POWER_OFF_LONG_TIME: 0x%02x]\n" , ext_csd[247 ]);printf ("Cache Size [CACHE_SIZE] is %d KiB\n" , - ext_csd[249 ] <<0 | (ext_csd[250 ] <<8 ) | - (ext_csd[251 ] <<16 ) | (ext_csd[252 ] <<24 )); + (ext_csd[249 ] <<0 | (ext_csd[250 ] <<8 ) | + (ext_csd[251 ] <<16 ) | (ext_csd[252 ] <<24 )) /8 ); }/* A441: Reserved [501:247] -- 2.26.0