ACPI: EC: Make the GPE storm threshold a module parameter
authorFeng Tang <feng.tang@intel.com>
Fri, 28 Sep 2012 07:22:00 +0000 (15:22 +0800)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 30 Oct 2012 23:26:37 +0000 (23:26 +0000)
commit6e653c320e86a62e0079217f70fead75e9a56aec
treed291615b711aaf30335590a7edc8fe5005bf3d67
parent9719a5f38c56b4005c5427e6730a6f808567d7f0
ACPI: EC: Make the GPE storm threshold a module parameter

commit a520d52e99b14ba7db135e916348f12f2a6e09be upstream.

The Linux EC driver includes a mechanism to detect GPE storms,
and switch from interrupt-mode to polling mode.  However, polling
mode sometimes doesn't work, so the workaround is problematic.
Also, different systems seem to need the threshold for detecting
the GPE storm at different levels.

ACPI_EC_STORM_THRESHOLD was initially 20 when it's created, and
was changed to 8 in 2.6.28 commit 06cf7d3c7 "ACPI: EC: lower interrupt storm
threshold" to fix kernel bug 11892 by forcing the laptop in that bug to
work in polling mode. However in bug 45151, it works fine in interrupt
mode if we lift the threshold back to 20.

This patch makes the threshold a module parameter so that user has a
flexible option to debug/workaround this issue.

The default is unchanged.

This is also a preparation patch to fix specific systems:
https://bugzilla.kernel.org/show_bug.cgi?id=45151

Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/acpi/ec.c