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.
This commit is contained in:
parent
76051d5c6d
commit
b8769414cd
@ -1078,6 +1078,23 @@ pcic_pci_shutdown(device_t dev)
|
||||
sp->getb(sp, PCIC_STAT_CHG);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
@ -1238,6 +1255,8 @@ pcic_pci_attach(device_t dev)
|
||||
return (error);
|
||||
}
|
||||
}
|
||||
if (bootverbose)
|
||||
pcic_pci_print_config(dev);
|
||||
return (pcic_attach(dev));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user