linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Shaohua Li <shaohua.li@intel.com>
Cc: Jiri Slaby <jirislaby@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	matthew@wil.cx,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-pm@lists.linux-foundation.org, drzeus@drzeus.cx,
	linux-acpi@vger.kernel.org, Adam Belay <ambx1@neo.rr.com>,
	Matthieu Castet <castet.matthieu@free.fr>,
	Len Brown <lenb@kernel.org>
Subject: Re: RFC: PNP: do not stop/start devices in suspend/resume path
Date: Mon, 10 Dec 2007 16:26:34 -0700	[thread overview]
Message-ID: <200712101626.35491.bjorn.helgaas@hp.com> (raw)
In-Reply-To: <1197011615.21100.1.camel@sli10-desk.sh.intel.com>

On Friday 07 December 2007 12:13:35 am Shaohua Li wrote:
> On Thu, 2007-12-06 at 02:24 +0800, Bjorn Helgaas wrote:
> > Index: linux-mm/drivers/pnp/driver.c
> > ===================================================================
> > --- linux-mm.orig/drivers/pnp/driver.c  2007-11-30 13:58:25.000000000
> > -0700
> > +++ linux-mm/drivers/pnp/driver.c       2007-12-03 09:58:35.000000000
> > -0700
> > @@ -161,13 +161,6 @@
> >                         return error;
> >         }
> > 
> > -       if (!(pnp_drv->flags & PNP_DRIVER_RES_DO_NOT_CHANGE) &&
> > -           pnp_can_disable(pnp_dev)) {
> > -               error = pnp_stop_dev(pnp_dev);
> > -               if (error)
> > -                       return error;
> > -       }
> > -
> >         if (pnp_dev->protocol && pnp_dev->protocol->suspend)
> >                 pnp_dev->protocol->suspend(pnp_dev, state);
> >         return 0;
> > @@ -177,7 +170,6 @@
> >  {
> >         struct pnp_dev *pnp_dev = to_pnp_dev(dev);
> >         struct pnp_driver *pnp_drv = pnp_dev->driver;
> > -       int error;
> > 
> >         if (!pnp_drv)
> >                 return 0;
> > @@ -185,12 +177,6 @@
> >         if (pnp_dev->protocol && pnp_dev->protocol->resume)
> >                 pnp_dev->protocol->resume(pnp_dev);
> > 
> > -       if (!(pnp_drv->flags & PNP_DRIVER_RES_DO_NOT_CHANGE)) {
> > -               error = pnp_start_dev(pnp_dev);
> > -               if (error)
> > -                       return error;
> > -       }
> > -
> I'd suggest keep pnp_start_dev here to prevent BIOS not or assign
> different resources after a resume.

The patch I currently have in -mm (http://lkml.org/lkml/2007/10/29/412)
merely requests resources in pnp_start_dev() and releases them in
pnp_stop_dev().  So if we remove pnp_stop_dev() but keep pnp_start_dev(),
I have to fix that patch to deal with things that may already be
reserved.

But I don't see any mention in the spec of running _SRS in the
sleep/wakup path, so I'm not convinced it's really necessary.
Section 7.4 mentions _TTS, _PTS, _GTS, etc., but not _SRS.

For devices, it looks like the intent is that BIOS should generate
notifications that cause OSPM to re-enumerate devices that might
have changed.  I'm pretty sure Linux is missing some of that code,
though, so I could believe that _SRS might help paper over that
deficiency.

What I'd really like to do is figure out how Windows uses _SRS and
do the same thing.

Bjorn

  reply	other threads:[~2007-12-10 23:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-22 21:41 WARNING: at kernel/resource.c:189 __release_resource Jiri Slaby
2007-11-27  6:05 ` Andrew Morton
2007-11-27 12:38   ` Matthew Wilcox
2007-11-29 23:40   ` Bjorn Helgaas
2007-11-30  0:42     ` Andrew Morton
2007-11-30 21:08       ` Bjorn Helgaas
2007-11-30 22:49         ` Jiri Slaby
2007-11-30 22:58           ` Bjorn Helgaas
2007-12-01  8:12             ` Jiri Slaby
2007-12-01 12:00               ` Jiri Slaby
2007-12-05 18:24                 ` RFC: PNP: do not stop/start devices in suspend/resume path Bjorn Helgaas
2007-12-05 18:50                   ` Matthew Wilcox
2007-12-06  1:07                   ` Rafael J. Wysocki
2007-12-06 23:25                   ` Bjorn Helgaas
2007-12-12  8:16                     ` Andrew Morton
2007-12-12 16:29                       ` Bjorn Helgaas
2007-12-13  8:26                     ` Pierre Ossman
2007-12-07  7:13                   ` RFC: " Shaohua Li
2007-12-10 23:26                     ` Bjorn Helgaas [this message]
2007-12-24  1:43                   ` do not stop/start devices in suspend/resume path: the SCSI case Stephane Ascoet
2007-12-24  3:21                     ` Bjorn Helgaas
2007-12-01 21:01     ` WARNING: at kernel/resource.c:189 __release_resource Pierre Ossman

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=200712101626.35491.bjorn.helgaas@hp.com \
    --to=bjorn.helgaas@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=ambx1@neo.rr.com \
    --cc=castet.matthieu@free.fr \
    --cc=drzeus@drzeus.cx \
    --cc=jirislaby@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=matthew@wil.cx \
    --cc=shaohua.li@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).