diff options
author | nyan <nyan@FreeBSD.org> | 2000-05-31 10:49:58 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2000-05-31 10:49:58 +0000 |
commit | 2b96345c0f5ec60aab4122a95b2369a30297565c (patch) | |
tree | 743ded5c8df8a66d13a09ec50f45dc3d10776219 /sys/pc98 | |
parent | 0e03ad84cfaa43e69a40a557dd0edba42a98cfa3 (diff) | |
download | FreeBSD-src-2b96345c0f5ec60aab4122a95b2369a30297565c.zip FreeBSD-src-2b96345c0f5ec60aab4122a95b2369a30297565c.tar.gz |
Sync with sys/isa/ppc.c revision 1.27.
Diffstat (limited to 'sys/pc98')
-rw-r--r-- | sys/pc98/cbus/ppc.c | 17 | ||||
-rw-r--r-- | sys/pc98/pc98/ppc.c | 17 |
2 files changed, 22 insertions, 12 deletions
diff --git a/sys/pc98/cbus/ppc.c b/sys/pc98/cbus/ppc.c index 14185e6..0afbad0 100644 --- a/sys/pc98/cbus/ppc.c +++ b/sys/pc98/cbus/ppc.c @@ -1699,6 +1699,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) { @@ -1717,14 +1723,13 @@ ppc_probe(device_t dev) unsigned int tmp; #endif - /* 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. diff --git a/sys/pc98/pc98/ppc.c b/sys/pc98/pc98/ppc.c index 14185e6..0afbad0 100644 --- a/sys/pc98/pc98/ppc.c +++ b/sys/pc98/pc98/ppc.c @@ -1699,6 +1699,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) { @@ -1717,14 +1723,13 @@ ppc_probe(device_t dev) unsigned int tmp; #endif - /* 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. |