Bug#660039: rtc no longer available under linux 3.2.4-1

2012-02-16 Thread Jonathan Nieder
notfound 660039 3.2.4-1
quit

Daniel Kahn Gillmor wrote:

 argh.  It looks like this is not the fault of the kernel, so i'm closing
 this ticket.
[... nice full explanation snipped ...]

Thanks for explaining.  Hopefully next time it happens we can learn
more.



-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120216095524.GB31212@burratino



Bug#660039: rtc no longer available under linux 3.2.4-1

2012-02-15 Thread Daniel Kahn Gillmor
Package: linux-2.6
Version: 3.2.4-1
Subject: rtc no longer available under linux 3.2.4-1

I have an asus eeePC 900.  lshw reports it as:

description: Notebook
product: 900 (90OAM09AB5312111U205Q)
vendor: ASUSTeK Computer INC.
version: 0704

When it wakes from sleep under 3.2.4-1, the system's clock is off by
days, which caused me to look into the real-time clock.  Apparently
something changed between 3.2.1-1 and 3.2.4-1.


When i booted it with 3.2.1-1, the kernel would record the following info about
the rtc:

[1.505626] rtc_cmos 00:03: RTC can wake from S4
[1.505886] rtc_cmos 00:03: rtc core: registered rtc_cmos as rtc0
[1.505999] rtc0: alarms up to one month, 114 bytes nvram, hpet irqs
[1.517779] rtc_cmos 00:03: setting system clock to 2012-01-22 18:22:12 UTC 
(1327256532)

Booting it with 3.2.4-1, i see this info instead:

[1.503620] rtc_cmos 00:03: RTC can wake from S4
[1.503887] rtc_cmos 00:03: rtc core: registered rtc_cmos as rtc0
[1.503980] rtc_cmos 00:03: only 24-hr supported
[1.515880] 
/build/buildd-linux-2.6_3.2.4-1-i386-61WrTr/linux-2.6-3.2.4/debian/build/source_i386_none/drivers/rtc/hctosys.c:
 unable to open rtc device (rtc0)


Also, trying to talk to the hardware clock now gives me:

0 pip:~# hwclock --show --debug
hwclock from util-linux 2.20.1
hwclock: Open of /dev/rtc failed: No such file or directory
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.
70 pip:~# 

Whereas before it would report as expected.

looking for the cause of the change, i see that:

https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.2.2

suggests there's been a change in the rtc code:

-
commit 36a8176166397d103352670327e1b20d334b5c7d
Author: Ben Hutchings b...@decadent.org.uk
Date:   Tue Jan 10 15:11:02 2012 -0800

drivers/rtc/interface.c: fix alarm rollover when day or month is 
out-of-range

commit e74a8f2edb92cb690b467cea0ab652c509e9f624 upstream.

Commit f44f7f96a20a (RTC: Initialize kernel state from RTC) introduced a
potential infinite loop.  If an alarm time contains a wildcard month and
an invalid day ( 31), or a wildcard year and an invalid month (= 12),
the loop searching for the next matching date will never terminate.  Treat
the invalid values as wildcards.

Fixes http://bugs.debian.org/646429, http://bugs.debian.org/653331
-


however, /usr/share/doc/linux-image-3.2.0-1-686-pae/changelog.Debian.gz
suggests that 3.1.8-1 had already introduced the same change by bwh:

  * rtc: Fix alarm rollover when day or month is out-of-range (Closes: #646429)


So i'm not sure what to make of the situation, but i'm happy to provide
any additional debugging info that would be useful.

Regards,

--dkg


pgpeokelVBMJF.pgp
Description: PGP signature


Bug#660039: rtc no longer available under linux 3.2.4-1

2012-02-15 Thread Jonathan Nieder
Hi Daniel,

Daniel Kahn Gillmor wrote:

 Booting it with 3.2.4-1, i see this info instead:

 [1.503620] rtc_cmos 00:03: RTC can wake from S4
 [1.503887] rtc_cmos 00:03: rtc core: registered rtc_cmos as rtc0
 [1.503980] rtc_cmos 00:03: only 24-hr supported

Weird.  Reproducible?  Does Linus's master behave the same way?
Can you bisect?

This is from

rtc_control = CMOS_READ(RTC_CONTROL);
[...]
if (is_valid_irq(rtc_irq)  !(rtc_control  RTC_24H)) {
dev_warn(dev, only 24-hr supported\n);

CMOS_READ() is declared in arch/x86/include/asm/mc146818rtc.h and
defined in arch/x86/kernel/rtc.c.  None of this code has changed
recently.

Puzzled,
Jonathan



-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120215230002.GA28433@burratino



Bug#660039: rtc no longer available under linux 3.2.4-1

2012-02-15 Thread Daniel Kahn Gillmor
On 02/15/2012 06:00 PM, Jonathan Nieder wrote:

 Weird.  Reproducible?  Does Linus's master behave the same way?
 Can you bisect?

argh.  It looks like this is not the fault of the kernel, so i'm closing
this ticket.

I tried rolling back to 3.2.1-1 from snapshot.debian.net:

 linux-image-3.2.0-1-686-pae_3.2.1-1_i386.deb
 SHA1: fb5ca95149378def1b12d4c314af928ab4f8d180

and it turned out that this machine was having the same rtc problems
after reboot to this older kernel (and on 3.1.8-2, which i tried as
well).   So something must have happened to my hardware that randomly
coincided with my switching kernels :(

I tried removing power and batteries from the machine, and booting to
different kernels, and the rtc still failed.

On my sixth reboot, i went into the BIOS setup, manually changed the
time of the clock by a little bit, and chose Exit and Save (or
whatever its moral equivalent is).

That must have reset something in the hardware, because now (rebooting
into 3.2.4-1) the rtc is back to working as normal.

Apologies for the false alarm over what appears to be some kind of
flakey hardware hiccup.

--dkg



-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4f3c6df8.4030...@fifthhorseman.net