Messages in this thread |  | | Date | Sat, 09 Sep 2000 16:34:01 -0400 | From | Jeff Garzik <> | Subject | Re: [PATCH] VIA parport fixes |
| |
Cesar Eduardo Barros wrote: > > This patch detects the bogus '255' values (meaning no IRQ/DMA) in the VIA > parport code. > > Not tested or compiled.
Patch looks good to me. Self-contained inside the Via code I wrote, which is important.
Longer term, I would like to fix up the values and ensure an IRQ and DMA setting, if such was the intention (as with ECP/EPP).
Jeff
> 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
-- Jeff Garzik | Isn't it strange that the same people Building 1024 | that laugh at gypsy fortune tellers MandrakeSoft, Inc. | take economists seriously? - 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/
|  |