public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] kernel-parameters.txt: Add new entry for i8042.noselftest
       [not found] <1469467222-2382-1-git-send-email-marcos.souza.org@gmail.com>
@ 2016-07-25 17:20 ` Marcos Paulo de Souza
  2016-07-25 18:22 ` [PATCH 1/2] input/serio/i8042: Skip selftest on i8042 controller in some ASUS laptops Dmitry Torokhov
  1 sibling, 0 replies; 2+ messages in thread
From: Marcos Paulo de Souza @ 2016-07-25 17:20 UTC (permalink / raw)
  To: Jonathan Corbet, open list:DOCUMENTATION, open list; +Cc: Marcos Paulo de Souza

This new parameter makes i8042 controller to skip selftest. It's
useful to test some problems in touchpads that stop to work after
a suspend/resume cycle.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
---
 Documentation/kernel-parameters.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 82b42c9..025a036 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1431,6 +1431,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 			     controllers
 	i8042.notimeout	[HW] Ignore timeout condition signalled by controller
 	i8042.reset	[HW] Reset the controller during init and cleanup
+	i8042.noselftest
+			[HW] Disable controller selftest, as it can cause
+			problems on some devices
 	i8042.unlock	[HW] Unlock (ignore) the keylock
 	i8042.kbdreset  [HW] Reset device connected to KBD port
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] input/serio/i8042: Skip selftest on i8042 controller in some ASUS laptops
       [not found] <1469467222-2382-1-git-send-email-marcos.souza.org@gmail.com>
  2016-07-25 17:20 ` [PATCH 2/2] kernel-parameters.txt: Add new entry for i8042.noselftest Marcos Paulo de Souza
@ 2016-07-25 18:22 ` Dmitry Torokhov
  1 sibling, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2016-07-25 18:22 UTC (permalink / raw)
  To: Marcos Paulo de Souza
  Cc: Aurélien Francillon, Rafael J. Wysocki, Takashi Iwai,
	linux-input, linux-kernel

[ resending to all - mutt is for some reason confused about recipent
list ]
On Mon, Jul 25, 2016 at 02:20:16PM -0300, Marcos Paulo de Souza wrote:
> On suspend/resume cycle, selftest is executed on to reset i8042 controller. But
> when this is done in these devices, posterior calls to detect/init functions
> to elantech driver fails. Skipping selftest fixes this problem.
> 
> An easier step to reproduce this problem is adding i8042.reset=1 as a kernel
> parameter. On problematic laptops, it'll make the system to start with the
> touchpad already stucked, since psmouse_probe forcibly calls the
> selftest function.
> 
> This patch was inspired by John Hiesey's change[1].
> 
> [1]: https://marc.info/?l=linux-input&m=144312209020616&w=2
> 
> Fixes: "ETPS/2 Elantech Touchpad dies after resume from suspend" (https://bugzilla.kernel.org/show_bug.cgi?id=7739)

*sigh* You just cant win, they'll manage to mess up the firmware one way
or another :( Witness:

"
commit 1ca56e513a9fd356d5a9e0de45dbe0e189e00386
Author: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date:   Tue Jul 20 20:25:34 2010 -0700

    Input: i8042 - reset keyboard controller wehen resuming from S2R

    Some laptops, such as Lenovo 3000 N100, require keyboard controller reset
    in order to have touchpad operable after suspend to RAM. Even if box does
    not need the reset it should be safe to do so, so instead of chasing
    after misbehaving boxes and grow DMI tables, let's reset the controller
    unconditionally.

    Reported-and-tested-by: Jerome Lacoste <jerome.lacoste@gmail.com>
    Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
"

so apparently it is not safe to reset the controller on resume. Oh joy.

The issue I have here is selftest is the same as reset, and we already
have i8042_reset flag, so 2 flags controlling the same functionality is
not great. Could we extend i8042 to an enum, like:

I8042_RESET_ALWAYS
I8042_RESET_NEVER
I8042_RESET_ON_RESUME (default)

and have a custom module parameter for it?

i8042.reset and i8042_reset={1|Y|y} would result in I8042_RESET_ALWAYS
i8042.reset={0|N|n} would result in I8042_RESET_NEVER
Without i8042.reset we just reset it when resuming from S3.

What do you think?

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-25 18:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1469467222-2382-1-git-send-email-marcos.souza.org@gmail.com>
2016-07-25 17:20 ` [PATCH 2/2] kernel-parameters.txt: Add new entry for i8042.noselftest Marcos Paulo de Souza
2016-07-25 18:22 ` [PATCH 1/2] input/serio/i8042: Skip selftest on i8042 controller in some ASUS laptops Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox