diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2008-12-06 09:07:59 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-01-07 14:12:38 -0500 |
commit | 90d25f246ddefbb743764f8d45ae97e545a6ee86 (patch) | |
tree | 68e6dc189098c38d9027a7cafe8fea52e784193e /drivers | |
parent | c70e0d9dfef3d826c8ae4f7544acc53887cb161d (diff) |
PCI: Suspend and resume PCI Express ports with interrupts disabled
I don't see why the suspend and resume of PCI Express ports should be
handled with interrupts enabled and it may even lead to problems in
some situations. For this reason, move the suspending and resuming
of PCI Express ports into ->suspend_late() and ->resume_early()
callbacks executed with interrupts disabled.
This patch addresses the regression from 2.6.26 tracked as
http://bugzilla.kernel.org/show_bug.cgi?id=12121 .
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/pcie/portdrv_pci.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index 584422da8d8b..0549fe2bdac9 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c | |||
@@ -50,7 +50,7 @@ static int pcie_portdrv_restore_config(struct pci_dev *dev) | |||
50 | } | 50 | } |
51 | 51 | ||
52 | #ifdef CONFIG_PM | 52 | #ifdef CONFIG_PM |
53 | static int pcie_portdrv_suspend(struct pci_dev *dev, pm_message_t state) | 53 | static int pcie_portdrv_suspend_late(struct pci_dev *dev, pm_message_t state) |
54 | { | 54 | { |
55 | int ret = pcie_port_device_suspend(dev, state); | 55 | int ret = pcie_port_device_suspend(dev, state); |
56 | 56 | ||
@@ -59,14 +59,14 @@ static int pcie_portdrv_suspend(struct pci_dev *dev, pm_message_t state) | |||
59 | return ret; | 59 | return ret; |
60 | } | 60 | } |
61 | 61 | ||
62 | static int pcie_portdrv_resume(struct pci_dev *dev) | 62 | static int pcie_portdrv_resume_early(struct pci_dev *dev) |
63 | { | 63 | { |
64 | pcie_portdrv_restore_config(dev); | 64 | pcie_portdrv_restore_config(dev); |
65 | return pcie_port_device_resume(dev); | 65 | return pcie_port_device_resume(dev); |
66 | } | 66 | } |
67 | #else | 67 | #else |
68 | #define pcie_portdrv_suspend NULL | 68 | #define pcie_portdrv_suspend_late NULL |
69 | #define pcie_portdrv_resume NULL | 69 | #define pcie_portdrv_resume_early NULL |
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | /* | 72 | /* |
@@ -282,8 +282,8 @@ static struct pci_driver pcie_portdriver = { | |||
282 | .probe = pcie_portdrv_probe, | 282 | .probe = pcie_portdrv_probe, |
283 | .remove = pcie_portdrv_remove, | 283 | .remove = pcie_portdrv_remove, |
284 | 284 | ||
285 | .suspend = pcie_portdrv_suspend, | 285 | .suspend_late = pcie_portdrv_suspend_late, |
286 | .resume = pcie_portdrv_resume, | 286 | .resume_early = pcie_portdrv_resume_early, |
287 | 287 | ||
288 | .err_handler = &pcie_portdrv_err_handler, | 288 | .err_handler = &pcie_portdrv_err_handler, |
289 | }; | 289 | }; |