summaryrefslogtreecommitdiffstats
path: root/sys/isa/isa_common.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2000-07-12 00:42:08 +0000
committerjhb <jhb@FreeBSD.org>2000-07-12 00:42:08 +0000
commitbb4d1e0fb6cf0c74e049d738b113c790a24d5e52 (patch)
treed9650c7fdf60d415f67e357d3f9a923228fbe139 /sys/isa/isa_common.c
parentce18c772bbedd168f82fcd2b2d7220fcb7295e29 (diff)
downloadFreeBSD-src-bb4d1e0fb6cf0c74e049d738b113c790a24d5e52.zip
FreeBSD-src-bb4d1e0fb6cf0c74e049d738b113c790a24d5e52.tar.gz
Don't assume that any ISA device that fails to probe is a PnP device,
instead, use the bus_print_child_* functions to display the error message. Also, since this is more of a warning than an error, hide it behind bootverbose. Similarly, if isa_assign_resources() fails to allocate resources to a device, use bus_print_child_header() instead of device_printf(), and display the resources that could not be allocated if bootverbose is true. Approved by: msmith Help from: mdodd
Diffstat (limited to 'sys/isa/isa_common.c')
-rw-r--r--sys/isa/isa_common.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c
index 4e8a624..79f4d5e 100644
--- a/sys/isa/isa_common.c
+++ b/sys/isa/isa_common.c
@@ -76,6 +76,8 @@
#include <alpha/isa/isavar.h>
#endif
+static int isa_print_child(device_t bus, device_t dev);
+
MALLOC_DEFINE(M_ISADEV, "isadev", "ISA device");
static devclass_t isa_devclass;
@@ -411,11 +413,10 @@ isa_assign_resources(device_t child)
/*
* Disable the device.
*/
- if (device_get_desc(child))
- device_printf(child, "<%s> can't assign resources\n",
- device_get_desc(child));
- else
- device_printf(child, "can't assign resources\n");
+ bus_print_child_header(device_get_parent(child), child);
+ printf(" can't assign resources\n");
+ if (bootverbose)
+ isa_print_child(device_get_parent(child), child);
bzero(&config, sizeof config);
if (idev->id_config_cb)
idev->id_config_cb(idev->id_config_arg, &config, 0);
@@ -605,11 +606,12 @@ isa_print_child(device_t bus, device_t dev)
static void
isa_probe_nomatch(device_t dev, device_t child)
{
- device_printf(dev, "<%s> found",
- pnp_eisaformat(isa_get_logicalid(child)));
- if (bootverbose)
+ if (bootverbose) {
+ bus_print_child_header(dev, child);
+ printf(" failed to probe");
isa_print_all_resources(child);
- printf("\n");
+ bus_print_child_footer(dev, child);
+ }
return;
}
OpenPOWER on IntegriCloud