From owner-freebsd-current@FreeBSD.ORG Tue Aug 3 04:29:06 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D78FC16A4CE; Tue, 3 Aug 2004 04:29:06 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6727643D55; Tue, 3 Aug 2004 04:29:01 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id i734SuQ6025034; Tue, 3 Aug 2004 13:58:56 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-current@freebsd.org Date: Tue, 3 Aug 2004 13:58:55 +0930 User-Agent: KMail/1.6.2 References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_HSxDBFcVO6gcCgK" Message-Id: <200408031358.56010.doconnor@gsoft.com.au> X-Spam-Score: -4.9 () IN_REP_TO,MIME_LONG_LINE_QP,PGP_SIGNATURE,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: Ian FREISLICH cc: current@freebsd.org Subject: Re: LPT interruptstorm X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Aug 2004 04:29:07 -0000 --Boundary-00=_HSxDBFcVO6gcCgK Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 2 Aug 2004 21:19, Ian FREISLICH wrote: > suggested 'lptcontrol -e', but every time I've tried that (even > with lpd stopped) I get 'lptcontrol: open: Device busy'. I'm not > sure what keeps the printer port open other than lpd. =46or some reason you can't open /dev/lpt* when something isn't driving the= BUSY=20 line on the parallel port :( Actually I just read the code some more :) You could try lptcontrol -d /dev/lpt0.ctl -X lpt0.ctl has the bypass flag (0x80) set in the minor number which prevents= =20 lptopen() from trying to talk to the hardware (see /usr/src/sys/dev/ppbus/lpt.c:478) I think lptcontrol could do with this diff (attached) =2D --=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBDxSH5ZPcIHs/zowRAjYSAJ9Fqj/TdYJugQ7ynvOgr7i7zlnc/ACgqkNE amxGtLQ7oVW8bo5sZWMfpHU=3D =3DBUWq =2D----END PGP SIGNATURE----- --Boundary-00=_HSxDBFcVO6gcCgK Content-Type: text/x-diff; charset="iso-8859-1"; name="lpt-ctl.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="lpt-ctl.diff" Index: share/man/man4/lpt.4 =================================================================== RCS file: /usr/CVS-Repository/src/share/man/man4/lpt.4,v retrieving revision 1.14 diff -u -r1.14 lpt.4 --- share/man/man4/lpt.4 28 Jun 2003 23:53:37 -0000 1.14 +++ share/man/man4/lpt.4 3 Aug 2004 04:27:27 -0000 @@ -86,6 +86,8 @@ .Bl -tag -width Pa -compact .It Pa /dev/lpt0 first parallel port driver +.It Pa /dev/lpt0.ctl +first parallel port control device (makes no attempt to select hardware) .El .Sh BUGS There are lots of them, especially in cheap parallel port implementations. Index: usr.sbin/lptcontrol/lptcontrol.8 =================================================================== RCS file: /usr/CVS-Repository/src/usr.sbin/lptcontrol/lptcontrol.8,v retrieving revision 1.19 diff -u -r1.19 lptcontrol.8 --- usr.sbin/lptcontrol/lptcontrol.8 2 Jul 2004 23:12:48 -0000 1.19 +++ usr.sbin/lptcontrol/lptcontrol.8 3 Aug 2004 04:25:38 -0000 @@ -52,7 +52,7 @@ The default value for .Ar device is -.Pa /dev/lpt0 . +.Pa /dev/lpt0.ctl . .El .Pp One of @@ -64,7 +64,7 @@ .Bl -tag -width /sys/i386/conf/GENERIC -compact .It Pa /dev/lpt? printer devices -.It Pa /dev/lpctl? +.It Pa /dev/lpt?.ctl printer control devices .It Pa /sys/i386/conf/GENERIC kernel configuration file Index: usr.sbin/lptcontrol/lptcontrol.c =================================================================== RCS file: /usr/CVS-Repository/src/usr.sbin/lptcontrol/lptcontrol.c,v retrieving revision 1.14 diff -u -r1.14 lptcontrol.c --- usr.sbin/lptcontrol/lptcontrol.c 3 May 2003 21:06:37 -0000 1.14 +++ usr.sbin/lptcontrol/lptcontrol.c 3 Aug 2004 04:25:16 -0000 @@ -46,8 +46,7 @@ #include -#define PATH_LPCTL _PATH_DEV "lpctl" -#define DEFAULT_DEVICE _PATH_DEV "lpt0" +#define DEFAULT_DEVICE _PATH_DEV "lpt0.ctl" #define IRQ_INVALID -1 #define DO_POLL 0 #define USE_IRQ 1 --Boundary-00=_HSxDBFcVO6gcCgK--