summaryrefslogtreecommitdiffstats
path: root/sys/dev/ti/if_ti.c
diff options
context:
space:
mode:
authormux <mux@FreeBSD.org>2003-06-13 20:46:34 +0000
committermux <mux@FreeBSD.org>2003-06-13 20:46:34 +0000
commit0137b15f49968623b32f9e536746dde5170d3f5d (patch)
treefe492332311030291a1ab86953f5544eb4583577 /sys/dev/ti/if_ti.c
parentf7f38ecf5e16741da29ba6bed03018570689c01a (diff)
downloadFreeBSD-src-0137b15f49968623b32f9e536746dde5170d3f5d.zip
FreeBSD-src-0137b15f49968623b32f9e536746dde5170d3f5d.tar.gz
Remove code that tries to detect if the MCLSHIFT and MSIZE macros
are the same that those of the kernel in the KLD_MODULE case. If we ever want to detect that kind of problems, this is not the right place to do this since every network driver would be affected by such desynchronisation.
Diffstat (limited to 'sys/dev/ti/if_ti.c')
-rw-r--r--sys/dev/ti/if_ti.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c
index 29806e0..ba09044 100644
--- a/sys/dev/ti/if_ti.c
+++ b/sys/dev/ti/if_ti.c
@@ -2056,38 +2056,6 @@ ti_probe(dev)
return(ENXIO);
}
-#ifdef KLD_MODULE
-static int
-log2rndup(int len)
-{
- int log2size = 0, t = len;
- while (t > 1) {
- log2size++;
- t >>= 1;
- }
- if (len != (1 << log2size))
- log2size++;
- return log2size;
-}
-
-static int
-ti_mbuf_sanity(device_t dev)
-{
- if ((mbstat.m_msize != MSIZE) || mbstat.m_mclbytes != MCLBYTES){
- device_printf(dev, "\n");
- device_printf(dev, "This module was compiled with "
- "-DMCLSHIFT=%d -DMSIZE=%d\n", MCLSHIFT,
- MSIZE);
- device_printf(dev, "The kernel was compiled with MCLSHIFT=%d,"
- " MSIZE=%d\n", log2rndup(mbstat.m_mclbytes),
- (int)mbstat.m_msize);
- return(EINVAL);
- }
- return(0);
-}
-#endif
-
-
static int
ti_attach(dev)
device_t dev;
@@ -2096,20 +2064,6 @@ ti_attach(dev)
struct ti_softc *sc;
int unit, error = 0, rid;
- sc = NULL;
-
-#ifdef KLD_MODULE
- if (ti_mbuf_sanity(dev)){
- device_printf(dev, "Module mbuf constants do not match "
- "kernel constants!\n");
- device_printf(dev, "Rebuild the module or the kernel so "
- "they match\n");
- device_printf(dev, "\n");
- error = EINVAL;
- goto fail;
- }
-#endif
-
sc = device_get_softc(dev);
unit = device_get_unit(dev);
OpenPOWER on IntegriCloud