From: Takashi Iwai Subject: Re: 2.6.18-rc5-mm1: BUG in pci_disable_msi on attempts to rmmod snd_hda_intel (64-bit kernel) Date: Thu, 07 Sep 2006 15:17:45 +0200 Message-ID: References: <200609062259.53465.rjw@sisk.pl> <200609071229.55655.rjw@sisk.pl> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (ns2.suse.de [195.135.220.15]) by alsa.jcu.cz (ALSA's E-mail Delivery System) with ESMTP id 6D3001AA for ; Thu, 7 Sep 2006 15:17:46 +0200 (MEST) In-Reply-To: <200609071229.55655.rjw@sisk.pl> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: "Rafael J. Wysocki" Cc: Andrew Morton , Greg KH , alsa-devel@alsa-project.org, Andi Kleen List-Id: alsa-devel@alsa-project.org At Thu, 7 Sep 2006 12:29:54 +0200, Rafael J. Wysocki wrote: > > On Thursday, 7 September 2006 11:20, Takashi Iwai wrote: > > At Wed, 6 Sep 2006 22:59:53 +0200, > > Rafael J. Wysocki wrote: > > > > > > Hi, > > > > > > I get the appended BUG when I try to rmmod snd_hda_intel on 2.6.18-rc5-mm1 > > > (the box is an HPC nx6325). > > > > > > The driver also breaks the suspend to disk (causes an oops to appear during > > > the suspend phase, but I haven't been able to catch it yet). > > > > Could you try the patch below? It's pending on my local tree for > > testing... Also, you can use disable_msi=1 option to avoid MSI. > > The patch fixes the rmmod issue. > > Also setting disable_msi=1 fixes the suspend issue. > > If the MSI is not disabled, the suspend fails with an oops (on an attempt to > access disk after the resume-during-suspend), but this will hopefully get > fixed with the new MSI code. The PM problem might be fixed by the patch below. Give it a try. Takashi diff -r 4f27a5064cda sound/pci/hda/hda_intel.c --- a/sound/pci/hda/hda_intel.c Thu Sep 07 12:40:00 2006 +0200 +++ b/sound/pci/hda/hda_intel.c Thu Sep 07 15:20:56 2006 +0200 @@ -1375,6 +1375,10 @@ static int azx_suspend(struct pci_dev *p snd_pcm_suspend_all(chip->pcm[i]); snd_hda_suspend(chip->bus, state); azx_free_cmd_io(chip); + if (chip->irq >= 0) + free_irq(chip->irq, chip); + if (!disable_msi) + pci_disable_msi(chip->pci); pci_disable_device(pci); pci_save_state(pci); return 0; @@ -1387,6 +1391,12 @@ static int azx_resume(struct pci_dev *pc pci_restore_state(pci); pci_enable_device(pci); + if (!disable_msi) + pci_enable_msi(pci); + /* FIXME: need proper error handling */ + request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED, + "HDA Intel", chip); + chip->irq = pci->irq; pci_set_master(pci); azx_init_chip(chip); snd_hda_resume(chip->bus); ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642