apm driver in 2.4-test1*

From: CRADOCK, Christopher (cradockc@oup.co.uk)
Date: Fri Jun 09 2000 - 04:34:43 EST


I'm trying to use the apm driver as a module, particularly the power_off
feature. The apm driver in certain circumstances returns a non-zero exit
code but doesn't go on to tidy up the kernel thread it spawned.

The module routines correctly unload the erring module but this then means
that the next time the kernel thread runs it tramples on whatever has been
loaded next. (The oops trace told me it was the floppy disk driver, even
though the thread name was "kapmd").

I noticed this as I have a dual-cpu machine and apm carefully treads around
in such cases.

Can I suggest two additional lines to the code?

1) Add: MODULE_PARAM(power_off,"i");
2) Wrap the "smp disables apm" return code with an if(!power_off).

We may need the register_device("apm") as being an else to the preceding
however power-supply monitoring would be useful.

I can supply a patch if this isn't clear.

Chris.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:18 EST