From: "Carlos R. Mafra" <crmafra2@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-kernel@vger.kernel.org, "Rafael J. Wysocki" <rjw@sisk.pl>,
linux-input@vger.kernel.org
Subject: Re: [bisected regression] Touchpad "paste" stops working after suspend to RAM
Date: Wed, 14 Oct 2009 01:16:41 +0200 [thread overview]
Message-ID: <20091013231641.GA4404@Pilar.aei.mpg.de> (raw)
In-Reply-To: <20091013202459.GE21593@core.coreip.homeip.net>
[restoring Cc: list]
On Tue 13.Oct'09 at 13:24:59 -0700, Dmitry Torokhov wrote:
>
> Could you please try this patch (again if you could post dmesg that
> would be great). Thank you!
The patch quoted below also fixes the problem. I attached the
syslog with i8042.debug (with a s2ram in the middle) to the
bugzilla:
http://bugzilla.kernel.org/show_bug.cgi?id=14392
(cool! the address above was pasted with the touchpad,
so it is really working :-)
Thanks Dmitry!
>
> Input: atkbd - postpone restoring LED/repeat rate at resume
>
> From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>
> We need to postpone restoring LED state and typematic settings until
> keyboard is finished reconnecting upon resume. Normally driver core
> and PM infrastructure takes care of proper ordering and dependencies,
> but or case actual reconnect is done asynchronously from kseriod.
> So while driver core thinks that keyboard was resumed and it is time
> to let input core run it's resume handlers in reality keyboard is not
> ready yet. The solution is to keep rescheduling work that adjusts LED
> and rate settings until keyboard is fully enabled.
>
> Reported-by: Carlos R. Mafra <crmafra2@gmail.com>
> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
> ---
>
> drivers/input/keyboard/atkbd.c | 19 +++++++++++++++----
> 1 files changed, 15 insertions(+), 4 deletions(-)
>
>
> diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
> index a45157d..022f3cb 100644
> --- a/drivers/input/keyboard/atkbd.c
> +++ b/drivers/input/keyboard/atkbd.c
> @@ -574,11 +574,22 @@ static void atkbd_event_work(struct work_struct *work)
>
> mutex_lock(&atkbd->event_mutex);
>
> - if (test_and_clear_bit(ATKBD_LED_EVENT_BIT, &atkbd->event_mask))
> - atkbd_set_leds(atkbd);
> + if (!atkbd->enabled) {
> + /*
> + * Serio ports are resumed asynchronously so while driver core
> + * thinks that device is already fully operational in reality
> + * it may not be ready yet. In this case we need to keep
> + * rescheduling till reconnect completes.
> + */
> + schedule_delayed_work(&atkbd->event_work,
> + msecs_to_jiffies(100));
> + } else {
> + if (test_and_clear_bit(ATKBD_LED_EVENT_BIT, &atkbd->event_mask))
> + atkbd_set_leds(atkbd);
>
> - if (test_and_clear_bit(ATKBD_REP_EVENT_BIT, &atkbd->event_mask))
> - atkbd_set_repeat_rate(atkbd);
> + if (test_and_clear_bit(ATKBD_REP_EVENT_BIT, &atkbd->event_mask))
> + atkbd_set_repeat_rate(atkbd);
> + }
>
> mutex_unlock(&atkbd->event_mutex);
> }
next prev parent reply other threads:[~2009-10-13 23:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-11 16:21 Carlos R. Mafra
2009-10-11 18:01 ` Dmitry Torokhov
2009-10-11 19:31 ` Carlos R. Mafra
2009-10-12 9:02 ` Dmitry Torokhov
2009-10-12 9:35 ` Carlos R. Mafra
2009-10-12 9:51 ` Carlos R. Mafra
2009-10-12 10:09 ` Carlos R. Mafra
2009-10-13 3:24 ` Dmitry Torokhov
2009-10-13 12:07 ` Carlos R. Mafra
[not found] ` <20091013121109.GB4619@Pilar.aei.mpg.de>
[not found] ` <20091013182643.GC21593@core.coreip.homeip.net>
[not found] ` <20091013190819.GA7555@Pilar.aei.mpg.de>
[not found] ` <20091013194654.GD21593@core.coreip.homeip.net>
[not found] ` <20091013202459.GE21593@core.coreip.homeip.net>
2009-10-13 23:16 ` Carlos R. Mafra [this message]
2009-10-13 23:56 ` Dmitry Torokhov
2009-10-13 23:57 ` Dmitry Torokhov
2009-10-14 0:51 ` Carlos R. Mafra
2009-10-14 2:30 ` Dmitry Torokhov
2009-10-14 11:13 ` Carlos R. Mafra
2009-10-15 0:44 ` Dmitry Torokhov
2009-10-15 11:08 ` Carlos R. Mafra
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=20091013231641.GA4404@Pilar.aei.mpg.de \
--to=crmafra2@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
/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
all inboxes | Powered by JetHome®