From owner-freebsd-bugs Sun Mar 19 15:50:10 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id E635137B805 for ; Sun, 19 Mar 2000 15:50:06 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id PAA80602; Sun, 19 Mar 2000 15:50:07 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from hergotha.lcs.mit.edu (wollman-bogus-56k.lcs.mit.edu [18.23.23.23]) by hub.freebsd.org (Postfix) with ESMTP id AAF8D37B805 for ; Sun, 19 Mar 2000 15:42:33 -0800 (PST) (envelope-from wollman@hergotha.lcs.mit.edu) Received: (from wollman@localhost) by hergotha.lcs.mit.edu (8.9.3/8.9.3) id SAA00419; Sun, 19 Mar 2000 18:42:26 -0500 (EST) (envelope-from wollman) Message-Id: <200003192342.SAA00419@hergotha.lcs.mit.edu> Date: Sun, 19 Mar 2000 18:42:26 -0500 (EST) From: Garrett Wollman Reply-To: wollman@hergotha.lcs.mit.edu To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/17495: ppc driver does not accept PNP attachments Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 17495 >Category: kern >Synopsis: ppc driver does not accept PNP attachments >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Mar 19 15:50:01 PST 2000 >Closed-Date: >Last-Modified: >Originator: Garrett Wollman >Release: FreeBSD 5.0-CURRENT i386 >Organization: MIT Laboratory for Computer Science >Environment: -current as of a couple of days ago (world just built today) >Description: The ppc (parallel printer controller) driver does not accept ISA PNP (and most importantly, PNPBIOS) attachments. >How-To-Repeat: Configure `device ppc0' in your kernel. Reboot. Notice its absence. >Fix: Index: ppc.c =================================================================== RCS file: /home/ncvs/src/sys/isa/ppc.c,v retrieving revision 1.26 diff -u -r1.26 ppc.c --- ppc.c 2000/01/29 14:02:30 1.26 +++ ppc.c 2000/03/19 23:31:57 @@ -1692,6 +1692,12 @@ return (ENXIO); } +static struct isa_pnp_id lpc_ids[] = { + { 0x0004d041, "Standard parallel printer port" }, /* PNP0400 */ + { 0x0104d041, "ECP parallel printer port" }, /* PNP0401 */ + { 0 } +}; + static int ppc_probe(device_t dev) { @@ -1703,14 +1709,13 @@ int error; u_long port; - /* If we are a PNP device, abort. Otherwise we attach to *everthing* */ - if (isa_get_logicalid(dev)) - return ENXIO; - parent = device_get_parent(dev); - /* XXX shall be set after detection */ - device_set_desc(dev, "Parallel port"); + error = ISA_PNP_PROBE(parent, dev, lpc_ids); + if (error == ENXIO) + return (ENXIO); + else if (error != 0) /* XXX shall be set after detection */ + device_set_desc(dev, "Parallel port"); /* * Allocate the ppc_data structure. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message