summaryrefslogtreecommitdiffstats
path: root/sys/dev/ppc
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>2000-04-22 15:08:50 +0000
committerwollman <wollman@FreeBSD.org>2000-04-22 15:08:50 +0000
commit494d7321f02ecd2732e6365ca8670bfb8f3688f3 (patch)
tree1fdd3eed9b392510927690c45facf49e05b61f76 /sys/dev/ppc
parent692df98b8157c5acee53a12be1583ca87d4f1f4e (diff)
downloadFreeBSD-src-494d7321f02ecd2732e6365ca8670bfb8f3688f3.zip
FreeBSD-src-494d7321f02ecd2732e6365ca8670bfb8f3688f3.tar.gz
Enable PnP attachment for parallel port controllers.
PR: 17495
Diffstat (limited to 'sys/dev/ppc')
-rw-r--r--sys/dev/ppc/ppc.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c
index eb49870..53cb50d 100644
--- a/sys/dev/ppc/ppc.c
+++ b/sys/dev/ppc/ppc.c
@@ -1692,6 +1692,12 @@ ppc_setmode(device_t dev, int mode)
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 @@ ppc_probe(device_t dev)
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.
OpenPOWER on IntegriCloud