From owner-freebsd-current Sat Jan 27 13:11:17 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 C00BC37B400 for ; Sat, 27 Jan 2001 13:10:59 -0800 (PST) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id f0RLADe74076; Sat, 27 Jan 2001 15:10:13 -0600 (CST) (envelope-from jlemon) Date: Sat, 27 Jan 2001 15:10:13 -0600 (CST) From: Jonathan Lemon Message-Id: <200101272110.f0RLADe74076@prism.flugsvamp.com> To: jasone@canonware.com, current@freebsd.org Subject: Re: XXX driver didn't initialize queue mtx X-Newsgroups: local.mail.freebsd-current In-Reply-To: References: Organization: Cc: Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article 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