diff options
author | billf <billf@FreeBSD.org> | 2000-02-22 21:44:39 +0000 |
---|---|---|
committer | billf <billf@FreeBSD.org> | 2000-02-22 21:44:39 +0000 |
commit | 750bc43f52b0f630f332b785c0d182b0a5387786 (patch) | |
tree | f124cfda8594f370e468651aceda0813acddc0f2 | |
parent | 4b075f967571efe7359ec282d756786702749018 (diff) | |
download | FreeBSD-src-750bc43f52b0f630f332b785c0d182b0a5387786.zip FreeBSD-src-750bc43f52b0f630f332b785c0d182b0a5387786.tar.gz |
o No need to print the vendor/device ID for things that matched succesfully.
o ``<device name>'' versus ``device name'' for things that fall under nomatch.
Reviewed by: dfr (in principle)
Approved by: Baron von Hubbard
-rw-r--r-- | sys/dev/pci/pci.c | 18 | ||||
-rw-r--r-- | sys/pci/pci.c | 18 |
2 files changed, 26 insertions, 10 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index e6c060d..bbb9dff 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1201,17 +1201,25 @@ pci_probe_nomatch(device_t dev, device_t child) struct pci_devinfo *dinfo; pcicfgregs *cfg; const char *desc; + int unknown; + unknown = 0; dinfo = device_get_ivars(child); cfg = &dinfo->cfg; desc = pci_ata_match(child); if (!desc) desc = pci_usb_match(child); if (!desc) desc = pci_vga_match(child); - if (!desc) desc = "unknown card"; - device_printf(dev, desc); - printf(" (vendor=0x%04x, dev=0x%04x) at %d.%d", - cfg->vendor, - cfg->device, + if (!desc) { + desc = "unknown card"; + unknown++; + } + device_printf(dev, "<%s>", desc); + if (bootverbose || unknown) { + printf(" (vendor=0x%04x, dev=0x%04x)", + cfg->vendor, + cfg->device); + } + printf(" at %d.%d", pci_get_slot(child), pci_get_function(child)); if (cfg->intpin > 0 && cfg->intline != 255) { diff --git a/sys/pci/pci.c b/sys/pci/pci.c index e6c060d..bbb9dff 100644 --- a/sys/pci/pci.c +++ b/sys/pci/pci.c @@ -1201,17 +1201,25 @@ pci_probe_nomatch(device_t dev, device_t child) struct pci_devinfo *dinfo; pcicfgregs *cfg; const char *desc; + int unknown; + unknown = 0; dinfo = device_get_ivars(child); cfg = &dinfo->cfg; desc = pci_ata_match(child); if (!desc) desc = pci_usb_match(child); if (!desc) desc = pci_vga_match(child); - if (!desc) desc = "unknown card"; - device_printf(dev, desc); - printf(" (vendor=0x%04x, dev=0x%04x) at %d.%d", - cfg->vendor, - cfg->device, + if (!desc) { + desc = "unknown card"; + unknown++; + } + device_printf(dev, "<%s>", desc); + if (bootverbose || unknown) { + printf(" (vendor=0x%04x, dev=0x%04x)", + cfg->vendor, + cfg->device); + } + printf(" at %d.%d", pci_get_slot(child), pci_get_function(child)); if (cfg->intpin > 0 && cfg->intline != 255) { |