From: Ben Dooks <ben-=mtd@fluff.org>
To: Ben Dooks <ben-mtd@fluff.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Suspend on 2.6.7-rc1 with mtd-snapshot-20040718
Date: Mon, 26 Jul 2004 19:11:34 +0100 [thread overview]
Message-ID: <20040726181134.GF7414@home.fluff.org> (raw)
In-Reply-To: <20040726145639.GE7414@home.fluff.org>
[-- Attachment #1: Type: text/plain, Size: 808 bytes --]
On Mon, Jul 26, 2004 at 03:56:39PM +0100, Ben Dooks wrote:
> I have a 2.6.7-rc2 kernel (PXA255) with a newish mtd
> snapshot applied, and I have a problem with suspend-to-ram
> with the mtdblockd and ntfld not going to sleep, and causing
> the suspend to fail.
>
> The kernel outputs the following:
>
> stopping tasks failed (1 tasks remaining)
> Restarting tasks...<6> Strange, mtdblockd not stopped
>
> I guess mtdblockd isn't going to sleep when
> requested, and is therefore causing the power
> management to abort. Is there a fix in the newer
> releases, or do I need to investiage this problem
> further?
I added the attached patch, and at least the system
can now suspend and resume, but is this the right
solution?
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
[-- Attachment #2: blkdev.patch --]
[-- Type: text/plain, Size: 837 bytes --]
Index: drivers/mtd/mtd_blkdevs.c
===================================================================
RCS file: /var/lib/cvs/linux-2.6/kernel/drivers/mtd/mtd_blkdevs.c,v
retrieving revision 1.2
diff -u -r1.2 mtd_blkdevs.c
--- drivers/mtd/mtd_blkdevs.c 19 Jul 2004 16:23:59 -0000 1.2
+++ drivers/mtd/mtd_blkdevs.c 26 Jul 2004 18:10:05 -0000
@@ -10,6 +10,7 @@
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/module.h>
+#include <linux/suspend.h>
#include <linux/list.h>
#include <linux/fs.h>
#include <linux/mtd/blktrans.h>
@@ -111,6 +112,12 @@
spin_unlock_irq(rq->queue_lock);
schedule();
+
+ if (current->flags & PF_FREEZE) {
+ printk(KERN_DEBUG "mtdblockd: sleeping\n");
+ refrigerator(0);
+ }
+
remove_wait_queue(&tr->blkcore_priv->thread_wq, &wait);
spin_lock_irq(rq->queue_lock);
prev parent reply other threads:[~2004-07-26 18:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-26 14:56 Suspend on 2.6.7-rc1 with mtd-snapshot-20040718 Ben Dooks
2004-07-26 18:11 ` Ben Dooks [this message]
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=20040726181134.GF7414@home.fluff.org \
--to=ben-=mtd@fluff.org \
--cc=ben-mtd@fluff.org \
--cc=ben@fluff.org.uk \
--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