From gordon@hangar19.iadfw.net  Tue May  2 12:15:10 2000
Return-Path: <gordon@hangar19.iadfw.net>
Received: from hangar19.iadfw.net (hangar19.iadfw.net [206.66.13.27])
	by hub.freebsd.org (Postfix) with ESMTP id 352A437BCEF
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  2 May 2000 12:15:02 -0700 (PDT)
	(envelope-from gordon@hangar19.iadfw.net)
Received: from localhost (4413 bytes) by hangar19.iadfw.net
	via sendmail with P:stdio/R:bind_hosts/T:inet_zone_bind_smtp
	(sender: <gordon>) (ident <gordon> using unix)
	id <m12mi8F-00002LC@hangar19.iadfw.net>
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 2 May 2000 14:14:55 -0500 (CDT)
	(Smail-3.2.0.96 1997-Jun-2 #110 built 2000-Jan-16)
Message-Id: <m12mi8F-00002LC@hangar19.iadfw.net>
Date: Tue, 2 May 2000 14:14:55 -0500 (CDT)
From: gburditt@airmail.net
Sender: gordon@hangar19.iadfw.net
Reply-To: gburditt@airmail.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: Parallel printer does not work <Synopsis of the problem (one line)>
X-Send-Pr-Version: 3.2

>Number:         18352
>Category:       kern
>Synopsis:       Parallel printer does not work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May  2 12:20:02 PDT 2000
>Closed-Date:    Fri Jan 18 08:14:39 PST 2002
>Last-Modified:  Fri Jan 18 08:15:26 PST 2002
>Originator:     Gordon Burditt
>Release:        FreeBSD 4.0-RELEASE i386
>Organization:
>Environment:

	FreeBSD-4.0-RELEASE
	i386/Pentium (I)
	Award BIOS
	System with problem has EPP/ECP-capable parallel port.
	

>Description:

On switching to FreeBSD-4.0-RELEASE from FreeBSD-3.3-RELEASE, I discovered
that my parallel-port printer no longer works - it appears to be
permanently offline after the first open.  lpd sits there generating
no output even if something is queued.  On the other hand, if I move 
the printer to another system, also running FreeBSD-4.0-RELEASE, it works.

There are two systems involved.  'hammy' has a stupid parallel port
not capable of special modes:
	ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
	ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
	ppi0: <Parallel I/O> on ppbus0
	lpt0: <Printer> on ppbus0
	lpt0: Interrupt-driven port
	plip0: <PLIP network interface> on ppbus0
This port works.  (It wasn't booted with the printer attached).

'mouse' has a "more capable" parallel port, but the BIOS is set up to
use it in 'normal' mode, however, the kernel seems to insist on
detecting special modes anyway:

	ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
	ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
	ppbus0: IEEE1284 device found /NIBBLE/PS2/ECP
	Probing for PnP devices on ppbus0:
	ppbus0: <HEWLETT-PACKARD DESKJET 870C> PCL,MLC,PML
	ppi0: <Parallel I/O> on ppbus0
	lpt0: <Printer> on ppbus0
	lpt0: Interrupt-driven port
	plip0: <PLIP network interface> on ppbus0
This port appears to be permanently not ready, except that
sometimes when booting single-user, I can get in one 
"cat /etc/passwd > /dev/lpt0" before it locks up (and the
result appears on the printer).  If lpd gets first shot at the 
printer, nothing comes out even though it has something queued 
for printing.

The two systems have nearly-identical kernels, the differences
being in the interrupts for sio2 and sio3, and 'mouse' has
a second ethernet card.  No, IRQ 7 is not being shared.
One test on 'mouse' with a GENERIC kernel demonstrated that the
problem isn't specific to my kernel configuration (and I didn't
change anything related to the parallel port anyway).

I have tried setting EPP in the BIOS settings for the parallel 
port on 'mouse', and it didn't seem to make any difference.

The printer and its cable are not broken because it works on 'hammy'
and used to work on 'mouse' under FreeBSD-3.3.

The parallel port on 'mouse' and associated cabling is not broken because 
it (a) works under MS-DOS booted from floppy, (b) used to work under 
FreeBSD-3.3 without problems, and (c) seems to work sometimes for the first 
open under FreeBSD-4.0.  Interrupt settings for the port (if they
are even changable) haven't changed since FreeBSD 3.3 and they
worked with that.  I am reasonably convinced that this is not a 
problem with a loose cable.

lpd and apsfilter are not broken (or at least not the only problem)
because cat directly to /dev/lpt0 doesn't work either (with lpd either
killed off or not started on boot), with an apparent indefinite hang
waiting for the printer to become ready.  lpd and apsfilter worked
fine under FreeBSD-3.3.  They haven't been recompiled or reinstalled
for 4.0, but they should have appropriate old libraries available to work.

Use of lptcontrol to set modes doesn't work as this requires the 
printer to become ready, and it doesn't.  Neither system should 
have any problems using IRQ 7 with the parallel port.

Is there a problem with mode detection for some chipsets?

	

>How-To-Repeat:

	Well, on my system 'mouse', it's hard NOT to repeat.
	I think the problem involves ports capable of EPP or ECP
	since the system with the stupid port works fine.

	

>Fix:

	
	Well, attaching the printer to a different system with
	a stupid parallel port is a possibility, but annoying.


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: jedgar 
Responsible-Changed-When: Sun May 7 05:22:28 PDT 2000 
Responsible-Changed-Why:  
Misfiled PR 
State-Changed-From-To: open->feedback 
State-Changed-By: mike 
State-Changed-When: Sat Jul 21 18:57:08 PDT 2001 
State-Changed-Why:  

Does this problem still occur in newer versions of FreeBSD, 
such as 4.3-RELEASE? 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=18352 
State-Changed-From-To: feedback->closed 
State-Changed-By: sheldonh 
State-Changed-When: Fri Jan 18 08:14:39 PST 2002 
State-Changed-Why:  
Automatic feedback timeout.  If additional feedback that warrants 
the re-opening of this PR is available but not included in the 
audit trail, please include the feedback in a reply to this message 
(preserving the Subject line) and ask that the PR be re-opened. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18352 
>Unformatted:
