patch-2.3.20 linux/drivers/parport/ieee1284_ops.c

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

diff -u --recursive --new-file v2.3.19/linux/drivers/parport/ieee1284_ops.c linux/drivers/parport/ieee1284_ops.c
@@ -9,8 +9,10 @@
  * Note: Make no assumptions about hardware or architecture in this file!
  *
  * Author: Tim Waugh <tim@cyberelk.demon.co.uk>
+ * Fixed AUTOFD polarity in ecp_forward_to_reverse().  Fred Barnes, 1999
  */
 
+
 #include <linux/config.h>
 #include <linux/parport.h>
 #include <linux/delay.h>
@@ -336,7 +338,7 @@
 	/* Event 38: Set nAutoFd low */
 	parport_frob_control (port,
 			      PARPORT_CONTROL_AUTOFD,
-			      0);
+			      PARPORT_CONTROL_AUTOFD);
 	parport_data_reverse (port);
 	udelay (5);
 
@@ -524,12 +526,12 @@
 			if (count && dev->port->irq != PARPORT_IRQ_NONE) {
 				parport_release (dev);
 				current->state = TASK_INTERRUPTIBLE;
-				schedule_timeout ((HZ + 99) / 25);
+				schedule_timeout ((HZ + 24) / 25);
 				parport_claim_or_block (dev);
 			}
 			else
 				/* We must have the device claimed here. */
-				parport_wait_event (port, (HZ + 99) / 25);
+				parport_wait_event (port, (HZ + 24) / 25);
 
 			/* Is there a signal pending? */
 			if (signal_pending (current))
@@ -610,10 +612,11 @@
 			count += rle_count;
 			DPRINTK (KERN_DEBUG "%s: decompressed to %d bytes\n",
 				 port->name, rle_count);
-		}
-		else
+		} else {
 			/* Normal data byte. */
-			*buf++ = byte, count++;
+			*buf = byte;
+			buf++, count++;
+		}
 	}
 
  out:

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