Source-Changes-HG archive

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

[src/trunk]: src remove usb(4)'s "flags 1" code. it has been dead for a while,



details:   https://anonhg.NetBSD.org/src/rev/94b822acf061
branches:  trunk
changeset: 433512:94b822acf061
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Sep 18 05:37:54 2018 +0000

description:
remove usb(4)'s "flags 1" code.  it has been dead for a while,
as it runs during the interrupts part of configuration now,
and all the devices try attach as early as possible, including
any root or boot required disk or keyboard device, which is
what this flag was for.

diffstat:

 share/man/man4/usb.4 |  30 +++++-------------------------
 sys/dev/usb/usb.c    |  13 ++-----------
 2 files changed, 7 insertions(+), 36 deletions(-)

diffs (85 lines):

diff -r 5ec17039cbc5 -r 94b822acf061 share/man/man4/usb.4
--- a/share/man/man4/usb.4      Tue Sep 18 05:24:10 2018 +0000
+++ b/share/man/man4/usb.4      Tue Sep 18 05:37:54 2018 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: usb.4,v 1.109 2017/09/30 13:39:41 wiz Exp $
+.\" $NetBSD: usb.4,v 1.110 2018/09/18 05:37:54 mrg Exp $
 .\"
 .\" Copyright (c) 1999-2014 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -43,10 +43,10 @@
 .Cd "slhci*  at pcmcia? function ?"
 .Cd "uhci*   at cardbus? function ?"
 .Cd "uhci*   at pci? dev ? function ?"
-.Cd "usb*    at ehci? flags X"
-.Cd "usb*    at ohci? flags X"
-.Cd "usb*    at uhci? flags X"
-.Cd "usb*    at slhci? flags X"
+.Cd "usb*    at ehci?"
+.Cd "usb*    at ohci?"
+.Cd "usb*    at uhci?"
+.Cd "usb*    at slhci?"
 .Cd "uhub*   at usb?"
 .Cd "uhub*   at uhub? port ? configuration ? interface ? vendor ? product ? release ?"
 .Cd "XX*     at uhub? port ? configuration ? interface ? vendor ? product ? release ?"
@@ -82,26 +82,6 @@
 device controls USB hubs and must always be present since there is
 at least a root hub in any USB system.
 .Pp
-The
-.Va flags
-argument to the
-.Va usb
-device affects the order in which the device detection happens
-during cold boot.
-Normally, only the USB host controller and the
-.Va usb
-device are detected during the autoconfiguration when the
-machine is booted.
-The rest of the devices are detected once
-the system becomes functional and the kernel thread for the
-.Va usb
-device is started.
-Sometimes it is desirable to have a device detected early in the
-boot process, e.g., the console keyboard.
-To achieve this use a
-.Va flags
-value of 1.
-.Pp
 .Nx
 supports the following machine-independent USB drivers:
 .Ss Storage devices
diff -r 5ec17039cbc5 -r 94b822acf061 sys/dev/usb/usb.c
--- a/sys/dev/usb/usb.c Tue Sep 18 05:24:10 2018 +0000
+++ b/sys/dev/usb/usb.c Tue Sep 18 05:37:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usb.c,v 1.173 2018/09/18 05:24:10 mrg Exp $    */
+/*     $NetBSD: usb.c,v 1.174 2018/09/18 05:37:54 mrg Exp $    */
 
 /*
  * Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.173 2018/09/18 05:24:10 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.174 2018/09/18 05:37:54 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -368,15 +368,6 @@
                }
                sc->sc_bus->ub_roothub = dev;
                usb_create_event_thread(self);
-#if 1
-               /*
-                * Turning this code off will delay attachment of USB devices
-                * until the USB event thread is running, which means that
-                * the keyboard will not work until after cold boot.
-                */
-               if (cold && (device_cfdata(self)->cf_flags & 1))
-                       dev->ud_hub->uh_explore(sc->sc_bus->ub_roothub);
-#endif
        } else {
                aprint_error("%s: root hub problem, error=%s\n",
                             device_xname(self), usbd_errstr(err));



Home | Main Index | Thread Index | Old Index