* [PATCH] mmc-utils: Fix scaling of cache size
@ 2020-02-13 22:13 patrick.oppenlander
2020-02-16 7:18 ` Avri Altman
0 siblings, 1 reply; 7+ messages in thread
From: patrick.oppenlander @ 2020-02-13 22:13 UTC (permalink / raw)
To: linux-mmc; +Cc: Patrick Oppenlander
From: Patrick Oppenlander <patrick.oppenlander@gmail.com>
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 <patrick.oppenlander@gmail.com>
---
mmc_cmds.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mmc_cmds.c b/mmc_cmds.c
index fb37189..a1b1d75 100644
--- a/mmc_cmds.c
+++ b/mmc_cmds.c
@@ -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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* RE: [PATCH] mmc-utils: Fix scaling of cache size
2020-02-13 22:13 [PATCH] mmc-utils: Fix scaling of cache size patrick.oppenlander
@ 2020-02-16 7:18 ` Avri Altman
2020-03-31 21:11 ` Patrick Oppenlander
0 siblings, 1 reply; 7+ messages in thread
From: Avri Altman @ 2020-02-16 7:18 UTC (permalink / raw)
To: patrick.oppenlander, linux-mmc
> From: Patrick Oppenlander <patrick.oppenlander@gmail.com>
>
> 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 <patrick.oppenlander@gmail.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
> ---
> mmc_cmds.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mmc_cmds.c b/mmc_cmds.c
> index fb37189..a1b1d75 100644
> --- a/mmc_cmds.c
> +++ b/mmc_cmds.c
> @@ -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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc-utils: Fix scaling of cache size
2020-02-16 7:18 ` Avri Altman
@ 2020-03-31 21:11 ` Patrick Oppenlander
2020-04-01 8:20 ` Ulf Hansson
0 siblings, 1 reply; 7+ messages in thread
From: Patrick Oppenlander @ 2020-03-31 21:11 UTC (permalink / raw)
To: Avri Altman; +Cc: linux-mmc
On Sun, Feb 16, 2020 at 6:18 PM Avri Altman <Avri.Altman@wdc.com> wrote:
>
> > From: Patrick Oppenlander <patrick.oppenlander@gmail.com>
> >
> > 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 <patrick.oppenlander@gmail.com>
> Reviewed-by: Avri Altman <avri.altman@wdc.com>
>
Does anything else need to happen to get this applied?
Thanks,
Patrick
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc-utils: Fix scaling of cache size
2020-03-31 21:11 ` Patrick Oppenlander
@ 2020-04-01 8:20 ` Ulf Hansson
2020-04-01 22:14 ` patrick.oppenlander
0 siblings, 1 reply; 7+ messages in thread
From: Ulf Hansson @ 2020-04-01 8:20 UTC (permalink / raw)
To: Patrick Oppenlander, Chris Ball; +Cc: Avri Altman, linux-mmc
+ Chris
On Tue, 31 Mar 2020 at 23:11, Patrick Oppenlander
<patrick.oppenlander@gmail.com> wrote:
>
> On Sun, Feb 16, 2020 at 6:18 PM Avri Altman <Avri.Altman@wdc.com> wrote:
> >
> > > From: Patrick Oppenlander <patrick.oppenlander@gmail.com>
> > >
> > > 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 <patrick.oppenlander@gmail.com>
> > Reviewed-by: Avri Altman <avri.altman@wdc.com>
> >
>
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] mmc-utils: Fix scaling of cache size
2020-04-01 8:20 ` Ulf Hansson
@ 2020-04-01 22:14 ` patrick.oppenlander
2020-07-23 7:17 ` Patrick Oppenlander
2021-03-31 9:40 ` Ulf Hansson
0 siblings, 2 replies; 7+ messages in thread
From: patrick.oppenlander @ 2020-04-01 22:14 UTC (permalink / raw)
To: linux-mmc; +Cc: chris, Patrick Oppenlander, Avri Altman
From: Patrick Oppenlander <patrick.oppenlander@gmail.com>
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.
Signed-off-by: Patrick Oppenlander <patrick.oppenlander@gmail.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
---
mmc_cmds.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mmc_cmds.c b/mmc_cmds.c
index fb37189..a1b1d75 100644
--- a/mmc_cmds.c
+++ b/mmc_cmds.c
@@ -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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc-utils: Fix scaling of cache size
2020-04-01 22:14 ` patrick.oppenlander
@ 2020-07-23 7:17 ` Patrick Oppenlander
2021-03-31 9:40 ` Ulf Hansson
1 sibling, 0 replies; 7+ messages in thread
From: Patrick Oppenlander @ 2020-07-23 7:17 UTC (permalink / raw)
To: linux-mmc; +Cc: chris, Avri Altman
Ping?
Kind regards,
Patrick
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc-utils: Fix scaling of cache size
2020-04-01 22:14 ` patrick.oppenlander
2020-07-23 7:17 ` Patrick Oppenlander
@ 2021-03-31 9:40 ` Ulf Hansson
1 sibling, 0 replies; 7+ messages in thread
From: Ulf Hansson @ 2021-03-31 9:40 UTC (permalink / raw)
To: Patrick Oppenlander; +Cc: linux-mmc, Avri Altman
On Thu, 2 Apr 2020 at 00:15, <patrick.oppenlander@gmail.com> wrote:
>
> From: Patrick Oppenlander <patrick.oppenlander@gmail.com>
>
> 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.
>
> Signed-off-by: Patrick Oppenlander <patrick.oppenlander@gmail.com>
> Reviewed-by: Avri Altman <avri.altman@wdc.com>
Applied to git.kernel.org/pub/scm/utils/mmc/mmc-utils.git master, thanks!
Kind regards
Uffe
> ---
> mmc_cmds.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mmc_cmds.c b/mmc_cmds.c
> index fb37189..a1b1d75 100644
> --- a/mmc_cmds.c
> +++ b/mmc_cmds.c
> @@ -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
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-03-31 9:42 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 22:13 [PATCH] mmc-utils: Fix scaling of cache size patrick.oppenlander
2020-02-16 7:18 ` Avri Altman
2020-03-31 21:11 ` Patrick Oppenlander
2020-04-01 8:20 ` Ulf Hansson
2020-04-01 22:14 ` patrick.oppenlander
2020-07-23 7:17 ` Patrick Oppenlander
2021-03-31 9:40 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).