aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/onenand
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2011-10-31 20:17:42 -0700
committerArve Hjønnevåg <arve@android.com>2011-11-17 17:54:35 -0800
commit83e688cd9e94256fbe22a140d9e791f37024445b (patch)
tree7278f76aee56e5c3724f630291c21ac324d1dfb5 /drivers/mtd/onenand
parent5126df5d44d9415a295e126578a9c7319a7553c3 (diff)
downloadkernel_samsung_aries-83e688cd9e94256fbe22a140d9e791f37024445b.zip
kernel_samsung_aries-83e688cd9e94256fbe22a140d9e791f37024445b.tar.gz
kernel_samsung_aries-83e688cd9e94256fbe22a140d9e791f37024445b.tar.bz2
mtd: onenand: Invalidate bufferram on resume
When first page read after resume was the same as the last page used before suspend, a new read command was never issued. Bad data would then be returned if the chip had been powered down. Add an invalidate bufferram call to the resume function to force a new read command. Change-Id: I0b20dc21505f8f8c83574a5f35ccf85484a6b9f2 Signed-off-by: Arve Hjønnevåg <arve@android.com>
Diffstat (limited to 'drivers/mtd/onenand')
-rw-r--r--drivers/mtd/onenand/onenand_base.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index c274911..0b964ee 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -3925,11 +3925,13 @@ static void onenand_resume(struct mtd_info *mtd)
{
struct onenand_chip *this = mtd->priv;
- if (this->state == FL_PM_SUSPENDED)
+ if (this->state == FL_PM_SUSPENDED) {
+ onenand_invalidate_bufferram(mtd, 0, -1);
onenand_release_device(mtd);
- else
+ } else {
printk(KERN_ERR "%s: resume() called for the chip which is not "
"in suspended state\n", __func__);
+ }
}
/**