Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Dec 1996 13:37:41 +1030 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        tony@nlanr.net (Tony Sterrett)
Cc:        hackers@freebsd.org
Subject:   Re: xx_probe() in driver
Message-ID:  <199612280307.NAA00509@genesis.atrad.adelaide.edu.au>
In-Reply-To: <199612272353.PAA05947@nlanr.net> from Tony Sterrett at "Dec 27, 96 03:53:10 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Tony Sterrett stands accused of saying:
> 	I am write a driver with xx_probe(). I understand that the
> 	xx_probe() is called at system config time. How do I let the 
> 	system know I want xx_probe() called? BTW I've followed the
> 	rules for developing drivers my read routine works but
> 	my xx_probe() it not called.

You need a non-static isa_driver structure called 'xxdriver', which is
concatenated into a linker set at link time.  Look at any other device
driver for an example of this; basically yours would look like :

struct isa_driver xxdriver = { xx_probe, xx_attach, "xx", 0};

(Make the 0 a 1 if your hardware is very touchy about being probed and
you want a chance to go first for your nominated I/O space.)

Because of this, the only non-static function in your driver should be
the interrupt handler.

> Tony

-- 
]] Mike Smith, Software Engineer        msmith@gsoft.com.au             [[
]] Genesis Software                     genesis@gsoft.com.au            [[
]] High-speed data acquisition and      (GSM mobile)     0411-222-496   [[
]] realtime instrument control.         (ph)          +61-8-8267-3493   [[
]] Unix hardware collector.             "Where are your PEZ?" The Tick  [[



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