diff options
author | Warner Losh <imp@FreeBSD.org> | 2001-07-30 00:03:58 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2001-07-30 00:03:58 +0000 |
commit | 4c7bc18993c269af198a93fcaef5e1383cde8549 (patch) | |
tree | 2d535f47a977837680bf3d0bf0be6bf2a9a0f0ae /sys/pccard/pccard.c | |
parent | 9e27954de1e37f5a28d70c29e23aa528b2ea9b0c (diff) |
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.
Notes
Notes:
svn path=/head/; revision=80570
Diffstat (limited to 'sys/pccard/pccard.c')
-rw-r--r-- | sys/pccard/pccard.c | 7 |
1 files changed, 7 insertions, 0 deletions
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) |