If anyone has a Via SIO chip that shows up in /proc/pci, could they
please try out this 2.4.x patch and let me know if it makes
insmod parport_pc irq=none
and insmod parport_pc irq=auto
work properly, and whether it uses interrupts by default (with no irq
parameter)?
Thanks,
Tim.
*/
2001-03-28 Tim Waugh <twaugh@redhat.com>
* drivers/parport/parport_pc.c: Make Via SuperIO chipsets behave
like everything else with respect to irq= and dma= parameters.
* drivers/parport/ChangeLog: Updated.
--- linux/drivers/parport/parport_pc.c.viaparam Wed Mar 28 17:37:03 2001
+++ linux/drivers/parport/parport_pc.c Wed Mar 28 17:52:46 2001
@@ -2981,7 +2981,8 @@
/* Via support maintained by Jeff Garzik <jgarzik@mandrakesoft.com> */
-static int __devinit sio_via_686a_probe (struct pci_dev *pdev)
+static int __devinit sio_via_686a_probe (struct pci_dev *pdev, int autoirq,
+ int autodma)
{
u8 tmp;
int dma, irq;
@@ -3061,6 +3062,14 @@
if (!have_eppecp)
dma = PARPORT_DMA_NONE;
+ /* Let the user (or defaults) steer us away from interrupts and DMA */
+ if (autoirq != PARPORT_IRQ_AUTO) {
+ irq = PARPORT_IRQ_NONE;
+ dma = PARPORT_DMA_NONE;
+ }
+ if (autodma != PARPORT_DMA_AUTO)
+ dma = PARPORT_DMA_NONE;
+
/* finally, do the probe with values obtained */
if (parport_pc_probe_port (port1, port2, irq, dma, NULL)) {
printk (KERN_INFO
@@ -3086,7 +3095,7 @@
/* each element directly indexed from enum list, above */
static struct parport_pc_superio {
- int (*probe) (struct pci_dev *pdev);
+ int (*probe) (struct pci_dev *pdev, int autoirq, int autodma);
} parport_pc_superio_info[] __devinitdata = {
{ sio_via_686a_probe, },
};
@@ -3423,7 +3432,7 @@
probe: parport_pc_pci_probe,
};
-static int __init parport_pc_init_superio (void)
+static int __init parport_pc_init_superio (int autoirq, int autodma)
{
#ifdef CONFIG_PCI
const struct pci_device_id *id;
@@ -3434,7 +3443,8 @@
if (id == NULL || id->driver_data >= last_sio)
continue;
- return parport_pc_superio_info[id->driver_data].probe (pdev);
+ return parport_pc_superio_info[id->driver_data].probe
+ (pdev, autoirq, autodma);
}
#endif /* CONFIG_PCI */
@@ -3481,7 +3491,7 @@
#endif
/* Onboard SuperIO chipsets that show themselves on the PCI bus. */
- count += parport_pc_init_superio ();
+ count += parport_pc_init_superio (autoirq, autodma);
/* ISA ports and whatever (see asm/parport.h). */
count += parport_pc_find_nonpci_ports (autoirq, autodma);
*** linux/drivers/parport/ChangeLog.viaparam Wed Mar 28 17:52:55 2001
--- linux/drivers/parport/ChangeLog Wed Mar 28 22:47:38 2001
***************
*** 0 ****
--- 1,10 ----
+ 2001-03-28 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (sio_via_686a_probe): Take autoirq and autodma
+ parameters in order to conform to how the rest of the driver
+ works.
+ (parport_pc_init_superio): Take autoirq and autodma parameters and
+ pass them on to sio_via_686a_probe.
+ (parport_pc_find_ports): Pass autoirq and autodma to
+ parport_pc_init_superio.
+
-- 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 : Wed Mar 28 2001 - 17:16:37 EST