lkml.org 
[lkml]   [2000]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] VIA parport fixes
From

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/

\
 
 \ /
  Last update: 2005-03-22 12:41    [W:0.031 / U:3.040 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site