[PATCH] Bug Fix: 2.6.{5,6,7-rc1}: i8042 module unload bug

From: Sau Dan Lee
Date: Mon May 24 2004 - 02:57:45 EST



I'm wondering why 2.6.7-rc1 does NOT contain the following patch.

See: http://lkml.org/lkml/2004/5/10/63


--- linux-2.6.7-rc1/drivers/input/serio/i8042.c
+++ linux-2.6.7-rc1.i8042-shutdown-fix/drivers/input/serio/i8042.c
@@ -990,24 +990,28 @@
unregister_reboot_notifier(&i8042_notifier);

if (i8042_pm_dev)
pm_unregister(i8042_pm_dev);

if (i8042_sysdev_initialized) {
sysdev_unregister(&device_i8042);
sysdev_class_unregister(&kbc_sysclass);
}

- del_timer_sync(&i8042_timer);
-
i8042_controller_cleanup();

+ /* we must delete the timer AFTER the i8042 chip is cleaned up,
+ so as to prevent any more interrupts to invoke i8042_interrupt()
+ which then schedules newer timer events.
+ */
+ del_timer_sync(&i8042_timer);
+
if (i8042_kbd_values.exists)
serio_unregister_port(&i8042_kbd_port);

if (i8042_aux_values.exists)
serio_unregister_port(&i8042_aux_port);

for (i = 0; i < 4; i++)
if (i8042_mux_values[i].exists)
serio_unregister_port(i8042_mux_port + i);




--
Sau Dan LEE ???(Big5) ~{@nJX6X~}(HZ)

E-mail: danlee@xxxxxxxxxxxxxxxxxxxxxxxxxx
Home page: http://www.informatik.uni-freiburg.de/~danlee

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