From: Kyle McMartin Subject: Re: PATCHv3 2.6.17-rc5 tulip free_irq() called too late Date: Wed, 14 Jun 2006 09:05:06 -0400 Message-ID: <20060614130506.GA8556@skunkworks.cabal.ca> References: <20060531195234.GA4967@colo.lackof.org> <44883778.8000209@pobox.com> <20060608170120.GI8246@colo.lackof.org> <20060613235531.GA4191@colo.lackof.org> <448F5952.1060201@pobox.com> <20060614044412.GA30552@colo.lackof.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jeff Garzik , Valerie Henson , Andrew Morton , netdev@vger.kernel.org Return-path: Received: from stout.engsoc.carleton.ca ([134.117.69.22]:446 "EHLO stout.engsoc.carleton.ca") by vger.kernel.org with ESMTP id S964783AbWFNNTt (ORCPT ); Wed, 14 Jun 2006 09:19:49 -0400 To: Grant Grundler Content-Disposition: inline In-Reply-To: <20060614044412.GA30552@colo.lackof.org> Sender: netdev-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Tue, Jun 13, 2006 at 10:44:12PM -0600, Grant Grundler wrote: > On Tue, Jun 13, 2006 at 08:33:22PM -0400, Jeff Garzik wrote: > > Grant Grundler wrote: > > >o tulip_stop_rxtx() has to be called _after_ free_irq(). > > > ie. v2 patch didn't fix the original race condition > > > and when under test, dies about as fast as the original code. > > > > You made the race window smaller, but it's still there. The chip's DMA > > engines should be stopped before you unregister the interrupt handler. > > Switching the order to be: > tulip_stop_rxtx(tp); /* Stop DMA */ > free_irq (dev->irq, dev); /* no more races after this */ > I think the correct sequence would be: reset tulip interrupt mask flush posted write synchronize irq /* make sure we got 'em all */ tulip_stop_rxtx /* turn off dma */ free irq /* bye bye */ The synchronize irq guarantees we shouldn't see another irq generated by the card because it was held up somewhere. Cheers, Kyle M.