* Re: [RFC] serio driver: speed up resume
[not found] ` <1214272978.29380.2.camel@sli10-desk.sh.intel.com>
@ 2008-06-27 15:49 ` Len Brown
2008-06-27 16:03 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Len Brown @ 2008-06-27 15:49 UTC (permalink / raw)
To: Shaohua Li
Cc: linux-input, dmitry.torokhov, linux acpi, Rafael J. Wysocki,
Linux Power Management List
<rafael and linux-pm cc'd>
On Tue, 24 Jun 2008, Shaohua Li wrote:
> On Mon, 2008-06-16 at 17:09 +0800, Shaohua Li wrote:
> > serio_resume will call into psmouse_extensions(). In my test, the
> > routine is very slow, it blocks resume about 1 sec. Below patch (move
> > resume to kseriod, just like boot time probe) cures the issue in my
> > test, and seems no side effect. I'm no familiar with serio driver, so
> > please check.
> Any comments from input guys?
none that i can see.
Rafael,
can you put this patch in with your suspend test patches?
I would do so, but as I'll be out for a bit I'll not
be here to babysit it if something breaks.
thanks,
-Len
>
> > Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> >
> > diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
> > index 7f52938..7dad33f 100644
> > --- a/drivers/input/serio/serio.c
> > +++ b/drivers/input/serio/serio.c
> > @@ -163,6 +163,7 @@ enum serio_event_type {
> > SERIO_RECONNECT_PORT,
> > SERIO_REGISTER_PORT,
> > SERIO_ATTACH_DRIVER,
> > + SERIO_RESUME_PORT,
> > };
> >
> > struct serio_event {
> > @@ -287,6 +288,13 @@ static struct serio_event *serio_get_event(void)
> > return event;
> > }
> >
> > +#ifdef CONFIG_PM
> > +static void serio_resume_port(struct device *dev);
> > +#else
> > +static inline void serio_resume_port(struct device *dev)
> > +{
> > +}
> > +#endif /* CONFIG_PM */
> > static void serio_handle_event(void)
> > {
> > struct serio_event *event;
> > @@ -319,6 +327,10 @@ static void serio_handle_event(void)
> > serio_attach_driver(event->object);
> > break;
> >
> > + case SERIO_RESUME_PORT:
> > + serio_resume_port(event->object);
> > + break;
> > +
> > default:
> > break;
> > }
> > @@ -922,21 +934,26 @@ static int serio_suspend(struct device *dev,
> > pm_message_t state)
> > return 0;
> > }
> >
> > -static int serio_resume(struct device *dev)
> > +static void serio_resume_port(struct device *dev)
> > {
> > struct serio *serio = to_serio_port(dev);
> >
> > - if (dev->power.power_state.event != PM_EVENT_ON &&
> > - serio_reconnect_driver(serio)) {
> > - /*
> > - * Driver re-probing can take a while, so better let
> > kseriod
> > - * deal with it.
> > - */
> > - serio_rescan(serio);
> > + if (serio_reconnect_driver(serio)) {
> > + serio_disconnect_port(serio);
> > + serio_find_driver(serio);
> > }
> >
> > dev->power.power_state = PMSG_ON;
> > +}
> >
> > +static int serio_resume(struct device *dev)
> > +{
> > + /*
> > + * Driver reconnect can take a while, so better let kseriod
> > + * deal with it.
> > + */
> > + if (dev->power.power_state.event != PM_EVENT_ON)
> > + serio_queue_event(dev, NULL, SERIO_RESUME_PORT);
> > return 0;
> > }
> > #endif /* CONFIG_PM */
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-acpi"
> > in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
> >
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RFC] serio driver: speed up resume
2008-06-27 15:49 ` [RFC] serio driver: speed up resume Len Brown
@ 2008-06-27 16:03 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2008-06-27 16:03 UTC (permalink / raw)
To: Len Brown
Cc: Shaohua Li, linux-input, dmitry.torokhov, linux acpi,
Linux Power Management List
On Friday, 27 of June 2008, Len Brown wrote:
>
> <rafael and linux-pm cc'd>
>
> On Tue, 24 Jun 2008, Shaohua Li wrote:
>
> > On Mon, 2008-06-16 at 17:09 +0800, Shaohua Li wrote:
> > > serio_resume will call into psmouse_extensions(). In my test, the
> > > routine is very slow, it blocks resume about 1 sec. Below patch (move
> > > resume to kseriod, just like boot time probe) cures the issue in my
> > > test, and seems no side effect. I'm no familiar with serio driver, so
> > > please check.
>
> > Any comments from input guys?
>
> none that i can see.
>
> Rafael,
> can you put this patch in with your suspend test patches?
> I would do so, but as I'll be out for a bit I'll not
> be here to babysit it if something breaks.
I will, but my series has been a bit out of order recently. I'm going to fix
it up shortly, though.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-27 16:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1213607375.31950.2.camel@sli10-desk.sh.intel.com>
[not found] ` <1214272978.29380.2.camel@sli10-desk.sh.intel.com>
2008-06-27 15:49 ` [RFC] serio driver: speed up resume Len Brown
2008-06-27 16:03 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox