]> git.baikalelectronics.ru Git - kernel.git/commit
virtio: pci: add PM notification handlers for restore, freeze, thaw, poweroff
authorAmit Shah <amit.shah@redhat.com>
Thu, 22 Dec 2011 11:28:26 +0000 (16:58 +0530)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 12 Jan 2012 05:14:44 +0000 (15:44 +1030)
commite8efb31ee3ebdc5a607772f538e1e8192ddac1f8
tree0f95d79a528809e169a742afeafddd041d275181
parentd0f9589ebbb2ccc47db5e21f72bfd1e031d08ae5
virtio: pci: add PM notification handlers for restore, freeze, thaw, poweroff

Handle thaw, restore and freeze notifications from the PM core.  Expose
these to individual virtio drivers that can quiesce and resume vq
operations.  For drivers not implementing the thaw() method, use the
restore method instead.

These functions also save device-specific data so that the device can be
put in pre-suspend state after resume, and disable and enable the PCI
device in the freeze and resume functions, respectively.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/virtio/virtio_pci.c
include/linux/virtio.h