>transfers don't work properly -- I get garbage data. I would like
>this not to happen, so either I need some fixes to the software-ECP
>code (Tim alluded to some changes to this code earlier) or parport_pc
>should disallow ECP mode if it's not configured to use DMA. I think
>you mean we should do the former, in which case other than the bug
>fixes for software-ECP parport_pc doesn't require any changes. Is
>that correct? I should still, of course, change lp.c to look at
>the mode bits before attempting to use ECP mode.
Well, sort of. What I was thinking was that you should change parport_pc
along the lines of the attached (but untested) patch. If you add code to
lp.c to check port->modes before attempting to select ECP, that should stop
lp from ever attempting to use software-ECP mode and hence make your corruption
problem go away. Of course the original bug will still be present, and we
ought to fix that separately.
Does it work for you if you set CONFIG_PARPORT_PC_FIFO but don't use DMA? I
think parport_pc should be capable of operating in an accelerated PIO mode
under those circumstances.
p.
Index: parport_pc.c
===================================================================
RCS file: /cvs/linux/drivers/parport/parport_pc.c,v
retrieving revision 1.57
diff -u -p -u -r1.57 parport_pc.c
--- parport_pc.c 2001/08/14 10:27:20 1.57
+++ parport_pc.c 2001/08/27 19:04:24
@@ -1871,7 +1871,6 @@ static int __devinit parport_ECP_support
/* Go back to mode 000 */
frob_econtrol (pb, 0xe0, ECR_SPP << 5);
- pb->modes |= PARPORT_MODE_ECP | PARPORT_MODE_COMPAT;
return 1;
}
@@ -2191,10 +2190,10 @@ struct parport *parport_pc_probe_port (u
p->ops = ops;
p->private_data = priv;
p->physport = p;
- if (base_hi && !check_region(base_hi,3)) {
+
+ if (base_hi && !check_region(base_hi,3))
parport_ECR_present(p);
- parport_ECP_supported(p);
- }
+
if (base != 0x3bc) {
if (!check_region(base+0x3, 5)) {
if (!parport_EPP_supported(p))
@@ -2250,8 +2249,10 @@ struct parport *parport_pc_probe_port (u
p->dma = PARPORT_DMA_NONE;
#ifdef CONFIG_PARPORT_PC_FIFO
- if (p->dma != PARPORT_DMA_NOFIFO &&
+ if (parport_ECP_supported(p) &&
+ p->dma != PARPORT_DMA_NOFIFO &&
priv->fifo_depth > 0 && p->irq != PARPORT_IRQ_NONE) {
+ p->modes |= PARPORT_MODE_ECP | PARPORT_MODE_COMPAT;
p->ops->compat_write_data = parport_pc_compat_write_block_pio;
#ifdef CONFIG_PARPORT_1284
p->ops->ecp_write_data = parport_pc_ecp_write_block_pio;
-- 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 2b29 : Mon Aug 27 2001 - 15:15:45 EDT