[PATCH] pcmcia: db1xxx-ss: suspend/resume fix
Manuel Lauss
manuel.lauss at googlemail.com
Tue Mar 9 14:45:29 EST 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>
---
drivers/pcmcia/db1xxx_ss.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/drivers/pcmcia/db1xxx_ss.c b/drivers/pcmcia/db1xxx_ss.c
index 9254ab0..8b49e49 100644
--- a/drivers/pcmcia/db1xxx_ss.c
+++ b/drivers/pcmcia/db1xxx_ss.c
@@ -559,21 +559,31 @@ 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 = db1x_pcmcia_suspend_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