public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* suspend/resume for multiple partitions
@ 2006-06-14 20:45 Paul J THACKER
  0 siblings, 0 replies; only message in thread
From: Paul J THACKER @ 2006-06-14 20:45 UTC (permalink / raw)
  To: linux-mtd

On my ARM9-based platform, we have 5 MTD partitions on NOR flash. One of 
those partitions contains a jffs2 filesystem. Upon wake-up from deep 
sleep, the NOR comes up in locked state. The resume code unlocks the 
first partition, but not the rest. This causes subsequent writes to the 
jffs2 filesystem to fail. Debugging showed that the mtd_info struct 
fields for suspend and resume were only set for the first partition. I 
traced this back to add_mtd_partitions():

        if (!i && master->suspend && master->resume) {
                slave->mtd.suspend = part_suspend;
                slave->mtd.resume = part_resume;
        }

which sets the fields, but only for the first partition. Removing the 
"!i" condition seems to fix this problem, at least for my platform.

I'm not that familiar with the MTD code, so can somebody explain why 
it's done this way, and if changing it will break something somewhere else?

Thanks,
Paul

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-14 20:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-14 20:45 suspend/resume for multiple partitions Paul J THACKER

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox