Kernel Functions for Drivers scsihbainit(9F)
NAME
scsihbainit, scsihbafini - SCSI Host Bus Adapter system
initialization and completion routines
SYNOPSIS
#include
int scsihbainit(struct modlinkage *modlp);
void scsihbafini(struct modlinkage *modlp);
INTERFACE LEVEL
Solaris architecture specific (Solaris DI).
PARAMETERS
modlp Pointer to the Host Bus Adapters module linkage
structure.
DESCRIPTION
scsihbainit()
scsihbainit() is the system-provided initialization rou-
tine for SCSI HBA drivers. The scsihbainit() function
registers the HBA in the system and allows the driver to
accept configuration requests on behalf of SCSI target
drivers. The scsihbainit() routine must be called in the
HBA's init(9E) routine before modinstall(9F) is called. If
modinstall(9F) fails, the HBA's init(9E) should call
scsihbafini() before returning failure.
scsihbafini()
scsihbafini() is the system provided completion routine
for SCSI HBA drivers. scsihbafini() removes all of the
system references for the HBA that were created in
scsihbainit(). The scsihbafini() routine should be
called in the HBA's fini(9E) routine if modremove(9F) is
successful.
RETURN VALUES
scsihbainit() returns 0 if successful, and a non-zero
value otherwise. If scsihbainit() fails, the HBA's init()
entry point should return the value returned by
scsihbainit().
CONTEXT
scsihbainit() and scsihbafini() should be called from
init(9E) or fini(9E), respectively.
SunOS 5.11 Last change: 1 Nov 1993 1
Kernel Functions for Drivers scsihbainit(9F)
SEE ALSO
fini(9E), init(9E), modinstall(9F), modremove(9F),
scsipktalloc(9F), scsipktfree(9F), scsihbatran(9S)
Writing Device Drivers
NOTES
The HBA is responsible for ensuring that no DI request rou-
tines are called on behalf of its SCSI target drivers once
scsihbafini() is called.
SunOS 5.11 Last change: 1 Nov 1993 2
|