Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Sep 1997 20:26:16 +0200 (MET DST)
From:      Eivind Eklund <perhaps@yes.no>
To:        freebsd-hackers@freebsd.org
Subject:   PnP support
Message-ID:  <199709101826.UAA02417@bitbox.follo.net>

next in thread | raw e-mail | index | archive | help

With the integration of the PnP drivers yesterday, I thought it was
time to play around a little, and attempted to convert a driver to use
PnP in addition to the normal ISA probes.  The PnP support seems like
a nice piece of work - most of it was exceedingly simple.

However, I had the following problems, and wonder if there is a stock
solution to them (they might just result from me not RTSLing well
enough, but answers might be enlightening to others too):

(1) I wanted the driver to be able to work with both PnP and ISA
cards.  However, the ISA probe mess up the card (or the internal
FreeBSD driver setup - I'm not certain, but it don't work unless I
inhibit the ISA probe).  What is the best way to inhibit this probe?
Presently, I just set a static variable and return false on the probe
if it is set, but I don't think that is a good solution.  I've thought
about setting the ISA card to disabled if PnP probes true, but somehow
don't find that aestecially pleasing, either (and I suspect it will be
saved in the kernel for the next boot, too).

(2) I found no way to report that the driver was unable to attach if
the probe came out true.  This might be me thinking approaching this
wrongly, but the default attach for this driver do some of the setup
for the card, and can fail.  Should this be re-arranged for most of
that work to be done during the probe, to be certain the attach can't
fail?  That would start messing with the card setup during the probe,
which doesn't seem right?

(3) The card reports as unknown0 <description>.  I assume this can be
changed somewhere, but didn't find it in the docs for the PnP code
(the man-page plus the .  Where do I fix this?  (A source file name
would be enough - I assume somebody can answer this with less work
than I would spend finding it ;-)

This is my first attempt at hardware driver hacking under FreeBSD, as
you probably can see from the level of the questions.  I'll contribute
the changes back when I get it to work properly (and I get my employer
to OK contributing this).

Eivind.



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