* [RFT] Input: speed up suspend/shutdown for PS/2 mice and keyboards
@ 2009-12-21 7:09 Dmitry Torokhov
2009-12-21 20:29 ` [linux-pm] " Alan Stern
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Dmitry Torokhov @ 2009-12-21 7:09 UTC (permalink / raw)
To: Linux Input; +Cc: linux-pm, LKML, Rafael J. Wysocki
Hi,
I am asking everyone to give this patch a try. It is reported to speed
up suspend process, however there is a risk that there are boxes out
there that do require full reset and I would prefer to know that sooner
than later.
Thanks!
--
Dmitry
Input: speed up suspend/shutdown for PS/2 mice and keyboards
Instead of doing full-blown reset while suspending or shutting down
the box use lighter form of reset that should take less time.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
drivers/input/keyboard/atkbd.c | 5 +++--
drivers/input/mouse/psmouse-base.c | 5 ++++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index a357357..1f5e2ce 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -134,7 +134,8 @@ static const unsigned short atkbd_unxlate_table[128] = {
#define ATKBD_CMD_GETID 0x02f2
#define ATKBD_CMD_SETREP 0x10f3
#define ATKBD_CMD_ENABLE 0x00f4
-#define ATKBD_CMD_RESET_DIS 0x00f5
+#define ATKBD_CMD_RESET_DIS 0x00f5 /* Reset to defaults and disable */
+#define ATKBD_CMD_RESET_DEF 0x00f6 /* Reset to defaults */
#define ATKBD_CMD_SETALL_MBR 0x00fa
#define ATKBD_CMD_RESET_BAT 0x02ff
#define ATKBD_CMD_RESEND 0x00fe
@@ -836,7 +837,7 @@ static void atkbd_cleanup(struct serio *serio)
struct atkbd *atkbd = serio_get_drvdata(serio);
atkbd_disable(atkbd);
- ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT);
+ ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_DEF);
}
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index fd0bc09..401ac6b 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -1137,7 +1137,10 @@ static void psmouse_cleanup(struct serio *serio)
if (psmouse->cleanup)
psmouse->cleanup(psmouse);
- psmouse_reset(psmouse);
+/*
+ * Reset the mouse to defaults (bare PS/2 protocol).
+ */
+ ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS);
/*
* Some boxes, such as HP nx7400, get terribly confused if mouse
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [linux-pm] [RFT] Input: speed up suspend/shutdown for PS/2 mice and keyboards
2009-12-21 7:09 [RFT] Input: speed up suspend/shutdown for PS/2 mice and keyboards Dmitry Torokhov
@ 2009-12-21 20:29 ` Alan Stern
2009-12-23 20:48 ` Rafael J. Wysocki
2009-12-26 13:40 ` Alexander Clouter
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Alan Stern @ 2009-12-21 20:29 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Linux Input, linux-pm, LKML
On Sun, 20 Dec 2009, Dmitry Torokhov wrote:
> Hi,
>
> I am asking everyone to give this patch a try. It is reported to speed
> up suspend process, however there is a risk that there are boxes out
> there that do require full reset and I would prefer to know that sooner
> than later.
It works okay on my machine (Intel ICH4).
Alan Stern
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-pm] [RFT] Input: speed up suspend/shutdown for PS/2 mice and keyboards
2009-12-21 20:29 ` [linux-pm] " Alan Stern
@ 2009-12-23 20:48 ` Rafael J. Wysocki
0 siblings, 0 replies; 8+ messages in thread
From: Rafael J. Wysocki @ 2009-12-23 20:48 UTC (permalink / raw)
To: Alan Stern; +Cc: Dmitry Torokhov, Linux Input, linux-pm, LKML
On Monday 21 December 2009, Alan Stern wrote:
> On Sun, 20 Dec 2009, Dmitry Torokhov wrote:
>
> > Hi,
> >
> > I am asking everyone to give this patch a try. It is reported to speed
> > up suspend process, however there is a risk that there are boxes out
> > there that do require full reset and I would prefer to know that sooner
> > than later.
>
> It works okay on my machine (Intel ICH4).
Likewise on my Toshiba Portege R500 (ICH7).
[Of course, it also works on my other test boxes, the Wind has ICH7 like the
Toshiba, and the nx6325 has ATI SB400).
Rafael
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFT] Input: speed up suspend/shutdown for PS/2 mice and keyboards
2009-12-21 7:09 [RFT] Input: speed up suspend/shutdown for PS/2 mice and keyboards Dmitry Torokhov
2009-12-21 20:29 ` [linux-pm] " Alan Stern
@ 2009-12-26 13:40 ` Alexander Clouter
2009-12-26 21:38 ` Rafael J. Wysocki
2009-12-27 0:26 ` Henrique de Moraes Holschuh
2009-12-27 14:20 ` Andreas Mohr
3 siblings, 1 reply; 8+ messages in thread
From: Alexander Clouter @ 2009-12-26 13:40 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-input
Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
>
> I am asking everyone to give this patch a try. It is reported to speed
> up suspend process, however there is a risk that there are boxes out
> there that do require full reset and I would prefer to know that sooner
> than later.
>
Seems to work on my ICH8 lapdog (a Fujitsu T2010), can't say it actually
speeds the suspend/resume cycle up though.
Cheers
--
Alexander Clouter
.sigmonster says: Bus error -- driver executed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFT] Input: speed up suspend/shutdown for PS/2 mice and keyboards
2009-12-26 13:40 ` Alexander Clouter
@ 2009-12-26 21:38 ` Rafael J. Wysocki
0 siblings, 0 replies; 8+ messages in thread
From: Rafael J. Wysocki @ 2009-12-26 21:38 UTC (permalink / raw)
To: Alexander Clouter; +Cc: linux-kernel, linux-input
On Saturday 26 December 2009, Alexander Clouter wrote:
> Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> >
> > I am asking everyone to give this patch a try. It is reported to speed
> > up suspend process, however there is a risk that there are boxes out
> > there that do require full reset and I would prefer to know that sooner
> > than later.
> >
> Seems to work on my ICH8 lapdog (a Fujitsu T2010), can't say it actually
> speeds the suspend/resume cycle up though.
With 2.6.33-rc2, if you do
dmesg | grep "of devices"
that will give you total device suspend/resume times. By comparing the times
with and without the patch you should be able to tell the difference (if any).
Rafael
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFT] Input: speed up suspend/shutdown for PS/2 mice and keyboards
2009-12-21 7:09 [RFT] Input: speed up suspend/shutdown for PS/2 mice and keyboards Dmitry Torokhov
2009-12-21 20:29 ` [linux-pm] " Alan Stern
2009-12-26 13:40 ` Alexander Clouter
@ 2009-12-27 0:26 ` Henrique de Moraes Holschuh
2009-12-27 10:10 ` Dmitry Torokhov
2009-12-27 14:20 ` Andreas Mohr
3 siblings, 1 reply; 8+ messages in thread
From: Henrique de Moraes Holschuh @ 2009-12-27 0:26 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Linux Input, linux-pm, LKML, Rafael J. Wysocki
Works on my ThinkPad T43 (KBC emulated by the embedded controller firmware),
although I don't think it made much difference in speed.
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFT] Input: speed up suspend/shutdown for PS/2 mice and keyboards
2009-12-27 0:26 ` Henrique de Moraes Holschuh
@ 2009-12-27 10:10 ` Dmitry Torokhov
0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Torokhov @ 2009-12-27 10:10 UTC (permalink / raw)
To: Henrique de Moraes Holschuh
Cc: Linux Input, linux-pm, LKML, Rafael J. Wysocki
On Sat, Dec 26, 2009 at 10:26:58PM -0200, Henrique de Moraes Holschuh wrote:
> Works on my ThinkPad T43 (KBC emulated by the embedded controller firmware),
> although I don't think it made much difference in speed.
>
Thanks. The speedup should not be that noticeable (even worst hardware
usually manages to do full reset in 0.5 sec), still 0.5 sec here and 0.5
sec there may add up.
--
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFT] Input: speed up suspend/shutdown for PS/2 mice and keyboards
2009-12-21 7:09 [RFT] Input: speed up suspend/shutdown for PS/2 mice and keyboards Dmitry Torokhov
` (2 preceding siblings ...)
2009-12-27 0:26 ` Henrique de Moraes Holschuh
@ 2009-12-27 14:20 ` Andreas Mohr
3 siblings, 0 replies; 8+ messages in thread
From: Andreas Mohr @ 2009-12-27 14:20 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Linux Input, linux-pm, LKML, Rafael J. Wysocki
Hi,
On an ATI SB600 (RS690), no problems either on mouse/kbd after a S2R cycle,
on current git with this patch applied (verified).
And this with a rather problematic "new-fangled, designer (tm)"
Logitech Wireless Keyboard M/N Y-RR54 , P/N 867512-0102 (plus mouse!),
plugged into PS/2 connectors!
Thanks for your work!
Andreas Mohr
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-12-27 14:20 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-21 7:09 [RFT] Input: speed up suspend/shutdown for PS/2 mice and keyboards Dmitry Torokhov
2009-12-21 20:29 ` [linux-pm] " Alan Stern
2009-12-23 20:48 ` Rafael J. Wysocki
2009-12-26 13:40 ` Alexander Clouter
2009-12-26 21:38 ` Rafael J. Wysocki
2009-12-27 0:26 ` Henrique de Moraes Holschuh
2009-12-27 10:10 ` Dmitry Torokhov
2009-12-27 14:20 ` Andreas Mohr
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).