Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2078f38c8008f5c54d9523ae19af32b9a0c5530e
Commit:     2078f38c8008f5c54d9523ae19af32b9a0c5530e
Parent:     c9758b2182bdcccce31e1be474bfcd75b69cff0c
Author:     Takashi Iwai <[EMAIL PROTECTED]>
AuthorDate: Fri Apr 20 12:30:28 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Fri May 11 16:56:08 2007 +0200

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/pci/intel8x0.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index 7cf2dcb..202f720 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -2493,6 +2493,7 @@ static int intel8x0_resume(struct pci_dev *pci)
                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_dev *pci)
        }
        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(struct snd_card 
*card,
                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:
@@ -2901,6 +2892,15 @@ static int __devinit snd_intel8x0_create(struct snd_card 
*card,
                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);
                return err;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to