Suspend on 2.6.7-rc1 with mtd-snapshot-20040718
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?
Signature · 3 lines
Ben ([email protected], http://www.fluff.org/) 'a smiley only costs 4 bytes'
Quoted 7 lines · Ben Dooks
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:
Quoted 8 lines
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?
Signature · 3 lines
Ben ([email protected], http://www.fluff.org/) 'a smiley only costs 4 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
mtd/mtd_blkdevs.c +7 -0
@@ -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);