PM / yenta: Fix cardbus suspend/resume regression
commit53024df259e37ad49ee3d1f3721d4cecdd7bc357
authorRafael J. Wysocki <rjw@sisk.pl>
Mon, 28 Sep 2009 22:11:03 +0000 (29 00:11 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Oct 2009 16:31:48 +0000 (5 09:31 -0700)
tree1430fdd300ec0567b150fa257792185bda81d484
parent2c2c7096066df8035a4bcdfacd1ee5e4d3fb2347
PM / yenta: Fix cardbus suspend/resume regression

commit 0c570cdeb8fdfcb354a3e9cd81bfc6a09c19de0c upstream.

Since 2.6.29 the PCI PM core have been restoring the standard
configuration registers of PCI devices in the early phase of
resume.  In particular, PCI devices without drivers have been handled
this way since commit 355a72d75b3b4f4877db4c9070c798238028ecb5
(PCI: Rework default handling of suspend and resume).  Unfortunately,
this leads to post-resume problems with CardBus devices which cannot
be accessed in the early phase of resume, because the sockets they
are on have not been woken up yet at that point.

To solve this problem, move the yenta socket resume to the early
phase of resume and, analogously, move the suspend of it to the late
phase of suspend.  Additionally, remove some unnecessary PCI code
from the yenta socket's resume routine.

Fixes http://bugzilla.kernel.org/show_bug.cgi?id=13092, which is a
post-2.6.28 regression.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Florian <fs-kernelbugzilla@spline.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pcmcia/yenta_socket.c