From: "Mika Penttilä" <mika.penttila@kolumbus.fi>
To: linux-kernel@vger.kernel.org
Subject: swsusp broken
Date: Sat, 30 Aug 2003 15:50:10 +0300 [thread overview]
Message-ID: <3F509D82.5050409@kolumbus.fi> (raw)
2.6.0-test4 software suspend seems to be badly broken...looking at it
(relevant code included below), no wonder. pm_suspend_disk() calls
swsusp_save(), which is is essentially a nop. The intention was clearly
that after resume control would return from swsusp_save(), which isn't
the case, instead we return from swsusp_write(), and power down again!!!
--Mika
--------------------------------------------------------------------------
static int pm_suspend_disk(void)
{
int error;
pr_debug("PM: Attempting to suspend to disk.\n");
if (pm_disk_mode == PM_DISK_FIRMWARE)
return pm_ops->enter(PM_SUSPEND_DISK);
if (!have_swsusp)
return -EPERM;
pr_debug("PM: snapshotting memory.\n");
in_suspend = 1;
if ((error = swsusp_save()))
goto Done;
if (in_suspend) {
pr_debug("PM: writing image.\n");
error = swsusp_write();
if (!error)
error = power_down(pm_disk_mode);
pr_debug("PM: Power down failed.\n");
} else
pr_debug("PM: Image restored successfully.\n");
swsusp_free();
Done:
return error;
}
----------------------------------------------------------------------------
/**
* swsusp_save - Snapshot memory
*/
int swsusp_save(void)
{
#if defined (CONFIG_HIGHMEM) || defined (COFNIG_DISCONTIGMEM)
printk("swsusp is not supported with high- or discontig-mem.\n");
return -EPERM;
#endif
return 0;
}
next reply other threads:[~2003-08-30 12:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-30 12:50 Mika Penttilä [this message]
2003-08-31 21:02 ` swsusp broken Pavel Machek
2003-09-02 17:00 ` Patrick Mochel
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=3F509D82.5050409@kolumbus.fi \
--to=mika.penttila@kolumbus.fi \
--cc=linux-kernel@vger.kernel.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