summaryrefslogtreecommitdiffstats
path: root/sys/isa
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-08-01 07:03:10 +0000
committerimp <imp@FreeBSD.org>2005-08-01 07:03:10 +0000
commit1c04aa97aa46439eb55179c1331c60bd9f42cb43 (patch)
tree23dce50cb5d343c59f6279c4f2634025010d5cdb /sys/isa
parent0367ce1d05ca18de2900e89d3d860740e4755bbf (diff)
downloadFreeBSD-src-1c04aa97aa46439eb55179c1331c60bd9f42cb43.zip
FreeBSD-src-1c04aa97aa46439eb55179c1331c60bd9f42cb43.tar.gz
Add pnp and location info for the ISA bus. The pnp info is the
primary vendor id for this device. The location is empty because ISA doesn't give one a way to generally locate a card. PNP BIOS entries do provide a way to locate cards, as do isa pnp cards. These locations will be added as soon as the code to remember them is written.
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/isa_common.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c
index 36f3d79..23c7454 100644
--- a/sys/isa/isa_common.c
+++ b/sys/isa/isa_common.c
@@ -655,6 +655,8 @@ isa_print_all_resources(device_t dev)
retval += resource_list_print_type(rl, "drq", SYS_RES_DRQ, "%ld");
if (device_get_flags(dev))
retval += printf(" flags %#x", device_get_flags(dev));
+ if (idev->id_vendorid)
+ retval += printf(" pnpid %s", pnp_eisaformat(idev->id_vendorid));
return (retval);
}
@@ -1059,6 +1061,27 @@ isa_pnp_probe(device_t dev, device_t child, struct isa_pnp_id *ids)
return (ENXIO);
}
+static int
+isa_child_pnpinfo_str(device_t bus, device_t child, char *buf,
+ size_t buflen)
+{
+ struct isa_device *idev = DEVTOISA(child);
+
+ if (idev->id_vendorid)
+ snprintf(buf, buflen, "pnpid=%s",
+ pnp_eisaformat(idev->id_vendorid));
+ return (0);
+}
+
+static int
+isa_child_location_str(device_t bus, device_t child, char *buf,
+ size_t buflen)
+{
+ /* Nothing here yet */
+ *buf = '\0';
+ return (0);
+}
+
static device_method_t isa_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, isa_probe),
@@ -1087,6 +1110,8 @@ static device_method_t isa_methods[] = {
DEVMETHOD(bus_delete_resource, bus_generic_rl_delete_resource),
DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
+ DEVMETHOD(bus_child_pnpinfo_str, isa_child_pnpinfo_str),
+ DEVMETHOD(bus_child_location_str, isa_child_location_str),
/* ISA interface */
DEVMETHOD(isa_add_config, isa_add_config),
OpenPOWER on IntegriCloud