From owner-p4-projects@FreeBSD.ORG Mon Sep 25 19:06:28 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 83EC316A416; Mon, 25 Sep 2006 19:06:28 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62EFB16A403 for ; Mon, 25 Sep 2006 19:06:28 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31B8243D70 for ; Mon, 25 Sep 2006 19:06:27 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k8PJ6R3Z001241 for ; Mon, 25 Sep 2006 19:06:27 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k8PJ6RGX001238 for perforce@freebsd.org; Mon, 25 Sep 2006 19:06:27 GMT (envelope-from imp@freebsd.org) Date: Mon, 25 Sep 2006 19:06:27 GMT Message-Id: <200609251906.k8PJ6RGX001238@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 106679 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Sep 2006 19:06:28 -0000 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),