linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Jonathan Denose <jdenose@chromium.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	jefferymiller@google.com, Jonathan Denose <jdenose@google.com>,
	Raul Rangel <rrangel@chromium.org>,
	linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: psmouse - add resync_on_resume dmi check
Date: Fri, 9 Feb 2024 11:01:52 -0800	[thread overview]
Message-ID: <ZcZ2oG1Rls-oR593@google.com> (raw)
In-Reply-To: <CALNJtpV0KsOusPQeGv8bQ3jKy2sUj+k=mPHc172f+vMaTDYPfg@mail.gmail.com>

On Wed, Feb 07, 2024 at 10:39:03AM -0600, Jonathan Denose wrote:
> Hi Dmitry,
> 
> Thanks for your reply.
> 
> On Tue, Feb 6, 2024 at 4:04 PM Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> >
> > Hi Jonathan,
> >
> > On Thu, Nov 02, 2023 at 07:52:47AM -0500, Jonathan Denose wrote:
> > > Some elantech touchpads consistently fail after resuming from
> > > suspend at sanity_check in elantech_packet_check_v4. This means
> > > the touchpad is completely unusable after suspend resume.
> > >
> > > With different permutations of i8042 nomux, nopnp, reset, and noloop
> > > kernel options enabled, and with crc_enabled the touchpad fails in
> > > the same way.
> > >
> > > Resyncing the touchpad after receiving the
> > > PACKET_UNKNOWN/PSMOUSE_BAD_DATA return code allows the touchpad to
> > > function correctly on resume. The touchpad fails to reconnect with
> > > the serio reconnect no matter how many times it retries, so this
> > > change skips over that retry sequence and goes directly to resync.
> >
> > Why can't we do this in elantech_reconnect()? I am sure we can make it
> > simpler and more robust than what the generic handler is trying to do
> > with polling and everything.
> >
> > Thanks.
> >
> > --
> > Dmitry
> 
> I am fine with anything that would be simpler and more robust, though
> I'm not sure how to implement what you are describing.
> 
> Are you suggesting that in this PSMOUSE_BAD_DATA case, instead of
> using psmouse_set_state and psmouse_queue_work to call
> psmouse->reconnect (which calls elantech_reconnect)?

No. From the description it sounds like the device sends wrong/extra
data right after resume. I think you can handle it in
elantech_reconnect() method by draining the buffer or issuing poll
request or something similar.

Can you post the i8042 data stream that happens on suspend/resume?
Toggling i8042.debug option will cause the driver to dump the data to
dmesg.

Thanks.

-- 
Dmitry

  reply	other threads:[~2024-02-09 19:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 12:52 [PATCH] Input: psmouse - add resync_on_resume dmi check Jonathan Denose
2024-02-06 22:04 ` Dmitry Torokhov
2024-02-07 16:39   ` Jonathan Denose
2024-02-09 19:01     ` Dmitry Torokhov [this message]
2024-02-12 20:57       ` Jonathan Denose
2024-02-29 18:23         ` Dmitry Torokhov
2024-03-04 17:17           ` Jonathan Denose
2024-03-05 18:47             ` Dmitry Torokhov
2024-03-05 21:48               ` Jonathan Denose
2024-03-05 23:17                 ` Dmitry Torokhov
2024-03-06 16:43                   ` Jonathan Denose
2024-03-07 18:29             ` Dmitry Torokhov
2024-08-05 14:18               ` Hans de Goede
2024-08-05 16:52                 ` Dmitry Torokhov
2024-08-09 15:35                   ` Jonathan Denose
2024-08-10 12:59                     ` Hans de Goede

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=ZcZ2oG1Rls-oR593@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=jdenose@chromium.org \
    --cc=jdenose@google.com \
    --cc=jefferymiller@google.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rrangel@chromium.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).