Hi Heribert,

you're right I messed up with the indexes. Thanks for catching it.

Next time you find something, please reply to all. It will help the maintainer, in this case Jaehoon.


Jaheoon,

The problem is that a version is missing in the table mmc_versions[] and it results in a shift of the indexes for all versions above or equal to MMC_VERSION_4_41.

I'll send a patch that fixes it this way:

static const u32 mmc_versions[] = {
        MMC_VERSION_4,
        MMC_VERSION_4_1,
        MMC_VERSION_4_2,
        MMC_VERSION_4_3,

+       MMC_VERSION_4_4,

        MMC_VERSION_4_41,
        MMC_VERSION_4_5,
        MMC_VERSION_5_0,
        MMC_VERSION_5_1
};

JJ




On 09/02/2018 08:06, eil Eilmsteiner Heribert wrote:
Hello Jean-Jacques

I have problems with your patch for u-boot. I lacks a table-entry for "4", so every mmc 
higher than  version 4.3 report a version "off by 1"
The range check is  also "off by 1", (it should be a >=), so (as in my case)  
MMC version 5.1 reports OK and complete nonsense (in my case this was lower than version 4.0 
so it didn't work).

if (ext_csd[EXT_CSD_REV] >= ARRAY_SIZE(mmc_versions))
                return -EINVAL;

Freundliche Grüße/Best regards
Heribert Eilmsteiner
Senior Software Engineer
Development Center

KEBA AG
A-4041 Linz, Austria
Gewerbepark Urfahr
Phone:  +43 732 7090-27423      
Fax:    +43 732 7090-61711
Firmenbuchgericht Linz FN 184376 t
mailto:e...@keba.com
http://www.keba.com






_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to