summaryrefslogtreecommitdiffstats
path: root/sys/dev/ce/if_ce.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2009-02-15 23:29:13 +0000
committerrwatson <rwatson@FreeBSD.org>2009-02-15 23:29:13 +0000
commit206de182c9214c0ba8642368e2a6c4a113812bf4 (patch)
tree9417c42ab1864f5d787903c5b3380ff77bf7265a /sys/dev/ce/if_ce.c
parent30dc79114abe5b3d74405b3ba7016d6ef1d69370 (diff)
downloadFreeBSD-src-206de182c9214c0ba8642368e2a6c4a113812bf4.zip
FreeBSD-src-206de182c9214c0ba8642368e2a6c4a113812bf4.tar.gz
Remove debug.ce.mpsafenet: we no longer support running the network
stack with conditional Giant acquisition, and IFF_NEEDSGIANT will be removed in the near future.
Diffstat (limited to 'sys/dev/ce/if_ce.c')
-rw-r--r--sys/dev/ce/if_ce.c48
1 files changed, 7 insertions, 41 deletions
diff --git a/sys/dev/ce/if_ce.c b/sys/dev/ce/if_ce.c
index 7b3ff87..efd6f00 100644
--- a/sys/dev/ce/if_ce.c
+++ b/sys/dev/ce/if_ce.c
@@ -127,35 +127,11 @@ __FBSDID("$FreeBSD$");
#define callout_drain callout_stop
#endif
-#if __FreeBSD_version >= 504000
#define CE_LOCK_NAME "ceX"
-static int ce_mpsafenet = 1;
-TUNABLE_INT("debug.ce.mpsafenet", &ce_mpsafenet);
-SYSCTL_NODE(_debug, OID_AUTO, ce, CTLFLAG_RD, 0, "Cronyx Tau32-PCI Adapters");
-SYSCTL_INT(_debug_ce, OID_AUTO, mpsafenet, CTLFLAG_RD, &ce_mpsafenet, 0,
- "Enable/disable MPSAFE network support for Cronyx Tau32-PCI Adapters");
-
-#define CE_LOCK(_bd) do { \
- if (ce_mpsafenet) \
- mtx_lock (&(_bd)->ce_mtx); \
- } while (0)
-#define CE_UNLOCK(_bd) do { \
- if (ce_mpsafenet) \
- mtx_unlock (&(_bd)->ce_mtx); \
- } while (0)
-
-#define CE_LOCK_ASSERT(_bd) do { \
- if (ce_mpsafenet) \
- mtx_assert (&(_bd)->ce_mtx, MA_OWNED); \
- } while (0)
-#else
-static int ce_mpsafenet = 0;
-
-#define CE_LOCK(_bd) do {} while (0 && (_bd) && ce_mpsafenet)
-#define CE_UNLOCK(_bd) do {} while (0 && (_bd) && ce_mpsafenet)
-#define CE_LOCK_ASSERT(_bd) do {} while (0 && (_bd) && ce_mpsafenet)
-#endif
+#define CE_LOCK(_bd) mtx_lock (&(_bd)->ce_mtx)
+#define CE_UNLOCK(_bd) mtx_unlock (&(_bd)->ce_mtx)
+#define CE_LOCK_ASSERT(_bd) mtx_assert (&(_bd)->ce_mtx, MA_OWNED)
#define CDEV_MAJOR 185
@@ -317,7 +293,6 @@ static struct cdevsw ce_cdevsw = {
.d_close = ce_close,
.d_ioctl = ce_ioctl,
.d_name = "ce",
- .d_flags = D_NEEDGIANT,
};
#endif
@@ -650,13 +625,13 @@ static int ce_attach (device_t dev)
return (ENXIO);
}
#if __FreeBSD_version >= 500000
- callout_init (&led_timo[unit], ce_mpsafenet ? CALLOUT_MPSAFE : 0);
+ callout_init (&led_timo[unit], CALLOUT_MPSAFE);
#else
callout_init (&led_timo[unit]);
#endif
error = bus_setup_intr (dev, bd->ce_irq,
#if __FreeBSD_version >= 500013
- INTR_TYPE_NET|(ce_mpsafenet?INTR_MPSAFE:0),
+ INTR_TYPE_NET|INTR_MPSAFE,
#else
INTR_TYPE_NET,
#endif
@@ -710,8 +685,7 @@ static int ce_attach (device_t dev)
}
#if __FreeBSD_version >= 500000
NG_NODE_SET_PRIVATE (d->node, d);
- callout_init (&d->timeout_handle,
- ce_mpsafenet ? CALLOUT_MPSAFE : 0);
+ callout_init (&d->timeout_handle, CALLOUT_MPSAFE);
#else
d->node->private = d;
#endif
@@ -755,10 +729,6 @@ static int ce_attach (device_t dev)
#endif
d->ifp->if_mtu = PP_MTU;
d->ifp->if_flags = IFF_POINTOPOINT | IFF_MULTICAST;
-#if __FreeBSD_version >= 502125
- if (!ce_mpsafenet)
- d->ifp->if_flags |= IFF_NEEDSGIANT;
-#endif
d->ifp->if_ioctl = ce_sioctl;
d->ifp->if_start = ce_ifstart;
d->ifp->if_watchdog = ce_ifwatchdog;
@@ -2608,10 +2578,6 @@ static int ce_modevent (module_t mod, int type, void *unused)
#if __FreeBSD_version < 500000
dev = makedev (CDEV_MAJOR, 0);
#endif
-#if __FreeBSD_version >= 502103
- if (ce_mpsafenet)
- ce_cdevsw.d_flags &= ~D_NEEDGIANT;
-#endif
switch (type) {
case MOD_LOAD:
@@ -2632,7 +2598,7 @@ static int ce_modevent (module_t mod, int type, void *unused)
cdevsw_add (&ce_cdevsw);
#endif
#if __FreeBSD_version >= 500000
- callout_init (&timeout_handle, ce_mpsafenet?CALLOUT_MPSAFE:0);
+ callout_init (&timeout_handle, CALLOUT_MPSAFE);
#else
callout_init (&timeout_handle);
#endif
OpenPOWER on IntegriCloud