public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: arjan@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Debug shared irqs.
Date: Thu, 5 Jan 2006 02:19:29 -0800	[thread overview]
Message-ID: <20060105021929.498f45ef.akpm@osdl.org> (raw)
In-Reply-To: <1135251766.3557.13.camel@pmac.infradead.org>

David Woodhouse <dwmw2@infradead.org> wrote:
>
>  Drivers registering IRQ handlers with SA_SHIRQ really ought to be able
>  to handle an interrupt happening before request_irq() returns. They also
>  ought to be able to handle an interrupt happening during the start of
>  their call to free_irq(). Let's test that hypothesis....

I don't think I like this patch.

diff -puN sound/oss/i810_audio.c~i810_audio-request_irq-fix sound/oss/i810_audio.c
--- 25/sound/oss/i810_audio.c~i810_audio-request_irq-fix	2006-01-05 02:16:04.000000000 -0800
+++ 25-akpm/sound/oss/i810_audio.c	2006-01-05 02:16:58.000000000 -0800
@@ -3360,12 +3360,6 @@ static int __devinit i810_probe(struct p
 		goto out_region2;
 	}
 
-	if (request_irq(card->irq, &i810_interrupt, SA_SHIRQ,
-			card_names[pci_id->driver_data], card)) {
-		printk(KERN_ERR "i810_audio: unable to allocate irq %d\n", card->irq);
-		goto out_pio;
-	}
-
 	if (card->use_mmio) {
 		if (request_mem_region(card->ac97base_mmio_phys, 512, "ich_audio MMBAR")) {
 			if ((card->ac97base_mmio = ioremap(card->ac97base_mmio_phys, 512))) { /*@FIXME can ioremap fail? don't know (jsaw) */
@@ -3396,10 +3390,8 @@ static int __devinit i810_probe(struct p
 	}
 
 	/* initialize AC97 codec and register /dev/mixer */
-	if (i810_ac97_init(card) <= 0) {
-		free_irq(card->irq, card);
+	if (i810_ac97_init(card) <= 0)
 		goto out_iospace;
-	}
 	pci_set_drvdata(pci_dev, card);
 
 	if(clocking == 0) {
@@ -3411,7 +3403,6 @@ static int __devinit i810_probe(struct p
 	if ((card->dev_audio = register_sound_dsp(&i810_audio_fops, -1)) < 0) {
 		int i;
 		printk(KERN_ERR "i810_audio: couldn't register DSP device!\n");
-		free_irq(card->irq, card);
 		for (i = 0; i < NR_AC97; i++)
 		if (card->ac97_codec[i] != NULL) {
 			unregister_sound_mixer(card->ac97_codec[i]->dev_mixer);
@@ -3420,6 +3411,13 @@ static int __devinit i810_probe(struct p
 		goto out_iospace;
 	}
 
+	if (request_irq(card->irq, &i810_interrupt, SA_SHIRQ,
+			card_names[pci_id->driver_data], card)) {
+		printk(KERN_ERR "i810_audio: unable to allocate irq %d\n", card->irq);
+		goto out_iospace;
+	}
+
+
  	card->initializing = 0;
 	return 0;
 
_


This is going to cause me a ton of grief.  How's about you put it in
Fedora for a few weeks, get all the drivers debugged first ;)


  reply	other threads:[~2006-01-05 10:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-22 11:42 [PATCH] Debug shared irqs David Woodhouse
2006-01-05 10:19 ` Andrew Morton [this message]
2006-01-05 10:39   ` David Woodhouse
2006-01-05 11:08     ` Andrew Morton
2006-01-05 10:48   ` Arjan van de Ven
2006-01-05 13:49   ` [PATCH] reduce sizeof(percpu_data) and removes dependance against NR_CPUS Eric Dumazet
2006-01-05 14:00     ` Andrew Morton
2006-01-05 14:33       ` Eric Dumazet
2006-01-06  7:18     ` Jan Engelhardt
2006-01-06  7:27       ` Andrew Morton
2006-01-06  7:29       ` Eric Dumazet

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=20060105021929.498f45ef.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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