When my IBM Thinkpad 755C suspends, or blanks the screen, I get "unknown
error 0x53" reported. However, the actual operation succeeds.
It would appear that the carry flag is being set erroneously, as the
contents of eax are unchanged.
Here is a patch that adds a config option to the APM driver so
that if the carry is set, but eax is unchanged, the BIOS call is
considered to have succeeded. Actually, this only is implemented in
apm_bios_call_simple, because eax has been modified in the assembly
contained in apm_bios_call (and I only get the problems with calls to
the BIOS that use apm_bios_call_simple).
This patch is against a clean 2.1.131 kernel. I would be very interested
to know if anbody else gets "unknown error 0x53" with their machine,
and if this patch fixes it. Also, anyone without this problem, but that
is willing to test it has no negative effects would be much appreciated.
--- linux-2.1/arch/i386/kernel/apm.c-dist Sat Dec 5 12:04:22 1998
+++ linux-2.1/arch/i386/kernel/apm.c Sat Dec 5 12:50:49 1998
@@ -480,6 +480,10 @@
}
APM_DO_RESTORE_SEGS;
__restore_flags(flags);
+#ifdef CONFIG_APM_IGNORE_BOGUS_ERROR
+ if (error && *eax == eax_in)
+ return 0;
+#endif
return error;
}
--- linux-2.1/arch/i386/config.in-dist Sat Dec 5 12:34:54 1998
+++ linux-2.1/arch/i386/config.in Sat Dec 5 12:36:04 1998
@@ -73,6 +73,7 @@
bool ' Power off on shutdown' CONFIG_APM_POWER_OFF
bool ' Ignore multiple suspend' CONFIG_APM_IGNORE_MULTIPLE_SUSPEND
bool ' Ignore multiple suspend/resume cycles' CONFIG_APM_IGNORE_SUSPEND_BOUNCE
+ bool ' Ignore bogus error returns' CONFIG_APM_IGNORE_BOGUS_ERROR
fi
endmenu
--- linux-2.1/Documentation/Configure.help-dist Sat Dec 5 12:36:20 1998
+++ linux-2.1/Documentation/Configure.help Sat Dec 5 12:54:31 1998
@@ -8330,6 +8330,14 @@
time.
Say Y.
+Ignore bogus error returns from APM BIOS.
+CONFIG_APM_IGNORE_BOGUS_ERROR
+ This option is necessary on the IBM Thinkpad 755C. Without this, you
+ get "unknown error code 0x53" reported on suspend and display blank.
+ If you say Y here, when the call to the BIOS reports an error, but
+ no error code has been set, then the BIOS call is considered to have
+ been successful.
+
Watchdog Timer Support
CONFIG_WATCHDOG
If you say Y here (and to one of the following options) and create a
--
`O O' | Home: [EMAIL PROTECTED] http://www.alfie.demon.co.uk/
// ^ \\ | Work: [EMAIL PROTECTED]