From Meyser@xenet.de  Mon Sep 29 06:18:59 2003
Return-Path: <Meyser@xenet.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D7CBA16A4BF
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 29 Sep 2003 06:18:59 -0700 (PDT)
Received: from server1.xenet.de (server1.xenet.de [193.159.181.120])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B8AC543FAF
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 29 Sep 2003 06:18:55 -0700 (PDT)
	(envelope-from Meyser@xenet.de)
Received: from server.intern (xenet.harz.de [193.159.181.111])
	by server1.xenet.de (8.12.5/8.12.5) with ESMTP id h8TDIroH092883
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 29 Sep 2003 15:18:53 +0200 (CEST)
	(envelope-from Meyser@xenet.de)
Received: from server.intern (localhost [127.0.0.1])
	by server.intern (8.12.9/8.12.9) with ESMTP id h8TDIrhO037503;
	Mon, 29 Sep 2003 15:18:53 +0200 (CEST)
	(envelope-from matthias@server.intern)
Received: (from matthias@localhost)
	by server.intern (8.12.9/8.12.9/Submit) id h8TDIrH6037502;
	Mon, 29 Sep 2003 15:18:53 +0200 (CEST)
	(envelope-from matthias)
Message-Id: <200309291318.h8TDIrH6037502@server.intern>
Date: Mon, 29 Sep 2003 15:18:53 +0200 (CEST)
From: Matthias Meyser <meyser@xenet.de>
Reply-To: Matthias Meyser <meyser@xenet.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Matthias Meyser <meyser@xenet.de>
Subject: kernel panics when using old monocrome printer port (IO_LPT3 / 0x3bc)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         57350
>Category:       kern
>Synopsis:       [panic] using old monocrome printer port (IO_LPT3 / 0x3bc)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 29 06:20:13 PDT 2003
>Closed-Date:    
>Last-Modified:  Sat Sep 11 22:12:24 GMT 2004
>Originator:     Matthias Meyser
>Release:        FreeBSD 4.9-RC i386
>Organization:
XeNET GmbH, Clausthal
>Environment:
System: FreeBSD ripper.intern 4.9-RC FreeBSD 4.9-RC #1: Mon Sep 29 13:16:30 CEST 2003     root@fbsd.intern:/usr/obj/usr/src/sys/RIPPER  i386

	PI 233 machine with 3 LPT Ports  at 0x378, 0x278 and 0x3bc
	all without irq.

>Description:
        If I inklude the following lines

        ----------------------------------8<--------------------------------
	# Parallel port
	device         ppc2    at isa? port IO_LPT3
	device         ppbus           # Parallel port bus (required)
        ----------------------------------8<--------------------------------

	in my custoim kernel. The system panics during boot. This happens 
	when normaly the ppc ports are detected.

        ----------------------------------8<--------------------------------
        # Parallel port
        device         ppc1    at isa? port IO_LPT1
        device         ppbus           # Parallel port bus (required)
        device         ppc2    at isa? port IO_LPT2
        device         ppbus           # Parallel port bus (required)
        ----------------------------------8<--------------------------------

	makes no problem, but adding IO_LPT3 traps kernel.

	If I boot with GENERIC kernel I geht the following output
        ----------------------------------8<--------------------------------
	cannot reserve I/O port range
        ----------------------------------8<--------------------------------
	and no LPT port ist detected.

	booting with my old kernel (same kernelconfig)
        ----------------------------------8<--------------------------------
	Copyright (c) 1992-2003 The FreeBSD Project.
	Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
	FreeBSD 4.8-STABLE #8: Fri Jun 20 21:06:01 CEST 2003
    		root@fbsd.intern:/usr/obj/usr/src/sys/RIPPER
	Timecounter "i8254"  frequency 1193182 Hz
	CPU: Pentium/P55C (233.86-MHz 586-class CPU)
  	Origin = "GenuineIntel"  Id = 0x543  Stepping = 3
	Features=0x8001bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,MMX>
	[...]
	ppc0: <Parallel port> at port 0x378-0x37f on isa0
	ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
	lpt0: <Printer> on ppbus0
	lpt0: Polled port
	ppc1: <Parallel port> at port 0x278-0x27f on isa0
	ppc1: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
	ppc1: FIFO with 7/0/5 bytes threshold
	lpt1: <Printer> on ppbus1
	lpt1: Polled port
	ppc2: <Parallel port> at port 0x3bc-0x3bf on isa0
	ppc2: Generic chipset (NIBBLE-only) in COMPATIBLE mode
	ppbus2: IEEE1284 device found /NIBBLE/ECP
	Probing for PnP devices on ppbus2:
	ppbus2: <Hewlett-Packard HP LaserJet 6P> PJL,MLC,PCLXL,PCL
	lpt2: <Printer> on ppbus2
	lpt2: Polled port
        ----------------------------------8<--------------------------------

>How-To-Repeat:
	Install a monocrome printer card (IO_LPT3,0x3bc) and configure
	your kernel to use it.

>Fix:
	If memory serves my right, this is caused by trying to reserve an extended
	I/O space (8 instead of 4 Bytes) for LPT3 (0x3bc). I think I had the same problem
	back in 1997 with FreeBSD 2.2.4

	The Fix is to NOT try to reserve this extended I/O space for IP_LPT3

>Release-Note:
>Audit-Trail:
>Unformatted:
