]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Sound: hda - Restore PCI configuration space with interrupts off
authorRafael J. Wysocki <rjw@sisk.pl>
Sat, 6 Dec 2008 14:09:08 +0000 (15:09 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sun, 7 Dec 2008 09:45:32 +0000 (10:45 +0100)
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>
sound/pci/hda/hda_intel.c

index 35722ec920cb0ed556cee27e19ad44929d34bc61..a06b0538fc903e11dfc09ce8c467e840e0df442f 100644 (file)
@@ -1951,13 +1951,16 @@ static int azx_suspend(struct pci_dev *pci, pm_message_t state)
        return 0;
 }
 
+static int azx_resume_early(struct pci_dev *pci)
+{
+       return pci_restore_state(pci);
+}
+
 static int azx_resume(struct pci_dev *pci)
 {
        struct snd_card *card = pci_get_drvdata(pci);
        struct azx *chip = card->private_data;
 
-       pci_set_power_state(pci, PCI_D0);
-       pci_restore_state(pci);
        if (pci_enable_device(pci) < 0) {
                printk(KERN_ERR "hda-intel: pci_enable_device failed, "
                       "disabling device\n");
@@ -2465,6 +2468,7 @@ static struct pci_driver driver = {
        .remove = __devexit_p(azx_remove),
 #ifdef CONFIG_PM
        .suspend = azx_suspend,
+       .resume_early = azx_resume_early,
        .resume = azx_resume,
 #endif
 };