From 61ebae6aebbd4a7a42dbbabb052c83a32912e953 Mon Sep 17 00:00:00 2001 From: alfred Date: Sun, 24 Feb 2002 22:27:54 +0000 Subject: [PATCH] Give a little more information as to why pnp configuration of a device may have failed. Submitted by: Terry Lambert --- sys/isa/isa_common.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c index 71409f032e50..dee64e20a9b8 100644 --- a/sys/isa/isa_common.c +++ b/sys/isa/isa_common.c @@ -423,17 +423,22 @@ isa_assign_resources(device_t child) struct isa_device *idev = DEVTOISA(child); struct isa_config_entry *ice; struct isa_config *cfg; + char *reason = "Empty ISA id_configs"; cfg = malloc(sizeof(struct isa_config), M_TEMP, M_NOWAIT|M_ZERO); if (cfg == NULL) return(0); TAILQ_FOREACH(ice, &idev->id_configs, ice_link) { + reason = "memory"; if (!isa_find_memory(child, &ice->ice_config, cfg)) continue; + reason = "port"; if (!isa_find_port(child, &ice->ice_config, cfg)) continue; + reason = "irq"; if (!isa_find_irq(child, &ice->ice_config, cfg)) continue; + reason = "drq"; if (!isa_find_drq(child, &ice->ice_config, cfg)) continue; @@ -441,6 +446,7 @@ isa_assign_resources(device_t child) * A working configuration was found enable the device * with this configuration. */ + reason = "no callback"; if (idev->id_config_cb) { idev->id_config_cb(idev->id_config_arg, cfg, 1); @@ -453,7 +459,7 @@ isa_assign_resources(device_t child) * Disable the device. */ bus_print_child_header(device_get_parent(child), child); - printf(" can't assign resources\n"); + printf(" can't assign resources (%s)\n", reason); if (bootverbose) isa_print_child(device_get_parent(child), child); bzero(cfg, sizeof (*cfg));