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.
This commit is contained in:
mux 2003-06-13 20:46:34 +00:00
parent a365e55a6c
commit ffc0bcfded
2 changed files with 0 additions and 92 deletions

View File

@ -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);

View File

@ -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);