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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message