From owner-freebsd-current Wed Apr 12 15:45:41 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id PAA28999 for current-outgoing; Wed, 12 Apr 1995 15:45:41 -0700 Received: from cs.weber.edu (cs.weber.edu [137.190.16.16]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id PAA28993 for ; Wed, 12 Apr 1995 15:45:39 -0700 Received: by cs.weber.edu (4.1/SMI-4.1.1) id AA19512; Wed, 12 Apr 95 16:39:05 MDT From: terry@cs.weber.edu (Terry Lambert) Message-Id: <9504122239.AA19512@cs.weber.edu> Subject: Re: Attention device-driver writers! To: wollman@halloran-eldar.lcs.mit.edu (Garrett Wollman) Date: Wed, 12 Apr 95 16:39:04 MDT Cc: current@FreeBSD.org In-Reply-To: <9504121934.AA07483@halloran-eldar.lcs.mit.edu> from "Garrett Wollman" at Apr 12, 95 03:34:05 pm X-Mailer: ELM [version 2.4dev PL52] Sender: current-owner@FreeBSD.org Precedence: bulk > A special raspberry goes to the PCI code, for getting the idea almost > completely inside-out. This is supposed to be DRIVER-driven, not > generic-bus-code-driven. I don't want to go fiddling fifteen > different PCI structures to provide the necessary information next > time I add a variable to the devconf interface! It was my impression that a bus attach *is* the way to handle the ISA, EISA, PCI, and VESA stuff. The thing I disagree with, which is what I think you are complaining about too, is that the drivers themselves should be largely unaware of what bus or whatever they are on. I think a special exception for stupid busses needs to be made in the case of an invasive probe procedure finding where the device lives. The magic in this case should be a flag to the attach routine to tell what kind of bus the machine thinks the card is on. When rightiousness hits the MB manufacturers and they install PCI slots with no ISA slots on new motherboards, there has to be a way to ensure that "all is right with the world". Not that I think a motherboard manufacturer can ever be truly rightious. 8-(. For PCI devices, the probe is implicit, and the attach is called. For ISA devices, the probe is in the attach, which must fail if it was called inerror. With a magic bus flag to the driver, those that support ISA can probe their brains out, and those that don't can locate themselves via callback. I think callbacks are and will continue to be an important mechanism for handling hot plug devices (like PCMCIA). ISA is *so* obnoxious. Terry Lambert terry@cs.weber.edu --- Any opinions in this posting are my own and not those of my present or previous employers.