From owner-p4-projects@FreeBSD.ORG Tue Oct 2 07:04:46 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7521916A468; Tue, 2 Oct 2007 07:04:46 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F4AE16A420 for ; Tue, 2 Oct 2007 07:04:46 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1BF9013C457 for ; Tue, 2 Oct 2007 07:04:46 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l9274k7G006050 for ; Tue, 2 Oct 2007 07:04:46 GMT (envelope-from thompsa@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l9274keR006047 for perforce@freebsd.org; Tue, 2 Oct 2007 07:04:46 GMT (envelope-from thompsa@freebsd.org) Date: Tue, 2 Oct 2007 07:04:46 GMT Message-Id: <200710020704.l9274keR006047@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thompsa@freebsd.org using -f From: Andrew Thompson To: Perforce Change Reviews Cc: Subject: PERFORCE change 127089 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2007 07:04:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=127089 Change 127089 by thompsa@thompsa_heff on 2007/10/02 07:04:15 - Drain the taskqueue on detach or bad things happen - Fix check on FW_INITED Affected files ... .. //depot/projects/wifi/sys/dev/ipw/if_ipw.c#34 edit Differences ... ==== //depot/projects/wifi/sys/dev/ipw/if_ipw.c#34 (text+ko) ==== @@ -404,6 +404,10 @@ ipw_stop(sc); callout_drain(&sc->sc_wdtimer); + taskqueue_drain(taskqueue_fast, &sc->sc_init_task); + taskqueue_drain(taskqueue_fast, &sc->sc_scan_task); + taskqueue_drain(taskqueue_fast, &sc->sc_assoc_task); + taskqueue_drain(taskqueue_fast, &sc->sc_disassoc_task); if (ifp != NULL) { bpfdetach(ifp); @@ -2456,7 +2460,7 @@ * NB: don't try to do this if ipw_stop_master has * shutdown the firmware and disabled interrupts. */ - if (sc->flags & IPW_FLAG_FW_INITED) + if (!(sc->flags & IPW_FLAG_FW_INITED)) return (0); sc->flags &= ~IPW_FLAG_ASSOCIATED;