From: Ben Dooks <ben-linux@fluff.org>
To: Kyungmin Park <kmpark@infradead.org>
Cc: linux-mmc@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH] Recognize CSD structure version 3
Date: Mon, 31 May 2010 08:06:43 +0100 [thread overview]
Message-ID: <20100531070643.GJ4720@trinity.fluff.org> (raw)
In-Reply-To: <20100531064035.GA25269@july>
On Mon, May 31, 2010 at 03:40:35PM +0900, Kyungmin Park wrote:
> The eMMC spec 4.4 and 4.3 + additional feature chips has CSD structure version 3
> To probe these chip properly and make it simple.
> it doesn't check CSD structure.
>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 89f7a25..9e42bc6 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -118,15 +118,12 @@ static int mmc_decode_csd(struct mmc_card *card)
> u32 *resp = card->raw_csd;
>
> /*
> - * We only understand CSD structure v1.1 and v1.2.
> + * We understand all CSD structure v1.1, v1.2 and v1.3.
> * v1.2 has extra information in bits 15, 11 and 10.
> */
> csd_struct = UNSTUFF_BITS(resp, 126, 2);
> - if (csd_struct != 1 && csd_struct != 2) {
Hmm, it isn't easy to see what was going on here, this version field is 2bits?
I'd still check for 0 in case someone repurposes the 0 bit to mean some
future version we don't know.
> - printk(KERN_ERR "%s: unrecognised CSD structure version %d\n",
> + printk(KERN_DEBUG "%s: recognised CSD structure version %d\n",
> mmc_hostname(card->host), csd_struct);
> - return -EINVAL;
> - }
>
> csd->mmca_vsn = UNSTUFF_BITS(resp, 122, 4);
> m = UNSTUFF_BITS(resp, 115, 4);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
next prev parent reply other threads:[~2010-05-31 7:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-31 6:40 [PATCH] Recognize CSD structure version 3 Kyungmin Park
2010-05-31 7:06 ` Ben Dooks [this message]
2010-05-31 7:35 ` Kyungmin Park
2010-06-01 9:51 ` Adrian Hunter
2010-06-02 8:12 ` Kyungmin Park
2010-06-02 19:31 ` Adrian Hunter
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=20100531070643.GJ4720@trinity.fluff.org \
--to=ben-linux@fluff.org \
--cc=akpm@linux-foundation.org \
--cc=kmpark@infradead.org \
--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.