diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c index 861352e1648..008aa8a4ee7 100644 --- a/sys/dev/pccbb/pccbb.c +++ b/sys/dev/pccbb/pccbb.c @@ -499,6 +499,15 @@ cbb_event_thread(void *arg) } mtx_unlock(&Giant); + /* + * First time through we need to tell mountroot that we're + * done. + */ + if (sc->sc_root_token) { + root_mount_rel(sc->sc_root_token); + sc->sc_root_token = NULL; + } + /* * Wait until it has been 250ms since the last time we * get an interrupt. We handle the rest of the interrupt diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c index b8582b78fee..c89e5ad1f45 100644 --- a/sys/dev/pccbb/pccbb_pci.c +++ b/sys/dev/pccbb/pccbb_pci.c @@ -439,6 +439,7 @@ cbb_pci_attach(device_t brdev) device_printf(brdev, "unable to create event thread.\n"); panic("cbb_create_event_thread"); } + sc->sc_root_token = root_mount_hold(device_get_nameunit(sc->dev)); return (0); err: if (sc->irq_res) diff --git a/sys/dev/pccbb/pccbbvar.h b/sys/dev/pccbb/pccbbvar.h index a38e82e617d..64e0727c355 100644 --- a/sys/dev/pccbb/pccbbvar.h +++ b/sys/dev/pccbb/pccbbvar.h @@ -88,6 +88,7 @@ struct cbb_softc { struct proc *event_thread; void (*chipinit)(struct cbb_softc *); int powerintr; + struct root_hold_token *sc_root_token; }; /* result of detect_card */