diff options
author | harti <harti@FreeBSD.org> | 2003-11-05 11:47:31 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2003-11-05 11:47:31 +0000 |
commit | 13097932fd54d7bf541a4c909b45592eb2399ebe (patch) | |
tree | 62a4542b638b3bd0bdc5d3be79d588546ad2a88d | |
parent | dcdf96e89d044bf40de0e566b80a5e856e2a0c05 (diff) | |
download | FreeBSD-src-13097932fd54d7bf541a4c909b45592eb2399ebe.zip FreeBSD-src-13097932fd54d7bf541a4c909b45592eb2399ebe.tar.gz |
Make the driver conditionally MPSAFE. MPSAFEty defaults to not-mpsafe
but can be enabled by setting hw.atm.hatmN.mpsafe in the kernel
environment to a non-zero value before loading the driver. When
the problems with network MPSAFEty have been sorted out this will
be removed and the driver will default to MPSAFE.
-rw-r--r-- | sys/dev/hatm/if_hatm.c | 9 | ||||
-rw-r--r-- | sys/dev/hatm/if_hatmvar.h | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/hatm/if_hatm.c b/sys/dev/hatm/if_hatm.c index cb1b23b..a411d06 100644 --- a/sys/dev/hatm/if_hatm.c +++ b/sys/dev/hatm/if_hatm.c @@ -1399,6 +1399,11 @@ hatm_configure(struct hatm_softc *sc) kenv_getuint(sc, "max_mbuf_pages", &sc->mbuf_max_pages, HE_CONFIG_MAX_MBUF_PAGES, 0); + /* mpsafe */ + kenv_getuint(sc, "mpsafe", &sc->mpsafe, 0, 0); + if (sc->mpsafe != 0) + sc->mpsafe = INTR_MPSAFE; + return (0); } @@ -1936,8 +1941,8 @@ hatm_attach(device_t dev) bpfattach(ifp, DLT_ATM_RFC1483, sizeof(struct atmllc)); #endif - error = bus_setup_intr(dev, sc->irqres, INTR_TYPE_NET, hatm_intr, - &sc->irq_0, &sc->ih); + error = bus_setup_intr(dev, sc->irqres, sc->mpsafe | INTR_TYPE_NET, + hatm_intr, &sc->irq_0, &sc->ih); if (error != 0) { device_printf(dev, "could not setup interrupt\n"); hatm_detach(dev); diff --git a/sys/dev/hatm/if_hatmvar.h b/sys/dev/hatm/if_hatmvar.h index f2ea62f..2ca6f94 100644 --- a/sys/dev/hatm/if_hatmvar.h +++ b/sys/dev/hatm/if_hatmvar.h @@ -458,6 +458,8 @@ struct hatm_softc { /* internal statistics */ struct istats istats; + u_int mpsafe; + #ifdef HATM_DEBUG /* debugging */ u_int debug; |