diff options
author | iedowse <iedowse@FreeBSD.org> | 2005-03-19 19:27:38 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2005-03-19 19:27:38 +0000 |
commit | 1aa8c2550879a4b3584d7b0dbe159fddafb848c1 (patch) | |
tree | 089cbec7b0da09cbf3f7e570a31faff1c91a0cde | |
parent | 9811c5568e8040e0da775b67cc461c212a6a1940 (diff) | |
download | FreeBSD-src-1aa8c2550879a4b3584d7b0dbe159fddafb848c1.zip FreeBSD-src-1aa8c2550879a4b3584d7b0dbe159fddafb848c1.tar.gz |
Now that all architectures allow hooks to be inserted before
configure_final(), assert that "cold" is true in usb_cold_explore()
when there are busses to explore. When USB is kldloaded after boot,
usb_cold_explore() will still get invoked but the list of busses
to explore in that case should always be empty.
-rw-r--r-- | sys/dev/usb/usb.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index 84420d7..d499d63 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -958,12 +958,8 @@ usb_cold_explore(void *arg) { struct usb_softc *sc; - /* XXX, on some archs this is called too late. */ - if (!cold) { - printf("usb_cold_explore: skipping because !cold\n"); - return; - } - + KASSERT(cold || TAILQ_EMPTY(&usb_coldexplist), + ("usb_cold_explore: busses to explore when !cold")); while (!TAILQ_EMPTY(&usb_coldexplist)) { sc = TAILQ_FIRST(&usb_coldexplist); TAILQ_REMOVE(&usb_coldexplist, sc, sc_coldexplist); |