bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnumach and gcc 4.x


From: Alfred M. Szmidt
Subject: gnumach and gcc 4.x
Date: Mon, 31 Oct 2005 01:40:57 +0100

The following patch fixes the following problem (reported by Sergio):

| I'm having trouble with the GNU Mach of your tarball, it stalls with
| "panic: free_irq: bad irq number" just after the floppy disk
| detection.  I've tried it on a P3 1000 Mhz laptop, on a AMD 700 Mhz
| tower and on qemu with the same result in all cases (no IRQ sharing
| problem).

since (also from Sergio):

| The problem seems to be a little bug (MAXIRQ value is 16, while
| reg_IRQ array range is 0-15) in eata_dma and eata_pio scsi drivers
| triggered by using gcc-4.0. Please try the attached patch, it works
| for me.

Here is the patch (once again from Sergio):

2005-10-29  Alfred M. Szmidt  <ams@gnu.org>

        * linux/src/drivers/scsi/eata_pio.c (eata_pio_detect): Fix a
        off-by-one error when probing.
        * linux/src/drivers/scsi/eata_dma.c (eata_detect): Likewise.
        * linux/dev/drivers/scsi/eata_dma.c (eata_detect): Likewise.
        Patch by Sergio Lopez <koro@sinrega.org>.

--- linux/src/drivers/scsi/eata_dma.c
+++ linux/src/drivers/scsi/eata_dma.c
@@ -1532,7 +1532,7 @@
     
     find_ISA(&gc, tpnt);
     
-    for (i = 0; i <= MAXIRQ; i++) { /* Now that we know what we have, we     */
+    for (i = 0; i < MAXIRQ; i++) {  /* Now that we know what we have, we     */
        if (reg_IRQ[i] >= 1){       /* exchange the interrupt handler which  */
            free_irq(i, NULL);      /* we used for probing with the real one */
            request_irq(i, (void *)(eata_int_handler), SA_INTERRUPT|SA_SHIRQ, 
--- linux/src/drivers/scsi/eata_pio.c
+++ linux/src/drivers/scsi/eata_pio.c
@@ -981,7 +981,7 @@
 
     find_pio_ISA(&gc, tpnt);
     
-    for (i = 0; i <= MAXIRQ; i++)
+    for (i = 0; i < MAXIRQ; i++)
        if (reg_IRQ[i])
            request_irq(i, eata_pio_int_handler, SA_INTERRUPT, "EATA-PIO", 
NULL);
     
--- linux/dev/drivers/scsi/eata_dma.c
+++ linux/dev/drivers/scsi/eata_dma.c
@@ -1536,7 +1536,7 @@
     
     find_ISA(&gc, tpnt);
     
-    for (i = 0; i <= MAXIRQ; i++) { /* Now that we know what we have, we     */
+    for (i = 0; i < MAXIRQ; i++) {  /* Now that we know what we have, we     */
        if (reg_IRQ[i] >= 1){       /* exchange the interrupt handler which  */
            free_irq(i, NULL);      /* we used for probing with the real one */
            request_irq(i, (void *)(eata_int_handler), SA_INTERRUPT|SA_SHIRQ, 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]