Re: Reproducible crash under 2.1.86 [solved and fixed]

Andrea Arcangeli (arcangeli@mbox.queen.it)
Tue, 17 Feb 1998 16:40:19 +0100 (CET)


Please Tuomo test this patch against 2.1.86 (sould work fine also against
2.1.87). This patch fix fine all my locks.

The crash was due to disable_dma() in the line 146:
...
dma_outb((dmanr & 3) | 4, DMA2_MASK_REG);
...

Seems that disabling/enabling at high speed dma my motherboard lock (the
power button no longer work and I can only press reset).

Great thanks to MOLNAR Ingo for its debugging patch (that I think sould be
included in the official kernel) that showed me the trace for debugging.
Without that patch sure I can' t fix the bug (at least so fast ;-).

Andrea[s] Arcangeli

--- /usr/src/linux/drivers/sound/dmabuf.c Tue Jan 27 19:30:52 1998
+++ linux/drivers/sound/dmabuf.c Tue Feb 17 16:33:47 1998
@@ -10,6 +10,13 @@
* Version 2 (June 1991). See the "COPYING" file distributed with this software
* for more info.
*/
+
+/*
+ * Removed fast disable_dma()/enable_dma() cycles in order to avoid
+ * kernel locks on some motherboards.
+ * Andrea Arcangeli <arcangeli@mbox.queen.it>
+ */
+
#include <linux/config.h>

#define BE_CONSERVATIVE
@@ -1128,9 +1135,7 @@
{
int chan = dmap->dma, pos, n;
clear_dma_ff(chan);
- disable_dma(dmap->dma);
pos = dmap->bytes_in_use - get_dma_residue(chan);
- enable_dma(dmap->dma);
pos = pos / dmap->fragment_size; /* Actual qhead */
if (pos < 0 || pos >= dmap->nbufs)
pos = 0;
@@ -1249,9 +1254,7 @@
int chan = dmap->dma, pos, n;

clear_dma_ff(chan);
- disable_dma(dmap->dma);
pos = dmap->bytes_in_use - get_dma_residue(chan);
- enable_dma(dmap->dma);

pos = pos / dmap->fragment_size; /* Actual qhead */
if (pos < 0 || pos >= dmap->nbufs)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu