diff options
author | se <se@FreeBSD.org> | 1997-03-25 19:03:04 +0000 |
---|---|---|
committer | se <se@FreeBSD.org> | 1997-03-25 19:03:04 +0000 |
commit | 505530044a9358d2980baf3760d385e0e1ebf4fa (patch) | |
tree | 8496cb066709ef431bda1014164af1c273402f57 /sys | |
parent | a0e22d0daf936d3d6969715f951af9a4b90048ae (diff) | |
download | FreeBSD-src-505530044a9358d2980baf3760d385e0e1ebf4fa.zip FreeBSD-src-505530044a9358d2980baf3760d385e0e1ebf4fa.tar.gz |
Improve probe message for generic PCI->xxx bridge chips.
Submitted by: phk
Diffstat (limited to 'sys')
-rw-r--r-- | sys/pci/pcisupport.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/sys/pci/pcisupport.c b/sys/pci/pcisupport.c index 2eb60bd..ef84ba3 100644 --- a/sys/pci/pcisupport.c +++ b/sys/pci/pcisupport.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id$ +** $Id: pcisupport.c,v 1.43 1997/02/22 09:44:13 peter Exp $ ** ** Device driver for DEC/INTEL PCI chipsets. ** @@ -87,18 +87,28 @@ struct condmsg { static char* generic_pci_bridge (pcici_t tag) { - char *descr; + char *descr, tmpbuf[120]; unsigned classreg = pci_conf_read (tag, PCI_CLASS_REG); if ((classreg & PCI_CLASS_MASK) == PCI_CLASS_BRIDGE) { unsigned id = pci_conf_read (tag, PCI_ID_REG); - descr = malloc (sizeof PPB_DESCR +1, M_DEVBUF, M_WAITOK); - if (descr) { - sprintf (descr, PPB_DESCR, id & 0xffff, (id >> 16) & 0xffff, - (classreg >> 16) & 0xff); + switch (classreg >> 16 & 0xff) { + case 0: strcpy(tmpbuf, "Host->PCI"); break; + case 1: strcpy(tmpbuf, "PCI->ISA"); break; + case 2: strcpy(tmpbuf, "PCI->EISA"); break; + case 4: strcpy(tmpbuf, "PCI->PCI"); break; + case 5: strcpy(tmpbuf, "PCI->PCMCIA"); break; + case 7: strcpy(tmpbuf, "PCI->CardBus"); break; + default: + sprintf(tmpbuf, "PCI->0x%x", classreg>>16 & 0xff); + break; } + sprintf(tmpbuf+strlen(tmpbuf), " bridge (vendor=%04x device=%04x)", + id & 0xffff, (id >> 16) & 0xffff); + descr = malloc (strlen(tmpbuf) +1, M_DEVBUF, M_WAITOK); + strcpy(descr, tmpbuf); return descr; } return 0; |