From owner-freebsd-bugs Thu May 17 1:10:15 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id BF65E37B423 for ; Thu, 17 May 2001 01:10:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f4H8A0E13396; Thu, 17 May 2001 01:10:00 -0700 (PDT) (envelope-from gnats) Received: from mx2.informatik.uni-tuebingen.de (mx2.Informatik.Uni-Tuebingen.De [134.2.12.9]) by hub.freebsd.org (Postfix) with ESMTP id E79D437B423 for ; Thu, 17 May 2001 01:05:20 -0700 (PDT) (envelope-from sperber@informatik.uni-tuebingen.de) Received: from sams.informatik.uni-tuebingen.de (sams [134.2.12.50]) by mx2.informatik.uni-tuebingen.de (Postfix) with ESMTP id 3A3841062 for ; Thu, 17 May 2001 10:05:19 +0200 (MST) Received: (from sperber@localhost) by sams.informatik.uni-tuebingen.de (8.11.3/8.11.3) id f4H85Ir07220; Thu, 17 May 2001 10:05:18 +0200 (CEST) (envelope-from sperber) Message-Id: Date: 17 May 2001 10:05:17 +0200 From: sperber@informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor]) To: FreeBSD-gnats-submit@freebsd.org Subject: kern/27403: lpt driver doesn't handle flags anymore Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 27403 >Category: kern >Synopsis: lpt driver doesn't handle flags anymore >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu May 17 01:10:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Mike Sperber Release: FreeBSD 4.3-RELEASE i386 >Organization: Wilhelm-Schickard-Institut / Programmierung >Environment: System: FreeBSD sams 4.3-RELEASE FreeBSD 4.3-RELEASE #1: Mon May 7 13:35:27 MST 2001 sperber@sams:/usr/local/src/sys/compile/SAMS i386 >Description: The lpt driver provides historical provision for some options to be encoded in the minor device number: #define LP_POS_INIT 0x04 /* if we are a postive init signal */ #define LP_POS_ACK 0x08 /* if we are a positive going ack */ #define LP_NO_PRIME 0x10 /* don't prime the printer at all */ #define LP_PRIMEOPEN 0x20 /* prime on every open */ #define LP_AUTOLF 0x40 /* tell printer to do an automatic lf */ #define LP_BYPASS 0x80 /* bypass printer ready checks */ (The first two seem to no longer be supported by the code, the rest is.) This used to work at least up to FreeBSD 2.2. Now, using mknod to create lpt devices with any of these options set, FreeBSD no longer recognizes the resulting device notes as attached to the driver. ("Device not configured.") My guess is that it used to mask out higher bits from the minor device number in earlier versions of FreeBSD which it doesn't do anymore. There is explicit provision for LP_BYPASS and LP_BYPASS by itself only for the lpt0.ctl device. >How-To-Repeat: As root: mknod /dev/lpt0.autolf c 16 64 cat /dev/null > /dev/lpt0.autolf >Fix: If I've diagnosed the problem right the old way of setting options is hard to support in the new framework. There seem to be two ways of approaching this: - make the options kernel-configurable - provide explicit support for NO_PRIME (as for LP_BYPASS) by itself and implement ioctls for priming the port and turning on auto linefeed. I'm willing and able to implement either of these, given some guidance from the maintainers on how to proceed. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message