From owner-freebsd-hackers Wed Jun 6 9:53: 7 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id BD67D37B406; Wed, 6 Jun 2001 09:53:00 -0700 (PDT) (envelope-from imp@billy-club.village.org) Received: from billy-club.village.org (billy-club.village.org [10.0.0.3]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f56Gqx628881; Wed, 6 Jun 2001 10:52:59 -0600 (MDT) (envelope-from imp@billy-club.village.org) Received: from billy-club.village.org (localhost [127.0.0.1]) by billy-club.village.org (8.11.2/8.8.3) with ESMTP id f56GtRl00468; Wed, 6 Jun 2001 10:55:27 -0600 (MDT) Message-Id: <200106061655.f56GtRl00468@billy-club.village.org> To: Nick Hibma Subject: Re: Resource reservation idea Cc: Mike Smith , Jonathan Chen , hackers@FreeBSD.ORG In-reply-to: Your message of "Tue, 05 Jun 2001 19:15:30 BST." References: Date: Wed, 06 Jun 2001 10:55:27 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message Nick Hibma writes: : > > - Some dummy driver which grabs the resource. The dummy driver would : > > need to be unloaded when the actual driver needs the resources. : > : > This sounds attractive, but it's hard to find the dummy driver when : > you want to open the bidding for one or more devices again. You also end : > up with the ugly case where the device has more resources than the driver : > uses; you end up needing a placeholder of some sort for these as well, so : > you might as well just built it into the way the bus thinks about child : > devices and be done with it. : : It was suggested some time ago to do this by having a priority value : that indicates a dummy, say -10000. When a driver is loaded, all dummies : are detached and the probe is restarted. The dummies are quiet if not : cold booting to avoi a storm of dummies announcing themselves again and : again. There are some subtle problems with this approach. Specifically, if I have a card in a bus that can live at any address. I load a driver for this card, so the bus reprobes. If all I have to go by is these drivers that have reserved resources, then if we detach them all before doing this, we could have a situation where order matters and the device could get one of the other device's resources. I also recall having a problem by not detaching all the devices at once, but I can't recall what it is at the moment. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message