From: Ulf Hansson <ulf.hansson@linaro.org>
To: Patrick Oppenlander <patrick.oppenlander@gmail.com>
Cc: linux-mmc <linux-mmc@vger.kernel.org>, Avri Altman <avri.altman@wdc.com>
Subject: Re: [PATCH] mmc-utils: Fix scaling of cache size
Date: Wed, 31 Mar 2021 11:40:38 +0200 [thread overview]
Message-ID: <CAPDyKFqWrmOt4JQ+uqGKJBf7YxSOFf8JCe=cSLS-i7bhvKdi_A@mail.gmail.com> (raw)
In-Reply-To: <20200401221453.267360-1-patrick.oppenlander@gmail.com>
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
>
prev parent reply other threads:[~2021-03-31 9:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPDyKFqWrmOt4JQ+uqGKJBf7YxSOFf8JCe=cSLS-i7bhvKdi_A@mail.gmail.com' \
--to=ulf.hansson@linaro.org \
--cc=avri.altman@wdc.com \
--cc=linux-mmc@vger.kernel.org \
--cc=patrick.oppenlander@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).