From owner-freebsd-current Sat Jan 27 13:20:10 2001 Delivered-To: freebsd-current@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id 3BC1E37B400; Sat, 27 Jan 2001 13:19:52 -0800 (PST) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id f0RLJ4M74398; Sat, 27 Jan 2001 15:19:04 -0600 (CST) (envelope-from jlemon) Date: Sat, 27 Jan 2001 15:19:04 -0600 From: Jonathan Lemon To: Jason Evans Cc: Matthew Jacob , jlemon@freebsd.org, freebsd-current@freebsd.org Subject: Re: XXX driver didn't initialize queue mtx Message-ID: <20010127151904.V29115@prism.flugsvamp.com> References: <20010127124149.O87569@canonware.com> <20010127130558.P87569@canonware.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <20010127130558.P87569@canonware.com> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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