From: Pavel Machek <pavel@ucw.cz>
To: Michal Semler <cijoml@volny.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Hibernation and time and dhcp
Date: Fri, 22 Oct 2004 01:20:17 +0200 [thread overview]
Message-ID: <20041021232017.GA7260@elf.ucw.cz> (raw)
In-Reply-To: <20041021230151.GA24980@elf.ucw.cz>
Hi!
> > with 2.6.9 hibernation to disk finally works! Thanks
> > To ram it still don't work, system starts with lcd disabled - but it is
> > another story.
> >
> > I have now this problem - when I hibernate and then system is started up in
> > other company, it don't update time and shows still for example 14:00 - when
> > I rehibernate for example in 20:00 - could you ask bios for current time?
> > It's better to have bad time about few seconds instead of hours.
> >
> > Same problem with dhcp - it should ask for IP when rehibernate.
>
> Known bug and I posted patch at least to acpi list few hours ago.
Here it is...
Pavel
--- clean/arch/i386/kernel/time.c 2004-10-01 00:29:59.000000000 +0200
+++ linux/arch/i386/kernel/time.c 2004-10-19 15:16:14.000000000 +0200
@@ -319,7 +319,7 @@
return retval;
}
-static long clock_cmos_diff;
+static long clock_cmos_diff, sleep_start;
static int time_suspend(struct sys_device *dev, u32 state)
{
@@ -328,6 +328,7 @@
*/
clock_cmos_diff = -get_cmos_time();
clock_cmos_diff += get_seconds();
+ sleep_start = get_cmos_time();
return 0;
}
@@ -335,10 +336,13 @@
{
unsigned long flags;
unsigned long sec = get_cmos_time() + clock_cmos_diff;
+ unsigned long sleep_length = get_cmos_time() - sleep_start;
+
write_seqlock_irqsave(&xtime_lock, flags);
xtime.tv_sec = sec;
xtime.tv_nsec = 0;
write_sequnlock_irqrestore(&xtime_lock, flags);
+ jiffies += sleep_length * HZ;
return 0;
}
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
prev parent reply other threads:[~2004-10-21 23:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-20 18:45 Michal Semler
2004-10-21 12:06 ` Stefan Schweizer
2004-10-21 12:31 ` Denis Vlasenko
2004-10-21 23:13 ` Michal Semler
2004-10-22 16:56 ` Denis Vlasenko
2004-10-21 23:01 ` Pavel Machek
2004-10-21 23:20 ` Pavel Machek [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=20041021232017.GA7260@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=cijoml@volny.cz \
--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
Powered by JetHome