Re: 2.6.21-rc2 : Oops in rtc_cmos...

From: David Brownell
Date: Tue Mar 06 2007 - 15:03:25 EST


On Monday 05 March 2007 11:29 pm, Paul Rolland wrote:
> Hello Adrian,
>
> > does the patch in http://lkml.org/lkml/2007/2/23/184 fix your problem?
>
> Yes, it does, so it's a Good One (tm),

And points out that $SUBJECT is misleading; the root cause of
the oops isn't rtc_cmos. Workaround, don't enable the legacy
driver for this hardware.


> but I don't understand what's going
> on then... My dmesg says, related to rtc :
>
> ...
> rtc_cmos 00:03: rtc core: registered rtc_cmos as rtc0

I think the RTC core shouldn't emit this message; I'll send
a patch. It's just confusing on error paths; and on success
paths it's less informative than a message from the driver
itself could be.

One of the good things about getting rtc-cmos merged: it
exposes this new RTC framework to new mistakes, which helps
fix some of the remaining rough spots.


> pnp: Device 00:03 does not support disabling.

Blame the PNP stack for that particular useless message.
I'l send a fix for that one too.


> rtc_cmos: probe of 00:03 failed with error -16

That's the first message that makes any sense to emit!

In this case, "-16" ("-EBUSY") means that a resource
was in use by the legacy RTC driver.


> ...
> and then later :
> ...
> drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

Because probing 00:03 failed, was never fully usable.
So then rtc0 couldn't be found. You'd get the same
message if, say, the RTC was loaded as a module.


> ...
>
> What does this all mean ? I thought an RTC Cmos was always there on a
> standard PC motherboard... (that's why I had activated the option in the
> first time).

You enabled CONFIG_RTC (under char drivers, "Enhanced Real Time Clock Support")
so that driver has claimed the CMOS RTC instead of "rtc-cmos.c". Disable it.
Then you'll be able to use this driver with no little surprises.


It's odd the way that code registered the RTC before grabbing the resources
it would use. Normally I wouldn't code it like that. I think that probably
had to do with wanting to make sure resources got associated with "rtc0"
(or whatever) rather than some generic name. Obviously that can only happen
if the RTC was registered (and thus named) before claiming resources.

- Dave
-
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/