On Friday 30 January 2009, Eric Sesterhenn wrote:
> * Rafael J. Wysocki ([email protected]) 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
> > >
> > > r...@computer-desktop:/sys/power# echo devices > pm_test
> >
> > What happens if you replace 'devices' with 'core' ?
>
> no change, it hangs after matroxfb
>
> r...@computer-desktop:/sys/power# echo core > pm_test
> r...@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;
}
--
To unsubscribe from this list: send the line "unsubscribe kernel-testers" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html