From owner-svn-src-all@FreeBSD.ORG Tue Jun 23 21:42:45 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4604E106568E; Tue, 23 Jun 2009 21:42:45 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id BF37A8FC17; Tue, 23 Jun 2009 21:42:44 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id n5NLDgeS046976; Tue, 23 Jun 2009 23:13:43 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.3/8.14.3/Submit) id n5NLDgDT046975; Tue, 23 Jun 2009 23:13:42 +0200 (CEST) (envelope-from marius) Date: Tue, 23 Jun 2009 23:13:42 +0200 From: Marius Strobl To: John Baldwin , yongari@freebsd.org Message-ID: <20090623211342.GJ71667@alchemy.franken.de> References: <200906232036.n5NKax9O089354@svn.freebsd.org> <200906231703.20496.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200906231703.20496.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r194763 - in head/sys: conf dev/gem modules/gem X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2009 21:42:45 -0000 On Tue, Jun 23, 2009 at 05:03:20PM -0400, John Baldwin wrote: > On Tuesday 23 June 2009 4:36:59 pm Marius Strobl wrote: > > Author: marius > > Date: Tue Jun 23 20:36:59 2009 > > New Revision: 194763 > > URL: http://svn.freebsd.org/changeset/base/194763 > > > > Log: > > - Initialize the ifnet structure, especially if_dname, before probing > > the PHYs as some PHY drivers use it (but probably shouldn't). How > > gem(4) has worked with brgphy(4) on powerpc without this so far is > > unclear to me. > > - Introduce a dying flag which is set during detach and checked in > > gem_ioctl() in order to prevent active BPF listeners to clear > > promiscuous mode which may lead to the tick callout being restarted > > which will trigger a panic once it's actually gone. > > This should not be needed assuming you follow a model of: > > gem_detach() > { > > ether_ifdetach(ifp); /* calls bpfdetach() */ > GEM_LOCK(sc); > gem_stop(sc); > GEM_UNLOCK(sc); > ... > } > > If you are invoking gem_stop() prior to ether_ifdetach() then that is your > real bug. :) > Okay, I'll let yongari@ comment on this as he was the one who claimed that either clearing IFF_UP in the driver before calling ether_ifdetach(9) (which I think is a layering violation) or the committed approach is necessary in order to solve the problem :) Marius