lkml.org 
[lkml]   [1998]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectlp/parport_pc fix for ECP or ECP+EPP mode (ECR init)
Seems that the printing problems of Andreas Muck was caused by the ECP (or
ECP+EPP) settings of the parallel port (since I suggested him to use SPP
mode in the BIOS and then lp started to work fine for him too).

I taken a look at ECP specs and seems that parport_pc was initializing the
ECR control register to use the parallel port in SPP mode _but_ it _left_
active the ECP _enable_ bit and ECP _service_ bit in the ECR control
register.

I suppose that the parport_pc policy is to _initialize_ all detected ECP
parallel port in plain SPP mode with more backwards compatibility with SPP
mode as possible, then if a pardevice will need a special handshaking mode
will (implement removing FIXME ;-) and then) use parport_change_mode() in
its init stage.

This patch seems to fix the lp problem initializing the ECR register (_if_
_detected_ and this is a bugfix) at 0x0 and not at 0xc. Muck said me that
fix things for him. I' d like if everybody is having troubles with lp in
2.1.104 (or with < 2.1.104 in polling mode) could try this not very tested
;-) patch and feedback.

Andrea[s] Arcangeli

--- linux/drivers/misc/parport_pc.c 1998/04/25 10:38:34 1.1
+++ linux/drivers/misc/parport_pc.c 1998/05/27 14:44:03
@@ -708,7 +708,8 @@
p->flags |= PARPORT_FLAG_COMA;

/* Done probing. Now put the port into a sensible start-up state. */
- parport_pc_write_econtrol(p, 0xc);
+ if (p->modes & PARPORT_MODE_PCECR)
+ parport_pc_write_econtrol(p, 0x0);
parport_pc_write_control(p, 0xc);
parport_pc_write_data(p, 0);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.043 / U:0.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site