mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Cc: Chuck Ebbert <cebbert@redhat.com>, Adrian Bunk <bunk@stusta.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	perex@suse.cz, linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [1/2] 2.6.21-rc7: known regressions
Date: Fri, 20 Apr 2007 12:34:18 +0200	[thread overview]
Message-ID: <s5h7is7xrkl.wl%tiwai@suse.de> (raw)
In-Reply-To: <4627CB04.4060401@googlemail.com>

At Thu, 19 Apr 2007 22:03:16 +0200,
Michal Piotrowski wrote:
> 
> Hi Takashi,
> 
> Takashi Iwai napisał(a):
> > 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 <michal.k.k.piotrowski@gmail.com>
> >>> 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?
(snip)
> 
> This patch solves the problem for me. Thanks!

Good to hear!  I forgot the patch description and sign-off, so here it
is again:


[PATCH] ALSA: intel8x0 - Fix Oops in crash kernel

When intel8x0 driver is loaded in the crash kernel, it gets Oops
occasionally.  This is because the irq handler gets called before
the proper hardware initialization.  Now defer it after
snd_intel8x0_chip_init().

(reference: http://lkml.org/lkml/2007/3/5/252)

Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 sound/pci/intel8x0.c |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff -r 202af90f8e68 -r a3f021fd290c sound/pci/intel8x0.c
--- a/sound/pci/intel8x0.c	Thu Apr 19 15:22:56 2007 +0200
+++ b/sound/pci/intel8x0.c	Fri Apr 20 12:30:28 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);

  reply	other threads:[~2007-04-20 10:34 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-16  0:05 Linux 2.6.21-rc7 Linus Torvalds
2007-04-16  0:37 ` [1/2] 2.6.21-rc7: known regressions Adrian Bunk
2007-04-16 21:44   ` Chuck Ebbert
2007-04-17 10:09     ` Takashi Iwai
2007-04-19 20:03       ` Michal Piotrowski
2007-04-20 10:34         ` Takashi Iwai [this message]
2007-04-20 18:18           ` Andrew Morton
2007-04-20 18:26             ` Takashi Iwai
2007-04-23 10:19               ` Takashi Iwai
2007-04-16  0:37 ` [2/2] " Adrian Bunk
2007-04-16  0:54   ` Dave Jones
2007-04-16  1:16     ` Adrian Bunk
2007-04-16  3:44       ` Jeremy Fitzhardinge
2007-04-16  6:29       ` Dave Jones
2007-04-16  6:54         ` Antonino A. Daplas
2007-04-16  7:23           ` Dave Jones
2007-04-16  7:32             ` Antonino A. Daplas
2007-04-16  7:55               ` Dave Jones
2007-04-16  9:26                 ` Richard Purdie
2007-04-17  3:34                   ` Dave Jones
2007-04-17 23:48                     ` Antonino A. Daplas
2007-04-18  0:35                       ` Dave Jones
2007-04-16 10:06   ` Rafael J. Wysocki
2007-04-20  4:57   ` Jeremy Fitzhardinge
2007-04-20  5:03     ` Dave Jones
2007-04-20  5:15       ` Jeremy Fitzhardinge
2007-04-20  5:19         ` Dave Jones
2007-04-20  5:33           ` Jeremy Fitzhardinge
2007-04-20 14:51             ` Dave Jones
2007-04-20 15:28               ` Jeremy Fitzhardinge
2007-04-20 16:03                 ` Dave Jones
2007-04-20 17:16                   ` Jeremy Fitzhardinge
2007-04-20 17:21                     ` Dave Jones
2007-04-21  0:02                       ` Jeremy Fitzhardinge
2007-04-21  9:45                         ` Rafael J. Wysocki
2007-04-17  0:01 ` Linux 2.6.21-rc7 Chuck Ebbert
2007-04-23 21:48 ` [1/3] 2.6.21-rc7: known regressions (v2) Adrian Bunk
2007-04-23 22:18   ` Greg KH
2007-04-24  9:32     ` Wolfgang Erig
2007-04-25  0:14       ` Greg KH
2007-04-25  0:29         ` Adrian Bunk
2007-04-25  0:51           ` Greg KH
2007-04-25  1:21             ` Adrian Bunk
2007-04-25  8:19               ` Eric W. Biederman
2007-04-25 16:20               ` Wolfgang Erig
2007-04-23 21:48 ` [2/3] " Adrian Bunk
2007-04-23 21:49 ` [3/3] " Adrian Bunk
2007-04-25 11:06   ` Andrew Morton
2007-04-25 11:31     ` Adrian Bunk
2007-04-25 13:01       ` Dave Jones
2007-04-25 13:50         ` Antonino A. Daplas
2007-04-25 13:52           ` Antonino A. Daplas
2007-04-25 14:33             ` Dave Jones
2007-04-25 15:24               ` Antonino A. Daplas
2007-04-25 16:31                 ` Dave Jones
2007-04-25 23:00                   ` Adrian Bunk
2007-04-25 14:06         ` Jeremy Fitzhardinge
2007-04-25 11:43     ` Ingo Molnar
2007-04-25 13:45       ` Jeff Chua
2007-05-02 21:44         ` Thomas Gleixner
2007-04-25 17:57     ` Ingo Molnar
2007-04-25 18:08     ` john stultz
2007-04-26  0:33       ` Len Brown
2007-04-26  0:49         ` john stultz
2007-04-25 19:34     ` Rafael J. Wysocki
2007-04-25 23:40 ` 2.6.21-rc7: known regressions with patches Adrian Bunk

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=s5h7is7xrkl.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=bunk@stusta.de \
    --cc=cebbert@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.k.k.piotrowski@gmail.com \
    --cc=perex@suse.cz \
    /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®