Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Remove the requirement for ehci to attach after ...



details:   https://anonhg.NetBSD.org/src/rev/db88262858f4
branches:  trunk
changeset: 825315:db88262858f4
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Jul 08 16:19:20 2017 +0000

description:
Remove the requirement for ehci to attach after companion devices.

"go for it" - skrll@

diffstat:

 sys/dev/usb/ehci.c |  24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diffs (53 lines):

diff -r 83b0346ef57a -r db88262858f4 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c        Sat Jul 08 15:15:43 2017 +0000
+++ b/sys/dev/usb/ehci.c        Sat Jul 08 16:19:20 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ehci.c,v 1.254 2016/10/03 00:32:37 dholland Exp $ */
+/*     $NetBSD: ehci.c,v 1.255 2017/07/08 16:19:20 jmcneill Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.254 2016/10/03 00:32:37 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.255 2017/07/08 16:19:20 jmcneill Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -447,12 +447,18 @@
        }
        if (sc->sc_ncomp > 0) {
                KASSERT(!(sc->sc_flags & EHCIF_ETTF));
-               aprint_normal("%s: companion controller%s, %d port%s each:",
-                   device_xname(sc->sc_dev), sc->sc_ncomp!=1 ? "s" : "",
+               aprint_normal("%s: %d companion controller%s, %d port%s%s",
+                   device_xname(sc->sc_dev), sc->sc_ncomp,
+                   sc->sc_ncomp!=1 ? "s" : "",
                    EHCI_HCS_N_PCC(sparams),
-                   EHCI_HCS_N_PCC(sparams)!=1 ? "s" : "");
-               for (i = 0; i < sc->sc_ncomp; i++)
-                       aprint_normal(" %s", device_xname(sc->sc_comps[i]));
+                   EHCI_HCS_N_PCC(sparams)!=1 ? "s" : "",
+                   sc->sc_ncomp!=1 ? " each" : "");
+               if (sc->sc_comps[0]) {
+                       aprint_normal(":");
+                       for (i = 0; i < sc->sc_ncomp; i++)
+                               aprint_normal(" %s",
+                                   device_xname(sc->sc_comps[i]));
+               }
                aprint_normal("\n");
        }
        sc->sc_noport = EHCI_HCS_N_PORTS(sparams);
@@ -2594,7 +2600,9 @@
                               "port %d to %s\n",
                               device_xname(sc->sc_dev),
                               lowspeed ? "low" : "full",
-                              index, device_xname(sc->sc_comps[i]));
+                              index, sc->sc_comps[i] ?
+                                device_xname(sc->sc_comps[i]) :
+                                "companion controller");
        } else {
                printf("%s: npcomp == 0\n", device_xname(sc->sc_dev));
        }



Home | Main Index | Thread Index | Old Index