Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!vixen.cso.uiuc.edu!uxa.cso.uiuc.edu!rkb55989 From: rkb55989@uxa.cso.uiuc.edu (Rafal Boni) Newsgroups: comp.os.386bsd.development Subject: [Q] How should config file and device probe relate Date: 3 Sep 1993 00:41:27 GMT Organization: University of Illinois at Urbana Lines: 43 Message-ID: <2663rn$3k6@vixen.cso.uiuc.edu> NNTP-Posting-Host: uxa.cso.uiuc.edu Keywords: probe config drivers Hi all, I have been hacking around with an ethernet card driver, and came across a few questions I figured were of a relegious nature... And since these questions were of a religious nature, let me ask the *BSD gods how they should be resolved [;>]... (1) I have an Ethernet board that can be configured without any knowledge of the board's stored configuration. Basically, the board has a single IO port fixed at 0x100, in addition to it's bank of regularly used IO ports, and through this port, one can override the IObase of the board. Once the IObase is known, one can override the memsize, memaddr, and IRQ settings. For completeness' sake, let's say the board's entry in the config file look like this: device el0 at isa? port 0x300 net irq 10 iomem 0xd0000 iosiz 65536 vector elintr Which one of the following is the correct behavior for the probe routine: [or, more accurately, will doing things one way or another break expected behavior?? Will doing things one way break the general idea of how this should work??] (a) Initialize the board to use it's stored configuration, and if this configuration does not match that given in the the config file, fail the probe (b) Initialize the board to use the parameters given in the config file, ignoring all paramters stored in the board's NVRAM, and thus force the board to fit the config file's idea of where the board should be (2) How is this handled on 4.4/Sun/other BSD or BSD-ish systems??? Anyone? Any clues from the likes of Chris D. and the NetBSD group especially welcome... Rafal