From: Takashi Iwai <tiwai@suse.de>
To: Karsten Wiese <annabellesgarden@yahoo.de>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: Re: rmmod snd-es1968 crashes my laptop...
Date: Tue, 15 Jun 2004 13:04:39 +0200 [thread overview]
Message-ID: <s5hwu29axq0.wl@alsa2.suse.de> (raw)
In-Reply-To: <200406150051.00056.annabellesgarden@yahoo.de>
[-- Attachment #1: Type: text/plain, Size: 985 bytes --]
At Tue, 15 Jun 2004 00:50:59 +0200,
Karsten Wiese wrote:
>
> Am Montag 14 Juni 2004 15:39 schrieb Takashi Iwai:
> > At Sun, 13 Jun 2004 20:23:48 +0200,
> This patch keeps the "snd_es1968_set_acpi(chip, ACPI_D3);":
(snip)
> I think its OK to commit with comment:
>
> - Prevent shared Interrupts from other devices
> causing crash on device free.
>
> (Analysis:
> the crash was induced when the usb interrupt was still reached to
> snd_es1968_interrupt:
> the value "event = inb(chip->io_port + 0x1A)" will possibly be != 0 cause the
> device went into high Z state, so snd_es1968_interrupt falsely tries to
> handle the alien interrupt....
> by telling kernel that the module doesn't handle interrupts any more before
> switching the device into powersave mode we keep the system sane.
> or so....)
Then we should move free_irq() itself before releasing other
resources. calling snd_es1968_set_acpi() after release io's is
invalid.
How about the attached patch?
Takashi
[-- Attachment #2: Type: text/plain, Size: 779 bytes --]
Index: alsa-kernel/pci/es1968.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/es1968.c,v
retrieving revision 1.66
diff -u -r1.66 es1968.c
--- alsa-kernel/pci/es1968.c 26 Apr 2004 10:58:07 -0000 1.66
+++ alsa-kernel/pci/es1968.c 15 Jun 2004 11:00:02 -0000
@@ -2470,6 +2470,8 @@
outw(0, chip->io_port + ESM_PORT_HOST_IRQ); /* disable IRQ */
}
+ if (chip->irq >= 0)
+ free_irq(chip->irq, (void *)chip);
#ifdef SUPPORT_JOYSTICK
if (chip->res_joystick) {
gameport_unregister_port(&chip->gameport);
@@ -2484,8 +2486,6 @@
release_resource(chip->res_io_port);
kfree_nocheck(chip->res_io_port);
}
- if (chip->irq >= 0)
- free_irq(chip->irq, (void *)chip);
snd_magic_kfree(chip);
return 0;
}
next prev parent reply other threads:[~2004-06-15 11:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-13 18:23 rmmod snd-es1968 crashes my laptop Karsten Wiese
2004-06-14 13:39 ` Takashi Iwai
2004-06-14 22:50 ` Karsten Wiese
2004-06-15 11:04 ` Takashi Iwai [this message]
2004-06-15 22:30 ` Karsten Wiese
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=s5hwu29axq0.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=annabellesgarden@yahoo.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.