From: Yu Chen <yu.chen.surf@gmail.com>
To: linux-input@vger.kernel.org
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Jiri Kosina <jkosina@suse.com>,
Dmitry Vyukov <dvyukov@google.com>
Subject: [RFC] Can we bypass the timeout when resetting Synaptics device?
Date: Mon, 27 Jun 2016 21:04:58 +0800 [thread overview]
Message-ID: <CADjb_WTNJJpmpNCOGxdUOd1AZ8S7iEf2NnSHC=VC6TzAOTbP_w@mail.gmail.com> (raw)
Hi All,
Currently I'm doing some tunings on the speed of suspend/resume,
it looks like my serio driver tooks a 200ms to finish, which is
too long:
[ 1120.255783] calling serio0+ @ 2764, parent: i8042
[ 1120.452976] call serio0+ returned 0 after 192472 usecs
So further investigation shows that the time cost is in
drivers/input/serio/libps2.c: __ps2_command
/*
* Some devices (Synaptics) peform the reset before
* ACKing the reset command, and so it can take a long
* time before the ACK arrives.
*/
if (ps2_sendbyte(ps2dev, command & 0xff,
command == PS2_CMD_RESET_BAT ? 1000 : 200)) {
serio_pause_rx(ps2dev->serio);
goto out_reset_flags;
}
If I understand correctly, if it is a Synaptics device, then we have to wait
at least 200ms for ATKBD_CMD_RESET_DEF, although this device has already
been reset.
So my question is, could we add flags to distinguish Synaptics device, and
if it is a Synaptics device, just do not wait that long time and
return after the command
has been sent out?
thanks,
Yu
next reply other threads:[~2016-06-27 13:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-27 13:04 Yu Chen [this message]
2016-06-27 17:05 ` [RFC] Can we bypass the timeout when resetting Synaptics device? Dmitry Torokhov
2016-06-28 2:10 ` Yu Chen
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='CADjb_WTNJJpmpNCOGxdUOd1AZ8S7iEf2NnSHC=VC6TzAOTbP_w@mail.gmail.com' \
--to=yu.chen.surf@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=dmitry.torokhov@gmail.com \
--cc=dvyukov@google.com \
--cc=jkosina@suse.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@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).