Hi,
If this is the wrong place to mail a patch, could someone clue me in?
Thanks. In the meantime...
This patch prevents parport_pc from thinking that HP ScanJet interface
cards are parallel ports. It also adds what I think is a missing kfree()
to the clean-up code following the failure of parport_SPP_supported().
(Tim Waugh if you're reading this and are wondering, the kfree() in this
patch is the one I mentioned in my last e-mail to you).
-Kipp
--- drivers/parport/parport_pc.c.orig Sun Jul 15 20:00:28 2001
+++ drivers/parport/parport_pc.c Sun Jul 15 20:32:30 2001
@@ -1440,6 +1440,20 @@
*/
clear_epp_timeout(pb);
+ /*
+ * then rule out the possibility that this is an HP ScanJet IF card
+ * by doing a read-write test on the low byte of what would be its
+ * "swing" count register. (kcannon@users.sourceforge.net)
+ */
+
+ if (!check_region (pb->base + 3, 4)) {
+ outb (0x08, pb->base + 3); /* write enable -> swing */
+ outb (0x55, pb->base + 7); /* low byte -> swing count */
+ outb (0x02, pb->base + 3); /* handshake -> swing */
+ if (inb (pb->base + 7) == 0x55) /* check read-back value */
+ return 0;
+ }
+
/* Do a simple read-write test to make sure the port exists. */
w = 0xc;
outb (w, CONTROL (pb));
@@ -2034,6 +2048,7 @@
if (!parport_SPP_supported (p)) {
/* No port. */
kfree (priv);
+ kfree (ops);
return NULL;
}
if (priv->ecr)
-- 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 Jul 16 2001 - 01:41:00 EDT