Date: Mon, 25 Sep 2006 19:06:27 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 106679 for review Message-ID: <200609251906.k8PJ6RGX001238@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=106679 Change 106679 by imp@imp_lighthouse on 2006/09/25 19:05:44 Defer probing of mmc bus til we have a sane system running. Affected files ... .. //depot/projects/arm/src/sys/dev/mmc/mmc.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/dev/mmc/mmc.c#2 (text+ko) ==== @@ -40,6 +40,7 @@ struct mmc_softc { device_t dev; struct mtx sc_mtx; + struct intr_config_hook config_intrhook; }; /* bus entry points */ @@ -56,6 +57,8 @@ #define MMC_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); #define MMC_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); +static void mmc_delayed_attach(void *); + static int mmc_probe(device_t dev) { @@ -73,6 +76,11 @@ sc->dev = dev; MMC_LOCK_INIT(sc); + /* We'll probe and attach our children later, but before / mount */ + sc->config_intrhook.ich_func = mmc_delayed_attach; + sc->config_intrhook.ich_arg = sc; + if (config_intrhook_establish(&sc->config_intrhook) != 0) + device_printf(dev, "config_intrhook_establish failed\n"); return (0); } @@ -82,6 +90,15 @@ return (EBUSY); /* XXX */ } +static void +mmc_delayed_attach(void *xsc) +{ + struct mmc_softc *sc = xsc; + + device_printf(sc->dev, "insert mmc/sd probe code here\n"); + config_intrhook_disestablish(&sc->config_intrhook); +} + static device_method_t mmc_methods[] = { DEVMETHOD(device_probe, mmc_probe), DEVMETHOD(device_attach, mmc_attach),
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609251906.k8PJ6RGX001238>