android_kernel_xiaomi_sm8350/drivers/input
Zoltan Devai 59bdb43769 Input: pcspkr - fix PIT lockup on some chipsets
There've been reports [1] about the sysem bell causing a hard
lockup.  My machine was affected as well: any speaker output hung
the machine completely, nothing in the logs, no magic sysrq,
etc., looked like a hardware problem.  Had a closer look on the
issue, and it turned out that the pcspkr module is responsible.
The cause is the bad setup of Timer 2 in the i8253 controller,
which probably hangs the whole PIT controller.

Intel datasheets [2] state that the timer registers are in an
undefined state after reset and they need to be programmed before
enabling the timer. (And enabling without programming the
frequency first doesn't make sense anyway).

I don't know which chipsets are affected (if not all), it also
depends on the BIOS whether it initializes the timer (e.g. to
beep when you start the machine).

The following patch solved the issue on my ICH6 notebook,
couldn't test it with any others, but should be safe to apply.

[1]
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/146151
https://bugs.launchpad.net/ubuntu/+bug/270790
http://ubuntuforums.org/showthread.php?t=227693
http://bugs.gentoo.org/show_bug.cgi?id=222583
https://bugzilla.redhat.com/show_bug.cgi?id=454225

[2]
http://www.intel.com/assets/pdf/datasheet/252516.pdf
http://www.intel.com/assets/pdf/datasheet/301473.pdf
http://www.intel.com/design/chipsets/datashts/29065503.pdf

Signed-off-by: Zoltan Devai <zdevai@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-11-19 16:54:59 -05:00
..
gameport Input: struct device - replace bus_id with dev_name(), dev_set_name() 2008-10-30 09:29:05 -04:00
joystick USB: remove info() macro from usb input drivers 2008-10-17 14:41:10 -07:00
keyboard Input: omap-keypad - allow more than 6 rows 2008-10-29 00:28:58 -04:00
misc Input: pcspkr - fix PIT lockup on some chipsets 2008-11-19 16:54:59 -05:00
mouse Input: appletouch - driver refactoring 2008-10-29 00:28:30 -04:00
serio Input: struct device - replace bus_id with dev_name(), dev_set_name() 2008-10-30 09:29:05 -04:00
tablet USB: remove info() macro from usb input drivers 2008-10-17 14:41:10 -07:00
touchscreen Input: usbtouchscreen - fix TSC-10 DM USB controllers without EEPROM 2008-11-19 16:53:58 -05:00
apm-power.c
evbug.c Input: struct device - replace bus_id with dev_name(), dev_set_name() 2008-10-30 09:29:05 -04:00
evdev.c Input: struct device - replace bus_id with dev_name(), dev_set_name() 2008-10-30 09:29:05 -04:00
ff-core.c
ff-memless.c
fixp-arith.h
input-compat.c Input: refactor evdev 32bit compat to be shareable with uinput 2008-10-27 22:03:42 -04:00
input-compat.h Input: refactor evdev 32bit compat to be shareable with uinput 2008-10-27 22:03:42 -04:00
input-polldev.c
input.c Input: struct device - replace bus_id with dev_name(), dev_set_name() 2008-10-30 09:29:05 -04:00
joydev.c Input: struct device - replace bus_id with dev_name(), dev_set_name() 2008-10-30 09:29:05 -04:00
Kconfig
Makefile Input: refactor evdev 32bit compat to be shareable with uinput 2008-10-27 22:03:42 -04:00
mousedev.c Input: struct device - replace bus_id with dev_name(), dev_set_name() 2008-10-30 09:29:05 -04:00
xen-kbdfront.c xen: clean up domain mode predicates 2008-08-20 12:40:07 +02:00