-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Pavel, on 10/21/04 22:20, Pavel Machek wrote: > It is a bug, here's the fix. actually, your fix doesn't work, as you can see from the attached syslog: I still need to synchronise the clock via NTP. BTW, I'm sure I applied your patch and the kernel is the right one: ===== luca@gismo:~$ ls -l /lib/modules/2.6.9/ total 200 drwxr-xr-x 2 root root 4096 Oct 22 09:03 bcm lrwxr-xr-x 1 root root 34 Oct 22 09:03 build -> /usr/src/linux-2.6.9-battery-clock drwxr-xr-x 9 root root 4096 Oct 21 02:03 kernel - -rw-r--r-- 1 root root 37325 Oct 22 09:03 modules.alias - -rw-r--r-- 1 root root 69 Oct 22 09:03 modules.ccwmap - -rw-r--r-- 1 root root 18819 Oct 22 09:03 modules.dep - -rw-r--r-- 1 root root 443 Oct 22 09:03 modules.ieee1394map - -rw-r--r-- 1 root root 700 Oct 22 09:03 modules.inputmap - -rw-r--r-- 1 root root 235 Oct 22 09:03 modules.isapnpmap - -rw-r--r-- 1 root root 43506 Oct 22 09:03 modules.pcimap - -rw-r--r-- 1 root root 37599 Oct 22 09:03 modules.symbols - -rw-r--r-- 1 root root 26434 Oct 22 09:03 modules.usbmap lrwxr-xr-x 1 root root 34 Oct 22 09:03 source -> /usr/src/linux-2.6.9-battery-clock drwxr-xr-x 3 root root 4096 Oct 21 02:03 updates luca@gismo:~$ cd /usr/src luca@gismo:/usr/src$ diff linux-2.6.9-battery/arch/i386/kernel/time.c linux-2.6.9-battery-clock/arch/i386/kernel/time.c - --- linux-2.6.9-battery/arch/i386/kernel/time.c 2004-10-18 23:54:08 +0200 +++ linux-2.6.9-battery-clock/arch/i386/kernel/time.c 2004-10-22 00:33:44 +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; } luca@gismo:/usr/src$ ===== I'm here for other tests :-) Thx, bye, Gismo / Luca -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Debian - http://enigmail.mozdev.org iD8DBQFBeMBwVAp7Xm10JmkRAipNAKCCUt5346gWnXg7Y8UDP1BvQ5c2cACaAvMV ywsbUI6EmXZ9qe0Jz8z9y3M= =rSh4 -----END PGP SIGNATURE-----