Andrea Arcangeli (firstname.lastname@example.org)
Tue, 9 Jun 1998 00:52:10 +0200 (CEST)
On Mon, 8 Jun 1998, Tim Waugh wrote:
>I can see what prompted this change, but wouldn't it be better to still
>write something vaguely sensible to a potential ECR (i.e. base isn't
>something like 0x3bc) before checking for SPP?
I see your point, you are right.
>(Is it possible for ECR to be so badly wrong that the read-write test
I don' t know if it' s possible (it should really be not possible after a
reboot). We should read the ECP specs to know that, but sure it' s simpler
and safer initiazlize the ECP as your patch if reversed ;-) does.
I added some checks and a comment to your patch, also why to initialize
the ECR to 0xc and not to 0x0?
RCS file: linux/drivers/misc/parport_pc.c,v
retrieving revision 1.1
diff -u -r1.1 linux/drivers/misc/parport_pc.c
--- linux/drivers/misc/parport_pc.c 1998/06/08 22:39:09 1.1
+++ linux/drivers/misc/parport_pc.c 1998/06/08 22:47:06
@@ -313,6 +313,12 @@
static int parport_SPP_supported(struct parport *pb)
+ * Initialize a potential present and not initiazlied ECR to the more
+ * SPP compatible mode to be sure to detect the port if present.
+ if (pb->base != 0x3bc && !check_region(pb->base+0x400,3))
+ parport_pc_write_econtrol(pb, 0x0);
/* Do a simple read-write test to make sure the port exists. */
-- To unsubscribe, send mail to: email@example.com --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2.0b3 on Wed 30 Dec 1998 - 10:17:49 EST