Date: Sat, 27 Jan 2001 15:19:04 -0600 From: Jonathan Lemon <jlemon@flugsvamp.com> To: Jason Evans <jasone@canonware.com> Cc: Matthew Jacob <mjacob@feral.com>, jlemon@freebsd.org, freebsd-current@freebsd.org Subject: Re: XXX driver didn't initialize queue mtx Message-ID: <20010127151904.V29115@prism.flugsvamp.com> In-Reply-To: <20010127130558.P87569@canonware.com> References: <20010127124149.O87569@canonware.com> <Pine.LNX.4.21.0101271246240.13274-100000@zeppo.feral.com> <20010127130558.P87569@canonware.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jan 27, 2001 at 01:05:58PM -0800, Jason Evans wrote:
> On Sat, Jan 27, 2001 at 12:48:36PM -0800, Matthew Jacob wrote:
> > Somewhere in between, Jason Evans wrote:
> > > 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.
> >
> > Shouldn't ether_ifattach initialize the mutex? Or do expect all drivers to
> > initialize these prior to calling ether_ifattach?
> >
> > Look- I just want to know what the people who put the check in *want*.....
>
> cvs annotate is your friend. The code was added in revision 1.95 of
> src/sys/net/if.c by Jonathan Lemon. Please talk to him about what should
> be done to fix the drivers.
Actually, the new check appears to be incorrect, as seen by the code
fragments below:
#define MTX_DEF 0x0 /* Default (spin/sleep) */
mtx_init(&ifp->if_snd.ifq_mtx, ifp->if_name, MTX_DEF);
mtx_init(... , flag)
{
...
m->mtx_flags = flag;
...
}
if (ifp->if_snd.ifq_mtx.mtx_flags == 0) {
So the warning will always be printed out even though the mutex is
correctly initialized.
--
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?20010127151904.V29115>
