All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: "Rafael J. Wysocki" <rjw@suse.com>
Cc: akpm@linux-foundation.org,
	Linux-pm mailing list <linux-pm@lists.linux-foundation.org>,
	Jiri Slaby <jirislaby@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]
Date: Wed, 30 Mar 2011 17:19:54 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1103301707210.2085-100000__25794.7062993937$1301577970$gmane$org@iolanthe.rowland.org> (raw)
In-Reply-To: <201103302202.04025.rjw@suse.com>

On Wed, 30 Mar 2011, Rafael J. Wysocki wrote:

> > Rafael, this does seem to be a general problem.  Suppose a new device
> > gets connected while the system is suspended.  How is the driver's
> > probe method supposed to cope if it gets called while userspace is
> > still frozen but it needs to load some firmware?
> > 
> > Is the answer that probing should always be delayed until after tasks
> > are thawed?  There must be lots of subsystems which would have trouble 
> > doing that, although we ought to be able to implement delayed probing 
> > from within the driver core easily enough.
> 
> I don't know how to solve that.
> 
> First off, the prepare routines of drivers that need to load firmware during
> resume probably should preload the firmware for the devices present during the
> suspend.

That's okay for drivers that are bound to a device before the suspend 
starts.  But we also need to handle new devices added while the system 
was asleep.

> Second, I don't generally think drivers should probe for devices during resume.
> I guess the delayed probing would be the cleanest appoach here.

Here's the difficulty.  Normally the USB subsystem does use delayed
probing -- in fact, probing is done in a freezable thread.  However
this is a special case.  Not all USB drivers support suspend/resume;
those that don't get unbound during suspend and then rebound during
resume.  The rebinding occurs in the "complete" phase of the resume,
before tasks are thawed.

I suppose the rebinding could be delayed.  It would be better to fix
the USB DVB drivers, though, by adding PM support.  But there's a bunch
of them in drivers/media/dvb/dvb-usb, and AFAICS they would all need to
be fixed.  And I have no idea of what changes they would need.

Do you have any better suggestions?

Alan Stern

  parent reply	other threads:[~2011-03-30 21:19 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-03  0:34 mmotm 2010-12-02-16-34 uploaded akpm
2010-12-03  0:34 ` akpm
2010-12-03 17:33 ` mmotm 2010-12-02-16-34 uploaded (acpi_video) Randy Dunlap
2010-12-03 17:37 ` mmotm 2010-12-02-16-34 uploaded (netfilter-related) Randy Dunlap
2010-12-03 21:43 ` mmotm 2010-12-02-16-34 uploaded Zimny Lech
2010-12-03 21:43   ` Zimny Lech
2010-12-04  0:39 ` Stephen Rothwell
2010-12-06 17:11   ` Randy Dunlap
2010-12-06 17:11     ` Randy Dunlap
2010-12-05  8:25 ` Resume hangs [was: mmotm 2010-12-02-16-34 uploaded] Jiri Slaby
2010-12-05 13:08   ` Rafael J. Wysocki
2010-12-13 10:04     ` Jiri Slaby
2010-12-13 10:04     ` Jiri Slaby
2010-12-13 21:10       ` Rafael J. Wysocki
2010-12-13 21:10       ` Rafael J. Wysocki
2010-12-14 22:08         ` Jiri Slaby
2010-12-14 22:22           ` Rafael J. Wysocki
2010-12-14 22:22           ` Rafael J. Wysocki
2011-01-06 14:18             ` Jiri Slaby
2011-01-06 14:18             ` Jiri Slaby
2011-01-20 15:23               ` Jiri Slaby
2011-01-20 15:23               ` Jiri Slaby
2011-01-20 21:02                 ` Rafael J. Wysocki
2011-01-21  9:16                   ` Jiri Slaby
2011-01-21  9:16                   ` Jiri Slaby
2011-01-31 21:37                   ` Jiri Slaby
2011-01-31 21:40                     ` Jiri Slaby
2011-01-31 21:40                     ` Jiri Slaby
2011-01-31 22:00                     ` Rafael J. Wysocki
2011-01-31 22:00                     ` Rafael J. Wysocki
2011-02-04 18:33                       ` Jiri Slaby
2011-02-04 19:33                         ` [linux-pm] " Alan Stern
2011-02-04 19:38                           ` Jiri Slaby
2011-02-04 19:38                           ` [linux-pm] " Jiri Slaby
2011-02-04 20:07                             ` Alan Stern
2011-02-04 20:07                             ` [linux-pm] " Alan Stern
2011-02-22  8:45                           ` Jiri Slaby
2011-02-22  8:45                           ` [linux-pm] " Jiri Slaby
2011-02-22 15:36                             ` Alan Stern
2011-02-23 11:58                               ` Jiri Slaby
2011-02-23 11:58                               ` [linux-pm] " Jiri Slaby
2011-02-23 15:59                                 ` Alan Stern
2011-02-23 15:59                                 ` Alan Stern
2011-02-24 18:41                               ` [linux-pm] " Jiri Slaby
2011-02-24 18:41                               ` Jiri Slaby
2011-03-08  9:13                               ` Jiri Slaby
2011-03-08  9:13                               ` [linux-pm] " Jiri Slaby
2011-03-08 19:25                                 ` Rafael J. Wysocki
2011-03-08 20:31                                   ` Jiri Slaby
2011-03-08 22:12                                     ` Rafael J. Wysocki
2011-03-08 22:12                                     ` [linux-pm] " Rafael J. Wysocki
2011-03-08 22:14                                       ` Jiri Slaby
2011-03-08 22:15                                         ` Rafael J. Wysocki
2011-03-08 22:15                                         ` [linux-pm] " Rafael J. Wysocki
2011-03-08 22:16                                         ` Rafael J. Wysocki
2011-03-08 22:18                                           ` Jiri Slaby
2011-03-08 22:18                                           ` Jiri Slaby
2011-03-08 22:16                                         ` Rafael J. Wysocki
2011-03-08 22:14                                       ` Jiri Slaby
2011-03-08 20:31                                   ` Jiri Slaby
2011-03-08 19:25                                 ` Rafael J. Wysocki
2011-03-30 14:11                               ` [linux-pm] " Jiri Slaby
2011-03-30 15:10                                 ` Alan Stern
2011-03-30 20:02                                   ` Rafael J. Wysocki
2011-03-30 20:02                                   ` [linux-pm] " Rafael J. Wysocki
2011-03-30 21:19                                     ` Alan Stern
2011-03-30 21:19                                     ` Alan Stern [this message]
2011-03-30 15:10                                 ` Alan Stern
2011-03-30 14:11                               ` Jiri Slaby
2011-02-22 15:36                             ` Alan Stern
2011-02-04 19:33                         ` Alan Stern
2011-02-04 18:33                       ` Jiri Slaby
2011-01-31 21:37                   ` Jiri Slaby
2011-01-20 21:02                 ` Rafael J. Wysocki
2010-12-14 22:08         ` Jiri Slaby
2010-12-05 13:08   ` Rafael J. Wysocki
2010-12-05  8:25 ` Jiri Slaby

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='Pine.LNX.4.44L0.1103301707210.2085-100000__25794.7062993937$1301577970$gmane$org@iolanthe.rowland.org' \
    --to=stern@rowland.harvard.edu \
    --cc=akpm@linux-foundation.org \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=rjw@suse.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.