From owner-freebsd-arch@FreeBSD.ORG Wed Jul 21 12:29:23 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 765A616A4CE; Wed, 21 Jul 2004 12:29:23 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id C16C143D46; Wed, 21 Jul 2004 12:29:22 +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 i6LCTLZh083183; Wed, 21 Jul 2004 14:29:21 +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 13:20:31 BST." <1090412431.7114.13.camel@builder02.qubesoft.com> Date: Wed, 21 Jul 2004 14:29:21 +0200 Message-ID: <83182.1090412961@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 12:29:23 -0000 In message <1090412431.7114.13.camel@builder02.qubesoft.com>, Doug Rabson write s: >> The problem is that I cannot find the device_t without dereferencing >> the struct cdev (either for si_driver[12] or the dev_t) and by then >> it is too late. There is no way we can avoid refcounting on the cdev. > >Ok, so you are going to handle this in specfs (or whatever replaces >specfs)? That makes sense. That's the only way I can see to avoid tons of copy&paste code all over the drivers, because it's all the same for them. >Any ideas on how network interfaces should >work in this? I talked with Robert briefly about this yesterday, and the problem there is that struct ifnet is embedded in the softc. If the softc had a pointer to the ifnet, then we could do something similar, but as long as it's embedded we're stuck. -- 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.