From nobody Sun Feb 06 12:19:34 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A779A19AE765; Sun, 6 Feb 2022 12:19:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Js7ck4L56z3MD1; Sun, 6 Feb 2022 12:19:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644149974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rAgu+KucvwgXPq286fR9ajstYQW1dn1W4AW71xcoRTw=; b=AN5lwSS1OnOXiKqiKQwHcxaJs5JBOtbf9qTdg0D4oQDvzCofLBYedZfW6OgHby1RD8ORLo sqLGbr/FDnBSQl2PWWZMFAkQRiImduBu0Kn34gv1+BTB7zTftdc1w53jJF9qnxMc9q//3F a1//YpHl6PN71RCiw7PpSrTljDSeCdUKNpERTS4rfHavsX8YUwvKXFFo3WYd6HUo/0k/TQ BRcdbbErvgr9mCIOfSL+bwc1y9VR0MqPkoXX/4VriyTRqpp6CHQLopm8r/WLwW5PE33rfY Dhh4m6fTCm+21rZBASC571/VCeVQzXF32rwuf/5bm1iYJ+iBMfbvxd61PiSojg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 70A61124C0; Sun, 6 Feb 2022 12:19:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 216CJYMI029007; Sun, 6 Feb 2022 12:19:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 216CJYRK029006; Sun, 6 Feb 2022 12:19:34 GMT (envelope-from git) Date: Sun, 6 Feb 2022 12:19:34 GMT Message-Id: <202202061219.216CJYRK029006@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 42cf33dd1a8d - main - Add new USB host controller PCI ID's. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42cf33dd1a8d6ff2548c8a7fb267879734ddfde3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644149974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rAgu+KucvwgXPq286fR9ajstYQW1dn1W4AW71xcoRTw=; b=XwW/pxApzs9gBHzCQk2pNPT2kCoSeno0V+UPViZZvLsibxRiYhCAy1GuV9EgnQCMVyzRqJ LvNN+/ihXiCAsqXmxsN1MjRjGyvce1kCp/olC+Y6M1BricfmZg9biRDAXyLMSVRNBfmPfA LkvSlFp3mttxNQc/R8yVrCf0ouKjvIpcfzPRvt9wCkZymFgRjVorfkF4IB9YW9O4vQNVeG nbVNp30sCJM93R4Zo6jGk5fKkLzNUAAaBtUiaT+kA6IM7vo7im++YjuzPndPhubrUpKGEq IsOKdX+tg4jPV99CYq4qEm+nQRs9r9QWIGQtqL93iKApLTZ6wzIhnuCG+/sLGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644149974; a=rsa-sha256; cv=none; b=T7MSaJpvbzHqRsisVrNDMEcGzzj2zU0Xlf0OQ4Y5UAotMFl3hmkF/87zvdcVjloni1Kw2o vDgKC7moV5AMbYEZOpHnDpuvqRqCxLm5ZVB6NJoRUOvH531XPX5shOHuEcM4W4NUi8es5E tJEl3oeGO2RC2ziyITQ7wr80azOaKAeLRRCOuKlJBD+g2Z4FYRzt5yepYguYtSSvxLg4lh dtwzqkHcdDq8BfHJ/FzOfWduyVUwP8DbHmygvJjkd+dg1n3v+JMfVIh7Ojy4Ih1Bq3/xtJ ZIjfg9v6J0BsPTPiphovyObHJ45ftUhOLdZDo8mxYbP8kUHhdt4vXYTS4h5aUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=42cf33dd1a8d6ff2548c8a7fb267879734ddfde3 commit 42cf33dd1a8d6ff2548c8a7fb267879734ddfde3 Author: Hans Petter Selasky AuthorDate: 2022-02-06 12:14:27 +0000 Commit: Hans Petter Selasky CommitDate: 2022-02-06 12:18:35 +0000 Add new USB host controller PCI ID's. Submitted by: Dmitry Luhtionov MFC after: 1 week Sponsored by: NVIDIA Networking --- 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 6dbe29b7c791..884200f547ec 100644 --- a/sys/dev/usb/controller/xhci_pci.c +++ b/sys/dev/usb/controller/xhci_pci.c @@ -62,6 +62,9 @@ __FBSDID("$FreeBSD$"); #include #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; @@ -106,6 +109,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"); @@ -367,7 +372,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,