diff options
author | Stefan Eßer <se@FreeBSD.org> | 1997-03-25 19:03:04 +0000 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 1997-03-25 19:03:04 +0000 |
commit | af78f012fd08ce2997c7cbbc3a251b7fc275049b (patch) | |
tree | 3aba0f778b594247f4b8b3e22e70310f5e838df4 | |
parent | ee886457810e37aa5a8cb3c846824debe23229ee (diff) | |
download | src-af78f012fd08ce2997c7cbbc3a251b7fc275049b.tar.gz src-af78f012fd08ce2997c7cbbc3a251b7fc275049b.zip |
Improve probe message for generic PCI->xxx bridge chips.
Submitted by: phk
Notes
Notes:
svn path=/head/; revision=24281
-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 2eb60bd96aef..ef84ba37ee9f 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; |