Skip to contentSkip to conversation

2.4.3-pre8: another parport bug

PATCH New Tim Waugh 1 participant 1 message Mar 27, 2001 Parallel port

lore
Share & tools
lore

Tim Waugh

author
#0 lore raw

PATCH 1/1 2.4.3-pre8: another parport bug

Oops, the last patch isn't the one I meant to send. Here is the right one.

Tim.
*/

2001-03-27 Tim Waugh <[email protected]>

* parport_pc: Fix save/restore_state to take account of the soft control port.
* ChangeLog: Updated.

drivers/parport/parport_pc.c renamed from drivers/parport/parport_pc.c.restorestate +3 -2
@@ -347,15 +347,16 @@
 void parport_pc_save_state(struct parport *p, struct parport_state *s)
 {
 	const struct parport_pc_private *priv = p->physport->private_data;
-	s->u.pc.ctr = inb (CONTROL (p));
+	s->u.pc.ctr = priv->ctr;
 	if (priv->ecr)
 		s->u.pc.ecr = inb (ECONTROL (p));
 }
 
 void parport_pc_restore_state(struct parport *p, struct parport_state *s)
 {
-	const struct parport_pc_private *priv = p->physport->private_data;
+	struct parport_pc_private *priv = p->physport->private_data;
 	outb (s->u.pc.ctr, CONTROL (p));
+	priv->ctr = s->u.pc.ctr;
 	if (priv->ecr)
 		outb (s->u.pc.ecr, ECONTROL (p));
 }

*** linux/drivers/parport/ChangeLog.restorestate Tue Mar 27 23:00:18 2001
--- linux/drivers/parport/ChangeLog Tue Mar 27 23:00:38 2001
***************
*** 0 ****
--- 1,7 ----
+ 2001-03-27 Tim Waugh <[email protected]>
+

+       * parport_pc.c (parport_pc_save_state): Read from the soft copy of
+       the control port.
+       (parport_pc_restore_state): Update the soft copy of the control
+       port.

+