|| ||"Rafael J. Wysocki" <email@example.com>|
|| ||Len Brown <firstname.lastname@example.org>,
Jesse Barnes <email@example.com>|
|| ||[RFC][PATCH 0/10] PCI PM: Make new suspend-resume callbacks carry out core operations|
|| ||Tue, 30 Dec 2008 23:33:44 +0100|
|| ||Pavel Machek <firstname.lastname@example.org>,
pm list <email@example.com>,
Matthew Wilcox <firstname.lastname@example.org>,
"H. Peter Anvin" <email@example.com>,
LKML <firstname.lastname@example.org>, Greg KH <email@example.com>,
Linux PCI <firstname.lastname@example.org>|
On Sunday 28 December 2008, Rafael J. Wysocki wrote:
> On Friday 19 December 2008, Rafael J. Wysocki wrote:
> > Hi Len,
> > The patch below adds the callbacks that save/restore the standard PCI config
> > registers, change the power state of the device etc. to the new suspend-resume
> > callbacks (which are not yet used by device drivers), so that the drivers don't
> > have to worry about these operations.
> > The saving and restoring of the standard PCI config registers is done with
> > interrupts off, the other things are done with interrupts enabled.
> > The patch should apply to the current linux-next tree.
> Below is a new version of the patch.
> Now, the standard config spaces of devices are restored with interrupts
> disabled, but only if the bridges the devices are behind are in D0. Otherwise,
> the operation is attempted again with interrupts enabled (presumably the
> bridge would be put into D0 before that happens).
> Also, pci_disable_device() is not called during resume and
> pci_reenable_device() is used to enable the devices that were enabled during
> suspend. This allows us to automatically call pci_set_master() for devices
> that were bus masters before suspend. Additionally, the pci_reenable_device()
> may be overriden by the driver, by disabling the device during suspend.
> Finally, bridges are handled a bit differently from the regular devices (they
> are not put into low power states during suspend and pci_enable_wake() is
> not called for them.
> The patch should apply on top of linux-next with the patch fixing
> pci_update_current_state() I sent yesterday
In the meantime I realized that the pcibios_enable_device() called from
pci_reenable_device() in the resume code path should be balanced by a "suspend"
call of the same kind.
Also, I decided to split the patch into a series of smaller patches with their
own changelogs to make it easier to follow the changes. Perhaps this way
it will be more clear what I'm after.
The patches should apply to linux-next with the patch from
http://marc.info/?l=linux-kernel&m=123039199607159&... on top.
Happy New Year to everyone,