From d5f6245f80217cffc05768ac75a8afc1d2a29370 Mon Sep 17 00:00:00 2001
From: Peter Wemm <peter@FreeBSD.org>
Date: Sat, 3 Nov 2001 05:03:00 +0000
Subject: [PATCH] Add ICH3 (82801CA/CAM) and 460GX

---
 sys/dev/usb/uhci_pci.c | 24 ++++++++++++++++++++++++
 sys/pci/uhci_pci.c     | 24 ++++++++++++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/sys/dev/usb/uhci_pci.c b/sys/dev/usb/uhci_pci.c
index 828761f68fef..9b89749b40df 100644
--- a/sys/dev/usb/uhci_pci.c
+++ b/sys/dev/usb/uhci_pci.c
@@ -90,8 +90,14 @@ static const char *uhci_device_ich0 	= "Intel 82801AB (ICH0) USB controller";
 static const char *uhci_device_ich2_a	= "Intel 82801BA/BAM (ICH2) USB controller USB-A";
 #define PCI_UHCI_DEVICEID_ICH2_B	0x24448086
 static const char *uhci_device_ich2_b	= "Intel 82801BA/BAM (ICH2) USB controller USB-B";
+#define PCI_UHCI_DEVICEID_ICH3_A	0x24828086
+static const char *uhci_device_ich3_a	= "Intel 82801CA/CAM (ICH3) USB controller USB-A";
+#define PCI_UHCI_DEVICEID_ICH3_B	0x24848086
+static const char *uhci_device_ich3_b	= "Intel 82801CA/CAM (ICH3) USB controller USB-B";
 #define PCI_UHCI_DEVICEID_440MX		0x719a8086
 static const char *uhci_device_440mx 	= "Intel 82443MX USB controller";
+#define PCI_UHCI_DEVICEID_460GX		0x76028086
+static const char *uhci_device_460gx 	= "Intel 82372FB/82468GX USB controller";
 #define PCI_UHCI_DEVICEID_VT83C572	0x30381106
 static const char *uhci_device_vt83c572	= "VIA 83C572 USB controller";
 
