Re: [PATCH] parport_pc.c PnP BIOS sanity check

Thomas Hood (jdthoodREMOVETHIS@yahoo.co.uk)
Fri, 21 Sep 2001 02:00:54 -0400


This is a multi-part message in MIME format.
--------------D617D8139E9E5BF008AE30D1
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I'm still wondering why this function in parport_pc.c rejects dma
values of zero. Is DMA0 not usable by the parallel port for some
reason? I should think that if the PnP BIOS returns a dma of zero
then it means that the parallel port is using DMA0. Sorry if I'm
being obtuse. // Thomas Hood

parport_pc.c line 2799:
int init_pnp040x(struct pci_dev *dev)
{ int io,iohi,irq,dma;

io=dev->resource[0].start;
iohi=dev->resource[1].start;
irq=dev->irq_resource[0].start;
dma=dev->dma_resource[0].start;

if(dma==0) dma=-1; <--- Why?

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);
if (parport_pc_probe_port(io,iohi,irq,dma,NULL))
return 1;
return 0;
}
--------------D617D8139E9E5BF008AE30D1
Content-Type: text/plain; charset=us-ascii;
name="patch-norejdma"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="patch-norejdma"

--- linux-2.4.7-ac10/drivers/parport/parport_pc.c_ORIG Fri Aug 10 18:19:07 2001
+++ linux-2.4.7-ac10/drivers/parport/parport_pc.c Mon Aug 13 17:40:38 2001
@@ -2797,8 +2797,6 @@
irq=dev->irq_resource[0].start;
dma=dev->dma_resource[0].start;

- if (dma==0) dma=-1;
-
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);
if (parport_pc_probe_port(io,iohi,irq,dma,NULL))

--------------D617D8139E9E5BF008AE30D1
Content-Type: text/plain; charset=us-ascii;
name="patch-dmanone"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="patch-dmanone"

--- linux-2.4.7-ac10/drivers/parport/parport_pc.c_ORIG Fri Aug 10 18:19:07 2001
+++ linux-2.4.7-ac10/drivers/parport/parport_pc.c Fri Aug 10 18:19:55 2001
@@ -2797,7 +2797,7 @@
irq=dev->irq_resource[0].start;
dma=dev->dma_resource[0].start;

- if (dma==0) dma=-1;
+ if (dma==0) dma=PARPORT_DMA_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);

--------------D617D8139E9E5BF008AE30D1--

-
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/