summaryrefslogtreecommitdiffstats
path: root/sys/pci/pci.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-12-10 17:44:22 +0000
committerpeter <peter@FreeBSD.org>1999-12-10 17:44:22 +0000
commit89dc47bffff3dd25265c4b55955d55b2b7f917ba (patch)
tree97d8f6e013ec93561c97d866d07aa57b15e322ab /sys/pci/pci.c
parent7cd6c4d188847b8167e9a9e05ad034f5d51a13df (diff)
downloadFreeBSD-src-89dc47bffff3dd25265c4b55955d55b2b7f917ba.zip
FreeBSD-src-89dc47bffff3dd25265c4b55955d55b2b7f917ba.tar.gz
Make the usb and ide/ata device identification a little saner. Rather than
attaching to the device via chip*, use the newbus nomatch method to report the device. This leaves them unattached so that a driver can be easily loaded to grab them later.
Diffstat (limited to 'sys/pci/pci.c')
-rw-r--r--sys/pci/pci.c21
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,
OpenPOWER on IntegriCloud