Subject: Re: Device driver implementation question
To: None <email@example.com>
From: Mike Long <firstname.lastname@example.org>
Date: 01/07/1997 17:42:49
>Date: Tue, 7 Jan 1997 15:57:32 -0500 (EST)
>From: Ben Tober <email@example.com>
> I have noted that in -current, NetBSD is trying to move toward a more
>uniform and rational style for probing and attaching device drivers, and I
>think this is all well and good. I note, however, that, in the new regime
>(without __BROKEN_INDIRECT_CONFIG, which I take to be an interim hack), the
>match routine for the device has no access to a softc structure.
It shouldn't need a softc; everything it needs should be stored in the
isa_attach_args structure. All the match routine has to do is
determine if hardware it supports is present at the location given by
the isa_attach_args structure. It should do nothing else.
>Would it be proper for the probe routine to allocate some static
>state information and then for the attach routine to use that information
> Is it
>even currently possible for an ISA driver (either with the old or new style
>match function) to support the use of the * syntax in the config file or
>is explicit mention of each device always needed for all ISA devices?
The only exception would be a device like if_ep, which supports a
small number of hardwired port locations. The match routine can
examine each one (*); if it finds the hardware, it fills in the
isa_attach_args structure and returns a 1.
(*) each one that hasn't already been found; avoiding multiple hits at
the same location is one reason why we need <sys/extent.h>.
Mike Long <firstname.lastname@example.org> <URL:http://www.shore.net/~mikel>
VLSI Design Engineer finger email@example.com for PGP public key
Analog Devices, CPD Division CCBF225E7D3F7ECB2C8F7ABB15D9BE7B
Norwood, MA 02062 USA (eq (opinion 'ADI) (opinion 'mike)) -> nil