swsusp broken
From: Mika Penttilä (mika.penttila_at_kolumbus.fi)
Date: 08/30/03
- Previous message: Con Kolivas: "Re: [PATCH]O19int"
- Next in thread: Pavel Machek: "Re: swsusp broken"
- Reply: Pavel Machek: "Re: swsusp broken"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 30 Aug 2003 15:50:10 +0300 To: linux-kernel@vger.kernel.org
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;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Con Kolivas: "Re: [PATCH]O19int"
- Next in thread: Pavel Machek: "Re: swsusp broken"
- Reply: Pavel Machek: "Re: swsusp broken"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: function Name
... int foo ... send the line "unsubscribe linux-kernel" in ... (Linux-Kernel) - Re: [PATCH] libata queue updated
... These "function(unsigned int *classes)" style functions in "libata-core.c" worry me
somewhat. ... Slave aware controllers will use, most SATA controllers will use only, and
PM aware ones will use. ... The intention was requiring low level drivers of only what
they know and normalize them in the core layer. ... To unsubscribe from this list: send the line
"unsubscribe linux-kernel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo
info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
(Linux-Kernel) - Direct io on block device has performance regression on 2.6.x kernel - fix AIO path
... +int raw_end_aio(struct bio *bio, unsigned int bytes_done, int error)
... send the line "unsubscribe linux-kernel" in ... (Linux-Kernel) - Re: forkbombing Linux distributions
... > Here at my school we have the workstations running Debian testing. ...
I was was thinking of the default settings. ... int main{ ... send the line
"unsubscribe linux-kernel" in ... (Linux-Kernel) - [PATCH 004 of 4] Drop size argument from bio_endio and bi_end_io.
... bio = xbh; ... -static int clone_endio(struct bio *bio, unsigned int
done, int error) ... +static void crypt_endio ... (Linux-Kernel)