Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/dev Pull up the following revisions, requested by msa...
details: https://anonhg.NetBSD.org/src/rev/9d6f79d2aa8a
branches: netbsd-8
changeset: 373178:9d6f79d2aa8a
user: martin <martin%NetBSD.org@localhost>
date: Mon Jan 23 12:10:12 2023 +0000
description:
Pull up the following revisions, requested by msaitoh in ticket #1787:
sys/dev/pci/xhci_pci.c 1.31 via patch
sys/dev/usb/xhci.c 1.173-1.175
sys/dev/usb/xhcivar.h 1.22
Support xHCI device which has USB 2 port only.
diffstat:
sys/dev/pci/xhci_pci.c | 10 ++++++----
sys/dev/usb/xhci.c | 16 +++++++++++-----
sys/dev/usb/xhcivar.h | 4 +++-
3 files changed, 20 insertions(+), 10 deletions(-)
diffs (97 lines):
diff -r 783b23b54e8f -r 9d6f79d2aa8a sys/dev/pci/xhci_pci.c
--- a/sys/dev/pci/xhci_pci.c Thu Jan 19 10:59:09 2023 +0000
+++ b/sys/dev/pci/xhci_pci.c Mon Jan 23 12:10:12 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xhci_pci.c,v 1.8.6.3 2019/11/16 16:30:09 martin Exp $ */
+/* $NetBSD: xhci_pci.c,v 1.8.6.4 2023/01/23 12:10:12 martin Exp $ */
/* OpenBSD: xhci_pci.c,v 1.4 2014/07/12 17:38:51 yuo Exp */
/*
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.8.6.3 2019/11/16 16:30:09 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.8.6.4 2023/01/23 12:10:12 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -245,9 +245,11 @@
aprint_error_dev(self, "couldn't establish power handler\n");
/* Attach usb buses. */
- sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint);
+ if (sc->sc_usb3nports != 0)
+ sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint);
- sc->sc_child2 = config_found(self, &sc->sc_bus2, usbctlprint);
+ if (sc->sc_usb2nports != 0)
+ sc->sc_child2 = config_found(self, &sc->sc_bus2, usbctlprint);
return;
diff -r 783b23b54e8f -r 9d6f79d2aa8a sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c Thu Jan 19 10:59:09 2023 +0000
+++ b/sys/dev/usb/xhci.c Mon Jan 23 12:10:12 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xhci.c,v 1.72.2.13 2022/09/16 18:34:20 martin Exp $ */
+/* $NetBSD: xhci.c,v 1.72.2.14 2023/01/23 12:10:12 martin Exp $ */
/*
* Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.72.2.13 2022/09/16 18:34:20 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.72.2.14 2023/01/23 12:10:12 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -783,7 +783,11 @@
case 0x0310:
case 0x0320:
aprint_debug_dev(sc->sc_dev, " %s ports %d - %d\n",
- major == 3 ? "ss" : "hs", cpo, cpo + cpc -1);
+ major == 3 ? "ss" : "hs", cpo, cpo + cpc - 1);
+ if (major == 3)
+ sc->sc_usb3nports += cpo + cpc - 1;
+ else
+ sc->sc_usb2nports += cpo + cpc - 1;
break;
default:
aprint_debug_dev(sc->sc_dev, " unknown major/minor (%d/%d)\n",
@@ -987,11 +991,13 @@
/* default all ports to bus 0, i.e. usb 3 */
sc->sc_ctlrportbus = kmem_zalloc(
howmany(sc->sc_maxports * sizeof(uint8_t), NBBY), KM_SLEEP);
- sc->sc_ctlrportmap = kmem_zalloc(sc->sc_maxports * sizeof(int), KM_SLEEP);
+ sc->sc_ctlrportmap =
+ kmem_zalloc(sc->sc_maxports * sizeof(int), KM_SLEEP);
/* controller port to bus roothub port map */
for (size_t j = 0; j < __arraycount(sc->sc_rhportmap); j++) {
- sc->sc_rhportmap[j] = kmem_zalloc(sc->sc_maxports * sizeof(int), KM_SLEEP);
+ sc->sc_rhportmap[j] =
+ kmem_zalloc(sc->sc_maxports * sizeof(int), KM_SLEEP);
}
/*
diff -r 783b23b54e8f -r 9d6f79d2aa8a sys/dev/usb/xhcivar.h
--- a/sys/dev/usb/xhcivar.h Thu Jan 19 10:59:09 2023 +0000
+++ b/sys/dev/usb/xhcivar.h Mon Jan 23 12:10:12 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xhcivar.h,v 1.7.6.1 2018/08/25 11:29:52 martin Exp $ */
+/* $NetBSD: xhcivar.h,v 1.7.6.2 2023/01/23 12:10:12 martin Exp $ */
/*
* Copyright (c) 2013 Jonathan A. Kollasch
@@ -100,6 +100,8 @@
* Port routing and root hub - xHCI 4.19.7
*/
int sc_maxports; /* number of controller ports */
+ int sc_usb3nports;
+ int sc_usb2nports;
uint8_t *sc_ctlrportbus; /* a bus bit per port */
Home |
Main Index |
Thread Index |
Old Index