mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-05 18:22:52 +00:00
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.
This commit is contained in:
parent
8e994188e2
commit
d7af3b881c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=122113
2 changed files with 9 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -458,6 +458,8 @@ struct hatm_softc {
|
|||
/* internal statistics */
|
||||
struct istats istats;
|
||||
|
||||
u_int mpsafe;
|
||||
|
||||
#ifdef HATM_DEBUG
|
||||
/* debugging */
|
||||
u_int debug;
|
||||
|
|
Loading…
Reference in a new issue