From owner-freebsd-hackers Wed Sep 10 11:26:30 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA17989 for hackers-outgoing; Wed, 10 Sep 1997 11:26:30 -0700 (PDT) Received: from bitbox.follo.net (bitbox.follo.net [194.198.43.36]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA17970 for ; Wed, 10 Sep 1997 11:26:22 -0700 (PDT) Received: (from eivind@localhost) by bitbox.follo.net (8.8.6/8.8.6) id UAA02417; Wed, 10 Sep 1997 20:26:16 +0200 (MET DST) Date: Wed, 10 Sep 1997 20:26:16 +0200 (MET DST) Message-Id: <199709101826.UAA02417@bitbox.follo.net> From: Eivind Eklund To: freebsd-hackers@freebsd.org Subject: PnP support Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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 . 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.