From: Jaehoon Chung <jh80.chung@samsung.com>
To: hyeonsu.kim@samsung.com
Cc: linux-mmc@vger.kernel.org, cjb@laptop.org,
kyungmin.park@samsung.com, jh80.chung@samsung.com
Subject: Re: [PATCH] mmc: core: fix au_size according to sd spec3.0
Date: Fri, 17 Feb 2012 19:46:04 +0900 [thread overview]
Message-ID: <4F3E2FEC.6030808@samsung.com> (raw)
In-Reply-To: <1329473681-5071-1-git-send-email-hyeonsu.kim@samsung.com>
Hi.
On 02/17/2012 07:14 PM, hyeonsu.kim@samsung.com wrote:
> From: Hyeonsu Kim <hyeonsu.kim@samsung.com>
>
> This "if phrase" is illogical.
> and SD Spec 3.0 supports au_size from 0 to 0xF.
>
> Signed-off-by: Hyeonsu Kim <hyeonsu.kim@samsung.com>
> ---
> drivers/mmc/core/sd.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
> index c63ad03..cf8bf0e 100644
> --- a/drivers/mmc/core/sd.c
> +++ b/drivers/mmc/core/sd.c
> @@ -244,7 +244,7 @@ static int mmc_read_ssr(struct mmc_card *card)
> * bitfield positions accordingly.
> */
> au = UNSTUFF_BITS(ssr, 428 - 384, 4);
> - if (au > 0 || au <= 9) {
> + if (au >= 0 && au < 16) {
I think "if (au > 0 && au <= 0xf)" is more readable and
need to check the sd-spec.
Because in SD2.0, didn't define from 0xa to 0xf.
> card->ssr.au = 1 << (au + 4);
Is it right???
card->ssr.au = 1 << (au + 4) is something wrong.
If au is 1, card->ssr.au is 32KB. BUt in spec, defined 16KB.
I think the wrong bit operation. this is more problem.
If my point is right, will send the patch.
Best Regards,
Jaehoon Chung
> es = UNSTUFF_BITS(ssr, 408 - 384, 16);
> et = UNSTUFF_BITS(ssr, 402 - 384, 6);
next prev parent reply other threads:[~2012-02-17 10:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-17 10:14 [PATCH] mmc: core: fix au_size according to sd spec3.0 hyeonsu.kim
2012-02-17 10:46 ` Jaehoon Chung [this message]
2012-02-22 10:28 ` Adrian Hunter
2012-02-21 10:42 ` Subhash Jadavani
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=4F3E2FEC.6030808@samsung.com \
--to=jh80.chung@samsung.com \
--cc=cjb@laptop.org \
--cc=hyeonsu.kim@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-mmc@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.