* patch to make suspend/resume work
@ 2004-04-18 5:53 Giridhar Pemmasani
2004-04-20 13:50 ` Pavel Machek
0 siblings, 1 reply; 3+ messages in thread
From: Giridhar Pemmasani @ 2004-04-18 5:53 UTC (permalink / raw)
To: linux-kernel; +Cc: alsa-user, alsa-devel
[-- Attachment #1: Type: text/plain, Size: 429 bytes --]
It seems that pci config space is messed up after resume for Intel
ICH4 audio controller (on Dell Latitude D600, but I notice that others
also complain about this problem). Consequently resume from S3 causes
oops with snd_intel8x0 module. If the module is removed before suspend
and loaded afterwards, I still get oops. The following simple patch
fixes the problem. With this, I can leave alsa untouched during
suspend/resume.
[-- Attachment #2: alsa-s3-fix --]
[-- Type: application/octet-stream, Size: 634 bytes --]
--- intel8x0.c.orig 2004-04-15 17:19:56.000000000 -0400
+++ intel8x0.c 2004-04-15 17:20:55.000000000 -0400
@@ -445,6 +445,7 @@
#ifdef CONFIG_PM
int in_suspend;
+ u32 pci_state[64 / sizeof(u32)];
#endif
};
@@ -2223,11 +2224,13 @@
{
intel8x0_t *chip = snd_magic_cast(intel8x0_t, pci_get_drvdata(dev), return -ENXIO);
intel8x0_suspend(chip);
+ pci_save_state(dev, chip->pci_state);
return 0;
}
static int snd_intel8x0_resume(struct pci_dev *dev)
{
intel8x0_t *chip = snd_magic_cast(intel8x0_t, pci_get_drvdata(dev), return -ENXIO);
+ pci_restore_state(dev, chip->pci_state);
intel8x0_resume(chip);
return 0;
}
[-- Attachment #3: Type: text/plain, Size: 11 bytes --]
--
Giri
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: patch to make suspend/resume work
2004-04-18 5:53 patch to make suspend/resume work Giridhar Pemmasani
@ 2004-04-20 13:50 ` Pavel Machek
2004-04-22 20:02 ` Giridhar Pemmasani
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2004-04-20 13:50 UTC (permalink / raw)
To: Giridhar Pemmasani; +Cc: linux-kernel, alsa-user, alsa-devel
Hi!
> It seems that pci config space is messed up after resume for Intel
> ICH4 audio controller (on Dell Latitude D600, but I notice that others
> also complain about this problem). Consequently resume from S3 causes
> oops with snd_intel8x0 module. If the module is removed before suspend
> and loaded afterwards, I still get oops. The following simple patch
> fixes the problem. With this, I can leave alsa untouched during
> suspend/resume.
>
Looks good to me. Probably more drivers need this...
--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: patch to make suspend/resume work
2004-04-20 13:50 ` Pavel Machek
@ 2004-04-22 20:02 ` Giridhar Pemmasani
0 siblings, 0 replies; 3+ messages in thread
From: Giridhar Pemmasani @ 2004-04-22 20:02 UTC (permalink / raw)
To: Pavel Machek; +Cc: linux-kernel, alsa-user, alsa-devel
On Tue, 20 Apr 2004 15:50:11 +0200, Pavel Machek <pavel@ucw.cz> said:
Pavel> Looks good to me. Probably more drivers need this...
Yes.
Sometime back (a few weeks?) Stefan Dosinger mailed (on acpi4linux
list?) about his PCI devices all giving oops on resume and to avoid,
he was using setpci to write back the config space the way it was
before suspend. If the drivers for those devices save/restored, then
they will probably work.
--
Giri
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-04-22 20:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-18 5:53 patch to make suspend/resume work Giridhar Pemmasani
2004-04-20 13:50 ` Pavel Machek
2004-04-22 20:02 ` Giridhar Pemmasani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®