summaryrefslogtreecommitdiff
path: root/drivers/pcmcia/yenta_socket.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-11-03 10:54:58 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-11-09 16:23:17 -0800
commitee2c54041db5404353aa768ba1ec6e4fbda7ef5f (patch)
tree7f9a26f32527885aa3f55fd0a4046839ca38886e /drivers/pcmcia/yenta_socket.c
parent54fb902e50fee7b3c39d31853805f849edfdd62e (diff)
PM / yenta: Split resume into early and late parts (rev. 4)
commit 9905d1b411946fb3fb228e8c6529fd94afda8a92 upstream. Commit 0c570cdeb8fdfcb354a3e9cd81bfc6a09c19de0c (PM / yenta: Fix cardbus suspend/resume regression) caused resume to fail on systems with two CardBus bridges. While the exact nature of the failure is not known at the moment, it can be worked around by splitting the yenta resume into an early part, executed during the early phase of resume, that will only resume the socket and power it up if there was a card in it during suspend, and a late part, executed during "regular" resume, that will carry out all of the remaining yenta resume operations. Fixes http://bugzilla.kernel.org/show_bug.cgi?id=14334, which is a listed regression from 2.6.31. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Dominik Brodowski <linux@dominikbrodowski.net> Reported-by: Stephen J. Gowdy <gowdy@cern.ch> Tested-by: Jose Marino <braket@hotmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pcmcia/yenta_socket.c')
-rw-r--r--drivers/pcmcia/yenta_socket.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index f728a459934d..bcebffb54b25 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -1275,16 +1275,26 @@ static int yenta_dev_resume_noirq(struct device *dev)
if (socket->type && socket->type->restore_state)
socket->type->restore_state(socket);
- return pcmcia_socket_dev_resume(dev);
+ pcmcia_socket_dev_early_resume(dev);
+ return 0;
+}
+
+static int yenta_dev_resume(struct device *dev)
+{
+ pcmcia_socket_dev_late_resume(dev);
+ return 0;
}
static struct dev_pm_ops yenta_pm_ops = {
.suspend_noirq = yenta_dev_suspend_noirq,
.resume_noirq = yenta_dev_resume_noirq,
+ .resume = yenta_dev_resume,
.freeze_noirq = yenta_dev_suspend_noirq,
.thaw_noirq = yenta_dev_resume_noirq,
+ .thaw = yenta_dev_resume,
.poweroff_noirq = yenta_dev_suspend_noirq,
.restore_noirq = yenta_dev_resume_noirq,
+ .restore = yenta_dev_resume,
};
#define YENTA_PM_OPS (&yenta_pm_ops)