Re: [PATCH] Recognize CSD structure version 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 31, 2010 at 4:06 PM, Ben Dooks <ben-linux@xxxxxxxxx> wrote:
> 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@xxxxxxxxxxx>
>> ---
>> 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.

I also consider it. but even though we don't check the 0 at here.
later time it can't pass the EXT_CSD version check. so it will return
error.

That's reason I remain it printk at here. and even though '0' csd
version has some meaning at future. no need to modify for this.

I want to wait others comments.

Thank you,
Kyungmin Park
>
>> -             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@xxxxxxxxxxxxxxx
>> 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.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux