Patch for broken Dell C600 and I5000
Greetings.
Some time ago I had to work around broken BIOS in Dell C600 and Linus accepted the patch (it was before Marcelo, IIRC). All this time BIOS writers continued to search for the bottom in the barrel of brokenness and now we have I5000 brain damaged in a similar way. Since I5000 is broken even before it sleeps, I made a different workaround.
Attached patch implements the new workaround and removes the old one.
Please comment. If nobody objects I'll resend it for Marcelo and do an equivalent patch for Linus tree.
Cheers,
-- Pete
arch/i386/kernel/dmi_scan.c +0 -25
@@ -457,26 +457,6 @@ }/* -* Some Bioses enable the PS/2 mouse (touchpad) at resume, even if it -* was disabled before the suspend. Linux gets terribly confused by that. -*/ - -typedef void (pm_kbd_func ) (void ); - -static __init int broken_ps2_resume (struct dmi_blacklist *d) -{ -#ifdef CONFIG_VT -if (pm_kbd_request_override ==NULL ) - { - pm_kbd_request_override = pckbd_pm_resume; -printk (KERN_INFO "%s machine detected. Mousepad Resume Bug workaround enabled.\n" , d->ident); - } -#endif -return 0 ; -} - - -/* * Simple "print if true" callback */
@@ -503,11 +483,6 @@ NO_MATCH, NO_MATCH, NO_MATCH } }, #endif - { broken_ps2_resume, "Dell Latitude C600", { /* Handle problems with APM on the C600 */ - MATCH(DMI_SYS_VENDOR, "Dell"), - MATCH(DMI_PRODUCT_NAME, "Latitude C600"), - NO_MATCH, NO_MATCH - } }, { broken_apm_power, "Dell Inspiron 5000e", { /* Handle problems with APM on Inspiron 5000e */ MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), MATCH(DMI_BIOS_VERSION, "A04"),
drivers/char/keyboard.c +2 -6
@@ -917,10 +917,6 @@EXPORT_SYMBOL (keyboard_tasklet);DECLARE_TASKLET_DISABLED (keyboard_tasklet, kbd_bh,0 ); -typedef void (pm_kbd_func ) (void ); - -pm_callback pm_kbd_request_override =NULL ; -int __init kbd_init (void ) {int i;
@@ -943,8 +939,8 @@tasklet_enable (&keyboard_tasklet);tasklet_schedule (&keyboard_tasklet); - - pm_kbd =pm_register (PM_SYS_DEV ,PM_SYS_KBC , pm_kbd_request_override); + + pm_kbd =pm_register (PM_SYS_DEV ,PM_SYS_KBC ,NULL );return 0 ; }
drivers/char/pc_keyb.c +69 -46
164 lines not on this page · raw message
include/asm-i386/keyboard.h +0 -3
@@ -16,7 +16,6 @@#include <linux/kernel.h> #include <linux/ioport.h> #include <linux/kd.h> -#include <linux/pm.h> #include <asm/io.h> #define KEYBOARD_IRQ 1
@@ -29,8 +28,6 @@extern char pckbd_unexpected_up (unsigned char keycode);extern void pckbd_leds (unsigned char leds);extern void pckbd_init_hw (void ); -extern int pckbd_pm_resume (struct pm_dev *,pm_request_t ,void *); -extern pm_callback pm_kbd_request_override;extern unsigned char pckbd_sysrq_xlate[128 ];#define kbd_setkeycode pckbd_setkeycode
include/asm-mips/keyboard.h +0 -3
@@ -14,7 +14,6 @@#include <linux/delay.h> #include <linux/ioport.h> #include <linux/kd.h> -#include <linux/pm.h> #define DISABLE_KBD_DURING_INTERRUPTS 0
@@ -27,8 +26,6 @@extern char pckbd_unexpected_up (unsigned char keycode);extern void pckbd_leds (unsigned char leds);extern void pckbd_init_hw (void ); -extern int pckbd_pm_resume (struct pm_dev *,pm_request_t ,void *); -extern pm_callback pm_kbd_request_override;extern unsigned char pckbd_sysrq_xlate[128 ];extern void kbd_forward_char (int ch);
include/asm-mips64/keyboard.h +0 -3
@@ -14,7 +14,6 @@#include <linux/delay.h> #include <linux/ioport.h> #include <linux/kd.h> -#include <linux/pm.h> #define DISABLE_KBD_DURING_INTERRUPTS 0
@@ -27,8 +26,6 @@extern char pckbd_unexpected_up (unsigned char keycode);extern void pckbd_leds (unsigned char leds);extern void pckbd_init_hw (void ); -extern int pckbd_pm_resume (struct pm_dev *,pm_request_t ,void *); -extern pm_callback pm_kbd_request_override;extern unsigned char pckbd_sysrq_xlate[128 ];extern void kbd_forward_char (int ch);
Quoted 9 lines · Pete Zaitcev
Greetings.
Some time ago I had to work around broken BIOS in Dell C600 and Linus accepted the patch (it was before Marcelo, IIRC). All this time BIOS writers continued to search for the bottom in the barrel of brokenness and now we have I5000 brain damaged in a similar way. Since I5000 is broken even before it sleeps, I made a different workaround.
Quoted 4 lines
Attached patch implements the new workaround and removes the old one.
Please comment. If nobody objects I'll resend it for Marcelo and do an equivalent patch for Linus tree.
What is the problem this fixes? I don't have any problems with my C600 suspending and resuming (2.4.19pre7-ac4). Some of the comments look BIOS-version-specific... why not just upgrade the BIOS? (The comment I saw referred to version A06, but I have A17!)
Correct me if I'm missing something here... I didn't read the patch too carefully...
ian
Quoted 3 lines · Pete Zaitcev
You can test your C600 with A17 by doing this. Apply the patch (this removes the old workaround), build, reboot. Without explicit parameter the new workaround is not activated.
I have a Dell Latitude C800 -- I'll give your patch a try later today.
On a related note... I recently updated to Bios A20 and I find the fan stays on after resuming... Also, in order for resume to complete sucessfully I find I need to never start X with dri so that agp support and the r128 module are not loaded. If they load then the laptop hangs when doing a resume. Known problems?
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
Quoted 5 lines · Erik Andersen
On a related note... I recently updated to Bios A20 and I find the fan stays on after resuming... Also, in order for resume to complete sucessfully I find I need to never start X with dri so that agp support and the r128 module are not loaded. If they load then the laptop hangs when doing a resume. Known problems?
Yes - it appears that some of the register state needs to be restored into the AGP registers when we resume. We have hooks for that but someone needs to sit down and either try rerunning the init code for the AGP on a resume or sit with a serial console working out what bits need fixup
Quoted 7 lines · Alan Cox
Quoted 5 lines · Erik Andersen
On a related note... I recently updated to Bios A20 and I find the fan stays on after resuming... Also, in order for resume to complete sucessfully I find I need to never start X with dri so that agp support and the r128 module are not loaded. If they load then the laptop hangs when doing a resume. Known problems?
Quoted 5 lines
Yes - it appears that some of the register state needs to be restored into the AGP registers when we resume. We have hooks for that but someone needs to sit down and either try rerunning the init code for the AGP on a resume or sit with a serial console working out what bits need fixup
serial console? We the system seems to be dead dead dead when resuming, so I'm not sure how that would help. Regardless, if you can tell me how to hunt for the cause of the problem I'll gladly work at fixing it,
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--