lkml.org 
[lkml]   [2014]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[PATCH v6 0000/0003] mmc: EXT_CSD_PARTITION_SETTING_COMPLETED bit not checked
JEDEC standard requires that EXT_CSD_PARTITION_SETTING_COMPLETED bit
must be set in order to take in account enhanced area and general purpose
partitions (gp) values.

Current code doesn't checks this bit and blindly trust enhanced area and
gp values. Moreover, "enhanced_area_en" attribute was set according to gp values
but not necessary enhanced area one. It's then used to switch
EXT_CSD_ERASE_GROUP_DEF bit which requires EXT_CSD_PARTITION_SETTING_COMPLETED.
This attribute has been replaced by "partition_setting_completed" that
match the expected behavior.

User is now warned in case of misconfiguration.

Plus, some code has been moved into functions for two reasons :
* Functional reason (one behavior per function)
* Deep indentation result

Grégory Soutadé (3):
mmc: Move code that manages user area and gp partitions into functions
mmc: Replace "enhanced_area_en" attribute by "partition_setting_completed"
mmc: Checks EXT_CSD_PARTITION_SETTING_COMPLETED before partitions computation

drivers/mmc/core/mmc.c | 172 ++++++++++++++++++++++++++--------------------
include/linux/mmc/card.h | 2 +-
include/linux/mmc/mmc.h | 2 +
3 files changed, 102 insertions(+), 74 deletions(-)

From commit 7ec62d421bdf29cb31101ae2689f7f3a9906289a in master linux tree.

Changelog v5:
Remove some useless braces
Changelog v4:
Second patch in v3 doesn't compile
Changelog v3:
Move code BEFORE fixing bugs.
Changelog v2:
Move code for user area and general purpose partitions
into functions.
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-09-15 18:21    [W:0.111 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site