mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Giridhar Pemmasani <giri@lmc.cs.sunysb.edu>
To: linux-kernel@vger.kernel.org
Cc: alsa-user@lists.sourceforge.net, alsa-devel@lists.sourceforge.net
Subject: patch to make suspend/resume work
Date: Sun, 18 Apr 2004 01:53:55 -0400	[thread overview]
Message-ID: <20040418055415.8FE2077A2B@mail.lmc.cs.sunysb.edu> (raw)

[-- 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

             reply	other threads:[~2004-04-18  5:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-18  5:53 Giridhar Pemmasani [this message]
2004-04-20 13:50 ` Pavel Machek
2004-04-22 20:02   ` Giridhar Pemmasani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040418055415.8FE2077A2B@mail.lmc.cs.sunysb.edu \
    --to=giri@lmc.cs.sunysb.edu \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=alsa-user@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®