On Mon, 6 Mar 2000, Greg Nelson wrote:
> Does this have to be done at the application level, by renegotiating
> compatibility mode or something like that?
Does this patch do what you want? I'll send it to Linus..
Tim.
*/
Index: linux/drivers/char/ppdev.c
diff -u linux/drivers/char/ppdev.c:1.1.1.12 linux/drivers/char/ppdev.c:1.15
--- linux/drivers/char/ppdev.c:1.1.1.12 Wed Mar 8 09:17:20 2000
+++ linux/drivers/char/ppdev.c Tue Mar 14 17:17:31 2000
@@ -537,6 +537,15 @@
unsigned int minor = MINOR (inode->i_rdev);
struct pp_struct *pp = file->private_data;
+ if (pp->pdev->port->ieee1284.mode != IEEE1284_MODE_COMPAT) {
+ parport_claim_or_block (pp->pdev);
+ pp->flags |= PP_CLAIMED;
+ parport_negotiate (pp->pdev->port, IEEE1284_MODE_COMPAT);
+ printk (KERN_DEBUG CHRDEV
+ "%x: negotiated back to compatibility mode because "
+ "user-space forgot\n", minor);
+ }
+
if (pp->flags & PP_CLAIMED) {
parport_release (pp->pdev);
printk (KERN_DEBUG CHRDEV "%x: released pardevice because "
-- 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 : Tue Mar 14 2000 - 12:19:32 EST