diff options
author | imp <imp@FreeBSD.org> | 2001-09-09 17:42:58 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2001-09-09 17:42:58 +0000 |
commit | 9bcbcfd13b61220c3de819914e0e2d6c2b604370 (patch) | |
tree | 30192b3d5e04e0c8996dcf11e409023ad45f725f /sys | |
parent | efea72f8e30b779213f12f337eb2df7e8a6afd24 (diff) | |
download | FreeBSD-src-9bcbcfd13b61220c3de819914e0e2d6c2b604370.zip FreeBSD-src-9bcbcfd13b61220c3de819914e0e2d6c2b604370.tar.gz |
When booting verbose, print the config space for this device. This
will help debugging problem systems as it will reduce the number of
commands the user needs to type and send me the output of.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/pccard/pcic_pci.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/pccard/pcic_pci.c b/sys/pccard/pcic_pci.c index a952c82..1df970a 100644 --- a/sys/pccard/pcic_pci.c +++ b/sys/pccard/pcic_pci.c @@ -1079,6 +1079,23 @@ pcic_pci_shutdown(device_t dev) } /* + * Print out the config space + */ +static void +pcic_pci_print_config(device_t dev) +{ + int i; + + device_printf(dev, "PCI Configuration space:"); + for (i = 0; i < 256; i += 4) { + if (i % 4 == 0) + printf("\n 0x%02x: ", i); + printf("0x%08x ", pci_read_config(dev, i, 4)); + } + printf("\n"); +} + +/* * General PCI based card dispatch routine. Right now * it only understands the Ricoh, CL-PD6832 and TI parts. It does * try to do generic things with other parts. @@ -1238,6 +1255,8 @@ pcic_pci_attach(device_t dev) return (error); } } + if (bootverbose) + pcic_pci_print_config(dev); return (pcic_attach(dev)); } |