From 4c7bc18993c269af198a93fcaef5e1383cde8549 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 30 Jul 2001 00:03:58 +0000 Subject: [PATCH] When booted -v (eg bootverbose is non-zero), have pccard report what resources it is attempting to assign to a child object. This should help people track down mysterious resource allocation problems more easily. # Unfortunately, it is harder to do the conflict check and report which # resource failed if the driver itself doesn't. --- sys/pccard/pccard.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index d8187d6d2aa3..816fa3f548bc 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -226,6 +226,13 @@ allocate_driver(struct slot *slt, struct dev_desc *desc) child = device_add_child(pccarddev, devi->name, desc->unit); device_set_flags(child, desc->flags); device_set_ivars(child, devi); + if (bootverbose) { + device_printf(pccarddev, + "Assigning %s: io 0x%x-0x%x irq %d mem 0x%lx-0x%lx\n", + device_get_nameunit(child), + desc->iobase, desc->iobase + desc->iosize - 1, + irq, desc->mem, desc->mem + desc->memsize - 1); + } err = bus_set_resource(child, SYS_RES_IOPORT, 0, desc->iobase, desc->iosize); if (err)