Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Apr 95 16:39:04 MDT
From:      terry@cs.weber.edu (Terry Lambert)
To:        wollman@halloran-eldar.lcs.mit.edu (Garrett Wollman)
Cc:        current@FreeBSD.org
Subject:   Re: Attention device-driver writers!
Message-ID:  <9504122239.AA19512@cs.weber.edu>
In-Reply-To: <9504121934.AA07483@halloran-eldar.lcs.mit.edu> from "Garrett Wollman" at Apr 12, 95 03:34:05 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9504122239.AA19512>