From owner-freebsd-arch@FreeBSD.ORG Wed Jul 21 09:22:14 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 00FE016A4CE; Wed, 21 Jul 2004 09:22:13 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 613F343D1D; Wed, 21 Jul 2004 09:22:13 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i6L9Ldwj079981; Wed, 21 Jul 2004 11:21:44 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Doug Rabson From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 21 Jul 2004 10:10:07 BST." <200407211010.08159.dfr@nlsystems.com> Date: Wed, 21 Jul 2004 11:21:39 +0200 Message-ID: <79980.1090401699@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: arch@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: kldunload DIAGNOSTIC idea... X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2004 09:22:14 -0000 In message <200407211010.08159.dfr@nlsystems.com>, Doug Rabson writes: >The original intention was that drivers use the >device_busy()/device_unbusy() counter to handle these things. In some >cases, just calling device_busy() from fooopen() and device_unbusy() >from fooclose() is sufficient. That is not enough. All methods in cdevsw, and things not in cdevsw (clone handlers, call backs, etc etc) needs to refcount. I have a lot of this working in a tree here, and will commit it once I have gone over it a few more times. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.