Commit 13c7e0d4 authored by Jens Axboe's avatar Jens Axboe Committed by Jens Axboe

[PATCH] ide irq problem

Attribution goes to Petr Vandrovec for finding and solving this one. You
probably read the mail you were cc'ed on, so I'll just mention that this
patch makes sure that the irq disabling and enabling is perfectly
balanced in the probing path. I've also looked at the multiple irq chain
problem you mentioned, and as far as I can see we are never touching the
2nd chain from within the first one. So should be ok.

I'm also including the unexpected interrupt prinkt removal.
parent 88c42974
......@@ -592,6 +592,7 @@ void probe_hwif (ide_hwif_t *hwif)
{
unsigned int unit;
unsigned long flags;
unsigned int irqd;
if (hwif->noprobe)
return;
......@@ -623,7 +624,12 @@ void probe_hwif (ide_hwif_t *hwif)
return;
}
if (hwif->hw.ack_intr && hwif->irq)
/*
* We must always disable IRQ, as probe_for_drive will assert IRQ, but
* we'll install our IRQ driver much later...
*/
irqd = hwif->irq;
if (irqd)
disable_irq(hwif->irq);
local_irq_set(flags);
......@@ -659,8 +665,12 @@ void probe_hwif (ide_hwif_t *hwif)
}
local_irq_restore(flags);
if (hwif->hw.ack_intr && hwif->irq)
enable_irq(hwif->irq);
/*
* Use cached IRQ number. It might be (and is...) changed by probe
* code above
*/
if (irqd)
enable_irq(irqd);
for (unit = 0; unit < MAX_DRIVES; ++unit) {
ide_drive_t *drive = &hwif->drives[unit];
......
......@@ -1378,7 +1378,6 @@ void ide_intr (int irq, void *dev_id, struct pt_regs *regs)
if ((handler = hwgroup->handler) == NULL ||
hwgroup->poll_timeout != 0) {
printk("ide_intr: unexpected interrupt!\n");
/*
* Not expecting an interrupt from this drive.
* That means this could be:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment