sdi_findspec(D3I) sdi_findspec(D3I)
NAME
sdi_findspec - allocate a structure from the pool of
structures
SYNOPSIS
#include <sys/sdi.h>
struct dev_spec * sdi_findspec(struct sdi_edt *edtp,
struct dev_spec *dev_spec[])
Arguments
edtp Pointer to an EDT structure for the desired device.
dev_spec
An array of pointers to device specific functions
relative to each of the target driver entry points.
Return Values
Pointer to a dev_spec entry or NULL if no match is found.
DESCRIPTION
sdi_findspec finds a matching device specification routine.
Target drivers may need special handling of certain devices.
An example is a disk which requires a power-up command on the
first open. This routine looks for a match of an inquiry
string of a device against those kept in the dev_spec
structure defined in the Space.c file of the target driver.
USAGE
During a target driver init routine, the sdi_findspec is
called to get the dev_spec structure (if defined) of the
various function pointers of the device specific routines.
The device specific routines which can be defined are
first_open, last_close, intr, and the command helper. Only
the needed functions should be defined. Included in the
dev_spec structure is the inquiry string of the device which
has the need for the special functions. It is also possible
to define standard supported commands for the device and those
which should use the command helper routine.
Level
Base only.
REFERENCES
Space.c(4)
Copyright 1994 Novell, Inc. Page 1
sdi_findspec(D3I) sdi_findspec(D3I)
NOTICES
This routine will be removed in a future release of the
DDI/DKI.
NOTICES
Applicability
sdi: 1, 2
Copyright 1994 Novell, Inc. Page 2