Module Name:    src
Committed By:   mrg
Date:           Tue Sep 18 05:37:54 UTC 2018

Modified Files:
        src/share/man/man4: usb.4
        src/sys/dev/usb: usb.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/share/man/man4/usb.4
cvs rdiff -u -r1.173 -r1.174 src/sys/dev/usb/usb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/usb.4
diff -u src/share/man/man4/usb.4:1.109 src/share/man/man4/usb.4:1.110
--- src/share/man/man4/usb.4:1.109	Sat Sep 30 13:39:41 2017
+++ src/share/man/man4/usb.4	Tue Sep 18 05:37:54 2018
@@ -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 @@ The
 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

Index: src/sys/dev/usb/usb.c
diff -u src/sys/dev/usb/usb.c:1.173 src/sys/dev/usb/usb.c:1.174
--- src/sys/dev/usb/usb.c:1.173	Tue Sep 18 05:24:10 2018
+++ src/sys/dev/usb/usb.c	Tue Sep 18 05:37:54 2018
@@ -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 @@ usb_doattach(device_t self)
 		}
 		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));

Reply via email to