public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Patrick Mochel <mochel@digitalimplant.org>
Cc: Linux-pm mailing list <linux-pm@lists.osdl.org>
Subject: Re: Re: Hotplug events during sleep transition
Date: Fri, 23 Dec 2005 13:32:15 -0500	[thread overview]
Message-ID: <200512231332.16777.dtor_core@ameritech.net> (raw)
In-Reply-To: <Pine.LNX.4.50.0512230722510.19327-100000@monsoon.he.net>

On Friday 23 December 2005 10:35, Patrick Mochel wrote:
> > > Quite often unbinding is easiest and also correct way. I would love to be
> > > able to just unbind serio port/input device and have it recreated later.
> > > Unfortunately X/GPM do not [yet?] support hotplugging of devices so kernel
> > > has to compensate.
> >
> > I agree with Dmitry.  Many drivers don't need to do anything special for
> > suspend, or only need to cancel an outstanding input request.  Rather than
> > go through every single driver and add a minimal (and possibly erroneous)
> > suspend routine, it's much easier just to unbind these drivers.
> 
> So why not fix the subsystems to do the equivalent of an unbinding, from
> a tear-down and reinitialization standpoint? That way, you don't have to
> force the core to contort itself simply for the fact that you want to push
> in a thumbtack with a sledgehammer?
> 
> Think about what is happening. It's been discovered that shutting down the
> device and reinitializing the device performs all the correct actions to
> get the device up and running again after a suspend/resume cycle. All you
> have to do for each suspend routine is mimic that effect. It arguably
> doesn't require any serious knowledge about the device - it only needs a
> copy of the ->probe() and ->remove() routines (or the functional
> equivalent for those devices), without the allocation and freeing of data
> structures.

That's all good except that it overly complicates things. Look for example
at psmouse driver - it can't just reinitialize the hardware, it also has to
make sure that device connected to the port is the same device there was
before suspending. And if it is not the same we still have to go though
deardown and re-creating input device to make sure that it reports correct
capabilities to userspace. Again, I would _love_ just to unbind the driver
and have it bind again after resume.

"Full" resume is only required when you have to maintain full state of the
device in question (like a drive may have outstanding requests to complete).
With some devices we can safely drop all outstanding requests.

-- 
Dmitry

      parent reply	other threads:[~2005-12-23 18:32 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-22 14:28 Hotplug events during sleep transition Alan Stern
2005-12-22 14:34 ` Pavel Machek
2005-12-22 18:20   ` Dmitry Torokhov
2005-12-22 20:52     ` Patrick Mochel
2005-12-22 20:56       ` Randy.Dunlap
2005-12-22 22:13       ` Alan Stern
2005-12-23  3:49         ` Patrick Mochel
2005-12-23  3:52           ` Dmitry Torokhov
2005-12-23 15:20             ` Alan Stern
2005-12-23 15:35               ` Patrick Mochel
2005-12-23 16:52                 ` Alan Stern
2005-12-23 17:20                   ` Pavel Machek
2005-12-23 21:22                     ` Alan Stern
2005-12-23 21:28                       ` Greg KH
2005-12-23 22:09                         ` Nigel Cunningham
2005-12-23 22:31                           ` Pavel Machek
2005-12-23 22:40                             ` Nigel Cunningham
2005-12-23 22:48                               ` Pavel Machek
2005-12-23 22:57                                 ` Nigel Cunningham
2005-12-24  0:29                                 ` Nigel Cunningham
2005-12-24 15:11                         ` Alan Stern
2005-12-24 15:28                           ` Pavel Machek
2005-12-24 17:02                           ` Greg KH
2005-12-23 21:28                       ` Pavel Machek
2005-12-23 19:40                   ` Greg KH
2005-12-24  0:23                   ` Patrick Mochel
2005-12-25  2:56                     ` Alan Stern
2005-12-25  8:53                       ` Pavel Machek
2005-12-25 16:43                         ` Alan Stern
2005-12-25 16:52                           ` Dmitry Torokhov
2005-12-25 19:54                             ` Pavel Machek
2005-12-25 19:52                           ` Pavel Machek
2005-12-26  3:53                             ` Alan Stern
2005-12-26 21:20                       ` Patrick Mochel
2005-12-26 22:50                         ` Dmitry Torokhov
2005-12-26 23:01                           ` Alan Stern
2005-12-27 21:45                             ` Dmitry Torokhov
2005-12-27 22:08                               ` Pavel Machek
2005-12-27 22:21                                 ` Dmitry Torokhov
2005-12-27 22:31                                   ` Pavel Machek
2005-12-27 22:39                                     ` Dmitry Torokhov
2005-12-27 22:44                                       ` Pavel Machek
2005-12-29  2:07                               ` Alan Stern
2005-12-27 21:09                           ` Patrick Mochel
2005-12-27 21:51                             ` Dmitry Torokhov
2005-12-28  4:36                               ` Patrick Mochel
2005-12-28  6:11                                 ` Dmitry Torokhov
2005-12-28 10:59                                 ` Rafael J. Wysocki
2005-12-29  2:18                                   ` Alan Stern
2005-12-29  2:55                                     ` Nigel Cunningham
2005-12-29 11:29                                       ` Rafael J. Wysocki
2005-12-30 17:46                                       ` Alan Stern
2006-01-04 23:31                                     ` Pavel Machek
2006-01-05 16:07                                       ` Alan Stern
2006-01-05 19:05                                         ` Pavel Machek
2005-12-29  2:13                                 ` Alan Stern
2005-12-29  2:10                               ` Alan Stern
2005-12-29  5:20                                 ` Dmitry Torokhov
2005-12-30 18:26                                   ` Alan Stern
2005-12-30 19:18                                     ` Dmitry Torokhov
2005-12-30 19:26                                       ` Alan Stern
2005-12-30 19:42                                         ` Dmitry Torokhov
2005-12-30 20:13                                           ` Alan Stern
2005-12-29  2:02                             ` Alan Stern
2005-12-30 18:34                               ` Patrick Mochel
2005-12-30 19:21                                 ` Alan Stern
2006-01-02 23:49                                   ` Patrick Mochel
2005-12-26 23:25                         ` Alan Stern
2005-12-23 18:32                 ` Dmitry Torokhov [this message]

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=200512231332.16777.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=linux-pm@lists.osdl.org \
    --cc=mochel@digitalimplant.org \
    /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