git: d9addaa0ba45 - stable/13 - Add new USB host controller PCI ID's.

From: Hans Petter Selasky <hselasky_at_FreeBSD.org>
Date: Thu, 24 Feb 2022 10:04:17 UTC
The branch stable/13 has been updated by hselasky:

URL: https://cgit.FreeBSD.org/src/commit/?id=d9addaa0ba450aad9ed40371059cbea0d10d3d2e

commit d9addaa0ba450aad9ed40371059cbea0d10d3d2e
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-02-24 09:58:16 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-02-24 09:58:16 +0000

    Add new USB host controller PCI ID's.
    
    Submitted by:   Dmitry Luhtionov <dmitryluhtionov@gmail.com>
    Sponsored by:   NVIDIA Networking
    
    (cherry picked from commit 42cf33dd1a8d6ff2548c8a7fb267879734ddfde3)
---
 sys/dev/usb/controller/ehci_pci.c |  2 ++
 sys/dev/usb/controller/xhci_pci.c | 21 ++++++++++++++++++++-
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/sys/dev/usb/controller/ehci_pci.c b/sys/dev/usb/controller/ehci_pci.c
index 7783c157046f..dbc2def5b8d2 100644
--- a/sys/dev/usb/controller/ehci_pci.c
+++ b/sys/dev/usb/controller/ehci_pci.c
@@ -117,6 +117,8 @@ ehci_pci_match(device_t self)
 		return ("AMD CS5536 (Geode) USB 2.0 controller");
 	case 0x78081022:
 		return ("AMD FCH USB 2.0 controller");
+	case 0x79081022:
+		return ("AMD FCH USB 2.0 controller");
 
 	case 0x43451002:
 		return "ATI SB200 USB 2.0 controller";
diff --git a/sys/dev/usb/controller/xhci_pci.c b/sys/dev/usb/controller/xhci_pci.c
index f1c567ac6ded..b5d327ad6cd7 100644
--- a/sys/dev/usb/controller/xhci_pci.c
+++ b/sys/dev/usb/controller/xhci_pci.c
@@ -62,6 +62,9 @@ __FBSDID("$FreeBSD$");
 #include <dev/usb/controller/xhcireg.h>
 #include "usb_if.h"
 
+#define	PCI_XHCI_VENDORID_AMD		0x1022
+#define	PCI_XHCI_VENDORID_INTEL		0x8086
+
 static device_probe_t xhci_pci_probe;
 static device_detach_t xhci_pci_detach;
 static usb_take_controller_t xhci_pci_take_controller;
@@ -102,6 +105,8 @@ xhci_pci_match(device_t self)
 		return ("AMD 300 Series USB 3.0 controller");
 	case 0x78141022:
 		return ("AMD FCH USB 3.0 controller");
+	case 0x79141022:
+		return ("AMD FCH USB 3.0 controller");
 
 	case 0x145f1d94:
 		return ("Hygon USB 3.0 controller");
@@ -358,7 +363,21 @@ xhci_pci_attach(device_t self)
 	}
 	device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus);
 
-	sprintf(sc->sc_vendor, "0x%04x", pci_get_vendor(self));
+	switch (pci_get_vendor(self)) {
+	case PCI_XHCI_VENDORID_AMD:
+		strlcpy(sc->sc_vendor, "AMD", sizeof(sc->sc_vendor));
+		break;
+	case PCI_XHCI_VENDORID_INTEL:
+		strlcpy(sc->sc_vendor, "Intel", sizeof(sc->sc_vendor));
+		break;
+	default:
+		if (bootverbose)
+			device_printf(self, "(New XHCI DeviceId=0x%08x)\n",
+			    pci_get_devid(self));
+		snprintf(sc->sc_vendor, sizeof(sc->sc_vendor),
+		    "(0x%04x)", pci_get_vendor(self));
+		break;
+	}
 
 	if (sc->sc_irq_res != NULL) {
 		err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,