summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>1999-01-06 19:55:49 +0000
committern_hibma <n_hibma@FreeBSD.org>1999-01-06 19:55:49 +0000
commit680badab4034356cdc9401994d200f4b89c90259 (patch)
tree138e4b9b34e388858660effce7dc6e16fa0d65cd /sys
parent3936fe2a01920fe1fb3d7bf34ade29da706ff55e (diff)
downloadFreeBSD-src-680badab4034356cdc9401994d200f4b89c90259.zip
FreeBSD-src-680badab4034356cdc9401994d200f4b89c90259.tar.gz
Added proper names to the device messages at probe and attach.
Missing ones: Device Id ADS technologies Device Id's SiS hardware
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/ohci_pci.c57
-rw-r--r--sys/dev/pci/uhci_pci.c42
2 files changed, 72 insertions, 27 deletions
diff --git a/sys/dev/pci/ohci_pci.c b/sys/dev/pci/ohci_pci.c
index 5963c10..032281b 100644
--- a/sys/dev/pci/ohci_pci.c
+++ b/sys/dev/pci/ohci_pci.c
@@ -1,4 +1,4 @@
-/* FreeBSD $Id: ohci_pci.c,v 1.6 1998/12/14 21:14:11 julian Exp $ */
+/* FreeBSD $Id: ohci_pci.c,v 1.7 1999/01/06 12:31:28 n_hibma Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -79,6 +79,16 @@
#define PCI_VENDOR(d) ((d) & 0xffff)
#define PCI_DEVICE(d) (((d) >> 8) & 0xffff)
+#define PCI_OHCI_VENDORID_ADS 0x
+#define PCI_OHCI_VENDORID_ALI 0x10b9
+#define PCI_OHCI_VENDORID_SIS 0x1039
+
+#define PCI_OHCI_DEVICEID_ALADDIN_V 0x523710b9
+static const char *ohci_device_aladdin_v = "AcerLabs M5237 (Aladdin-V) USB Host Controller";
+#define PCI_OHCI_DEVICEID_ADS 0x
+static const char *ohci_device_ads = "ADS Technologies USB Host Controller";
+static const char *ohci_device_generic = "OHCI USB Host Controller (generic)";
+
#define PCI_OHCI_BASE_REG 0x10
static const char *ohci_pci_probe __P((pcici_t, pcidi_t));
@@ -101,11 +111,20 @@ ohci_pci_probe(pcici_t config_id, pcidi_t device_id)
{
u_int32_t class;
- class = pci_conf_read(config_id, PCI_CLASS_REG);
- if ( (PCI_CLASS(class) == PCI_CLASS_SERIALBUS)
- && (PCI_SUBCLASS(class) == PCI_SUBCLASS_SERIALBUS_USB)
- && (PCI_INTERFACE(class) == PCI_INTERFACE_OHCI))
- return("OHCI USB Host Controller (generic)");
+ if (device_id == PCI_OHCI_DEVICEID_ALADDIN_V) {
+ return (ohci_device_aladdin_v);
+ /*
+ } else if (device_id == PCI_OHCI_DEVICEID_ADS) {
+ return (ohci_device_ads);
+ */
+ } else {
+ class = pci_conf_read(config_id, PCI_CLASS_REG);
+ if ( (PCI_CLASS(class) == PCI_CLASS_SERIALBUS)
+ && (PCI_SUBCLASS(class) == PCI_SUBCLASS_SERIALBUS_USB)
+ && (PCI_INTERFACE(class) == PCI_INTERFACE_OHCI)) {
+ return(ohci_device_generic);
+ }
+ }
return NULL; /* dunno */
}
@@ -153,10 +172,16 @@ ohci_pci_attach(pcici_t config_id, int unit)
/* Figure out vendor for root hub descriptor. */
id = pci_conf_read(config_id, PCI_ID_REG);
- if (PCI_VENDOR(id) == 0x8086)
- sprintf(sc->sc_vendor, "Intel");
+ if (PCI_VENDOR(id) == PCI_OHCI_VENDORID_ALI)
+ sprintf(sc->sc_vendor, "AcerLabs");
+ /*
+ else if (PCI_VENDOR(id) == PCI_OHCI_VENDORID_ADS)
+ sprintf(sc->sc_vendor, "ADS");
+ */
+ else if (PCI_VENDOR(id) == PCI_OHCI_VENDORID_SIS)
+ sprintf(sc->sc_vendor, "SiS");
else
- sprintf(sc->sc_vendor, "Vendor 0x%04x", PCI_VENDOR(id));
+ sprintf(sc->sc_vendor, "(0x%04x)", PCI_VENDOR(id));
/* We add a child to the root bus. After PCI configuration
* has completed the root bus will start to probe and
@@ -185,7 +210,19 @@ ohci_pci_attach(pcici_t config_id, int unit)
return;
}
- device_set_desc(sc->sc_bus.bdev, "OHCI USB Host Controller (generic)");
+ switch(id) {
+ case PCI_OHCI_DEVICEID_ALADDIN_V:
+ device_set_desc(sc->sc_bus.bdev, ohci_device_aladdin_v);
+ break;
+ /*
+ case PCI_OHCI_DEVICEID_ADS:
+ device_set_desc(sc->sc_bus.bdev, ohci_device_ads);
+ break;
+ */
+ default:
+ printf("(New OHCI DeviceId=0x%08x)\n", id);
+ device_set_desc(sc->sc_bus.bdev, ohci_device_generic);
+ }
return;
}
diff --git a/sys/dev/pci/uhci_pci.c b/sys/dev/pci/uhci_pci.c
index 138b64b..b21fad9 100644
--- a/sys/dev/pci/uhci_pci.c
+++ b/sys/dev/pci/uhci_pci.c
@@ -1,4 +1,4 @@
-/* FreeBSD $Id: uhci_pci.c,v 1.5 1998/12/14 09:40:14 n_hibma Exp $ */
+/* FreeBSD $Id: uhci_pci.c,v 1.6 1999/01/06 12:31:28 n_hibma Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -72,10 +72,17 @@
#define PCI_VENDOR(d) ((d)&0xffff)
#define PCI_DEVICE(d) (((d)>>8)&0xffff)
+#define PCI_UHCI_VENDORID_INTEL 0x8086
+#define PCI_UHCI_VENDORID_VIA 0x1106
+
#define PCI_UHCI_DEVICEID_PIIX3 0x70208086ul
+static const char *uhci_device_piix3 = "Intel 82371SB USB Host Controller";
#define PCI_UHCI_DEVICEID_PIIX4 0x71128086ul
#define PCI_UHCI_DEVICEID_PIIX4E 0x71128086ul /* no separate step */
+static const char *uhci_device_piix4 = "Intel 82371AB/EB USB Host Controller";
#define PCI_UHCI_DEVICEID_VT83C572 0x30381106ul
+static const char *uhci_device_vt83c572 = "VIA 83C572 USB Host Controller";
+static const char *uhci_device_generic = "UHCI USB Controller (generic)";
#define PCI_UHCI_BASE_REG 0x20
@@ -100,18 +107,18 @@ uhci_pci_probe(pcici_t config_id, pcidi_t device_id)
{
u_int32_t class;
- if (device_id == PCI_UHCI_DEVICEID_PIIX3)
- return ("Intel 82371SB USB Host Controller");
- else if (device_id == PCI_UHCI_DEVICEID_PIIX4)
- return ("Intel 82371AB/EB USB Host Controller");
- else if (device_id == PCI_UHCI_DEVICEID_VT83C572)
- return ("Via Techn. 83C572 USB Host Controller");
- else {
+ if (device_id == PCI_UHCI_DEVICEID_PIIX3) {
+ return (uhci_device_piix3);
+ } else if (device_id == PCI_UHCI_DEVICEID_PIIX4) {
+ return (uhci_device_piix4);
+ } else if (device_id == PCI_UHCI_DEVICEID_VT83C572) {
+ return (uhci_device_vt83c572);
+ } else {
class = pci_conf_read(config_id, PCI_CLASS_REG);
if ( PCI_CLASS(class) == PCI_CLASS_SERIALBUS
&& PCI_SUBCLASS(class) == PCI_SUBCLASS_SERIALBUS_USB
&& PCI_INTERFACE(class) == PCI_INTERFACE_UHCI) {
- return ("UHCI USB Host Controller (generic)");
+ return (uhci_device_generic);
}
}
@@ -165,10 +172,12 @@ uhci_pci_attach(pcici_t config_id, int unit)
/* Figure out vendor for root hub descriptor. */
id = pci_conf_read(config_id, PCI_ID_REG);
- if (PCI_VENDOR(id) == 0x8086)
+ if (PCI_VENDOR(id) == PCI_UHCI_VENDORID_INTEL)
sprintf(sc->sc_vendor, "Intel");
+ else if (PCI_VENDOR(id) == PCI_UHCI_VENDORID_VIA)
+ sprintf(sc->sc_vendor, "VIA");
else
- sprintf(sc->sc_vendor, "Vendor 0x%04x", PCI_VENDOR(id));
+ sprintf(sc->sc_vendor, "(0x%04x)", PCI_VENDOR(id));
/* We add a child to the root bus. After PCI configuration
* has completed the root bus will start to probe and
@@ -200,20 +209,19 @@ uhci_pci_attach(pcici_t config_id, int unit)
return;
}
-
- id = pci_conf_read(config_id, PCI_ID_REG);
switch (id) {
case PCI_UHCI_DEVICEID_PIIX3:
- device_set_desc(sc->sc_bus.bdev, "Intel 82371SB USB Host Controller");
+ device_set_desc(sc->sc_bus.bdev, uhci_device_piix3);
break;
case PCI_UHCI_DEVICEID_PIIX4:
- device_set_desc(sc->sc_bus.bdev, "Intel 82371AB/EB USB Host Controller");
+ device_set_desc(sc->sc_bus.bdev, uhci_device_piix4);
break;
case PCI_UHCI_DEVICEID_VT83C572:
- device_set_desc(sc->sc_bus.bdev, "Via Techn. 83C572 USB Host Controller");
+ device_set_desc(sc->sc_bus.bdev, uhci_device_vt83c572);
break;
default:
- device_set_desc(sc->sc_bus.bdev, "UHCI USB Host Controller (generic)");
+ printf("(New UHCI DeviceId=0x%08x)\n", id);
+ device_set_desc(sc->sc_bus.bdev, uhci_device_generic);
}
return;
OpenPOWER on IntegriCloud