From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: "Ike Panhc" <ike.pan@canonical.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Andy Shevchenko" <andy@kernel.org>,
platform-driver-x86@vger.kernel.org, linux-input@vger.kernel.org,
"Jonathan Denose" <jdenose@chromium.org>,
"Maxim Mikityanskiy" <maxtram95@gmail.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] platform/x86: ideapad-laptop: Stop calling i8042_command()
Date: Mon, 5 Aug 2024 07:30:31 -0700 [thread overview]
Message-ID: <ZrDiBxZ7ZiNrwB9c@google.com> (raw)
In-Reply-To: <20240805141608.170844-1-hdegoede@redhat.com>
On Mon, Aug 05, 2024 at 04:16:08PM +0200, Hans de Goede wrote:
> Commit 07a4a4fc83dd ("ideapad: add Lenovo IdeaPad Z570 support (part 2)")
> added an i8042_command(..., I8042_CMD_AUX_[EN|DIS]ABLE) call to
> the ideapad-laptop driver to suppress the touchpad events at the PS/2
> AUX controller level.
>
> Commit c69e7d843d2c ("platform/x86: ideapad-laptop: Only toggle ps2 aux
> port on/off on select models") limited this to only do this by default
> on the IdeaPad Z570 to replace a growing list of models on which
> the i8042_command() call was disabled by quirks because it was causing
> issues.
>
> A recent report shows that this is causing issues even on the Z570 for
> which it was originally added because it can happen on resume before
> the i8042 controller's own resume() method has run:
>
> [ 50.241235] ideapad_acpi VPC2004:00: PM: calling acpi_subsys_resume+0x0/0x5d @ 4492, parent: PNP0C09:00
> [ 50.242055] snd_hda_intel 0000:00:0e.0: PM: pci_pm_resume+0x0/0xed returned 0 after 13511 usecs
> [ 50.242120] snd_hda_codec_realtek hdaudioC0D0: PM: calling hda_codec_pm_resume+0x0/0x19 [snd_hda_codec] @ 4518, parent: 0000:00:0e.0
> [ 50.247406] i8042: [49434] a8 -> i8042 (command)
> [ 50.247468] ideapad_acpi VPC2004:00: PM: acpi_subsys_resume+0x0/0x5d returned 0 after 6220 usecs
> ...
> [ 50.247883] i8042 kbd 00:01: PM: calling pnp_bus_resume+0x0/0x9d @ 4492, parent: pnp0
> [ 50.247894] i8042 kbd 00:01: PM: pnp_bus_resume+0x0/0x9d returned 0 after 0 usecs
> [ 50.247906] i8042 aux 00:02: PM: calling pnp_bus_resume+0x0/0x9d @ 4492, parent: pnp0
> [ 50.247916] i8042 aux 00:02: PM: pnp_bus_resume+0x0/0x9d returned 0 after 0 usecs
> ...
> [ 50.248301] i8042 i8042: PM: calling platform_pm_resume+0x0/0x41 @ 4492, parent: platform
> [ 50.248377] i8042: [49434] 55 <- i8042 (flush, kbd)
> [ 50.248407] i8042: [49435] aa -> i8042 (command)
> [ 50.248601] i8042: [49435] 00 <- i8042 (return)
> [ 50.248604] i8042: [49435] i8042 controller selftest: 0x0 != 0x55
>
> Dmitry (input subsys maintainer) pointed out that just sending
> KEY_TOUCHPAD_OFF/KEY_TOUCHPAD_ON which the ideapad-laptop driver
> already does should be sufficient and that it then is up to userspace
> to filter out touchpad events after having received a KEY_TOUCHPAD_OFF.
>
> Given all the problems the i8042_command() call has been causing just
> removing it indeed seems best, so this removes it completely. Note that
> this only impacts the Ideapad Z570 since it was already disabled by
> default on all other models.
Right, I think stopping using it here is the best. I also had a draft of
a patch to allow establishing a link between i8042 driver and users of
i8042_command() so that they do not disturb resuming of the keyboard
controller. I need to finish it.
>
> Fixes: c69e7d843d2c ("platform/x86: ideapad-laptop: Only toggle ps2 aux port on/off on select models")
> Reported-by: Jonathan Denose <jdenose@chromium.org>
> Closes: https://lore.kernel.org/linux-input/20231102075243.1.Idb37ff8043a29f607beab6440c32b9ae52525825@changeid/
> Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Maxim Mikityanskiy <maxtram95@gmail.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
FWIW:
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Thanks.
--
Dmitry
next prev parent reply other threads:[~2024-08-05 14:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-05 14:16 [PATCH] platform/x86: ideapad-laptop: Stop calling i8042_command() Hans de Goede
2024-08-05 14:30 ` Dmitry Torokhov [this message]
2024-08-05 15:30 ` Maxim Mikityanskiy
2024-08-05 15:45 ` Hans de Goede
2024-08-05 17:00 ` Dmitry Torokhov
2024-08-05 18:40 ` Hans de Goede
2024-08-12 14:37 ` Maxim Mikityanskiy
2024-08-12 14:41 ` Hans de Goede
2024-08-12 17:24 ` Dmitry Torokhov
2024-08-12 18:18 ` Hans de Goede
2024-08-12 19:26 ` Dmitry Torokhov
2024-08-18 20:30 ` Dmitry Torokhov
2024-08-20 10:46 ` Maxim Mikityanskiy
2024-08-20 21:40 ` Maxim Mikityanskiy
2024-08-21 5:28 ` Dmitry Torokhov
2024-09-03 23:55 ` Dmitry Torokhov
2024-09-22 8:35 ` Maxim Mikityanskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZrDiBxZ7ZiNrwB9c@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=andy@kernel.org \
--cc=hdegoede@redhat.com \
--cc=ike.pan@canonical.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jdenose@chromium.org \
--cc=linux-input@vger.kernel.org \
--cc=maxtram95@gmail.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).