Messages in this thread Patch in this message |  | | Date | Sat, 9 Sep 2000 17:24:40 -0300 | Subject | [PATCH] VIA parport fixes | From | Cesar Eduardo Barros <> |
| |
This patch detects the bogus '255' values (meaning no IRQ/DMA) in the VIA parport code.
Not tested or compiled.
diff -Naur linux-2.4.0-test8.orig/drivers/parport/parport_pc.c linux-2.4.0-test8/drivers/parport/parport_pc.c --- linux-2.4.0-test8.orig/drivers/parport/parport_pc.c Sat Sep 9 17:09:42 2000 +++ linux-2.4.0-test8/drivers/parport/parport_pc.c Sat Sep 9 17:20:37 2000 @@ -2239,11 +2239,13 @@ irq = ((irq >> 4) & 0x0F); /* filter bogus IRQs */ + /* 255 means NONE, and is bogus as well */ switch (irq) { case 0: case 2: case 8: case 13: + case 255: irq = PARPORT_IRQ_NONE; break; @@ -2252,7 +2254,9 @@ } /* if ECP not enabled, DMA is not enabled, assumed bogus 'dma' value */ - if (!have_eppecp) + /* 255 means NONE. Looks like some BIOS don't set the DMA correctly + * even on ECP mode */ + if (!have_eppecp || dma == 255) dma = PARPORT_DMA_NONE; /* finally, do the probe with values obtained */ -- Cesar Eduardo Barros cesarb@nitnet.com.br cesarb@dcc.ufrj.br - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |