summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorOluwafemi Adeyemi <aadeyemi@codeaurora.org>2013-01-03 11:32:53 -0800
committerSubhash Jadavani <subhashj@codeaurora.org>2016-05-31 15:25:43 -0700
commit93896acd78892518724a2a4f2342bc85da1d74f2 (patch)
tree5fd17ef38f532699f4b2b282e0862dc76a5b3812 /include
parent26a145722e298ecfe2ac45f99baf3d6a08b74388 (diff)
mmc: Keep track of current hard partition
eMMC may have several hard partitions such as BOOT and RPMB in addition to the main USER partition. On resume(if card is reinitialized), the current hard partition is always switched to the default USER partition. But this switch to default partition is not propagated to the MMC block driver, which may have set the hard partition to any partition(BOOT/RPMB) other than USER before suspend. After resume, the MMC block driver still assumes it is accessing the previously set partition(BOOT/RPMB), and instead overwrites the USER partition(the current selected partition on the eMMC device). To prevent this, make MMC block driver aware of the partition switches done as part of card reinitialization. CRs-Fixed: 439313 Change-Id: I3e959101a1c56c1e6631da3d660f4b914e100503 Signed-off-by: Oluwafemi Adeyemi <aadeyemi@codeaurora.org> Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org> [subhashj@codeaurora.org: fixed trivial merge conflicts] Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mmc/card.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 01fe9263d2f2..20630f657db5 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -337,6 +337,7 @@ struct mmc_card {
struct dentry *debugfs_root;
struct mmc_part part[MMC_NUM_PHY_PARTITION]; /* physical partitions */
unsigned int nr_parts;
+ unsigned int part_curr;
struct mmc_wr_pack_stats wr_pack_stats; /* packed commands stats*/
};