patch-2.4.0-test9 linux/drivers/parport/parport_pc.c

Next file: linux/drivers/pci/names.c
Previous file: linux/drivers/parport/ChangeLog
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test8/linux/drivers/parport/parport_pc.c linux/drivers/parport/parport_pc.c
@@ -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 */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)