From owner-cvs-all Mon May 10 10: 7:33 1999 Delivered-To: cvs-all@freebsd.org Received: from herring.nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (Postfix) with ESMTP id 90824158E0; Mon, 10 May 1999 10:07:04 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from localhost (dfr@localhost) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id SAA52907; Mon, 10 May 1999 18:07:06 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Mon, 10 May 1999 18:07:06 +0100 (BST) From: Doug Rabson To: Nick Hibma Cc: Peter Wemm , cvs-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/pci pcisupport.c In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk On Mon, 10 May 1999, Nick Hibma wrote: > > How would you unbind those stubs in case a module is loaded? > > As in, not load USB support at boottime. The stub would prevent the > module loaded later on from obtaining the device. > > In USB land we already have that problem (the generic driver that > attaches to anything not taken by any other driver). The solution there > is to detach anything called ugen\d+ when a module is loaded/before a > probe is done. > > An option would be to return as a priority PRIORITY_STUB, and, when > a new driver for PCI is loaded, detach anything that has attached at > this priority. > > > Or more general (for PCI that is): reprobe all the devices. If the > device is probed at a higher priority detach it from the old one and > reattach it to the new one. This assumes probes with no side effects. > This also is not compatible with the statement that anything that > probes at maximum priority can expect the device structs to be as it > left it after the probe. The scheme which I chose in the end uses negative numbers to represent priorities (I think you suggested this a while ago). As a special case, drivers which return zero stop the probing and are attached immediately. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message