mmc: reworked version lookup in mmc_startup_v4
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 4/9 mmc: reworked version lookup in mmc_startup_v4
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
Quoted 26 lines · eil Eilmsteiner Heribert
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 CenterKEBA AG
A-4041 Linz, Austria
Gewerbepark Urfahr
Phone: +43 732 7090-27423
Fax: +43 732 7090-61711
Firmenbuchgericht Linz FN 184376 t
mailto:eil at keba.com
http://www.keba.com
PATCH v2 4/9 mmc: reworked version lookup in mmc_startup_v4
Quoted 4 lines · Jean-Jacques Hiblot
Hi Heribert,
you're right I messed up with the indexes. Thanks for catching it.
Quoted 8 lines
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:
If you send a patch, then i will apply it.
Best Regards,
Jaehoon Chung
Quoted 51 lines
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
Quoted 26 lines · eil Eilmsteiner Heribert
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 CenterKEBA AG
A-4041 Linz, Austria
Gewerbepark Urfahr
Phone: +43 732 7090-27423
Fax: +43 732 7090-61711
Firmenbuchgericht Linz FN 184376 t
mailto:eil at keba.com
http://www.keba.com