Skip to contentSkip to conversation

Add pci_save_state() to ALSA

PATCH In review Martin Josefsson 2 participants 2 messages Nov 11, 2004 – Nov 12, 2004 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add pci_save_state() to ALSA

Hi

Some time ago, a patch was merged that removed pci_save_state() and pci_restore_state() from various drivers. That patch also added pci_restore_state() to sound/core/init.c but didn't add pci_save_state() anywhere.

My laptop doesn't resume (gets what I assume is an ACPI timeout and hangs solid) without this small obvious patch.

sound/core/init.c +2 -0
@@ -789,6 +789,8 @@ int snd_card_pci_suspend(struct pci_dev 
 		return 0;
 	if (card->power_state == SNDRV_CTL_POWER_D3hot)
 		return 0;
+	/* save the PCI config space */
+	pci_save_state(dev);
 	/* FIXME: correct state value? */
 	return card->pm_suspend(card, 0);
 }
Signature · 1 line
/Martin
#1 lore raw

At Thu, 11 Nov 2004 21:39:46 +0100,

Quoted 7 lines · Martin Josefsson

Hi

Some time ago, a patch was merged that removed pci_save_state() and pci_restore_state() from various drivers. That patch also added pci_restore_state() to sound/core/init.c but didn't add pci_save_state() anywhere.

pci_save_state() is called internally in drivers/pci/pci-driver.c:pci_device_suspend(), so it's redundant.

Quoted 2 lines

My laptop doesn't resume (gets what I assume is an ACPI timeout and hangs solid) without this small obvious patch.

I'm wondering how this can fix your problem...

Takashi

Quoted 16 lines
sound/core/init.c +2 -0
@@ -789,6 +789,8 @@ int snd_card_pci_suspend(struct pci_dev 
 		return 0;
 	if (card->power_state == SNDRV_CTL_POWER_D3hot)
 		return 0;
+	/* save the PCI config space */
+	pci_save_state(dev);
 	/* FIXME: correct state value? */
 	return card->pm_suspend(card, 0);
 }
Signature · 2 lines
-- 
/Martin