[PARPORT] forcing software-driven transfers


Tim Waugh (tim@cyberelk.demon.co.uk)
Fri, 23 Jul 1999 09:10:25 +0100 (GMT)


It's currently not possible to get parport_pc to avoid using
extended/enhanced modes if it finds them. Here's a simplistic patch that
changes that for modules.

The main things that are wrong with it:

. it's not done on a per-port basis; it affects all ports or none
. can't be controlled from kernel command line when parport is built in

We need _something_ like this, as some hardware is just broken. What do
you think?

Tim.
*/

--- linux/drivers/misc/parport_pc.c~ Fri Jul 23 08:59:53 1999
+++ linux/drivers/misc/parport_pc.c Fri Jul 23 09:06:08 1999
@@ -71,6 +71,7 @@
 #define ECR_CNF 07
 
 static int user_specified __initdata = 0;
+static int bare __initdata = 0;
 
 /* frob_control, but for ECR */
 static void frob_econtrol (struct parport *pb, unsigned char m,
@@ -1543,12 +1544,12 @@
         p->ops = &parport_pc_ops;
         p->private_data = priv;
         p->physport = p;
- if (base_hi && !check_region(base_hi,3)) {
+ if (!bare && base_hi && !check_region(base_hi,3)) {
                 parport_ECR_present(p);
                 parport_ECP_supported(p);
                 parport_ECPPS2_supported(p);
         }
- if (base != 0x3bc) {
+ if (!bare && base != 0x3bc) {
                 if (!check_region(base+0x3, 5)) {
                         parport_EPP_supported(p);
                         if (!(p->modes & PARPORT_MODE_EPP))
@@ -1564,7 +1565,7 @@
         parport_PS2_supported (p);
 
         if (!(p = parport_register_port(base, PARPORT_IRQ_NONE,
- PARPORT_DMA_NONE, &parport_pc_ops))) {
+ PARPORT_DMA_NONE, &parport_pc_ops))) {
                 kfree (priv);
                 return 0;
         }
@@ -1843,6 +1844,7 @@
 MODULE_PARM(io_hi, "1-" __MODULE_STRING(PARPORT_PC_MAX_PORTS) "i");
 MODULE_PARM(irq, "1-" __MODULE_STRING(PARPORT_PC_MAX_PORTS) "s");
 MODULE_PARM(dma, "1-" __MODULE_STRING(PARPORT_PC_MAX_PORTS) "s");
+MODULE_PARM(bare, "i");
 
 int init_module(void)
 {

-- 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 2.0b3 on Fri 23 Jul 1999 - 04:16:00 EDT