[PARPORT] [PATCH] parport_pc.c sanity check

From: Thomas Hood (jdthoodREMOVETHIS@yahoo.co.uk)
Date: Tue Jul 31 2001 - 00:25:11 EDT

  • Next message: Philip Blundell: "Re: [PARPORT] [PATCH] parport_pc.c sanity check"

    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. This patch was also sent to the
    linux-kernel mailing list. // 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, send mail to: linux-parport-request@torque.net --
    -- with the single word "unsubscribe" in the body of the message. --



    This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 14:16:05 EDT