[PATCH] VIA parport fixes

From: Cesar Eduardo Barros (cesarb@nitnet.com.br)
Date: Sat Sep 09 2000 - 16:24:40 EDT

  • Next message: Rasmus Andersen: "Re: Oops on boot with both 2.2.17 and 2.4.0t8p6"

    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/
    



    This archive was generated by hypermail 2b29 : Sat Sep 09 2000 - 16:26:45 EDT