patch-2.3.49 linux/drivers/parport/parport_pc.c

Next file: linux/drivers/pci/Makefile
Previous file: linux/drivers/parport/ieee1284.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.48/linux/drivers/parport/parport_pc.c linux/drivers/parport/parport_pc.c
@@ -1503,7 +1503,7 @@
 
 /* --- DMA detection -------------------------------------- */
 
-/* Only if supports ECP mode */
+/* Only if chipset conforms to ECP ISA Interface Standard */
 static int __devinit programmable_dma_support (struct parport *p)
 {
 	unsigned char oecr = inb (ECONTROL (p));
@@ -1511,8 +1511,10 @@
 
 	frob_econtrol (p, 0xe0, ECR_CNF << 5);
 	
-	dma = inb (CONFIGB(p)) & 0x03;
-	if (!dma)
+	dma = inb (CONFIGB(p)) & 0x07;
+	/* 000: Indicates jumpered 8-bit DMA if read-only.
+	   100: Indicates jumpered 16-bit DMA if read-only. */
+	if ((dma & 0x03) == 0)
 		dma = PARPORT_DMA_NONE;
 
 	outb (oecr, ECONTROL (p));
@@ -1722,6 +1724,7 @@
 }
 
 
+/* Via support maintained by Jeff Garzik <jgarzik@mandrakesoft.com> */
 static int __devinit sio_via_686a_probe (struct pci_dev *pdev)
 {
 	u8 dma, irq, tmp;
@@ -1835,6 +1838,7 @@
 
 static int __devinit parport_pc_init_superio(void)
 {
+#ifdef CONFIG_PCI
 	const struct pci_device_id *id;
 	struct pci_dev *pdev;
 	
@@ -1845,11 +1849,11 @@
 		
 		return parport_pc_superio_info[id->driver_data].probe (pdev);
 	}
+#endif /* CONFIG_PCI */
 	
 	return 0; /* zero devices found */
 }
 
-
 /* Look for PCI parallel port cards. */
 static int __init parport_pc_init_pci (int irq, int dma)
 {
@@ -1991,6 +1995,7 @@
 		}
 	}
 
+#ifdef CONFIG_PCI
 	/* Look for parallel controllers that we don't know about. */
 	pci_for_each_dev(pcidev) {
 		const int class_noprogif = pcidev->class & ~0xff;
@@ -2011,6 +2016,7 @@
 			"tim@cyberelk.demon.co.uk\n",
 			pcidev->vendor, pcidev->device);
 	}
+#endif
 
 	return count;
 }
@@ -2034,9 +2040,16 @@
 static int irqval[PARPORT_PC_MAX_PORTS] = { [0 ... PARPORT_PC_MAX_PORTS-1] = PARPORT_IRQ_PROBEONLY };
 static const char *irq[PARPORT_PC_MAX_PORTS] = { NULL, };
 static const char *dma[PARPORT_PC_MAX_PORTS] = { NULL, };
+
+MODULE_AUTHOR("Phil Blundell, Tim Waugh, others");
+MODULE_DESCRIPTION("PC-style parallel port driver");
+MODULE_PARM_DESC(io, "Base I/O address (SPP regs)");
 MODULE_PARM(io, "1-" __MODULE_STRING(PARPORT_PC_MAX_PORTS) "i");
+MODULE_PARM_DESC(io_hi, "Base I/O address (ECR)");
 MODULE_PARM(io_hi, "1-" __MODULE_STRING(PARPORT_PC_MAX_PORTS) "i");
+MODULE_PARM_DESC(irq, "IRQ line");
 MODULE_PARM(irq, "1-" __MODULE_STRING(PARPORT_PC_MAX_PORTS) "s");
+MODULE_PARM_DESC(dma, "DMA channel");
 MODULE_PARM(dma, "1-" __MODULE_STRING(PARPORT_PC_MAX_PORTS) "s");
 
 int init_module(void)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)