@@ -148,8 +154,14 @@ uhci_pci_match(device_t self)
 		return (uhci_device_ich2_a);
 	} else if (device_id == PCI_UHCI_DEVICEID_ICH2_B) {
 		return (uhci_device_ich2_b);
+	} else if (device_id == PCI_UHCI_DEVICEID_ICH3_A) {
+		return (uhci_device_ich3_a);
+	} else if (device_id == PCI_UHCI_DEVICEID_ICH3_B) {
+		return (uhci_device_ich3_b);
 	} else if (device_id == PCI_UHCI_DEVICEID_440MX) {
 		return (uhci_device_440mx);
+	} else if (device_id == PCI_UHCI_DEVICEID_460GX) {
+		return (uhci_device_460gx);
 	} else if (device_id == PCI_UHCI_DEVICEID_VT83C572) {
 		return (uhci_device_vt83c572);
 	} else {
@@ -239,10 +251,22 @@ uhci_pci_attach(device_t self)
 		device_set_desc(sc->sc_bus.bdev, uhci_device_ich2_b);
 		sprintf(sc->sc_vendor, "Intel");
 		break;
+	case PCI_UHCI_DEVICEID_ICH3_A:
+		device_set_desc(sc->sc_bus.bdev, uhci_device_ich3_a);
+		sprintf(sc->sc_vendor, "Intel");
+		break;
+	case PCI_UHCI_DEVICEID_ICH3_B:
+		device_set_desc(sc->sc_bus.bdev, uhci_device_ich3_b);
+		sprintf(sc->sc_vendor, "Intel");
+		break;
 	case PCI_UHCI_DEVICEID_440MX:
 		device_set_desc(sc->sc_bus.bdev, uhci_device_440mx);
 		sprintf(sc->sc_vendor, "Intel");
 		break;
+	case PCI_UHCI_DEVICEID_460GX:
+		device_set_desc(sc->sc_bus.bdev, uhci_device_460gx);
+		sprintf(sc->sc_vendor, "Intel");
+		break;
 	case PCI_UHCI_DEVICEID_VT83C572:
 		device_set_desc(sc->sc_bus.bdev, uhci_device_vt83c572);
 		sprintf(sc->sc_vendor, "VIA");
diff --git a/sys/pci/uhci_pci.c b/sys/pci/uhci_pci.c
index 828761f68fef..9b89749b40df 100644
--- a/sys/pci/uhci_pci.c
+++ b/sys/pci/uhci_pci.c
@@ -90,8 +90,14 @@ static const char *uhci_device_ich0 	= "Intel 82801AB (ICH0) USB controller";
 static const char *uhci_device_ich2_a	= "Intel 82801BA/BAM (ICH2) USB controller USB-A";
 #define PCI_UHCI_DEVICEID_ICH2_B	0x24448086
 static const char *uhci_device_ich2_b	= "Intel 82801BA/BAM (ICH2) USB controller USB-B";
+#define PCI_UHCI_DEVICEID_ICH3_A	0x24828086
+static const char *uhci_device_ich3_a	= "Intel 82801CA/CAM (ICH3) USB controller USB-A";
+#define PCI_UHCI_DEVICEID_ICH3_B	0x24848086
+static const char *uhci_device_ich3_b	= "Intel 82801CA/CAM (ICH3) USB controller USB-B";
 #define PCI_UHCI_DEVICEID_440MX		0x719a8086
 static const char *uhci_device_440mx 	= "Intel 82443MX USB controller";
+#define PCI_UHCI_DEVICEID_460GX		0x76028086
+static const char *uhci_device_460gx 	= "Intel 82372FB/82468GX USB controller";
 #define PCI_UHCI_DEVICEID_VT83C572	0x30381106
 static const char *uhci_device_vt83c572	= "VIA 83C572 USB controller";
 
@@ -148,8 +154,14 @@ uhci_pci_match(device_t self)
 		return (uhci_device_ich2_a);
 	} else if (device_id == PCI_UHCI_DEVICEID_ICH2_B) {
 		return (uhci_device_ich2_b);
+	} else if (device_id == PCI_UHCI_DEVICEID_ICH3_A) {
+		return (uhci_device_ich3_a);
+	} else if (device_id == PCI_UHCI_DEVICEID_ICH3_B) {
+		return (uhci_device_ich3_b);
 	} else if (device_id == PCI_UHCI_DEVICEID_440MX) {
 		return (uhci_device_440mx);
+	} else if (device_id == PCI_UHCI_DEVICEID_460GX) {
+		return (uhci_device_460gx);
 	} else if (device_id == PCI_UHCI_DEVICEID_VT83C572) {
 		return (uhci_device_vt83c572);
 	} else {
@@ -239,10 +251,22 @@ uhci_pci_attach(device_t self)
 		device_set_desc(sc->sc_bus.bdev, uhci_device_ich2_b);
 		sprintf(sc->sc_vendor, "Intel");
 		break;
+	case PCI_UHCI_DEVICEID_ICH3_A:
+		device_set_desc(sc->sc_bus.bdev, uhci_device_ich3_a);
+		sprintf(sc->sc_vendor, "Intel");
+		break;
+	case PCI_UHCI_DEVICEID_ICH3_B:
+		device_set_desc(sc->sc_bus.bdev, uhci_device_ich3_b);
+		sprintf(sc->sc_vendor, "Intel");
+		break;
 	case PCI_UHCI_DEVICEID_440MX:
 		device_set_desc(sc->sc_bus.bdev, uhci_device_440mx);
 		sprintf(sc->sc_vendor, "Intel");
 		break;
+	case PCI_UHCI_DEVICEID_460GX:
+		device_set_desc(sc->sc_bus.bdev, uhci_device_460gx);
+		sprintf(sc->sc_vendor, "Intel");
+		break;
 	case PCI_UHCI_DEVICEID_VT83C572:
 		device_set_desc(sc->sc_bus.bdev, uhci_device_vt83c572);
 		sprintf(sc->sc_vendor, "VIA");