From owner-freebsd-arch@FreeBSD.ORG Fri Sep 12 11:26:37 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 C762B16A4D6 for ; Fri, 12 Sep 2003 11:26:37 -0700 (PDT) Received: from mail.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id E39EC43FE0 for ; Fri, 12 Sep 2003 11:26:36 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 24706 invoked from network); 12 Sep 2003 18:26:36 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 12 Sep 2003 18:26:36 -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 h8CIQV6Y055420; Fri, 12 Sep 2003 14:26:31 -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: <1063353880.5536.6.camel@herring.nlsystems.com> Date: Fri, 12 Sep 2003 14:26:30 -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 cc: "M. Warner Losh" 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: Fri, 12 Sep 2003 18:26:37 -0000 On 12-Sep-2003 Doug Rabson wrote: > On Fri, 2003-09-12 at 08:39, M. Warner Losh wrote: >> In message: >> John Baldwin writes: >> : How do you know which drivers to detach? Are you going to detach >> : the generic PCI ATA driver on every kldload? Are you going to >> : detach the generic PCI-PCI bridge driver for PCI-PCI bridges on >> : add-on cards for every kldload of a PCI driver? That would be >> : freaking insane. The problem is that you don't know what devices >> : a new driver might be more suitable for than existing drivers. >> >> This does suck. >> >> : > Besides, proble routines on self enumerating devices should look at >> : > the IDs that anybody can look at at any time. However, there are some >> : > issues with some drivers that have old/new versions or that need to >> : > ask the hardware what kind of thing it really is before making the >> : > call. These drivers are rare, thankfully, and even rarer are those >> : > that have different levels. owi/wi is the only one I know of that >> : > fits this bill, and the only reason owi is there is to help fix wi, so >> : > I don't think we should necessarily design to make this sort of thing >> : > too easy.... >> : >> : rl(4) and re(4)? Several drivers still allocate resources in probe(), >> : which would break things. >> >> yea, but that's a bit of a pathological case. first, rl/re attach to >> a specific driver, and not override. So maybe we could mandate that >> drivers that are generic and return negative return values should be >> constrained to only look at the plug and play info and are not allowed >> to look at resources. owi/wi is the only pair that does this >> evilness. > > This is why I was thinking about a device flag which a driver would set > if it is just a placeholder which can be pre-empted safely. Yes, I wish we had better drivers so we didn't have to do that, but that might be the best for now. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/