diff options
author | Brian King <brking@linux.vnet.ibm.com> | 2010-05-07 08:56:08 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-17 17:09:10 -0700 |
commit | e7a3af5d8cd782b84e6ca4e4dcc8613be1a809f0 (patch) | |
tree | d723555192dbdb3aa6d8e2c750729fb9dcf1567e /drivers/net/ibmveth.c | |
parent | 0771275b25e84f568699a5d209c5e339ef83fa94 (diff) | |
download | op-kernel-dev-e7a3af5d8cd782b84e6ca4e4dcc8613be1a809f0.zip op-kernel-dev-e7a3af5d8cd782b84e6ca4e4dcc8613be1a809f0.tar.gz |
ibmveth: Add suspend/resume support
Adds support for resuming from suspend for IBM virtual ethernet devices.
We may have lost an interrupt over the suspend, so we just kick the
interrupt handler to process anything that is outstanding.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ibmveth.c')
-rw-r--r-- | drivers/net/ibmveth.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c index 3e4dead..941be84 100644 --- a/drivers/net/ibmveth.c +++ b/drivers/net/ibmveth.c @@ -45,6 +45,7 @@ #include <linux/init.h> #include <linux/delay.h> #include <linux/mm.h> +#include <linux/pm.h> #include <linux/ethtool.h> #include <linux/proc_fs.h> #include <linux/in.h> @@ -1588,6 +1589,12 @@ static struct kobj_type ktype_veth_pool = { .default_attrs = veth_pool_attrs, }; +static int ibmveth_resume(struct device *dev) +{ + struct net_device *netdev = dev_get_drvdata(dev); + ibmveth_interrupt(netdev->irq, netdev); + return 0; +} static struct vio_device_id ibmveth_device_table[] __devinitdata= { { "network", "IBM,l-lan"}, @@ -1595,6 +1602,10 @@ static struct vio_device_id ibmveth_device_table[] __devinitdata= { }; MODULE_DEVICE_TABLE(vio, ibmveth_device_table); +static struct dev_pm_ops ibmveth_pm_ops = { + .resume = ibmveth_resume +}; + static struct vio_driver ibmveth_driver = { .id_table = ibmveth_device_table, .probe = ibmveth_probe, @@ -1603,6 +1614,7 @@ static struct vio_driver ibmveth_driver = { .driver = { .name = ibmveth_driver_name, .owner = THIS_MODULE, + .pm = &ibmveth_pm_ops, } }; |