aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2008-12-06 09:09:08 -0500
committerTakashi Iwai <tiwai@suse.de>2008-12-07 04:45:32 -0500
commit32e176c14d7a425b681ef003c9061001ddb7fc7b (patch)
treea1b7f93172e5739e741d8129f80a6ce35530280f /sound/pci
parent061e41fdb5047b1fb161e89664057835935ca1d2 (diff)
Sound: hda - Restore PCI configuration space with interrupts off
Move the restoration of the standard PCI configuration registers in the snd_hda_intel driver to a ->resume_early() callback executed with interrupts disabled, since doing that with interrupts enabled may lead to problems in some cases. This patch addresses the regression from 2.6.26 tracked as http://bugzilla.kernel.org/show_bug.cgi?id=12121 . Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_intel.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 35722ec920cb..a06b0538fc90 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1951,13 +1951,16 @@ static int azx_suspend(struct pci_dev *pci, pm_message_t state)
1951 return 0; 1951 return 0;
1952} 1952}
1953 1953
1954static int azx_resume_early(struct pci_dev *pci)
1955{
1956 return pci_restore_state(pci);
1957}
1958
1954static int azx_resume(struct pci_dev *pci) 1959static int azx_resume(struct pci_dev *pci)
1955{ 1960{
1956 struct snd_card *card = pci_get_drvdata(pci); 1961 struct snd_card *card = pci_get_drvdata(pci);
1957 struct azx *chip = card->private_data; 1962 struct azx *chip = card->private_data;
1958 1963
1959 pci_set_power_state(pci, PCI_D0);
1960 pci_restore_state(pci);
1961 if (pci_enable_device(pci) < 0) { 1964 if (pci_enable_device(pci) < 0) {
1962 printk(KERN_ERR "hda-intel: pci_enable_device failed, " 1965 printk(KERN_ERR "hda-intel: pci_enable_device failed, "
1963 "disabling device\n"); 1966 "disabling device\n");
@@ -2465,6 +2468,7 @@ static struct pci_driver driver = {
2465 .remove = __devexit_p(azx_remove), 2468 .remove = __devexit_p(azx_remove),
2466#ifdef CONFIG_PM 2469#ifdef CONFIG_PM
2467 .suspend = azx_suspend, 2470 .suspend = azx_suspend,
2471 .resume_early = azx_resume_early,
2468 .resume = azx_resume, 2472 .resume = azx_resume,
2469#endif 2473#endif
2470}; 2474};