Date: Sun, 19 Mar 2000 18:42:26 -0500 (EST) From: Garrett Wollman <wollman@hergotha.lcs.mit.edu> To: FreeBSD-gnats-submit@freebsd.org Subject: kern/17495: ppc driver does not accept PNP attachments Message-ID: <200003192342.SAA00419@hergotha.lcs.mit.edu>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003192342.SAA00419>