[PATCH] parport_pc.c PnP BIOS sanity check

Thomas Hood (jdthoodREMOVETHIS@yahoo.co.uk)
Wed, 08 Aug 2001 11:15:15 -0400


The following would seem to be required to protect against
the case in which PnP BIOS reports an IRQ of 0 for a
parport with disabled IRQ. // Thomas jdthood_AT_yahoo.co.uk

--- linux-2.4.7-ac2/drivers/parport/parport_pc.c Mon Jul 30 01:18:34 2001
+++ linux-2.4.7-ac2-jdth1/drivers/parport/parport_pc.c Mon Jul 30 12:32:16 2001
@@ -2797,7 +2797,8 @@
irq=dev->irq_resource[0].start;
dma=dev->dma_resource[0].start;

- if(dma==0) dma=-1;
+ if (dma==0) dma=PARPORT_DMA_NONE;
+ if (irq==0) irq=PARPORT_IRQ_NONE;

printk(KERN_INFO "PnPBIOS: Parport found %s %s at io=%04x,%04x irq=%d dma=%d\n",
dev->name,dev->slot_name,io,iohi,irq,dma);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/