All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw-KKrjLPT3xs0@public.gmane.org>
To: Eric Sesterhenn <snakebyte-Mmb7MZpHnFY@public.gmane.org>
Cc: linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	vandrove-hnqZr3NxcozrBKCeMvbIDA@public.gmane.org,
	Kernel Testers
	<kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [linux-pm] Suspend regression, hang after matroxfb
Date: Fri, 30 Jan 2009 22:15:27 +0100	[thread overview]
Message-ID: <200901302215.28057.rjw@sisk.pl> (raw)
In-Reply-To: <20090130124643.GA8394@alice>

On Friday 30 January 2009, Eric Sesterhenn wrote:
> * Rafael J. Wysocki (rjw-KKrjLPT3xs0@public.gmane.org) wrote:
> > On Thursday 29 January 2009, Eric Sesterhenn wrote:
> > > hi,
> > > 
> > > on this box standby worked with 2.6.28, but is broken with 2.6.29-rc3.
> > > 
> > > Dmesg of startup
> > > http://www.cccmz.de/~snakebyte/200.log
> > > .config
> > > http://www.cccmz.de/~snakebyte/config_200
> > > 
> > > When testing the devices 
> > > 
> > > root@computer-desktop:/sys/power# echo devices > pm_test 
> > 
> > What happens if you replace 'devices' with 'core' ?
> 
> no change, it hangs after matroxfb
> 
> root@computer-desktop:/sys/power# echo core > pm_test 
> root@computer-desktop:/sys/power# echo standby > state
> 
[--snip--]
> 
> > If the same, what happens without the matroxfb driver?
> 
> It gets a bit further, suspend seems to complete,
> but hangs during resume

Please check if the appended patch helps.

Thanks,
Rafael

---
 drivers/pci/pci-driver.c |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

Index: linux-2.6/drivers/pci/pci-driver.c
===================================================================
--- linux-2.6.orig/drivers/pci/pci-driver.c
+++ linux-2.6/drivers/pci/pci-driver.c
@@ -445,11 +445,11 @@ static void pci_pm_default_suspend_gener
 	pci_save_state(pci_dev);
 }
 
-static void pci_pm_default_suspend(struct pci_dev *pci_dev)
+static void pci_pm_default_suspend(struct pci_dev *pci_dev, bool prepare)
 {
 	pci_pm_default_suspend_generic(pci_dev);
 
-	if (!pci_is_bridge(pci_dev))
+	if (prepare && !pci_is_bridge(pci_dev))
 		pci_prepare_to_sleep(pci_dev);
 
 	pci_fixup_device(pci_fixup_suspend, pci_dev);
@@ -509,7 +509,7 @@ static int pci_pm_suspend(struct device 
 	}
 
 	if (!error)
-		pci_pm_default_suspend(pci_dev);
+		pci_pm_default_suspend(pci_dev, drv && drv->pm);
 
 	return error;
 }
@@ -669,16 +669,13 @@ static int pci_pm_poweroff(struct device
 	if (pci_has_legacy_pm_support(pci_dev))
 		return pci_legacy_suspend(dev, PMSG_HIBERNATE);
 
-	if (!drv || !drv->pm)
-		return 0;
-
-	if (drv->pm->poweroff) {
+	if (drv && drv->pm && drv->pm->poweroff) {
 		error = drv->pm->poweroff(dev);
 		suspend_report_result(drv->pm->poweroff, error);
 	}
 
 	if (!error)
-		pci_pm_default_suspend(pci_dev);
+		pci_pm_default_suspend(pci_dev, drv && drv->pm);
 
 	return error;
 }

  parent reply	other threads:[~2009-01-30 21:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-29 12:58 Suspend regression, hang after matroxfb Eric Sesterhenn
2009-01-29 22:12 ` [linux-pm] " Rafael J. Wysocki
2009-01-30 12:46   ` Eric Sesterhenn
     [not found]   ` <200901292312.44884.rjw-KKrjLPT3xs0@public.gmane.org>
2009-01-30 12:46     ` [linux-pm] " Eric Sesterhenn
2009-01-30 21:15       ` Rafael J. Wysocki
2009-01-30 21:15       ` Rafael J. Wysocki [this message]
2009-01-30 22:03         ` Rafael J. Wysocki
2009-01-30 22:06         ` Eric Sesterhenn
     [not found]         ` <200901302215.28057.rjw-KKrjLPT3xs0@public.gmane.org>
2009-01-30 22:03           ` [linux-pm] " Rafael J. Wysocki
     [not found]             ` <200901302303.23143.rjw-KKrjLPT3xs0@public.gmane.org>
2009-01-30 22:09               ` Eric Sesterhenn
2009-01-30 22:09             ` Eric Sesterhenn
2009-01-30 22:06           ` [linux-pm] " Eric Sesterhenn
2009-01-30 22:27             ` Rafael J. Wysocki
     [not found]               ` <200901302327.50887.rjw-KKrjLPT3xs0@public.gmane.org>
2009-01-30 22:31                 ` Eric Sesterhenn
2009-01-30 22:59                   ` Rafael J. Wysocki
2009-01-30 23:21                     ` Alan Stern
     [not found]                     ` <200901302359.18309.rjw-KKrjLPT3xs0@public.gmane.org>
2009-01-30 23:21                       ` [linux-pm] " Alan Stern
2009-01-30 23:40                         ` Rafael J. Wysocki
     [not found]                         ` <Pine.LNX.4.44L0.0901301818400.2785-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2009-01-30 23:40                           ` [linux-pm] " Rafael J. Wysocki
2009-01-30 23:36                       ` Eric Sesterhenn
2009-01-30 23:36                     ` Eric Sesterhenn
2009-01-30 22:59                   ` Rafael J. Wysocki
2009-01-30 22:31               ` Eric Sesterhenn
2009-01-30 22:27             ` Rafael J. Wysocki
2009-01-29 22:12 ` Rafael J. Wysocki

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=200901302215.28057.rjw@sisk.pl \
    --to=rjw-kkrjlpt3xs0@public.gmane.org \
    --cc=kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=snakebyte-Mmb7MZpHnFY@public.gmane.org \
    --cc=vandrove-hnqZr3NxcozrBKCeMvbIDA@public.gmane.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 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.