From 2b2b44c9833058d637c4f2eeb7316eb499d8460d Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 12 Jul 2000 00:42:08 +0000 Subject: [PATCH] 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 --- sys/isa/isa_common.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c index 4e8a6243b92..79f4d5e892d 100644 --- a/sys/isa/isa_common.c +++ b/sys/isa/isa_common.c @@ -76,6 +76,8 @@ #include #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; }