From owner-cvs-all@FreeBSD.ORG Thu Aug 18 20:50:26 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B807116A421; Thu, 18 Aug 2005 20:50:26 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D89243D55; Thu, 18 Aug 2005 20:50:25 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[10.50.40.201]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Thu, 18 Aug 2005 17:05:25 -0400 From: John Baldwin To: Robert Watson Date: Thu, 18 Aug 2005 16:22:20 -0400 User-Agent: KMail/1.8 References: <200508181429.j7IET16d038533@repoman.freebsd.org> <200508181538.32988.jhb@FreeBSD.org> <20050818211150.W32515@fledge.watson.org> In-Reply-To: <20050818211150.W32515@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508181622.22292.jhb@FreeBSD.org> Cc: cvs-src@FreeBSD.org, Maxim.Sobolev@portaone.com, cvs-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/re if_re.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2005 20:50:27 -0000 On Thursday 18 August 2005 04:12 pm, Robert Watson wrote: > On Thu, 18 Aug 2005, John Baldwin wrote: > > I've still yet to see what the real panic is. For one thing, if the > > foo_stop method does its jobs, the ethernet hardware shouldn't be > > generating interrupts. The stop method should be shutting the card down > > (i.e. turning off the receiver and transmitter for example). Is your > > ethernet driver sharing an interrupt with another device and the other > > device is interrupting? In that case, the ethernet driver would have > > the same panic if you did an 'ifconfig foo0 down' and then the other > > device interrupted. So, I think clearing IFF_UPP in foo_shutdown() is > > wrong. foo_stop() should really be sufficient, and foo_intr() should be > > able to handle a spurious interrupt while the interface is stopped > > without panicing since it already needs to do so to handle the shared > > interrupt case. > > Ideally, I'd like to see device drivers stop setting or clearing > stack-owned bits, such as IFF_UP, IFF_PROMISC, etc. However, we probably > have a ways to go before we're there. Yes, and I think that since we clear RUNNING in the driver by calling foo_stop() when IFF_UP is cleared by the stack, the real fix is to change re_intr to check RUNNING rather than UP. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org