Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264140AbUDRFyY (ORCPT ); Sun, 18 Apr 2004 01:54:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264142AbUDRFyY (ORCPT ); Sun, 18 Apr 2004 01:54:24 -0400 Received: from lmcgw.cs.sunysb.edu ([130.245.128.4]:59581 "EHLO mail.lmc.cs.sunysb.edu") by vger.kernel.org with ESMTP id S264140AbUDRFyQ (ORCPT ); Sun, 18 Apr 2004 01:54:16 -0400 Date: Sun, 18 Apr 2004 01:53:55 -0400 From: Giridhar Pemmasani To: linux-kernel@vger.kernel.org Cc: alsa-user@lists.sourceforge.net, alsa-devel@lists.sourceforge.net Subject: patch to make suspend/resume work User-Agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 MULE XEmacs/21.4 (patch 15) (Security Through Obscurity) (i386-debian-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="Multipart_Sun_Apr_18_01:53:55_2004-1" Message-Id: <20040418055415.8FE2077A2B@mail.lmc.cs.sunysb.edu> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1695 Lines: 57 --Multipart_Sun_Apr_18_01:53:55_2004-1 Content-Type: text/plain; charset=US-ASCII 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. --Multipart_Sun_Apr_18_01:53:55_2004-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="alsa-s3-fix" Content-Transfer-Encoding: 7bit --- 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; } --Multipart_Sun_Apr_18_01:53:55_2004-1 Content-Type: text/plain; charset=US-ASCII -- Giri --Multipart_Sun_Apr_18_01:53:55_2004-1-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/