Messages in this thread Patch in this message | | | Date | Sun, 9 Nov 2003 22:56:43 -0800 | From | Andrew Morton <> | Subject | Re: [PATCH?] psmouse-base.c |
| |
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?
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |