Skip to content

Commit

Permalink
ibmveth: Add suspend/resume support
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
bjking1 authored and davem330 committed May 18, 2010
1 parent 0771275 commit e7a3af5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/net/ibmveth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -1588,13 +1589,23 @@ 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"},
{ "", "" }
};
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,
Expand All @@ -1603,6 +1614,7 @@ static struct vio_driver ibmveth_driver = {
.driver = {
.name = ibmveth_driver_name,
.owner = THIS_MODULE,
.pm = &ibmveth_pm_ops,
}
};

Expand Down

0 comments on commit e7a3af5

Please sign in to comment.