Date: Tue, 3 Aug 2004 13:58:55 +0930 From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: freebsd-current@freebsd.org Cc: current@freebsd.org Subject: Re: LPT interruptstorm Message-ID: <200408031358.56010.doconnor@gsoft.com.au> In-Reply-To: <E1BrbKD-000GdA-00@hetzner.co.za> References: <E1BrbKD-000GdA-00@hetzner.co.za>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <sys/types.h> -#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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408031358.56010.doconnor>