diff options
Diffstat (limited to 'sys/pci/pci.c')
-rw-r--r-- | sys/pci/pci.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/sys/pci/pci.c b/sys/pci/pci.c index d7c6b41..b0e94f8 100644 --- a/sys/pci/pci.c +++ b/sys/pci/pci.c @@ -1165,23 +1165,16 @@ pci_probe_nomatch(device_t dev, device_t child) { struct pci_devinfo *dinfo; pcicfgregs *cfg; + const char *desc; - /* a few 'known' devices */ - if (pci_get_class(child) == PCIC_SERIALBUS - && pci_get_subclass(child) == PCIS_SERIALBUS_USB) { - if (pci_get_progif(child) == 0x00 /* UHCI */ ) { - device_printf(dev, "UHCI USB controller"); - } else if (pci_get_progif(child) == 0x10 /* OHCI */ ) { - device_printf(dev, "OHCI USB controller"); - } else { - device_printf(dev, "USB controller"); - } - } else { - device_printf(dev, "unknown card"); - } dinfo = device_get_ivars(child); cfg = &dinfo->cfg; - + desc = pci_ata_match(child); + if (!desc) + desc = pci_usb_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, |