Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jan 2001 15:10:13 -0600 (CST)
From:      Jonathan Lemon <jlemon@flugsvamp.com>
To:        jasone@canonware.com, current@freebsd.org
Subject:   Re: XXX driver didn't initialize queue mtx
Message-ID:  <200101272110.f0RLADe74076@prism.flugsvamp.com>
In-Reply-To: <local.mail.freebsd-current/20010127124149.O87569@canonware.com>
References:  <local.mail.freebsd-current/xzpy9vwizq4.fsf@flood.ping.uio.no> <local.mail.freebsd-current/Pine.LNX.4.21.0101271236100.13274-100000@zeppo.feral.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <local.mail.freebsd-current/20010127124149.O87569@canonware.com> you write:
>On Sat, Jan 27, 2001 at 12:36:41PM -0800, Matthew Jacob wrote:
>> 
>> Oh, I suppose, I did find that... well, mainly I wanted the person who made
>> the change to actually broadcast to NIC maintainers what the expectations
>> were...
>
>The code that prints these warnings out has existed for a while.  However,
>whoever added it made a bad assumption about the internals of the mutex
>implementation, so the code never got executed.  I "fixed" it last week, so
>the warnings get printed now.

Actually, I think it was correct at the time I added it.  Anything 
that calls if_attach (or ether_ifattach) will automatically have the
mutex correctly initialized, so the driver doesn't have to do anything
extra.

e.g.:

            ifp->if_name = "lo";
            ifp->if_unit = i++;
            ifp->if_snd.ifq_maxlen = ifqmaxlen;
            if_attach(ifp);


if_attach(ifp)
{
	....

        mtx_init(&ifp->if_snd.ifq_mtx, ifp->if_name, MTX_DEF);

	...
}

I'm not up-to-date with -current at the moment, so I'm not sure
why things aren't working any more.
--
Jonathan


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101272110.f0RLADe74076>