From owner-freebsd-current@freebsd.org Wed Jul 1 20:58:22 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8162D9929F3 for ; Wed, 1 Jul 2015 20:58:22 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D5421690 for ; Wed, 1 Jul 2015 20:58:22 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: by widjy10 with SMTP id jy10so68195413wid.1 for ; Wed, 01 Jul 2015 13:58:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=nQDk1pTjyGhMpu0OjnCebxhPkcbeRrvutYaO2t+yt9I=; b=wOdAPrWOzaxn82I3pQ62BzRo9O9y13tsyd28oztIyoSDKCDjo1MYAgrhgX8LX4JnpE GmOnjxirEH6efUUhJzwm1c3eVX6LN1JMNXGUHUNkq3LiJuHiF+ly/xNChjbXAiTsMm4E 1BHERY036dDomyucGByfCBEvSVjS0WlsF4TvrLngzUP0Pa8N4WuZoBrDicUcmW1PFYXx 8I2hJYhz2zQgGrwQ8TnEcTQjm3KRYGKRJlIMNiOGRbtn585j1l7ePGhYyXFQjMdKHecy sm/4S6UUjBIJJKlbu2c1fKAuvokmVEil7FWZwsYNY5L9Fgnu16YVDPE4cI6OV6PS+5l+ /WgQ== MIME-Version: 1.0 X-Received: by 10.194.243.230 with SMTP id xb6mr52704014wjc.13.1435784300558; Wed, 01 Jul 2015 13:58:20 -0700 (PDT) Received: by 10.194.248.163 with HTTP; Wed, 1 Jul 2015 13:58:20 -0700 (PDT) In-Reply-To: References: Date: Wed, 1 Jul 2015 13:58:20 -0700 Message-ID: Subject: Re: How should a driver shutdown a taskqueue on detach? From: Jack Vogel To: Ryan Stone Cc: FreeBSD Current Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2015 20:58:22 -0000 But if you've disabled interrupts why would an "interrupt-handling task" even run?? Jack On Wed, Jul 1, 2015 at 12:44 PM, Ryan Stone wrote: > I'm trying to figure out how a driver is supposed to shut down its > interrupt-handling taskqueue when it detaches. taskqueue(9) recommends > disabling interrupts, draining each task and then freeing the taskqueue. > The problem that I have is the interrupt-handling tasks will sometimes > re-enable interrupts on the device. Is there a better way than using some > kind of flag internally in the driver to note that a detach is in progress > that the interrupt handlers will have to check before enabling interrupts? > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >