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.
This commit is contained in:
imp 2005-08-01 07:03:10 +00:00
parent 0367ce1d05
commit 1c04aa97aa

View File

@ -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),