From owner-svn-src-head@FreeBSD.ORG Fri May 8 13:44:34 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 666B7106566C; Fri, 8 May 2009 13:44:34 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 549418FC25; Fri, 8 May 2009 13:44:34 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n48DiYw6092607; Fri, 8 May 2009 13:44:34 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n48DiYJI092605; Fri, 8 May 2009 13:44:34 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200905081344.n48DiYJI092605@svn.freebsd.org> From: Andrew Thompson Date: Fri, 8 May 2009 13:44:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191912 - in head/sys/dev: ipw iwi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2009 13:44:34 -0000 Author: thompsa Date: Fri May 8 13:44:33 2009 New Revision: 191912 URL: http://svn.freebsd.org/changeset/base/191912 Log: Drain the tasks before the interface stop call in case a restart was queued. Modified: head/sys/dev/ipw/if_ipw.c head/sys/dev/iwi/if_iwi.c Modified: head/sys/dev/ipw/if_ipw.c ============================================================================== --- head/sys/dev/ipw/if_ipw.c Fri May 8 03:19:57 2009 (r191911) +++ head/sys/dev/ipw/if_ipw.c Fri May 8 13:44:33 2009 (r191912) @@ -404,13 +404,13 @@ ipw_detach(device_t dev) struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; + ieee80211_draintask(ic, &sc->sc_init_task); ipw_stop(sc); bpfdetach(ifp); ieee80211_ifdetach(ic); callout_drain(&sc->sc_wdtimer); - ieee80211_draintask(ic, &sc->sc_init_task); ipw_release(sc); Modified: head/sys/dev/iwi/if_iwi.c ============================================================================== --- head/sys/dev/iwi/if_iwi.c Fri May 8 03:19:57 2009 (r191911) +++ head/sys/dev/iwi/if_iwi.c Fri May 8 13:44:33 2009 (r191912) @@ -459,17 +459,17 @@ iwi_detach(device_t dev) struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; - iwi_stop(sc); - - bpfdetach(ifp); - ieee80211_ifdetach(ic); - /* NB: do early to drain any pending tasks */ ieee80211_draintask(ic, &sc->sc_radiontask); ieee80211_draintask(ic, &sc->sc_radiofftask); ieee80211_draintask(ic, &sc->sc_restarttask); ieee80211_draintask(ic, &sc->sc_disassoctask); + iwi_stop(sc); + + bpfdetach(ifp); + ieee80211_ifdetach(ic); + iwi_put_firmware(sc); iwi_release_fw_dma(sc);