From owner-freebsd-arch@FreeBSD.ORG Thu Sep 11 07:51:01 2003 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 D360216A4BF for ; Thu, 11 Sep 2003 07:51:01 -0700 (PDT) Received: from mail.speakeasy.net (mail14.speakeasy.net [216.254.0.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9CD843FE3 for ; Thu, 11 Sep 2003 07:50:58 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 4839 invoked from network); 11 Sep 2003 14:50:58 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 11 Sep 2003 14:50:58 -0000 Received: from laptop.baldwin.cx (p26.n-sfpop02.stsn.com [199.107.153.26]) by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id h8BEos6Y047929; Thu, 11 Sep 2003 10:50:54 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <1063268981.55877.9.camel@herring.nlsystems.com> Date: Thu, 11 Sep 2003 10:50:53 -0400 (EDT) From: John Baldwin To: Doug Rabson X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: arch@FreeBSD.org Subject: RE: When to burn those bridges 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: Thu, 11 Sep 2003 14:51:01 -0000 On 11-Sep-2003 Doug Rabson wrote: > On Wed, 2003-09-10 at 23:39, John Baldwin wrote: >> On 10-Sep-2003 Doug Rabson wrote: >> > >> > My feeling about that was always that the hostb driver provides >> > absolutely no added value in the system. When I was developing agp >> > originally, I just nuked it and kldloading agp.ko worked just fine. >> >> I don't mind if hostb were to die, but it does serve somewhat of a >> purpose. A dummy vga driver might also be useful with Warner's PCI >> power management stuff as well. > > A long time ago, I was thinking about a scheme where newbus would detach > a driver which had attached to a device at a very low priority if a new > driver was added via kldload. > > The way it might work is that a 'placeholder' driver like hostb would > mark the device with a flag, e.g. device_set_placeholder. When a new > driver is loaded, devices set as placeholders would be re-probed in > bus_generic_driver_added as well as devices with no drivers at all. If > the new driver probed with a higher value than the current placeholder > driver, in device_probe_and_attach, the old driver would be detached and > the new one attached. I have thought about this as well, but instead of a placeholder flag, just doing this for any driver that returned a probe value != 0. This relies on very simple probes however, since ideally you would want to execute the new driver's probe and if it matches better, then you detach the old driver and attach the new one. This requires that the new driver's probe not try to alloc resources or dink with the hardware though. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/