lkml.org 
[lkml]   [2003]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Re: 2.5.65-ac2 -- hda/ide trouble on ICH4

On Sat, 22 Mar 2003, Dominik Brodowski wrote:
> On Sat, Mar 22, 2003 at 04:35:05PM +0000, Alan Cox wrote:
> >
> > I've seen 3 or 4 reports of this, none of them duplicatable with the same IDE
> > code on 2.4 so far. Which is odd but I don't yet understand what is going on.
> /me neither, unfortunately :-(


Alan, I can trigger the same dma_intr bug under 2.4.21-pre5-ac3 but not
2.4.20-ac2 (VIA vt8235 + WD800JB so it is not controller/disk related).

Dominik could you try attached patch with vanilla 2.5.65?
It reverts previous logic of handling masked_irq argument of ide_do_request().

Previously callers called it with masked_irq=0 and disabling/enabling
hwif->irq code wasn't executed, now ide_do_request() is called with
masked_irq=IDE_NO_IRQ=-1 so this code is executed for sure.

And no, I don't know wtf is exactly going on there :\.


[ Alan, please forget about yesterday's mail, I hitted dma_intr again today
with yesterday's patch, with attached patch I hope it is gone now :-) ]

BTW 2.5.64-ac4 deadlocks for me the same way Dominik has described.


Greets
--
Bartlomiej
--- linux-2.5.65/drivers/ide/ide-io.c Fri Mar 21 14:24:31 2003
+++ linux-dma_intr-fix/drivers/ide/ide-io.c Sat Mar 22 22:03:26 2003
@@ -838,14 +838,14 @@
* happens anyway when any interrupt comes in, IDE or otherwise
* -- the kernel masks the IRQ while it is being handled.
*/
- if (hwif->irq != masked_irq)
+ if (masked_irq && hwif->irq != masked_irq)
disable_irq_nosync(hwif->irq);
spin_unlock(&ide_lock);
local_irq_enable();
/* allow other IRQs while we start this request */
startstop = start_request(drive, rq);
spin_lock_irq(&ide_lock);
- if (hwif->irq != masked_irq)
+ if (masked_irq && hwif->irq != masked_irq)
enable_irq(hwif->irq);
if (startstop == ide_released)
goto queue_next;
@@ -861,7 +861,7 @@
*/
void do_ide_request(request_queue_t *q)
{
- ide_do_request(q->queuedata, IDE_NO_IRQ);
+ ide_do_request(q->queuedata, 0);
}

/*
@@ -1009,7 +1009,7 @@
hwgroup->busy = 0;
}
}
- ide_do_request(hwgroup, IDE_NO_IRQ);
+ ide_do_request(hwgroup, 0);
spin_unlock_irqrestore(&ide_lock, flags);
}

@@ -1299,7 +1299,7 @@
insert_end = 0;
}
__elv_add_request(&drive->queue, rq, insert_end, 0);
- ide_do_request(hwgroup, IDE_NO_IRQ);
+ ide_do_request(hwgroup, 0);
spin_unlock_irqrestore(&ide_lock, flags);

err = 0;
\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.065 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site