summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2004-05-04 22:31:16 +0000
committermarius <marius@FreeBSD.org>2004-05-04 22:31:16 +0000
commit441f1204cc6d4312cb9836e40ce4947cc8221f25 (patch)
treee5a0a23b5ca30d2c9fb6d79cc0c69a696509ccd5 /sys/sparc64
parentc99291a3b04b3d1905e3634d4fe531bebf4de5bc (diff)
downloadFreeBSD-src-441f1204cc6d4312cb9836e40ce4947cc8221f25.zip
FreeBSD-src-441f1204cc6d4312cb9836e40ce4947cc8221f25.tar.gz
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
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/sparc64/nexus.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/sparc64/sparc64/nexus.c b/sys/sparc64/sparc64/nexus.c
index 7eece49..eeb3699 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
OpenPOWER on IntegriCloud