summaryrefslogtreecommitdiffstats
path: root/sys/pci/pci.c
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>1999-11-22 03:34:43 +0000
committern_hibma <n_hibma@FreeBSD.org>1999-11-22 03:34:43 +0000
commitce990701454da56eade1bde3de50ba12d287441c (patch)
treecb45f05a948eb97aafad7adce8063c3796ea0530 /sys/pci/pci.c
parent2365e84cddf9b1dba8720a87a6e9500fe654ba8f (diff)
downloadFreeBSD-src-ce990701454da56eade1bde3de50ba12d287441c.zip
FreeBSD-src-ce990701454da56eade1bde3de50ba12d287441c.tar.gz
Move the pretty printing of the description for USB controllers to
pci_probe_nomatch, so it won't be in the way when loading USB as a module. The reason for them being there in the first place is that every motherboard comes with USB kit and this way it looks more pretty (peter). The real solution will be to define some method of detaching a driver after it has attached.
Diffstat (limited to 'sys/pci/pci.c')
-rw-r--r--sys/pci/pci.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/pci/pci.c b/sys/pci/pci.c
index 4a36158..027a894 100644
--- a/sys/pci/pci.c
+++ b/sys/pci/pci.c
@@ -1164,11 +1164,24 @@ pci_probe_nomatch(device_t dev, device_t child)
{
struct pci_devinfo *dinfo;
pcicfgregs *cfg;
-
+
+ /* a few 'known' devices */
+ if (pci_get_class(dev) == PCIC_SERIALBUS
+ && pci_get_subclass(dev) == PCIS_SERIALBUS_USB) {
+ if (pci_get_progif(dev) == 0x00 /* UHCI */ ) {
+ device_printf(dev, "UHCI USB controller (vendor");
+ } else if (pci_get_progif(dev) == 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;
- device_printf(dev, "unknown card (vendor=0x%04x, dev=0x%04x) at %d.%d",
+ printf(" (vendor=0x%04x, dev=0x%04x) at %d.%d",
cfg->vendor,
cfg->device,
pci_get_slot(child),
OpenPOWER on IntegriCloud