From: Andrew Morton <akpm@osdl.org>
To: Dmitry Torokhov <dtor_core@ameritech.net>
Cc: arief_m_utama@telkomsel.co.id, vojtech@suse.cz,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH?] psmouse-base.c
Date: Sun, 9 Nov 2003 22:56:43 -0800 [thread overview]
Message-ID: <20031109225643.2a0383ef.akpm@osdl.org> (raw)
In-Reply-To: <200311100143.58955.dtor_core@ameritech.net>
Dmitry Torokhov <dtor_core@ameritech.net> wrote:
>
> On Sunday 09 November 2003 11:12 pm, Andrew Morton wrote:
> > arief_mulya <arief_m_utama@telkomsel.co.id> wrote:
> > > static int psmouse_pm_callback(struct pm_dev *dev, pm_request_t
> > > request, void *data)
> > > {
> > > struct psmouse *psmouse = dev->data;
> > > struct serio_dev *ser_dev = psmouse->serio->dev;
> > >
> > >
> > > switch (request) {
> > > case PM_RESUME:
> > > psmouse->state = PSMOUSE_IGNORE;
> > > serio_rescan(psmouse->serio);
> > > default:
> > > return 0;
> > > }
> > > }
> >
> > What does the driver do without this change? ie: what problem is this
> > fixing?
> >
> > Why is it calling serio_rescan() rather than serio_reconnect()?
> >
>
> serio_reconnect() is only in your tree (-mm), it has not been pushed to
> Linus yet... Unfortunately using rescan can cause input devices be shifted
> if some program has them open while suspending.
Ah, I see. So would you say that reconnect is the correct thing to use
here?
That would mean that the appropriate patch against -mm is
--- 25/drivers/input/mouse/psmouse-base.c~serio-pm-fix 2003-11-09 20:12:27.000000000 -0800
+++ 25-akpm/drivers/input/mouse/psmouse-base.c 2003-11-09 20:12:27.000000000 -0800
@@ -533,9 +533,10 @@ static int psmouse_pm_callback(struct pm
{
struct psmouse *psmouse = dev->data;
- psmouse->state = PSMOUSE_IGNORE;
- serio_reconnect(psmouse->serio);
-
+ if (request == PM_RESUME) {
+ psmouse->state = PSMOUSE_IGNORE;
+ serio_reconnect(psmouse->serio);
+ }
return 0;
}
_
Those serio patches have been in -mm for six weeks btw. Was there some
problem with them?
next prev parent reply other threads:[~2003-11-10 6:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-10 2:28 arief_mulya
2003-11-10 4:12 ` Andrew Morton
2003-11-10 6:43 ` Dmitry Torokhov
2003-11-10 6:56 ` Andrew Morton [this message]
2003-11-10 7:08 ` arief_mulya
2003-11-11 5:20 ` Dmitry Torokhov
2003-11-11 6:54 ` arief_mulya
2003-11-11 23:29 ` Dmitry Torokhov
2003-11-12 2:28 ` arief_mulya
2003-11-12 3:42 ` Dmitry Torokhov
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=20031109225643.2a0383ef.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=arief_m_utama@telkomsel.co.id \
--cc=dtor_core@ameritech.net \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@suse.cz \
/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®