Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188300
b: refs/heads/master
c: b0f4d4c
h: refs/heads/master
v: v3
  • Loading branch information
Brian King authored and James Bottomley committed Mar 3, 2010
1 parent 9afca8a commit 5890120
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 64355b929dec0cb6271e4ac7834c9cf262961e40
refs/heads/master: b0f4d4cf12d0eaa0bd766686bba843fc105b6a60
27 changes: 27 additions & 0 deletions trunk/drivers/scsi/ibmvscsi/ibmvfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <linux/interrupt.h>
#include <linux/kthread.h>
#include <linux/of.h>
#include <linux/pm.h>
#include <linux/stringify.h>
#include <asm/firmware.h>
#include <asm/irq.h>
Expand Down Expand Up @@ -4735,6 +4736,27 @@ static int ibmvfc_remove(struct vio_dev *vdev)
return 0;
}

/**
* ibmvfc_resume - Resume from suspend
* @dev: device struct
*
* We may have lost an interrupt across suspend/resume, so kick the
* interrupt handler
*
*/
static int ibmvfc_resume(struct device *dev)
{
unsigned long flags;
struct ibmvfc_host *vhost = dev_get_drvdata(dev);
struct vio_dev *vdev = to_vio_dev(dev);

spin_lock_irqsave(vhost->host->host_lock, flags);
vio_disable_interrupts(vdev);
tasklet_schedule(&vhost->tasklet);
spin_unlock_irqrestore(vhost->host->host_lock, flags);
return 0;
}

/**
* ibmvfc_get_desired_dma - Calculate DMA resources needed by the driver
* @vdev: vio device struct
Expand All @@ -4755,6 +4777,10 @@ static struct vio_device_id ibmvfc_device_table[] __devinitdata = {
};
MODULE_DEVICE_TABLE(vio, ibmvfc_device_table);

static struct dev_pm_ops ibmvfc_pm_ops = {
.resume = ibmvfc_resume
};

static struct vio_driver ibmvfc_driver = {
.id_table = ibmvfc_device_table,
.probe = ibmvfc_probe,
Expand All @@ -4763,6 +4789,7 @@ static struct vio_driver ibmvfc_driver = {
.driver = {
.name = IBMVFC_NAME,
.owner = THIS_MODULE,
.pm = &ibmvfc_pm_ops,
}
};

Expand Down

0 comments on commit 5890120

Please sign in to comment.