diff options
Diffstat (limited to 'drivers/scsi/ibmvscsi/ibmvscsi.c')
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvscsi.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index e3a18e0ef276..dc1bcbe3b176 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c | |||
@@ -71,6 +71,7 @@ | |||
71 | #include <linux/dma-mapping.h> | 71 | #include <linux/dma-mapping.h> |
72 | #include <linux/delay.h> | 72 | #include <linux/delay.h> |
73 | #include <linux/of.h> | 73 | #include <linux/of.h> |
74 | #include <linux/pm.h> | ||
74 | #include <asm/firmware.h> | 75 | #include <asm/firmware.h> |
75 | #include <asm/vio.h> | 76 | #include <asm/vio.h> |
76 | #include <scsi/scsi.h> | 77 | #include <scsi/scsi.h> |
@@ -1991,6 +1992,19 @@ static int ibmvscsi_remove(struct vio_dev *vdev) | |||
1991 | } | 1992 | } |
1992 | 1993 | ||
1993 | /** | 1994 | /** |
1995 | * ibmvscsi_resume: Resume from suspend | ||
1996 | * @dev: device struct | ||
1997 | * | ||
1998 | * We may have lost an interrupt across suspend/resume, so kick the | ||
1999 | * interrupt handler | ||
2000 | */ | ||
2001 | static int ibmvscsi_resume(struct device *dev) | ||
2002 | { | ||
2003 | struct ibmvscsi_host_data *hostdata = dev_get_drvdata(dev); | ||
2004 | return ibmvscsi_ops->resume(hostdata); | ||
2005 | } | ||
2006 | |||
2007 | /** | ||
1994 | * ibmvscsi_device_table: Used by vio.c to match devices in the device tree we | 2008 | * ibmvscsi_device_table: Used by vio.c to match devices in the device tree we |
1995 | * support. | 2009 | * support. |
1996 | */ | 2010 | */ |
@@ -2000,6 +2014,10 @@ static struct vio_device_id ibmvscsi_device_table[] __devinitdata = { | |||
2000 | }; | 2014 | }; |
2001 | MODULE_DEVICE_TABLE(vio, ibmvscsi_device_table); | 2015 | MODULE_DEVICE_TABLE(vio, ibmvscsi_device_table); |
2002 | 2016 | ||
2017 | static struct dev_pm_ops ibmvscsi_pm_ops = { | ||
2018 | .resume = ibmvscsi_resume | ||
2019 | }; | ||
2020 | |||
2003 | static struct vio_driver ibmvscsi_driver = { | 2021 | static struct vio_driver ibmvscsi_driver = { |
2004 | .id_table = ibmvscsi_device_table, | 2022 | .id_table = ibmvscsi_device_table, |
2005 | .probe = ibmvscsi_probe, | 2023 | .probe = ibmvscsi_probe, |
@@ -2008,6 +2026,7 @@ static struct vio_driver ibmvscsi_driver = { | |||
2008 | .driver = { | 2026 | .driver = { |
2009 | .name = "ibmvscsi", | 2027 | .name = "ibmvscsi", |
2010 | .owner = THIS_MODULE, | 2028 | .owner = THIS_MODULE, |
2029 | .pm = &ibmvscsi_pm_ops, | ||
2011 | } | 2030 | } |
2012 | }; | 2031 | }; |
2013 | 2032 | ||