From kjwolf@seismic.de  Sun Oct  5 18:58:05 2003
Return-Path: <kjwolf@seismic.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 2038D16A4B3
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  5 Oct 2003 18:58:05 -0700 (PDT)
Received: from ks420.kasserver.com (ks420.kasserver.com [62.141.48.137])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A6B5443FF7
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  5 Oct 2003 18:58:03 -0700 (PDT)
	(envelope-from kjwolf@seismic.de)
Received: from golulu.seismic.de (dsl-213-023-223-195.arcor-ip.net [213.23.223.195])
	(authenticated)
	by ks420.kasserver.com (8.11.6/8.11.6) with ESMTP id h961w2H15910
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 6 Oct 2003 03:58:02 +0200
Received: by golulu.seismic.de (Postfix, from userid 1000)
	id 1BBA8BB46; Mon,  6 Oct 2003 03:58:01 +0200 (CEST)
Message-Id: <20031006015801.1BBA8BB46@golulu.seismic.de>
Date: Mon,  6 Oct 2003 03:58:01 +0200 (CEST)
From: "Klaus-J.Wolf" <yanestra@seismic.de>
To: FreeBSD-gnats-submit@freebsd.org
Subject: lptcontrol gives "device busy" if device turned off
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         57630
>Category:       bin
>Synopsis:       lptcontrol(8) gives "device busy" if device turned off
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          patched
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 05 19:00:36 PDT 2003
>Closed-Date:    
>Last-Modified:  Sat May 24 19:01:23 UTC 2008
>Originator:     Klaus-J. Wolf
>Release:        FreeBSD 5.1-RELEASE i386
>Organization:
>Environment:
System: FreeBSD golulu.logelhorst.xx 5.1-RELEASE FreeBSD 5.1-RELEASE #12: Tue Sep 23 15:50:50 CEST 2003 toor@golulu.logelhorst.xx:/usr/src/sys/i386/compile/GOLULU i386

>Description:
"lptcontrol -ei -d /dev/lpt0" during boot time fails with "device busy"
if the printer is turned off at that time.

# dmesg|grep lpt
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port

>How-To-Repeat:
Turn printer off. Type "lptcontrol -i -d /dev/lpt0".

>Fix:
unknown.


>Release-Note:
>Audit-Trail:

From: Bruce Evans <bde@zeta.org.au>
To: "Klaus-J.Wolf" <yanestra@seismic.de>
Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org
Subject: Re: bin/57630: lptcontrol gives "device busy" if device turned off
Date: Mon, 6 Oct 2003 19:02:03 +1000 (EST)

 On Mon, 6 Oct 2003, Klaus-J.Wolf wrote:
 
 > >Description:
 > "lptcontrol -ei -d /dev/lpt0" during boot time fails with "device busy"
 > if the printer is turned off at that time.
 
 lptcontrol should be run on the control device (not /dev/lptN).
 
 Support for using the control device automatically was broken in
 rev.1.8 of lptcontrol.c.
 
 Existence of the documented control device was broken in FreeBSD-5
 as part of devfs lossage.  The documented control device is "/dev/lpctlN"
 (see lptcontrol(8), but devfs creates "/dev/lptN.ctl".
 
 The lpt driver also has support for control bits in the minor number.
 (The control device is a special case of this -- it uses bit 0x80.)
 There are 6 control bits, giving a total of 64 possible devices per
 unit.  devfs only creates 2 of these.
 
 Bruce

From: "Klaus-J. Wolf" <yanestra@seismic.de>
To: freebsd-gnats-submit@FreeBSD.org, yanestra@seismic.de
Cc:  
Subject: Re: bin/57630: lptcontrol gives "device busy" if device turned off
Date: Wed, 08 Oct 2003 03:19:58 +0200

  From the manual page:
      -d device
              Set the mode of the printer device specified by device.  The
              default value for device is /dev/lpt0.
 :-(
 
State-Changed-From-To: open->patched 
State-Changed-By: schweikh 
State-Changed-When: Fri Oct 1 20:12:18 GMT 2004 
State-Changed-Why:  
C code and man page were overhauled. Should be clearer now. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=57630 

From: Ulrich Spoerlein <q@uni.de>
To: freebsd-gnats-submit@FreeBSD.org, yanestra@seismic.de
Cc: schweikh@FreeBSD.org
Subject: Re: bin/57630: lptcontrol gives "device busy" if device turned off
Date: Sun, 10 Oct 2004 19:30:29 +0200

 Hi,
 
 this seems still broken on at least 5.3-BETA5
 
 The manpage now says this:
  -d device
              Set the mode of the printer device specified by device.  The
              default value for device is /dev/lpt0.
 
 But nothing works:
 # lptcontrol -p
 lptcontrol: open: Device busy
 # lptcontrol -p -d /dev/lpt0
 lptcontrol: open: Device busy
 # lptcontrol -p -d /dev/lpt0.ctl
 lptcontrol: ioctl: Operation not supported
 
 Note that there is a pause before the error message gets displayed.
 
 There is a Scanner attached to the parallel port, disconnecting the
 scanner yields the same results.
 
 Coupled with the fact, that acpi "claims" the ppc(4) device and ignores
 settings in /boot/device.hints, this is rather annoying :(
 
 Ulrich Spoerlein
 -- 
 PGP Key ID: F0DB9F44				Encrypted mail welcome!
 PGP Fingerprint: F1CE D062 0CA9 ADE3 349B  2FE8 980A C6B5 F0DB 9F44
 Ok, which part of "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn."
 didn't you understand?
>Unformatted:
