public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Paul J THACKER <paul.thacker@st.com>
To: linux-mtd@lists.infradead.org
Subject: suspend/resume for multiple partitions
Date: Wed, 14 Jun 2006 13:45:38 -0700	[thread overview]
Message-ID: <44907572.5040304@st.com> (raw)

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

                 reply	other threads:[~2006-06-14 20:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44907572.5040304@st.com \
    --to=paul.thacker@st.com \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox