[PATCH v2] pcmcia: db1xxx-ss: suspend/resume fix
Manuel Lauss
manuel.lauss at googlemail.com
Mon Mar 22 15:43:23 EDT 2010
This patch adds more pm method callbacks to the db1xxx-ss socket
driver, which fixes spurious interrupts and dead cards upon resume
from STR.
Tested on DB1200 with CF card (tons of spurious interrupts resulting
in card interrupt being disabled) and a 3c509 card (this one was
just dead after resume).
Signed-off-by: Manuel Lauss <manuel.lauss at gmail.com>
---
v2: remove uneeded .suspend callback (which was identical to
suspend_noirq).
drivers/pcmcia/db1xxx_ss.c | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/drivers/pcmcia/db1xxx_ss.c b/drivers/pcmcia/db1xxx_ss.c
index 9254ab0..2191654 100644
--- a/drivers/pcmcia/db1xxx_ss.c
+++ b/drivers/pcmcia/db1xxx_ss.c
@@ -559,21 +559,30 @@ static int __devexit db1x_pcmcia_socket_remove(struct platform_device *pdev)
}
#ifdef CONFIG_PM
-static int db1x_pcmcia_suspend(struct device *dev)
+static int db1x_pcmcia_suspend_noirq(struct device *dev)
{
return pcmcia_socket_dev_suspend(dev);
}
+static int db1x_pcmcia_resume_noirq(struct device *dev)
+{
+ pcmcia_socket_dev_early_resume(dev);
+ return 0;
+}
+
static int db1x_pcmcia_resume(struct device *dev)
{
- return pcmcia_socket_dev_resume(dev);
+ pcmcia_socket_dev_late_resume(dev);
+ return 0;
}
static struct dev_pm_ops db1x_pcmcia_pmops = {
.resume = db1x_pcmcia_resume,
- .suspend = db1x_pcmcia_suspend,
+ .resume_noirq = db1x_pcmcia_resume_noirq,
+ .suspend_noirq = db1x_pcmcia_suspend_noirq,
.thaw = db1x_pcmcia_resume,
- .freeze = db1x_pcmcia_suspend,
+ .thaw_noirq = db1x_pcmcia_resume_noirq,
+ .freeze = db1x_pcmcia_suspend_noirq,
};
#define DB1XXX_SS_PMOPS &db1x_pcmcia_pmops
--
1.7.0.2
More information about the linux-pcmcia
mailing list