Source-Changes-HG archive

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

[src/trunk]: src Use the flags `locator' to govern if devices are detected ea...



details:   https://anonhg.NetBSD.org/src/rev/e0ff386783e4
branches:  trunk
changeset: 479833:e0ff386783e4
user:      augustss <augustss%NetBSD.org@localhost>
date:      Wed Dec 22 23:54:09 1999 +0000

description:
Use the flags `locator' to govern if devices are detected early or
late during cold boot.

diffstat:

 share/man/man4/usb.4 |  25 ++++++++++++++++++++++---
 sys/dev/usb/usb.c    |   4 ++--
 2 files changed, 24 insertions(+), 5 deletions(-)

diffs (64 lines):

diff -r 71c99fb53f36 -r e0ff386783e4 share/man/man4/usb.4
--- a/share/man/man4/usb.4      Wed Dec 22 23:21:21 1999 +0000
+++ b/share/man/man4/usb.4      Wed Dec 22 23:54:09 1999 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: usb.4,v 1.21 1999/12/06 14:52:08 augustss Exp $
+.\" $NetBSD: usb.4,v 1.22 1999/12/22 23:54:09 augustss Exp $
 .\"
 .\" Copyright (c) 1999 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -44,8 +44,8 @@
 .Cd "uhci*   at pci? dev ? function ?"
 .Cd "ohci*   at cardbus? dev ? function ?"
 .Cd "ohci*   at pci? dev ? function ?"
-.Cd "usb*    at uhci?"
-.Cd "usb*    at ohci?"
+.Cd "usb*    at uhci? flags X"
+.Cd "usb*    at ohci? flags X"
 .Cd "uhub*   at usb?"
 .Cd "uhub*   at uhub? port ? configuration ? interface ? vendor ? product ? release ?"
 .Cd "XX*     at uhub? port ? configuration ? interface ? vendor ? product ? release ?"
@@ -89,6 +89,25 @@
 .Tn 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
 
 .Sh SUPPORTED DEVICES
 .Nx
diff -r 71c99fb53f36 -r e0ff386783e4 sys/dev/usb/usb.c
--- a/sys/dev/usb/usb.c Wed Dec 22 23:21:21 1999 +0000
+++ b/sys/dev/usb/usb.c Wed Dec 22 23:54:09 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usb.c,v 1.35 1999/12/20 02:12:23 augustss Exp $        */
+/*     $NetBSD: usb.c,v 1.36 1999/12/22 23:54:09 augustss Exp $        */
 /*     $FreeBSD: src/sys/dev/usb/usb.c,v 1.20 1999/11/17 22:33:46 n_hibma Exp $        */
 
 /*
@@ -232,7 +232,7 @@
                 * until the USB event thread is running, which means that
                 * the keyboard will not work until after cold boot.
                 */
-               if (cold)
+               if (cold && (sc->sc_dev.dv_cfdata->cf_flags & 1))
                        dev->hub->explore(sc->sc_bus->root_hub);
 #endif
        } else {



Home | Main Index | Thread Index | Old Index