From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753198AbXDQKJK (ORCPT ); Tue, 17 Apr 2007 06:09:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753250AbXDQKJK (ORCPT ); Tue, 17 Apr 2007 06:09:10 -0400 Received: from mx1.suse.de ([195.135.220.2]:53804 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753198AbXDQKJJ (ORCPT ); Tue, 17 Apr 2007 06:09:09 -0400 Date: Tue, 17 Apr 2007 12:09:04 +0200 Message-ID: From: Takashi Iwai To: Chuck Ebbert Cc: Adrian Bunk , Andrew Morton , perex@suse.cz, Michal Piotrowski , linux-kernel Subject: Re: [1/2] 2.6.21-rc7: known regressions In-Reply-To: <4623EE59.7090005@redhat.com> References: <20070416003714.GL3691@stusta.de> <4623EE59.7090005@redhat.com> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta27) (fiddleheads) (+CVS-20060704) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org At Mon, 16 Apr 2007 17:44:57 -0400, Chuck Ebbert wrote: > > Adrian Bunk wrote: > > > This email lists some known regressions in Linus' tree compared to 2.6.20. > > > > Subject : snd_intel8x0: divide error: 0000 > > References : http://lkml.org/lkml/2007/3/5/252 > > Submitter : Michal Piotrowski > > Status : unknown > > > > Oops is in sound/pci/intel8x0.c::snd_intel8x0_update(), part of > the interrupt handler: > > Line 751: > > ichdev->position += step * ichdev->fragsize1; > if (! chip->in_measurement) > ichdev->position %= ichdev->size; > > ichdev->size is 0. Interrupt happened upon request_irq(). > > Does chip->in_measurement need to be reset because this is a > crashdump kernel? No, the problem seems to be the timing of request_irq() and the initialization of hardware. The irq handler shouldn't get called there at all. How about the patch below? Takashi diff -r 4b6ed4ef4820 sound/pci/intel8x0.c --- a/sound/pci/intel8x0.c Mon Apr 16 19:20:17 2007 +0200 +++ b/sound/pci/intel8x0.c Tue Apr 17 11:02:49 2007 +0200 @@ -2493,6 +2493,7 @@ static int intel8x0_resume(struct pci_de return -EIO; } pci_set_master(pci); + snd_intel8x0_chip_init(chip, 0); if (request_irq(pci->irq, snd_intel8x0_interrupt, IRQF_SHARED, card->shortname, chip)) { printk(KERN_ERR "intel8x0: unable to grab IRQ %d, " @@ -2502,7 +2503,6 @@ static int intel8x0_resume(struct pci_de } chip->irq = pci->irq; synchronize_irq(chip->irq); - snd_intel8x0_chip_init(chip, 0); /* re-initialize mixer stuff */ if (chip->device_type == DEVICE_INTEL_ICH4 && !spdif_aclink) { @@ -2862,16 +2862,7 @@ static int __devinit snd_intel8x0_create ICH_REG_ALI_INTERRUPTSR : ICH_REG_GLOB_STA; chip->int_sta_mask = int_sta_masks; - /* request irq after initializaing int_sta_mask, etc */ - if (request_irq(pci->irq, snd_intel8x0_interrupt, - IRQF_SHARED, card->shortname, chip)) { - snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); - snd_intel8x0_free(chip); - return -EBUSY; - } - chip->irq = pci->irq; pci_set_master(pci); - synchronize_irq(chip->irq); switch(chip->device_type) { case DEVICE_INTEL_ICH4: @@ -2900,6 +2891,15 @@ static int __devinit snd_intel8x0_create snd_intel8x0_free(chip); return err; } + + /* request irq after initializaing int_sta_mask, etc */ + if (request_irq(pci->irq, snd_intel8x0_interrupt, + IRQF_SHARED, card->shortname, chip)) { + snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); + snd_intel8x0_free(chip); + return -EBUSY; + } + chip->irq = pci->irq; if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { snd_intel8x0_free(chip);