lkml.org 
[lkml]   [2000]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.2.18pre21 oops reading /proc/apm
On Sun, 10 Dec 2000, Alan Cox wrote:

> > Is it "obvious" that I'm dealing with the same or similar kind of
> > bugginess here?
>
> Obvious no, but its a pretty good guess.

FWIW, I now get:

-------------------------------------
neale@gull:~$ cat /proc/apm
1.13 1.1 0x03 0xff 0xff 0xff -1% -1 ?
-------------------------------------

> > That being the case, any reason I can't/shouldn't put in a function
> > similar to apm_battery_horked(), and call/run it based on a config-time
> > variable?
>
> None at all

Diff against unmolested 2.2.18pre24 is attached.

Obviously the next challenge is to figure out how I can get what
information out of this strange beastie.

Regards,
Neale.
diff -ur -x *.ntb0 -x .config linux-2.2.18pre24-orig/Documentation/Configure.help linux-2.2.18pre24/Documentation/Configure.help
--- linux-2.2.18pre24-orig/Documentation/Configure.help Tue Dec 12 11:39:51 2000
+++ linux-2.2.18pre24/Documentation/Configure.help Mon Dec 11 19:06:33 2000
@@ -10295,6 +10295,17 @@
a work-around for a number of buggy BIOSes. Switch this option on if
your computer crashes instead of powering off properly.

+Buggy battery status reporting
+CONFIG_APM_ASHES_NOTEBIOS
+ Currently disables battery status reporting for buggy BIOS which
+ (a) oopses on reading from /proc/apm and (b) does NOT have DMI.
+ (AcerNote-950 with Phoenix NoteBIOS 1994).
+ In future, this might implement a bug-workaround.
+
+ Note that if the machine has DMI then the BIOS version should be
+ automagically detectable and this workaround automated. Send the DMI
+ strings printed at boot-time with any report if this is not happening.
+
Watchdog Timer Support
CONFIG_WATCHDOG
If you say Y here (and to one of the following options) and create a
diff -ur -x *.ntb0 -x .config linux-2.2.18pre24-orig/arch/i386/config.in linux-2.2.18pre24/arch/i386/config.in
--- linux-2.2.18pre24-orig/arch/i386/config.in Tue Dec 12 11:39:54 2000
+++ linux-2.2.18pre24/arch/i386/config.in Mon Dec 11 19:00:44 2000
@@ -116,6 +116,7 @@
bool ' RTC stores time in GMT' CONFIG_APM_RTC_IS_GMT
bool ' Allow interrupts during APM BIOS calls' CONFIG_APM_ALLOW_INTS
bool ' Use real mode APM BIOS call to power off' CONFIG_APM_REAL_MODE_POWER_OFF
+ bool ' Buggy battery status reporting' CONFIG_APM_ASHES_NOTEBIOS
fi
tristate 'Toshiba Laptop support' CONFIG_TOSHIBA

diff -ur -x *.ntb0 -x .config linux-2.2.18pre24-orig/arch/i386/kernel/apm.c linux-2.2.18pre24/arch/i386/kernel/apm.c
--- linux-2.2.18pre24-orig/arch/i386/kernel/apm.c Tue Dec 12 11:39:54 2000
+++ linux-2.2.18pre24/arch/i386/kernel/apm.c Tue Dec 12 08:44:22 2000
@@ -130,6 +130,9 @@
* is now the way life works).
* Fix thinko in suspend() (wrong return).
* 1.13ac: Added apm_battery_horked() for Compal boards (Dell 5000e etc)
+ * 1.13ac-nb: WIP: AcerNote-950 oops on reading /proc/apm
+ * Try disabling battery status reporting.
+ * Neale Banks <neale@lowendale.com.au>
*
* APM 1.1 Reference:
*
@@ -211,6 +214,8 @@
* P: Toshiba 1950S: battery life information only gets updated after resume
* P: Midwest Micro Soundbook Elite DX2/66 monochrome: screen blanking
* broken in BIOS [Reported by Garst R. Reese <reese@isn.net>]
+ * ?: AcerNote-950: oops on reading /proc/apm - workaround is a WIP
+ * Neale Banks <neale@lowendale.com.au> December 2000
*
* Legend: U = unusable with APM patches
* P = partially usable with APM patches
@@ -327,6 +332,11 @@
static int power_off_enabled = 1;
#endif
static int dell_crap = 0; /*Set if we find a 5000e */
+#ifdef CONFIG_APM_ASHES_NOTEBIOS
+static int ashes_notebios = 1; /*Set by configure*/
+#else
+static int ashes_notebios = 0; /* Default to OK */
+#endif

static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue);
static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue);
@@ -1272,7 +1282,7 @@

p = buf;

- if ((smp_num_cpus == 1) && (!dell_crap) &&
+ if ((smp_num_cpus == 1) && (!dell_crap) && (!ashes_notebios) &&
!(error = apm_get_power_status(&bx, &cx, &dx))) {
ac_line_status = (bx >> 8) & 0xff;
battery_status = bx & 0xff;
@@ -1492,6 +1502,9 @@
(apm_bios_info.version & 0xff),
apm_bios_info.flags,
driver_version);
+ if (dell_crap || ashes_notebios) {
+ printk(KERN_INFO "apm: battery status reporting disabled\n");
+ }
if ((apm_bios_info.flags & APM_32_BIT_SUPPORT) == 0) {
printk(KERN_INFO "apm: no 32 bit BIOS support\n");
return -ENODEV;
\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.073 / U:3.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site