From 9f7cc56b4e6247170be8a87c9d448d00e881464b Mon Sep 17 00:00:00 2001 From: Marius Strobl Date: Tue, 4 May 2004 22:31:16 +0000 Subject: [PATCH] Fix bug introduced in revision 1.9; in nexus_probe_nomatch() get device name and type for printing info about the device that didn't probe from child, not parent. This fixes a panic on systems where not yet supported devices hang off of the nexus, e.g. on E450. Reported by: joerg --- sys/sparc64/sparc64/nexus.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/sparc64/sparc64/nexus.c b/sys/sparc64/sparc64/nexus.c index 7eece499aaa..eeb36998733 100644 --- a/sys/sparc64/sparc64/nexus.c +++ b/sys/sparc64/sparc64/nexus.c @@ -228,13 +228,12 @@ nexus_attach(device_t dev) static void nexus_probe_nomatch(device_t dev, device_t child) { - char *name = nexus_get_name(dev); char *type; - if ((type = nexus_get_device_type(dev)) == NULL) + if ((type = nexus_get_device_type(child)) == NULL) type = "(unknown)"; device_printf(dev, "<%s>, type %s (no driver attached)\n", - name, type); + nexus_get_name(child), type); } static int